diff options
author | HacktheTime <l4bg0jb7@duck.com> | 2023-09-26 17:01:49 +0200 |
---|---|---|
committer | HacktheTime <l4bg0jb7@duck.com> | 2023-09-26 17:01:49 +0200 |
commit | 1e8c85d2bbf1d8a6fb7bc125becd790c15654dbe (patch) | |
tree | ebdbf63e2f7cd08ee162f8dd17ae784d680d671b /src/main/java/de/hype/bbsentials/client/Commands | |
parent | 9d673ac2a30da174b17978b78a1af49a915df677 (diff) | |
download | BBsentials-1e8c85d2bbf1d8a6fb7bc125becd790c15654dbe.tar.gz BBsentials-1e8c85d2bbf1d8a6fb7bc125becd790c15654dbe.tar.bz2 BBsentials-1e8c85d2bbf1d8a6fb7bc125becd790c15654dbe.zip |
null pointer connection bug fixes
added contributers to mod json
Diffstat (limited to 'src/main/java/de/hype/bbsentials/client/Commands')
-rw-r--r-- | src/main/java/de/hype/bbsentials/client/Commands/CommandsOLD.java | 25 |
1 files changed, 4 insertions, 21 deletions
diff --git a/src/main/java/de/hype/bbsentials/client/Commands/CommandsOLD.java b/src/main/java/de/hype/bbsentials/client/Commands/CommandsOLD.java index 11b3dda..74de17a 100644 --- a/src/main/java/de/hype/bbsentials/client/Commands/CommandsOLD.java +++ b/src/main/java/de/hype/bbsentials/client/Commands/CommandsOLD.java @@ -158,7 +158,7 @@ public class CommandsOLD { .then(ClientCommandManager.argument("Z", IntegerArgumentType.integer()) .then(ClientCommandManager.argument("ContactWay", StringArgumentType.string()) .suggests(((context, builder) -> { - return CommandSource.suggestMatching(new String[]{"/msg " + getConfig().getUsername() + " bb:party me", "/p join " + config.getUsername()}, builder); + return CommandSource.suggestMatching(new String[]{"\"/msg " + getConfig().getUsername() + " bb:party me\"", "\"/p join " + config.getUsername()+"\""}, builder); })) .executes((context) -> { String item = StringArgumentType.getString(context, "Item"); @@ -180,23 +180,6 @@ public class CommandsOLD { });/*chchest*/ event.register((dispatcher, registryAccess) -> { dispatcher.register( - ClientCommandManager.literal("bbserver") - .then(ClientCommandManager.argument("Message", StringArgumentType.greedyString()) - .executes((context) -> { - String message = StringArgumentType.getString(context, "Message"); - if (message.equals("bb:reconnect")) { - BBsentials.connectToBBserver(); - } - else { - BBsentials.bbserver.sendMessage(message); - } - return 1; - }) - ) - ); - });/*BBserver*/ - event.register((dispatcher, registryAccess) -> { - dispatcher.register( ClientCommandManager.literal("bc") .then(ClientCommandManager.argument("Message to Bingo Chat", StringArgumentType.greedyString()) .executes((context) -> { @@ -283,7 +266,7 @@ public class CommandsOLD { ) .executes((context) -> { int hub = IntegerArgumentType.getInteger(context, "Hub"); - String location = "bea"; + String location = StringArgumentType.getString(context, "location"); boolean lessWaste = Boolean.parseBoolean(StringArgumentType.getString(context, "lasswaste")); splashAnnounce(hub, location, "", lessWaste); return 1; @@ -291,7 +274,7 @@ public class CommandsOLD { )) .executes((context) -> { int hub = IntegerArgumentType.getInteger(context, "Hub"); - String location = StringArgumentType.getString(context, "location"); + String location = "bea"; splashAnnounce(hub, location, "", true); return 1; }) @@ -320,7 +303,7 @@ public class CommandsOLD { ClientCommandManager.literal(commandName) .executes((context) -> { try { - BBsentials.bbserver.sendPacket(new MiningEventPacket(event,//TODO get the island + BBsentials.bbserver.sendPacket(new MiningEventPacket(event, config.getUsername(), Objects.requireNonNull(BBUtils.getCurrentIsland()))); } catch (Exception e) { Chat.sendPrivateMessageToSelf("§c" + e.getMessage()); |