Skip to content
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

Changing difficulty from peaceful to easy in Skript needs a server restart #3834

Closed
oskarkk opened this issue Mar 18, 2021 · 3 comments
Closed
Labels
bug An issue that needs to be fixed. Alternatively, a PR fixing an issue. completed The issue has been fully resolved and the change will be in the next Skript update. priority: low Issues that are not harmful to the experience but are related to useful changes or additions.

Comments

@oskarkk
Copy link
Contributor

oskarkk commented Mar 18, 2021

Description

I have a script that allows the players to vote on difficulty changes and it sometimes doesn't work. I believe something is broken in Skript.

Steps to Reproduce

  1. Start a new server with difficulty=peaceful in server.properties, or run /difficulty peaceful on an already running server and stop the server, so that the test world would be set to peaceful.
  2. Write a script containing:
command /test <text>:
  trigger:
    set difficulty of world "world" to arg-1 parsed as difficulty

or:

    set difficulty of all worlds to arg-1 parsed as difficulty
  1. Load the script, log into the server, run /time set night and then /test easy
  2. Nothing happens, no mobs appear. /difficulty easy says that the world is already set to easy.
  3. Restart the server.
  4. Log in, the mobs spawn as it's easy.

And the same scenario without using Skript:

  1. Start a server with worlds set to peaceful as above
  2. Run /difficulty easy.
  3. Mobs spawn instantly.

And then:

  1. Run /difficulty peaceful.
  2. /test easy - again, nothing happens.
  3. /test peaceful and /difficulty easy - mobs spawn
  4. /test peaceful and /test easy - this time, when we first changed easy to peaceful in Skript, mobs spawn on change from peaceful to easy
  5. Restart the server, the difficulty is easy, mobs spawn normally
  6. /test peaceful - mobs disappear.
  7. /test easy - mobs appear

It seems that there's a bug only on the initial change from peaceful to easy, strange thing.

Expected Behavior

The same as the /difficulty command

Server Information

  • Server version/platform: This server is running Paper version git-Paper-543 (MC: 1.16.5) (Implementing API version 1.16.5-R0.1-SNAPSHOT)
  • Skript version: Skript version 2.5.3
  • System Info: Java 15 (OpenJDK 64-Bit Server VM 15.0.2+7) Host: Linux 5.10.19-1-MANJARO (amd64)
@oskarkk oskarkk changed the title Setting difficulty from peaceful to easy in Skript needs a server restart Changing difficulty from peaceful to easy in Skript needs a server restart Mar 18, 2021
@TPGamesNL
Copy link
Member

Can confirm

@TPGamesNL TPGamesNL added bug An issue that needs to be fixed. Alternatively, a PR fixing an issue. priority: low Issues that are not harmful to the experience but are related to useful changes or additions. labels Mar 19, 2021
@TPGamesNL TPGamesNL added the PR available Issues which have a yet-to-be merged PR resolving it label Apr 25, 2021
@oskarkk
Copy link
Contributor Author

oskarkk commented Apr 27, 2021

Fixed in #3921, thanks

@oskarkk oskarkk closed this as completed Apr 27, 2021
@TPGamesNL
Copy link
Member

We like to keep issues open with the completed label until they appear in a release :)

@TPGamesNL TPGamesNL reopened this Apr 27, 2021
@TPGamesNL TPGamesNL added completed The issue has been fully resolved and the change will be in the next Skript update. and removed PR available Issues which have a yet-to-be merged PR resolving it labels Apr 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An issue that needs to be fixed. Alternatively, a PR fixing an issue. completed The issue has been fully resolved and the change will be in the next Skript update. priority: low Issues that are not harmful to the experience but are related to useful changes or additions.
Projects
None yet
Development

No branches or pull requests

3 participants