diff options
Diffstat (limited to 'spark-forge')
3 files changed, 3 insertions, 2 deletions
diff --git a/spark-forge/build.gradle b/spark-forge/build.gradle index c47408b..836f893 100644 --- a/spark-forge/build.gradle +++ b/spark-forge/build.gradle @@ -15,6 +15,7 @@ apply plugin: 'net.minecraftforge.gradle' minecraft { mappings channel: 'snapshot', version: '20200125-1.15.1' + accessTransformer = file('src/main/resources/META-INF/accesstransformer.cfg') } processResources { 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 c017d95..4051d24 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 @@ -79,8 +79,7 @@ public class ForgeServerSparkPlugin extends ForgeSparkPlugin implements Command< String[] args = processArgs(context); if (args == null) return 0; - ICommandSource source = context.getSource().getEntity() instanceof ServerPlayerEntity ? context.getSource().asPlayer() : context.getSource().getServer(); - this.platform.executeCommand(new ForgeCommandSender(source, this), args); + this.platform.executeCommand(new ForgeCommandSender(context.getSource().source, this), args); return Command.SINGLE_SUCCESS; } diff --git a/spark-forge/src/main/resources/META-INF/accesstransformer.cfg b/spark-forge/src/main/resources/META-INF/accesstransformer.cfg new file mode 100644 index 0000000..5f9dd8a --- /dev/null +++ b/spark-forge/src/main/resources/META-INF/accesstransformer.cfg @@ -0,0 +1 @@ +public net.minecraft.command.CommandSource field_197041_c # source
\ No newline at end of file |