Use lombok, add new config options for disabling pvp, pve, action bar when disguised, permission to hide name above head
This commit is contained in:
@@ -55,7 +55,7 @@ public class DisguiseCommand extends DisguiseBaseCommand implements TabCompleter
|
||||
return true;
|
||||
}
|
||||
|
||||
if (DisguiseConfig.isNameOfPlayerShownAboveDisguise()) {
|
||||
if (DisguiseConfig.isNameOfPlayerShownAboveDisguise() && !sender.hasPermission("libsdisguises.hidename")) {
|
||||
if (disguise.getWatcher() instanceof LivingWatcher) {
|
||||
disguise.getWatcher().setCustomName(getDisplayName(sender));
|
||||
|
||||
|
@@ -96,7 +96,8 @@ public class DisguisePlayerCommand extends DisguiseBaseCommand implements TabCom
|
||||
return true;
|
||||
}
|
||||
|
||||
if (DisguiseConfig.isNameOfPlayerShownAboveDisguise()) {
|
||||
if (DisguiseConfig.isNameOfPlayerShownAboveDisguise() &&
|
||||
!entityTarget.hasPermission("libsdisguises.hidename")) {
|
||||
if (disguise.getWatcher() instanceof LivingWatcher) {
|
||||
disguise.getWatcher().setCustomName(getDisplayName(entityTarget));
|
||||
|
||||
|
@@ -170,7 +170,8 @@ public class DisguiseRadiusCommand extends DisguiseBaseCommand implements TabCom
|
||||
Disguise disguise = DisguiseParser
|
||||
.parseDisguise(sender, entity, getPermNode(), disguiseArgs, permissions);
|
||||
|
||||
if (entity instanceof Player && DisguiseConfig.isNameOfPlayerShownAboveDisguise()) {
|
||||
if (entity instanceof Player && DisguiseConfig.isNameOfPlayerShownAboveDisguise() &&
|
||||
!entity.hasPermission("libsdisguises.hidename")) {
|
||||
if (disguise.getWatcher() instanceof LivingWatcher) {
|
||||
disguise.getWatcher().setCustomName(getDisplayName(entity));
|
||||
if (DisguiseConfig.isNameAboveHeadAlwaysVisible()) {
|
||||
|
Reference in New Issue
Block a user