Skip to content

Commit

Permalink
Add log messages for left/error
Browse files Browse the repository at this point in the history
Add in logger messages when an entity gets left behind or an error is caught with the teleport.
  • Loading branch information
CoolLord22 committed Mar 30, 2023
1 parent be43f96 commit b9e8d7a
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,12 @@ public void onTeleport(PlayerTeleportEvent event) {
OATMethods.teleportLeashedEnt(ent, event.getFrom(), event.getTo(), event.getPlayer(), plugin);
continue;
} catch(Exception e) {
plugin.log.logInfo("[Ent-" + ent.getEntityId() + "] Teleport reached exception. Sending player error.", Verbosity.HIGHEST);
toSendError = true;
continue;
}
}
plugin.log.logInfo("[Ent-" + ent.getEntityId() + "] Left behind. Sending player notification.", Verbosity.HIGHEST);
toSendLeft = true;
}
if(ent instanceof Tameable && event.getPlayer().hasPermission("otheranimalteleport.player.teleportpets")) {
Expand All @@ -91,11 +93,13 @@ public void onTeleport(PlayerTeleportEvent event) {
OATMethods.teleportEnt(ent, event.getFrom(), event.getTo(), event.getPlayer(), plugin);
continue;
} catch(Exception e) {
plugin.log.logInfo("[Ent-" + ent.getEntityId() + "] Teleport reached exception. Sending player error.", Verbosity.HIGHEST);
toSendError = true;
continue;
}
}
}
plugin.log.logInfo("[Ent-" + ent.getEntityId() + "] Left behind. Sending player notification.", Verbosity.HIGHEST);
toSendLeft = true;
}
}
Expand Down

0 comments on commit b9e8d7a

Please sign in to comment.