CraftBook 3

CraftBook 3

139k Downloads

CommandItems Superuser lag/delay and commands not running.

LadyCailinBot opened this issue ยท 3 comments

commented

CRAFTBOOK-3385 - Reported by chaoswizard98

I created some custom command items for my server. Some are simple and run 1 command, others run 5-10. All items are set to be used by SUPERUSER.

When an OP uses the item, the item behaves as expected. All commands are run instantly, and after the set delay, the delayed set is run. When another player uses the item (who isn't OP) the commands are run painfully slow, one at a time with a second or so delay in between each command (When they should be instantaneous.) In some cases (With multiple commands), commands aren't even run. It will run the first, but skip the second. In some cases the player receives a "Sorry but you don't have permission to use this command" message when the last command in the list is run.

For example, I created an item that summons a spray of 8 fireworks. When an OP uses the item, all 8 are summoned at the same time. When a non-OP uses the item, it summons them 1 at a time, with a half second delay between each.

Every item also has a short delay before the first command is run if a non-OP is using it.

I attached the command items config below with a few items that result in the issues described above.

commented

Comment by me4502

Is this reproducible with only CraftBook and dependencies? You could potentially have a plugin that's listening for the way that CraftBook is providing the permission to run these commands.

commented

Comment by chaoswizard98

Yes. Using only CraftBook (having only command items enabled), and world edit, the same effect is noticeable. Continuing with the fireworks example, if an OP uses the item, his chat is spammed with 8 "summoned entity" messages instantly. If a non-OP uses the command, they appear one at a time with a bit of delay in between.

commented

The SUPER_USER functionality is deprecated and removed in CB5, due to platform-related issues that cannot be solved in a safe way. I'll look into whether something similar is possible to implement, but realistically using CONSOLE is safer and better.