diff --git a/src/main/java/com/graywolf336/jail/events/PrePrisonerJailedEvent.java b/src/main/java/com/graywolf336/jail/events/PrePrisonerJailedEvent.java index 83f96db..3949ca2 100644 --- a/src/main/java/com/graywolf336/jail/events/PrePrisonerJailedEvent.java +++ b/src/main/java/com/graywolf336/jail/events/PrePrisonerJailedEvent.java @@ -98,6 +98,20 @@ public class PrePrisonerJailedEvent extends Event implements Cancellable { public void setJailer(String jailer) { this.jailer = jailer; } + + /** Gets the reason the player was jailed for. */ + public String getReason() { + return this.prisoner.getReason(); + } + + /** + * Sets the reason the prisoner was jailed for. + * + * @param reason the prisoner was jailed for. + */ + public void setReason(String reason) { + this.prisoner.setReason(reason); + } /** Checks whether this event is cancelled or not. */ public boolean isCancelled() { diff --git a/src/main/java/com/graywolf336/jail/events/PrisonerJailedEvent.java b/src/main/java/com/graywolf336/jail/events/PrisonerJailedEvent.java index 211ee05..fd62572 100644 --- a/src/main/java/com/graywolf336/jail/events/PrisonerJailedEvent.java +++ b/src/main/java/com/graywolf336/jail/events/PrisonerJailedEvent.java @@ -72,6 +72,11 @@ public class PrisonerJailedEvent extends Event { public String getJailer() { return this.prisoner.getJailer(); } + + /** Gets the reason the prisoner was jailed. */ + public String getReason() { + return this.prisoner.getReason(); + } public static HandlerList getHandlerList() { return handlers;