aboutsummaryrefslogtreecommitdiff
path: root/spark-forge/src/main/java/me
diff options
context:
space:
mode:
Diffstat (limited to 'spark-forge/src/main/java/me')
-rw-r--r--spark-forge/src/main/java/me/lucko/spark/forge/ForgeCommandSender.java6
-rw-r--r--spark-forge/src/main/java/me/lucko/spark/forge/ForgePlatformInfo.java2
-rw-r--r--spark-forge/src/main/java/me/lucko/spark/forge/plugin/ForgeClientSparkPlugin.java4
-rw-r--r--spark-forge/src/main/java/me/lucko/spark/forge/plugin/ForgeServerSparkPlugin.java2
4 files changed, 7 insertions, 7 deletions
diff --git a/spark-forge/src/main/java/me/lucko/spark/forge/ForgeCommandSender.java b/spark-forge/src/main/java/me/lucko/spark/forge/ForgeCommandSender.java
index 9470e65..574ca3a 100644
--- a/spark-forge/src/main/java/me/lucko/spark/forge/ForgeCommandSender.java
+++ b/spark-forge/src/main/java/me/lucko/spark/forge/ForgeCommandSender.java
@@ -59,15 +59,15 @@ public class ForgeCommandSender extends AbstractCommandSender<ICommandSource> {
@Override
public UUID getUniqueId() {
if (super.delegate instanceof PlayerEntity) {
- return ((PlayerEntity) super.delegate).getUniqueID();
+ return ((PlayerEntity) super.delegate).getUUID();
}
return null;
}
@Override
public void sendMessage(Component message) {
- IFormattableTextComponent component = ITextComponent.Serializer.getComponentFromJson(GsonComponentSerializer.gson().serialize(message));
- super.delegate.sendMessage(component, Util.DUMMY_UUID);
+ IFormattableTextComponent component = ITextComponent.Serializer.fromJson(GsonComponentSerializer.gson().serialize(message));
+ super.delegate.sendMessage(component, Util.NIL_UUID);
}
@Override
diff --git a/spark-forge/src/main/java/me/lucko/spark/forge/ForgePlatformInfo.java b/spark-forge/src/main/java/me/lucko/spark/forge/ForgePlatformInfo.java
index fbe99ce..60294be 100644
--- a/spark-forge/src/main/java/me/lucko/spark/forge/ForgePlatformInfo.java
+++ b/spark-forge/src/main/java/me/lucko/spark/forge/ForgePlatformInfo.java
@@ -34,7 +34,7 @@ public class ForgePlatformInfo extends AbstractPlatformInfo {
@Override
public Type getType() {
- return type;
+ return this.type;
}
@Override
diff --git a/spark-forge/src/main/java/me/lucko/spark/forge/plugin/ForgeClientSparkPlugin.java b/spark-forge/src/main/java/me/lucko/spark/forge/plugin/ForgeClientSparkPlugin.java
index a97a0bf..90d35ee 100644
--- a/spark-forge/src/main/java/me/lucko/spark/forge/plugin/ForgeClientSparkPlugin.java
+++ b/spark-forge/src/main/java/me/lucko/spark/forge/plugin/ForgeClientSparkPlugin.java
@@ -77,7 +77,7 @@ public class ForgeClientSparkPlugin extends ForgeSparkPlugin implements Suggesti
private CommandDispatcher<ISuggestionProvider> getPlayerCommandDispatcher() {
return Optional.ofNullable(this.minecraft.player)
.map(player -> player.connection)
- .map(ClientPlayNetHandler::getCommandDispatcher)
+ .map(ClientPlayNetHandler::getCommands)
.orElse(null);
}
@@ -106,7 +106,7 @@ public class ForgeClientSparkPlugin extends ForgeSparkPlugin implements Suggesti
this.threadDumper.ensureSetup();
this.platform.executeCommand(new ForgeCommandSender(this.minecraft.player, this), args);
- this.minecraft.ingameGUI.getChatGUI().addToSentMessages(event.getMessage());
+ this.minecraft.gui.getChat().addRecentChat(event.getMessage());
event.setCanceled(true);
}
diff --git a/spark-forge/src/main/java/me/lucko/spark/forge/plugin/ForgeServerSparkPlugin.java b/spark-forge/src/main/java/me/lucko/spark/forge/plugin/ForgeServerSparkPlugin.java
index f6ea346..3a077d6 100644
--- a/spark-forge/src/main/java/me/lucko/spark/forge/plugin/ForgeServerSparkPlugin.java
+++ b/spark-forge/src/main/java/me/lucko/spark/forge/plugin/ForgeServerSparkPlugin.java
@@ -102,7 +102,7 @@ public class ForgeServerSparkPlugin extends ForgeSparkPlugin implements Command<
return Suggestions.empty();
}
- ServerPlayerEntity player = context.getSource().asPlayer();
+ ServerPlayerEntity player = context.getSource().getPlayerOrException();
return CompletableFuture.supplyAsync(() -> {
for (String suggestion : this.platform.tabCompleteCommand(new ForgeCommandSender(player, this), args)) {
builder.suggest(suggestion);