How to use Data API 2.0

To reply to @soccer66 in this post

To change the game mode of a player, all you have to do now is:

entity.offer(Keys.GAME_MODE, GameModes.CREATIVE);

If there is not a key called GAME_MODE, there likely will be one shortly.

2 Likes