From 57833bee13ddf7ef3c8a09fe6e92d743bbcc4296 Mon Sep 17 00:00:00 2001 From: Driftay Date: Sat, 4 Jan 2020 18:49:55 -0500 Subject: [PATCH] Fixed TntFill (Again) -_- --- .../factions/cmd/tnt/CmdTntFill.java | 2 +- .../factions/shield/TimeFrame.java | 5 --- .../massivecraft/factions/shield/Times.java | 31 +++++++++++++++++++ 3 files changed, 32 insertions(+), 6 deletions(-) create mode 100644 src/main/java/com/massivecraft/factions/shield/Times.java diff --git a/src/main/java/com/massivecraft/factions/cmd/tnt/CmdTntFill.java b/src/main/java/com/massivecraft/factions/cmd/tnt/CmdTntFill.java index f8a44d1b..f96dbe80 100644 --- a/src/main/java/com/massivecraft/factions/cmd/tnt/CmdTntFill.java +++ b/src/main/java/com/massivecraft/factions/cmd/tnt/CmdTntFill.java @@ -111,7 +111,7 @@ public class CmdTntFill extends FCommand { } // Take TNT from the bank. - context.faction.takeTnt(getFactionTnt); + removeFromBank(context, getFactionTnt); } fillDispensers(context.fPlayer, opDispensers, amount); // Remove used TNT from player inventory. diff --git a/src/main/java/com/massivecraft/factions/shield/TimeFrame.java b/src/main/java/com/massivecraft/factions/shield/TimeFrame.java index 5698a655..9cf9263a 100644 --- a/src/main/java/com/massivecraft/factions/shield/TimeFrame.java +++ b/src/main/java/com/massivecraft/factions/shield/TimeFrame.java @@ -19,11 +19,6 @@ public class TimeFrame { private boolean starting; // pending starting countdown private boolean ending; // pending ending countdown - private enum times { - twelveAM, oneAM, twoAM, threeAM, fourAM, fiveAM, sixAM, sevenAM, eightAM, nineAM, tenAM, elevenAM, twelvePM, - onePM, twoPM, threePM, fourPM, fivePM, sixPM, sevenPM, eightPM, ninePM, tenPM, elevenPM; - } - public TimeFrame(Faction faction, Enum startingTime, Enum endingTime, boolean starting, boolean ending, boolean inEffect, int currentMinutes){ this.faction = faction; diff --git a/src/main/java/com/massivecraft/factions/shield/Times.java b/src/main/java/com/massivecraft/factions/shield/Times.java new file mode 100644 index 00000000..24de9590 --- /dev/null +++ b/src/main/java/com/massivecraft/factions/shield/Times.java @@ -0,0 +1,31 @@ +package com.massivecraft.factions.shield; + +/** + * @author Saser + */ +public enum Times { + TWELVEAM, + ONEAM, + TWOAM, + THREEAM, + FOURAM, + FIVEAM, + SIXAM, + SEVENAM, + EIGHTAM, + NINEAM, + TENAM, + ELEVENAM, + TWELVEPM, + ONEPM, + TWOPM, + THREEPM, + FOURPM, + FIVEPM, + SIXPM, + SEVENPM, + EIGHTPM, + NINEPM, + TENPM, + ELEVENPM +}