Add some debugging to the jailing of a player.

This commit is contained in:
graywolf336 2014-07-14 21:19:12 -05:00
parent 049ea63102
commit 27b557991e

View File

@ -233,6 +233,7 @@ public class PrisonerManager {
//Teleport them to the cell's teleport location
//they will now be placed in jail.
pl.debug("Teleporting " + player.getName() + " to " + jail.getName() + " in the cell " + cell.getName() + "'s in: " + jail.getTeleportIn().toString());
player.teleport(cell.getTeleport());
}else {
//There is no cell we're jailing them to, so stick them in the jail
@ -247,6 +248,7 @@ public class PrisonerManager {
//Teleport them to the jail's teleport in location
//They will now be placed in jail.
pl.debug("Teleporting " + player.getName() + " to " + jail.getName() + "'s in: " + jail.getTeleportIn().toString());
player.teleport(jail.getTeleportIn());
}
@ -266,12 +268,12 @@ public class PrisonerManager {
pl.getScoreBoardManager().addScoreBoard(player, prisoner);
}
//Save the data, as we have changed it
pl.getJailIO().saveJail(jail);
//Call our custom event for when a prisoner is actually jailed.
PrisonerJailedEvent event = new PrisonerJailedEvent(jail, cell, prisoner, player);
pl.getServer().getPluginManager().callEvent(event);
//Save the data, as we have changed it
pl.getJailIO().saveJail(jail);
}
/**