Skip to content

Commit

Permalink
more stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
Percyqaz committed Dec 17, 2021
1 parent 154ed98 commit 91b4228
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/me/Percyqaz/Lodestone/CompassListener.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ public void Compass(PlayerInteractEvent e) {
if (e.getHand() == EquipmentSlot.HAND && item.getType() == Material.COMPASS && e.getAction() == Action.RIGHT_CLICK_AIR) {
CompassMeta itemMeta = (CompassMeta)item.getItemMeta();
if (itemMeta.hasLodestone() && itemMeta.isLodestoneTracked()) {
p.sendMessage(ChatColor.BLUE + "Whoosh!");
String teleportMessage = itemMeta.hasDisplayName() ? " Teleported to " + ChatColor.GREEN + itemMeta.getDisplayName() : "";
p.sendMessage(ChatColor.BLUE + "Whoosh!" + teleportMessage);
Location pos = itemMeta.getLodestone();
p.teleport(pos.add(0.5, 1.5, 0.5));
item.setAmount(item.getAmount() - 1);
Expand Down

0 comments on commit 91b4228

Please sign in to comment.