diff options
| author | Kevinthegreat <92656833+kevinthegreat1@users.noreply.github.com> | 2025-01-25 17:00:54 -0500 |
|---|---|---|
| committer | Kevinthegreat <92656833+kevinthegreat1@users.noreply.github.com> | 2025-01-25 17:00:54 -0500 |
| commit | 9182b9acbf7f85ce2e5d4a810e4e83c8a42f839f (patch) | |
| tree | cf740d9add99d04ba14c609574f1389679a47f5b | |
| parent | 233026b37d357bd3762b29c9503f5786ccd5b138 (diff) | |
| download | Skyblocker-9182b9acbf7f85ce2e5d4a810e4e83c8a42f839f.tar.gz Skyblocker-9182b9acbf7f85ce2e5d4a810e4e83c8a42f839f.tar.bz2 Skyblocker-9182b9acbf7f85ce2e5d4a810e4e83c8a42f839f.zip | |
Fix individual waypoint command with empty area
| -rw-r--r-- | src/main/java/de/hysky/skyblocker/skyblock/chat/ChatPositionShare.java | 2 | ||||
| -rw-r--r-- | src/main/java/de/hysky/skyblocker/skyblock/waypoint/IndividualWaypoint.java | 11 |
2 files changed, 10 insertions, 3 deletions
diff --git a/src/main/java/de/hysky/skyblocker/skyblock/chat/ChatPositionShare.java b/src/main/java/de/hysky/skyblocker/skyblock/chat/ChatPositionShare.java index 92f17a5f..71f34a94 100644 --- a/src/main/java/de/hysky/skyblocker/skyblock/chat/ChatPositionShare.java +++ b/src/main/java/de/hysky/skyblocker/skyblock/chat/ChatPositionShare.java @@ -74,7 +74,7 @@ public class ChatPositionShare { MutableText requestMessage = Constants.PREFIX.get().append(Text.translatable("skyblocker.config.chat.waypoints.display").formatted(Formatting.AQUA) .styled(style -> style .withHoverEvent(new HoverEvent(HoverEvent.Action.SHOW_TEXT, Text.translatable("skyblocker.config.chat.waypoints.display"))) - .withClickEvent(new ClickEvent(ClickEvent.Action.RUN_COMMAND, command)) + .withClickEvent(new ClickEvent(ClickEvent.Action.RUN_COMMAND, command.trim())) ) ); if (!area.isEmpty()) { diff --git a/src/main/java/de/hysky/skyblocker/skyblock/waypoint/IndividualWaypoint.java b/src/main/java/de/hysky/skyblocker/skyblock/waypoint/IndividualWaypoint.java index 02fc24c2..b493c241 100644 --- a/src/main/java/de/hysky/skyblocker/skyblock/waypoint/IndividualWaypoint.java +++ b/src/main/java/de/hysky/skyblocker/skyblock/waypoint/IndividualWaypoint.java @@ -47,11 +47,18 @@ public class IndividualWaypoint extends NamedWaypoint { StringArgumentType.getString(context, "area") )) ) + .executes(context -> setWaypoint( + context.getSource()::sendFeedback, + IntegerArgumentType.getInteger(context, "x"), + IntegerArgumentType.getInteger(context, "y"), + IntegerArgumentType.getInteger(context, "z"), + "" + )) ) ) ) - ))) - ); + )) + )); } public IndividualWaypoint(BlockPos pos, Text name, float[] colorComponents) { |
