-
-
Notifications
You must be signed in to change notification settings - Fork 213
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Completing phase - detected runaway phase in plugin #1922
Comments
So I worked around this issue like I have done with other similar problems:
|
@randombyte-developer Does this occur when using the Vanilla execute commands? If not, I wonder what's different. |
I don't know. Will test. But the error doesn't happen when the command is executed from the console. |
both work without any error. I think especially the second one is the case I am replicating with CommandUtils. Maybe Sponge doesn't track the executed commands in the |
I can't reproduce this with CommandUtils 2.0.5 on SpongeForge 3148. |
Actually, I think I'm getting an issue with PlaceholderAPI that's keeping me from accurately reproducing this. I'll try and get that fixed. |
@JBYoshi I've implemented the above mentioned workaround with the scheduler into command utils. I should setup a test repo. |
Test repo: https://github.com/randombyte-developer/sponge-common-issue-1922 Just clone and run the plugin. The command The numbers |
This would be a tricky one. It's not showing up on any versions in my development environment, but it shows up every time when I run it in production (using a JAR from the Sponge website). Looks like it's time for me to get down and dirty with the remote debugger. |
Turns out, it's all about recursion. @gabizou Could you take a look at this? |
I think we can expect then that command states can be re-entrant. |
Definitely considering https://minecraft.gamepedia.com/Function |
- Fixed workaround for SpongePowered/Sponge#1922, the commands got out of order
I have implemented new things to the plugin CommandUtils. One new thing is the
It executes the
command
ifcondition_command
returnsCommandsResult.SUCCESS
.One command which does this with the balance of the player is
which returns success if the player has more than the specified amount.
This is the config:
{0}
is an argument, here for a player name. It is placed into the executed command(has money
)./wealth KitCrafty
first checks if the player has more than 12 money. If that's true, it executes the internal command which can only be executed by the ones which have theadmin
permission. This is also true here because of the*
which executes a command as the console.In the internal command a message is broadcasted and another check is performed. If the player has more than 25 money,
and even a bit more!
is appended.I hope you can understand what's going on. If not, please ask.
Now the error from Sponge, with KitCrafty having 30 money:
https://gist.github.com/randombyte-developer/c771a419b6500f205922d3b8cce055ac
This error doesn't happen when the command is executed from the console.
It seems like Sponge doesn't like executing commands in other
CommandExecutor
s.Compiled plugin: https://github.com/randombyte-developer/command-utils/releases/tag/v2.0-pre
it needs an economy plugin and PlaceolderAPI.
Source: https://github.com/randombyte-developer/command-utils
Edit1: This doesn't happen on SV-BETA-22.
The text was updated successfully, but these errors were encountered: