Skip to content

Commit d0d8a4d

Browse files
committed
Add check for BanWarden status in handleBanwardenPardon method
1 parent 99b607c commit d0d8a4d

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

bukkit/src/main/java/com/xinecraft/minetrax/bukkit/webquery/BukkitWebQuery.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,10 @@ public String handleCheckPlayerOnline(String playerUuid) throws Exception {
170170

171171
@Override
172172
public String handleBanwardenPardon(BanWardenPunishmentType type, String victim, String reason, String admin) throws Exception {
173+
boolean isBanWardenEnabled = this.plugin.isBanWardenEnabled;
174+
if (!isBanWardenEnabled) {
175+
throw new Exception("BanWarden is not enabled.");
176+
}
173177
boolean status = this.plugin.getCommon().getBanWarden().pardon(type, victim, reason, admin);
174178
return status ? "true" : "false";
175179
}

0 commit comments

Comments
 (0)