Permission Check Fails when using script from a command block
DomAmato opened this issue ยท 1 comments
Checking permissions fails when a script is run from a command block specifically this line:
https://github.com/ForgeEssentials/ForgeEssentials/blob/develop/src/main/java/com/forgeessentials/scripting/ScriptMethods.java#L280
it will throw this error:
[14:47:46] [Server thread/WARN]: Couldn't process command: 'cleardig @p'
java.lang.IllegalArgumentException: Invalid UUID string:
at java.util.UUID.fromString(Unknown Source) ~[?:1.8.0_51]
at com.forgeessentials.api.UserIdent.getServer(UserIdent.java:266) ~[UserIdent.class:?]
at com.forgeessentials.scripting.ScriptMethods.getPermcheckResult(ScriptMethods.java:890) ~[ScriptMethods.class:?]
at com.forgeessentials.scripting.ScriptMethods$15.process(ScriptMethods.java:240) ~[ScriptMethods$15.class:?]
at com.forgeessentials.scripting.ScriptParser.run(ScriptParser.java:466) ~[ScriptParser.class:?]
at com.forgeessentials.scripting.ScriptParser.run(ScriptParser.java:277) ~[ScriptParser.class:?]
at com.forgeessentials.scripting.command.PatternCommand.processCommand(PatternCommand.java:148) ~[PatternCommand.class:?]
at com.forgeessentials.scripting.command.PatternCommand.func_71515_b(PatternCommand.java:168) ~[PatternCommand.class:?]
at net.minecraft.command.CommandHandler.func_175786_a(CommandHandler.java:100) [j.class:?]
at net.minecraft.command.CommandHandler.func_71556_a(CommandHandler.java:79) [j.class:?]
at net.minecraft.command.server.CommandBlockLogic.func_145755_a(SourceFile:97) [adc.class:?]
at net.minecraft.block.BlockCommandBlock.func_180650_b(SourceFile:54) [afw.class:?]
at net.minecraft.world.WorldServer.func_72955_a(WorldServer.java:611) [le.class:?]
at net.minecraft.world.WorldServer.func_72835_b(WorldServer.java:219) [le.class:?]
at net.minecraft.server.MinecraftServer.func_71190_q(MinecraftServer.java:690) [MinecraftServer.class:?]
at net.minecraft.server.dedicated.DedicatedServer.func_71190_q(DedicatedServer.java:344) [ko.class:?]
at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:605) [MinecraftServer.class:?]
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:481) [MinecraftServer.class:?]
at java.lang.Thread.run(Unknown Source) [?:1.8.0_51]
ignore the line numbers since my repo is not in sync with this one but i believe that line should be
ident = UserIdent.getServer(null, "$" + sender.getName().toLowerCase());
instead. Since it passes an empty string it tries to get a UUID from an empty string and so that line will always fail