Fix usage of ExItem#getName()
This commit is contained in:
parent
82560f5707
commit
42bde96c86
|
@ -76,7 +76,7 @@ public class PortalCommand extends DCommand {
|
|||
MessageUtil.sendMessage(player, DMessage.PLAYER_PORTAL_INTRODUCTION.getMessage());
|
||||
|
||||
} else {
|
||||
if (args.length == 3 && VanillaItem.NETHER_PORTAL.getName().equalsIgnoreCase(args[1])) {
|
||||
if (args.length == 3 && VanillaItem.NETHER_PORTAL.getId().equalsIgnoreCase(args[1])) {
|
||||
if (args[2].equalsIgnoreCase("-rotate")) {
|
||||
dPortal.rotate();
|
||||
}
|
||||
|
|
|
@ -211,11 +211,11 @@ public class DPortal extends GlobalProtection {
|
|||
player.setCreatingPortal(null);
|
||||
|
||||
} else {
|
||||
ClickEvent onClickYes = new ClickEvent(ClickEvent.Action.RUN_COMMAND, "/dungeonsxl portal NETHER_PORTAL -rotate");
|
||||
ClickEvent onClickYes = new ClickEvent(ClickEvent.Action.RUN_COMMAND, "/dungeonsxl portal " + VanillaItem.NETHER_PORTAL.getId() + " -rotate");
|
||||
TextComponent yes = new TextComponent(DMessage.BUTTON_ACCEPT.getMessage());
|
||||
yes.setClickEvent(onClickYes);
|
||||
|
||||
ClickEvent onClickNo = new ClickEvent(ClickEvent.Action.RUN_COMMAND, "/dungeonsxl portal NETHER_PORTAL -norotate");
|
||||
ClickEvent onClickNo = new ClickEvent(ClickEvent.Action.RUN_COMMAND, "/dungeonsxl portal " + VanillaItem.NETHER_PORTAL.getId() + " -norotate");
|
||||
TextComponent no = new TextComponent(DMessage.BUTTON_DENY.getMessage());
|
||||
no.setClickEvent(onClickNo);
|
||||
|
||||
|
|
|
@ -212,7 +212,7 @@ public class RewardChest extends GameBlock {
|
|||
}
|
||||
}
|
||||
if (name == null) {
|
||||
name = VanillaItem.get(itemStack.getType()).getName().replace("_", " ");
|
||||
name = VanillaItem.get(itemStack.getType()).getName();
|
||||
}
|
||||
msg += ChatColor.RED + " " + itemStack.getAmount() + " " + name + ChatColor.GOLD + ",";
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue