Simplify redundant statements and casts

This commit is contained in:
riking
2014-06-03 18:20:46 -07:00
parent 009df4a0ad
commit 5dce8a22e8
6 changed files with 11 additions and 17 deletions

View File

@@ -57,7 +57,7 @@ public class DisguisePlayerCommand extends BaseDisguiseCommand {
}
if (DisguiseConfig.isNameOfPlayerShownAboveDisguise()) {
if (disguise.getWatcher() instanceof LivingWatcher) {
((LivingWatcher) disguise.getWatcher()).setCustomName(((Player) player).getDisplayName());
((LivingWatcher) disguise.getWatcher()).setCustomName(player.getDisplayName());
if (DisguiseConfig.isNameAboveHeadAlwaysVisible()) {
((LivingWatcher) disguise.getWatcher()).setCustomNameVisible(true);
}