Change player's game state in 1.18

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.

Hackusater

Active Member
Aug 5, 2017
74
2
8
34
How do I change a player's game state in 1.18? I know this is possible using the packet Change Game State and but I am unsure how to send NMS packets in 1.18. I tried using skript reflect, but i'm not sure how to import NMS on 1.18.
 
Last edited:
How do I change a player's game state in 1.18? I know this is possible using the packet Change Game State and but I am unsure how to send NMS packets in 1.18. I tried using skript reflect, but i'm not sure how to import NMS on 1.18.

just use
Code:
set players gamemode to creative # change 'creative' to the gamemode you want
 
How do I change a player's game state in 1.18? I know this is possible using the packet Change Game State and but I am unsure how to send NMS packets in 1.18. I tried using skript reflect, but i'm not sure how to import NMS on 1.18.

You can use this wiki here to learn how to change the Game State.

You can also use this spigot post to learn how to change the Game State via NMS.
 
Status
Not open for further replies.