Fixed log spam for portals to nowhere.
This commit is contained in:
parent
ecd0664d66
commit
cb6854abbb
|
|
@ -774,6 +774,9 @@ class PlayerEventHandler implements Listener
|
||||||
@EventHandler(ignoreCancelled = true, priority = EventPriority.HIGH)
|
@EventHandler(ignoreCancelled = true, priority = EventPriority.HIGH)
|
||||||
void onPlayerPortal(PlayerPortalEvent event)
|
void onPlayerPortal(PlayerPortalEvent event)
|
||||||
{
|
{
|
||||||
|
//if the player isn't going anywhere, take no action
|
||||||
|
if(event.getTo() == null || event.getTo().getWorld() == null) return;
|
||||||
|
|
||||||
//don't track in worlds where claims are not enabled
|
//don't track in worlds where claims are not enabled
|
||||||
if(!GriefPrevention.instance.claimsEnabledForWorld(event.getTo().getWorld())) return;
|
if(!GriefPrevention.instance.claimsEnabledForWorld(event.getTo().getWorld())) return;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user