1.19.3-pre2
This commit is contained in:
1 parent
f7d9f662fd
commit
1edd06605b
3 files changed
+4
-4
No files matched your search
@@ -1549,7 +1549,7 @@ public class EntityValue extends Value
|
||||
put("gamemode", (e,v)->{
|
||||
if(!(e instanceof ServerPlayer)) return;
|
||||
GameType toSet = v instanceof NumericValue ?
|
||||
GameType.byId(((NumericValue) v).getInt(), null) :
|
||||
GameType.byId(((NumericValue) v).getInt()) :
|
||||
GameType.byName(v.getString().toLowerCase(Locale.ROOT), null);
|
||||
if (toSet != null) ((ServerPlayer) e).setGameMode(toSet);
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user