aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKevinthegreat <92656833+kevinthegreat1@users.noreply.github.com>2025-01-25 17:00:54 -0500
committerKevinthegreat <92656833+kevinthegreat1@users.noreply.github.com>2025-01-25 17:00:54 -0500
commit9182b9acbf7f85ce2e5d4a810e4e83c8a42f839f (patch)
treecf740d9add99d04ba14c609574f1389679a47f5b /src
parent233026b37d357bd3762b29c9503f5786ccd5b138 (diff)
downloadSkyblocker-9182b9acbf7f85ce2e5d4a810e4e83c8a42f839f.tar.gz
Skyblocker-9182b9acbf7f85ce2e5d4a810e4e83c8a42f839f.tar.bz2
Skyblocker-9182b9acbf7f85ce2e5d4a810e4e83c8a42f839f.zip
Fix individual waypoint command with empty area
Diffstat (limited to 'src')
-rw-r--r--src/main/java/de/hysky/skyblocker/skyblock/chat/ChatPositionShare.java2
-rw-r--r--src/main/java/de/hysky/skyblocker/skyblock/waypoint/IndividualWaypoint.java11
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) {