From 677291fcfe3f95fd4819eb12eda07945bcf33a7f Mon Sep 17 00:00:00 2001 From: Daniel Naylor Date: Sun, 18 Oct 2015 00:35:44 +0100 Subject: [PATCH] Fix global bans not being set. --- HammerBukkit/build.gradle | 2 +- HammerCore/build.gradle | 2 +- .../java/uk/co/drnaylor/minecraft/hammer/core/HammerCore.java | 2 +- .../minecraft/hammer/core/commands/BaseBanCommandCore.java | 4 ++++ 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/HammerBukkit/build.gradle b/HammerBukkit/build.gradle index 8b87716..8db4523 100644 --- a/HammerBukkit/build.gradle +++ b/HammerBukkit/build.gradle @@ -2,7 +2,7 @@ apply plugin: 'java' apply plugin: 'idea' sourceCompatibility = 1.8 -version = '0.2.1' +version = '0.3' repositories { mavenCentral() diff --git a/HammerCore/build.gradle b/HammerCore/build.gradle index b34c45f..8b2fa6c 100644 --- a/HammerCore/build.gradle +++ b/HammerCore/build.gradle @@ -2,7 +2,7 @@ apply plugin: 'java' apply plugin: 'idea' sourceCompatibility = 1.8 -version = '0.3' +version = '0.3.1' repositories { mavenCentral() diff --git a/HammerCore/src/main/java/uk/co/drnaylor/minecraft/hammer/core/HammerCore.java b/HammerCore/src/main/java/uk/co/drnaylor/minecraft/hammer/core/HammerCore.java index 5227b65..9981fec 100644 --- a/HammerCore/src/main/java/uk/co/drnaylor/minecraft/hammer/core/HammerCore.java +++ b/HammerCore/src/main/java/uk/co/drnaylor/minecraft/hammer/core/HammerCore.java @@ -23,7 +23,7 @@ public class HammerCore { * @return The version of the core. */ public String getHammerCoreVersion() { - return "0.3"; + return "0.3.1"; } /** diff --git a/HammerCore/src/main/java/uk/co/drnaylor/minecraft/hammer/core/commands/BaseBanCommandCore.java b/HammerCore/src/main/java/uk/co/drnaylor/minecraft/hammer/core/commands/BaseBanCommandCore.java index cace6e6..588d058 100644 --- a/HammerCore/src/main/java/uk/co/drnaylor/minecraft/hammer/core/commands/BaseBanCommandCore.java +++ b/HammerCore/src/main/java/uk/co/drnaylor/minecraft/hammer/core/commands/BaseBanCommandCore.java @@ -63,6 +63,10 @@ public final boolean executeCommand(WrappedCommandSource source, ArgumentMap arg // Start a transaction. We might need to delete some rows here. conn.startTransaction(); BanInfo status = checkOtherBans(uuidToBan, conn, flag.contains(BanFlagEnum.ALL)); + + // Set global flag here, before the checks below. + builder.setAll(flag.contains(BanFlagEnum.ALL)); + if (status.status == BanStatus.NO_ACTION) { sendTemplatedMessage(source, "hammer.player.alreadyBanned", true, true); return true;