diff --git a/.gradle/8.4/checksums/checksums.lock b/.gradle/8.4/checksums/checksums.lock index 5712e41b677834e97f86adaa9192ecc6a62b3168..21145f43f22d432f1ca21841bfb56896bf25d877 100644 Binary files a/.gradle/8.4/checksums/checksums.lock and b/.gradle/8.4/checksums/checksums.lock differ diff --git a/.gradle/8.4/checksums/md5-checksums.bin b/.gradle/8.4/checksums/md5-checksums.bin index b6e06d545e5f88b788999b8f70e1540c0565b3af..7bd557f6811d1159c5e82a8a9eab8bbc2e08385c 100644 Binary files a/.gradle/8.4/checksums/md5-checksums.bin and b/.gradle/8.4/checksums/md5-checksums.bin differ diff --git a/.gradle/8.4/checksums/sha1-checksums.bin b/.gradle/8.4/checksums/sha1-checksums.bin index cd6a19a68bfbad44d3878aa0f296b5e52226c2c0..d2bb349bb4c258c7fde3ce33a587d8f0ee7296e1 100644 Binary files a/.gradle/8.4/checksums/sha1-checksums.bin and b/.gradle/8.4/checksums/sha1-checksums.bin differ diff --git a/.gradle/8.4/executionHistory/executionHistory.bin b/.gradle/8.4/executionHistory/executionHistory.bin index e282a8a47212697d026107fdc9e8732d8b624ee1..2860b5ad8db1eaaba3ab8a04b4ea20f547e54938 100644 Binary files a/.gradle/8.4/executionHistory/executionHistory.bin and b/.gradle/8.4/executionHistory/executionHistory.bin differ diff --git a/.gradle/8.4/executionHistory/executionHistory.lock b/.gradle/8.4/executionHistory/executionHistory.lock index 8471de5fadd7b090dbd7121816fe3dadfc83be50..415c1df60e9d29d6c070a84563bd1d8886d27ba5 100644 Binary files a/.gradle/8.4/executionHistory/executionHistory.lock and b/.gradle/8.4/executionHistory/executionHistory.lock differ diff --git a/.gradle/8.4/fileHashes/fileHashes.bin b/.gradle/8.4/fileHashes/fileHashes.bin index 601b25fbbb8c11e91f94c98ff51add5c1cf7d661..f9bee2717ce60e5847a0856cc3707a54aa42da19 100644 Binary files a/.gradle/8.4/fileHashes/fileHashes.bin and b/.gradle/8.4/fileHashes/fileHashes.bin differ diff --git a/.gradle/8.4/fileHashes/fileHashes.lock b/.gradle/8.4/fileHashes/fileHashes.lock index cd278fd59a00764b9c191b58d19903c6faca0a1d..d707fa81aea764b0f0abf00743be7980591f100d 100644 Binary files a/.gradle/8.4/fileHashes/fileHashes.lock and b/.gradle/8.4/fileHashes/fileHashes.lock differ diff --git a/.gradle/8.4/fileHashes/resourceHashesCache.bin b/.gradle/8.4/fileHashes/resourceHashesCache.bin index 2ed0cd57ad075821e866dd985cc1411c4cc0aa7f..27c3d972a9477a076e02b67dd685ac17da28e22d 100644 Binary files a/.gradle/8.4/fileHashes/resourceHashesCache.bin and b/.gradle/8.4/fileHashes/resourceHashesCache.bin differ diff --git a/.gradle/buildOutputCleanup/buildOutputCleanup.lock b/.gradle/buildOutputCleanup/buildOutputCleanup.lock index 09cf17184588a0fbb491e48734d8746bd8e2536b..b2026c4464da2a06ca3dd2d4a58874c2be6c25c9 100644 Binary files a/.gradle/buildOutputCleanup/buildOutputCleanup.lock and b/.gradle/buildOutputCleanup/buildOutputCleanup.lock differ diff --git a/.idea/compiler.xml b/.idea/compiler.xml index 27f993c8646b262de50751d320ace97b3b4f8b88..b2775cf687d8855c2f2cbbed30dc7b331187759f 100644 --- a/.idea/compiler.xml +++ b/.idea/compiler.xml @@ -5,7 +5,7 @@ <profile name="Gradle Imported" enabled="true"> <outputRelativeToContentRoot value="true" /> <processorPath useClasspath="false"> - <entry name="$USER_HOME$/.gradle/caches/modules-2/files-2.1/com.velocitypowered/velocity-api/3.3.0-SNAPSHOT/e0222d8c76d1f9fba74fed95d46759946354228c/velocity-api-3.3.0-SNAPSHOT.jar" /> + <entry name="$USER_HOME$/.gradle/caches/modules-2/files-2.1/com.velocitypowered/velocity-api/3.3.0-SNAPSHOT/8059f7df2108d84ea9cdca685c57214cac31fb83/velocity-api-3.3.0-SNAPSHOT.jar" /> <entry name="$USER_HOME$/.gradle/caches/modules-2/files-2.1/com.moandjiezana.toml/toml4j/0.7.2/a03337911d0bd2c40932aca3946edb30d0e7d0c/toml4j-0.7.2.jar" /> <entry name="$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.spongepowered/configurate-gson/4.1.2/3e5c7a0ea73e95ce6139fa72f1b6d36eb531ab81/configurate-gson-4.1.2.jar" /> <entry name="$USER_HOME$/.gradle/caches/modules-2/files-2.1/net.kyori/adventure-text-logger-slf4j/4.16.0/a2e7eadb8d26481fb3da619a761cf3a47a1da43f/adventure-text-logger-slf4j-4.16.0.jar" /> diff --git a/.idea/gradle.xml b/.idea/gradle.xml index 8e1534f45f49352789537a60235c4cc70d9f503d..ce1c62c7c60561be6b5a9bc9f115e8966e9e5a4a 100644 --- a/.idea/gradle.xml +++ b/.idea/gradle.xml @@ -11,14 +11,6 @@ </set> </option> </GradleProjectSettings> - <GradleProjectSettings> - <option name="externalProjectPath" value="$PROJECT_DIR$" /> - <option name="modules"> - <set> - <option value="$PROJECT_DIR$" /> - </set> - </option> - </GradleProjectSettings> </option> </component> </project> \ No newline at end of file diff --git a/build/classes/java/main/CommandDisable/CommandDisable.class b/build/classes/java/main/CommandDisable/CommandDisable.class new file mode 100644 index 0000000000000000000000000000000000000000..60bfcee106bd74a140ea016ea0d619c30faa6aad Binary files /dev/null and b/build/classes/java/main/CommandDisable/CommandDisable.class differ diff --git a/build/classes/java/main/HubCommand/HubCommand.class b/build/classes/java/main/HubCommand/HubCommand.class index 123466a30cebd350c8b5e01e9fc2f356e1b12c43..71388a72025c55ec9bfd74b557adfe84ea6cf7c1 100644 Binary files a/build/classes/java/main/HubCommand/HubCommand.class and b/build/classes/java/main/HubCommand/HubCommand.class differ diff --git a/build/classes/java/main/org/fsi/pixelcampusproxy/PixelcampusProxy.class b/build/classes/java/main/org/fsi/pixelcampusproxy/PixelcampusProxy.class index 324e0896b5b8a89da2872943db3b87e98ab70c21..befd271b0a8290a0816debb8973c6a53acb5ce25 100644 Binary files a/build/classes/java/main/org/fsi/pixelcampusproxy/PixelcampusProxy.class and b/build/classes/java/main/org/fsi/pixelcampusproxy/PixelcampusProxy.class differ diff --git a/build/libs/PixelcampusProxy-1.0.jar b/build/libs/PixelcampusProxy-1.0.jar index 7d4f040329c57ddefa12dbee6e1527cc150b59b1..bda558d61707d33dced8f1274726704fc174d71d 100644 Binary files a/build/libs/PixelcampusProxy-1.0.jar and b/build/libs/PixelcampusProxy-1.0.jar differ diff --git a/build/tmp/compileJava/previous-compilation-data.bin b/build/tmp/compileJava/previous-compilation-data.bin index bf4dda41c08789cf4826d3c7c878e7601c260588..dbed214889e96173708e9b9b060a62143d50cf59 100644 Binary files a/build/tmp/compileJava/previous-compilation-data.bin and b/build/tmp/compileJava/previous-compilation-data.bin differ diff --git a/src/main/java/HubCommand/HubCommand.java b/src/main/java/HubCommand/HubCommand.java index fdf9dbceae8c29c2436dd1c0f968449dc2002354..7b48d7acd7b658af4185467c5d3e45f14c1cec3d 100644 --- a/src/main/java/HubCommand/HubCommand.java +++ b/src/main/java/HubCommand/HubCommand.java @@ -3,6 +3,7 @@ package HubCommand; import com.velocitypowered.api.command.CommandSource; import com.velocitypowered.api.command.SimpleCommand; import com.velocitypowered.api.proxy.Player; +import com.velocitypowered.api.proxy.ServerConnection; import net.kyori.adventure.text.Component; import net.kyori.adventure.text.format.NamedTextColor; import org.fsi.pixelcampusproxy.PixelcampusProxy; @@ -12,6 +13,7 @@ import java.util.concurrent.CompletableFuture; public class HubCommand implements SimpleCommand { + private final String lobbyName = "lobby"; //todo: config dafür erstellen @Override public void execute(Invocation invocation) { @@ -19,9 +21,17 @@ public class HubCommand implements SimpleCommand { if(source instanceof Player p){ + ServerConnection currentServer = p.getCurrentServer().orElse(null); + + + if(currentServer != null && currentServer.getServerInfo().getName().equals(lobbyName)){ + p.sendMessage(Component.text("You are already in " + lobbyName).color(NamedTextColor.RED)); + return; + } + try { p.createConnectionRequest( - PixelcampusProxy.getProxy().getServer("lobby").orElse(null) + PixelcampusProxy.getProxy().getServer(lobbyName).orElse(null) ).connect(); }catch (Exception e){