Add a record entry when a player is jailed by jail sticks.

Closes #20
This commit is contained in:
graywolf336 2014-03-08 23:55:13 -06:00
parent 39cc95b96d
commit 74812114c6

View File

@ -9,6 +9,7 @@ import org.bukkit.event.Listener;
import com.graywolf336.jail.JailMain;
import com.graywolf336.jail.enums.LangString;
import com.graywolf336.jail.events.PrePrisonerJailedByJailStickEvent;
import com.graywolf336.jail.events.PrePrisonerJailedEvent;
public class JailingListener implements Listener {
@ -26,4 +27,11 @@ public class JailingListener implements Listener {
event.getPrisoner().getJailer(), dateFormat.format(new Date()),
event.getPrisoner().getRemainingTimeInMinutes(), event.getPrisoner().getReason());
}
@EventHandler(ignoreCancelled=true)
public void preJailingListener(PrePrisonerJailedByJailStickEvent event) {
pl.getJailIO().addRecordEntry(event.getPrisoner().getName(),
event.getPrisoner().getJailer(), dateFormat.format(new Date()),
event.getPrisoner().getRemainingTimeInMinutes(), event.getPrisoner().getReason());
}
}