Divine Journey 2

Divine Journey 2

636k Downloads

player.executeCommand might not work on servers

Atricos opened this issue ยท 1 comments

commented

I'm opening this issue so it doesn't get lost.

From Jaded_Magic:

I recommend changing all player.executeCommand to Commands.call for ContentTweaker items.
This will not require the player to have access to the command (even though mods.contenttweaker.Commands says not adding boolean overridePermissions defaults to true, does not work) I tested the change in SP and works proper, image sent is me using the 2 teleport items and then running /gamemode 1 to show cheat mode is not enabled. The format I used and seems to require is: omothol_teleporter: Commands.call("tpx @p 0 80 0 52", player, world); instead of player.executeCommand("tpx @p 0 80 0 52"); you already have the proper imports, and only this line per item has to be changed.
image

commented

Changed all player.executeCommand lines in item right click functions to Commands.call.