Skip to content

Commit

Permalink
base
Browse files Browse the repository at this point in the history
  • Loading branch information
xxAROX committed Jul 14, 2024
1 parent 4e824d4 commit 812aea1
Show file tree
Hide file tree
Showing 6 changed files with 799 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .idea/copyright/profiles_settings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/copyright/xxAROX.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

84 changes: 84 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright (c) 2024. By Jan-Michael Sohn also known as @xxAROX.
~ This program is free software: you can redistribute it and/or modify
~ it under the terms of the GNU Affero General Public License as
~ published by the Free Software Foundation, either version 3 of the
~ License, or (at your option) any later version.
~ This program is distributed in the hope that it will be useful,
~ but WITHOUT ANY WARRANTY; without even the implied warranty of
~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
~ GNU Affero General Public License for more details.
~ You should have received a copy of the GNU Affero General Public License
~ along with this program. If not, see <https://www.gnu.org/licenses/>.
-->

<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<groupId>xxAROX.PresenceMan</groupId>
<artifactId>WaterdogPE</artifactId>
<version>2.0-SNAPSHOT</version>

<properties>
<maven.compiler.source>18</maven.compiler.source>
<maven.compiler.target>18</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>

<repositories>
<repository>
<id>nukkitx-repo-release</id>
<url>https://repo.opencollab.dev/maven-releases/</url>
</repository>
<repository>
<id>nukkitx-repo-snapshot</id>
<url>https://repo.opencollab.dev/maven-snapshots/</url>
</repository>
<repository>
<id>waterdog</id>
<url>https://repo.waterdog.dev/artifactory/main/</url>
</repository>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
</repositories>

<dependencies>
<dependency>
<groupId>dev.waterdog.waterdogpe</groupId>
<artifactId>waterdog</artifactId>
<version>2.0.2-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.github.xxAROX</groupId>
<artifactId>WD-Forms</artifactId>
<version>2.1.3</version>
</dependency>
<dependency>
<groupId>com.github.xxAROX</groupId>
<artifactId>WebRequester</artifactId>
<version>latest</version>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.0</version>
<configuration>
<encoding>UTF-8</encoding>
<source>16</source>
<target>16</target>
</configuration>
</plugin>
</plugins>
</build>

</project>
27 changes: 27 additions & 0 deletions src/main/java/xxAROX/PresenceMan/WaterdogPE/entity/Gateway.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
/*
* Copyright (c) 2024. By Jan-Michael Sohn also known as @xxAROX.
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/

package xxAROX.PresenceMan.WaterdogPE.entity;

public final class Gateway {
public static String protocol = "http://";
public static String address = "127.0.0.1";
public static Integer port = null;
public static boolean broken = false;

public static String getUrl() throws RuntimeException{
if (broken) throw new RuntimeException("Presence-Man Backend server is not reachable");
return protocol + address + (port != null ? ":" + port : "");
}
}
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
/*
* Copyright (c) 2024. By Jan-Michael Sohn also known as @xxAROX.
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/

package xxAROX.PresenceMan.WaterdogPE.utils;

import java.util.Arrays;
Expand Down
Loading

0 comments on commit 812aea1

Please sign in to comment.