mirror of
https://github.com/filoghost/HolographicDisplays.git
synced 2024-11-07 11:19:56 +01:00
Small fix + remove duplicate code
This commit is contained in:
parent
90ac307519
commit
b7eefd44c9
@ -113,9 +113,9 @@ public class MainListener implements Listener {
|
||||
|
||||
try {
|
||||
touchSlime.getTouchablePiece().getTouchHandler().onTouch(event.getPlayer());
|
||||
} catch (Exception ex) {
|
||||
} catch (Throwable t) {
|
||||
Plugin plugin = touchSlime.getParent() instanceof PluginHologram ? ((PluginHologram) touchSlime.getParent()).getOwner() : HolographicDisplays.getInstance();
|
||||
HolographicDisplays.getInstance().getLogger().log(Level.WARNING, "The plugin " + plugin.getName() + " generated an exception when the player " + event.getPlayer().getName() + " touched a hologram.", ex);
|
||||
HolographicDisplays.getInstance().getLogger().log(Level.WARNING, "The plugin " + plugin.getName() + " generated an exception when the player " + event.getPlayer().getName() + " touched a hologram.", t);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -131,9 +131,9 @@ public class MainListener implements Listener {
|
||||
if (hologram.getVisibilityManager().isVisibleTo(player)) {
|
||||
pickupHandler.onPickup(player);
|
||||
}
|
||||
} catch (Exception ex) {
|
||||
} catch (Throwable t) {
|
||||
Plugin plugin = hologram instanceof PluginHologram ? ((PluginHologram) hologram).getOwner() : HolographicDisplays.getInstance();
|
||||
HolographicDisplays.getInstance().getLogger().log(Level.WARNING, "The plugin " + plugin.getName() + " generated an exception when the player " + player.getName() + " picked up an item from a hologram.", ex);
|
||||
HolographicDisplays.getInstance().getLogger().log(Level.WARNING, "The plugin " + plugin.getName() + " generated an exception when the player " + player.getName() + " picked up an item from a hologram.", t);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -324,15 +324,14 @@ public class CraftHologram implements Hologram, com.gmail.filoghost.holograms.ap
|
||||
Validator.isTrue(!deleted, "hologram already deleted");
|
||||
Validator.notNull(world, "world");
|
||||
|
||||
if (this.world != world) {
|
||||
updateLocation(world, x, y, z);
|
||||
|
||||
if (this.world != world) {
|
||||
despawnEntities();
|
||||
refreshAll();
|
||||
return;
|
||||
}
|
||||
|
||||
updateLocation(world, x, y, z);
|
||||
|
||||
double currentY = y;
|
||||
boolean first = true;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user