regionpostitemwatcher: simplify compass item management

This commit is contained in:
2021-06-10 23:07:01 -07:00
parent 2fd43aba13
commit 4573e9473e
2 changed files with 15 additions and 14 deletions

View File

@@ -62,7 +62,7 @@ public class RegionOpCommand implements CommandExecutor, TabCompleter {
});
} else if (subCommand.equals("compass") && sender.hasPermission("regions.give-items.compass")) {
Player player = (Player)sender;
ItemStack compassItem = RegionPostItemWatcher.createCreateItem();
ItemStack compassItem = RegionPostItemWatcher.createCompass(m_plugin.regionManager().nearestRegion(player.getLocation()));
if (split.length > 1) {
compassItem.setAmount(Integer.parseInt(split[1]));
}