Fix usage of ExItem#getName()

This commit is contained in:
Daniel Saukel 2021-02-26 20:13:41 +01:00
parent 82560f5707
commit 42bde96c86
3 changed files with 4 additions and 4 deletions

View File

@ -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();
}

View File

@ -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);

View File

@ -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 + ",";
}