mirror of
https://github.com/libraryaddict/LibsDisguises.git
synced 2025-01-30 23:01:50 +01:00
Add setUnsafeSize to Slime disguises
This commit is contained in:
parent
bce4e96f55
commit
f5cc86f8d5
@ -30,6 +30,10 @@ public class SlimeWatcher extends InsentientWatcher {
|
||||
size = 50;
|
||||
}
|
||||
|
||||
setUnsafeSize(size);
|
||||
}
|
||||
|
||||
public void setUnsafeSize(int size) {
|
||||
if (hasValue(MetaIndex.SLIME_SIZE) && getData(MetaIndex.SLIME_SIZE) == size) {
|
||||
return;
|
||||
}
|
||||
@ -39,4 +43,8 @@ public class SlimeWatcher extends InsentientWatcher {
|
||||
|
||||
updateNameHeight();
|
||||
}
|
||||
|
||||
public int getUnsafeSize() {
|
||||
return getSize();
|
||||
}
|
||||
}
|
||||
|
@ -410,10 +410,10 @@ public class DisguisePermissions {
|
||||
}
|
||||
|
||||
if (sender instanceof Player && !sender.isOp() && !DisguiseConfig.isExplicitDisguisePermissions()) {
|
||||
storage.permittedOptions.remove("setYModifier");
|
||||
storage.negatedOptions.add("setYModifier");
|
||||
storage.permittedOptions.remove("setNameYModifier");
|
||||
storage.negatedOptions.add("setNameYModifier");
|
||||
for (String unsafeMethod : new String[]{"setYModifier", "setNameYModifier"}) {
|
||||
storage.permittedOptions.remove(unsafeMethod);
|
||||
storage.negatedOptions.add(unsafeMethod);
|
||||
}
|
||||
}
|
||||
|
||||
disguises.add(storage);
|
||||
|
Loading…
Reference in New Issue
Block a user