diff --git a/src/main/java/me/Demon/AskyBlockWarps/Listener/WarpGui.java b/src/main/java/me/Demon/AskyBlockWarps/Listener/WarpGui.java index 815abfb..02edb39 100644 --- a/src/main/java/me/Demon/AskyBlockWarps/Listener/WarpGui.java +++ b/src/main/java/me/Demon/AskyBlockWarps/Listener/WarpGui.java @@ -27,8 +27,9 @@ public class WarpGui implements Listener { ItemStack item = e.getCurrentItem(); if (e.getRawSlot() >= 0 && e.getRawSlot() < e.getInventory().getSize() && !DemonAPI.itemIsNull(item) && !DemonAPI.itemIsLore(item)) { if (CDTimeAPI.getCD(p.getUniqueId(), "islandwarptp") < 0) { + String playName = item.getItemMeta().getDisplayName().replace("§6§l传送到 §e", "").replace(" §6§l的空岛",""); UUID islandOwner = ASkyBlockAPI.getInstance().getOwner(p.getLocation()); - p.teleport(Main.LandWarpLoc(p.getName())); + p.teleport(Main.LandWarpLoc(playName)); p.sendMessage(Main.prefix + "您已传送至 §e" + Main.convertUUIDToName(islandOwner) + "§f 的空岛地标旁."); CDTimeAPI.setPlayerCD(p.getUniqueId(), "islandwarptp", 1000 * 3); p.playSound(p.getLocation(), Sound.ENTITY_ENDEREYE_DEATH, 1.0F, 2.0F);