Change method name to what it really does

This commit is contained in:
MineTheCube 2016-08-18 14:43:36 +02:00
parent 55a3bb87d3
commit 1c079b5abe

View File

@ -36,17 +36,17 @@ public class ShopItemListener implements Listener {
return;
}
updateShopVisibility(e.getPlayer(), true);
updateShopItemVisibility(e.getPlayer(), true);
}
@EventHandler(priority = EventPriority.HIGH, ignoreCancelled = true)
public void onPlayerTeleport(PlayerTeleportEvent e) {
updateShopVisibility(e.getPlayer(), true, e.getTo());
updateShopItemVisibility(e.getPlayer(), true, e.getTo());
}
@EventHandler
public void onPlayerJoin(PlayerJoinEvent e) {
updateShopVisibility(e.getPlayer(), false);
updateShopItemVisibility(e.getPlayer(), false);
}
@EventHandler
@ -56,11 +56,11 @@ public class ShopItemListener implements Listener {
}
}
private void updateShopVisibility(Player p, boolean hideIfAway) {
updateShopVisibility(p, hideIfAway, p.getLocation());
private void updateShopItemVisibility(Player p, boolean hideIfAway) {
updateShopItemVisibility(p, hideIfAway, p.getLocation());
}
private void updateShopVisibility(Player p, boolean hideIfAway, Location playerLocation) {
private void updateShopItemVisibility(Player p, boolean hideIfAway, Location playerLocation) {
double itemDistanceSquared = plugin.getShopChestConfig().maximal_item_distance;
itemDistanceSquared *= itemDistanceSquared;