From 3ce51ff4705005beae2920e268a994550588098c Mon Sep 17 00:00:00 2001 From: Matt Worzala Date: Thu, 26 Aug 2021 11:10:48 -0400 Subject: [PATCH] switch permission level back to an int internally --- src/main/java/net/minestom/server/entity/Player.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/net/minestom/server/entity/Player.java b/src/main/java/net/minestom/server/entity/Player.java index df55efa90..038acc530 100644 --- a/src/main/java/net/minestom/server/entity/Player.java +++ b/src/main/java/net/minestom/server/entity/Player.java @@ -150,7 +150,7 @@ public class Player extends LivingEntity implements CommandSender, Localizable, private BelowNameTag belowNameTag; - private byte permissionLevel; + private int permissionLevel; private boolean reducedDebugScreenInformation; @@ -1591,7 +1591,7 @@ public class Player extends LivingEntity implements CommandSender, Localizable, public void setPermissionLevel(int permissionLevel) { Check.argCondition(!MathUtils.isBetween(permissionLevel, 0, 4), "permissionLevel has to be between 0 and 4"); - this.permissionLevel = (byte) permissionLevel; + this.permissionLevel = permissionLevel; // Magic values: https://wiki.vg/Entity_statuses#Player // TODO remove magic values