From 11d772a32b0377ec08af64ea6fc146fa79b9c734 Mon Sep 17 00:00:00 2001 From: Sebastian Hartte Date: Sat, 15 Aug 2020 17:44:28 +0200 Subject: [PATCH] Fixed client-side only Text methods. --- .../server/subcommands/SpatialStorageCommand.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/main/java/appeng/server/subcommands/SpatialStorageCommand.java b/src/main/java/appeng/server/subcommands/SpatialStorageCommand.java index 43cc248b6..febeb74cd 100644 --- a/src/main/java/appeng/server/subcommands/SpatialStorageCommand.java +++ b/src/main/java/appeng/server/subcommands/SpatialStorageCommand.java @@ -92,7 +92,7 @@ public class SpatialStorageCommand implements ISubCommand { private void teleportBack(ServerCommandSource source) { if (source.getWorld().getRegistryKey() != SpatialStorageDimensionIds.WORLD_ID) { - throw new CommandException(Text.of("Must be within the spatial storage world.")); + throw new CommandException(new LiteralText("Must be within the spatial storage world.")); } BlockPos playerPos = new BlockPos(source.getPosition()); @@ -181,7 +181,7 @@ public class SpatialStorageCommand implements ISubCommand { sendKeyValuePair(source, "Source", sourceLink); sendKeyValuePair(source, "When", lastTransition.getTimestamp().toString()); } else { - source.sendFeedback(Text.of("Last Transition unknown"), true); + source.sendFeedback(new LiteralText("Last Transition unknown"), true); } } @@ -265,7 +265,7 @@ public class SpatialStorageCommand implements ISubCommand { return style -> style.withFormatting(Formatting.UNDERLINE) .withClickEvent(new ClickEvent(ClickEvent.Action.RUN_COMMAND, command)) - .withHoverEvent(new HoverEvent(HoverEvent.Action.SHOW_TEXT, Text.of(tooltip))); + .withHoverEvent(new HoverEvent(HoverEvent.Action.SHOW_TEXT, new LiteralText(tooltip))); } @@ -281,7 +281,7 @@ public class SpatialStorageCommand implements ISubCommand { private static SpatialStoragePlot getPlot(int plotId) { SpatialStoragePlot plot = SpatialStoragePlotManager.INSTANCE.getPlot(plotId); if (plot == null) { - throw new CommandException(Text.of("Plot not found: " + plotId)); + throw new CommandException(new LiteralText("Plot not found: " + plotId)); } return plot; } @@ -293,7 +293,7 @@ public class SpatialStorageCommand implements ISubCommand { } private static void sendKeyValuePair(ServerCommandSource source, String label, String value) { - sendKeyValuePair(source, label, Text.of(value)); + sendKeyValuePair(source, label, new LiteralText(value)); } /** @@ -301,7 +301,7 @@ public class SpatialStorageCommand implements ISubCommand { */ private static SpatialStoragePlot getCurrentPlot(ServerCommandSource source) { if (source.getWorld().getRegistryKey() != SpatialStorageDimensionIds.WORLD_ID) { - throw new CommandException(Text.of("Must be within the spatial storage world.")); + throw new CommandException(new LiteralText("Must be within the spatial storage world.")); } BlockPos playerPos = new BlockPos(source.getPosition());