From 18fc1b1b62f119f01172f178f05e312d61ad3627 Mon Sep 17 00:00:00 2001
From: Spazzinq <26337405+Spazzinq@users.noreply.github.com>
Date: Thu, 1 Aug 2019 15:54:10 -0400
Subject: [PATCH] Last-minute fixes before release
---
API/pom.xml | 26 +++++++++
FlightControl/pom.xml | 22 ++++----
.../commands/TempFlyCommand.java | 54 +++++++++----------
3 files changed, 63 insertions(+), 39 deletions(-)
diff --git a/API/pom.xml b/API/pom.xml
index bd152a56..200be183 100644
--- a/API/pom.xml
+++ b/API/pom.xml
@@ -64,6 +64,32 @@
spigot-api
1.14.3-SNAPSHOT
provided
+
+
+ commons-lang
+ commons-lang
+
+
+ json-simple
+ com.googlecode.json-simple
+
+
+ gson
+ com.google.code.gson
+
+
+ ebean
+ org.avaje
+
+
+ snakeyaml
+ org.yaml
+
+
+ bungeecord-chat
+ net.md-5
+
+
org.projectlombok
diff --git a/FlightControl/pom.xml b/FlightControl/pom.xml
index 2bc52279..57b2fffb 100644
--- a/FlightControl/pom.xml
+++ b/FlightControl/pom.xml
@@ -119,12 +119,6 @@
-
- org.bstats
- bstats-bukkit
- 1.5
- compile
-
org.spigotmc
spigot-api
@@ -149,11 +143,6 @@
-
- org.projectlombok
- lombok
- 1.18.8
-
net.ess3
EssentialsX
@@ -397,5 +386,16 @@
SNAPSHOT
compile
+
+ org.projectlombok
+ lombok
+ 1.18.8
+
+
+ org.bstats
+ bstats-bukkit
+ 1.5
+ compile
+
\ No newline at end of file
diff --git a/FlightControl/src/main/java/org/spazzinq/flightcontrol/commands/TempFlyCommand.java b/FlightControl/src/main/java/org/spazzinq/flightcontrol/commands/TempFlyCommand.java
index 4c2c9fea..24f78c5c 100644
--- a/FlightControl/src/main/java/org/spazzinq/flightcontrol/commands/TempFlyCommand.java
+++ b/FlightControl/src/main/java/org/spazzinq/flightcontrol/commands/TempFlyCommand.java
@@ -41,34 +41,32 @@ public final class TempFlyCommand implements CommandExecutor {
if (args.length >= 1) {
Player p = Bukkit.getPlayer(args[0]);
if (p != null) {
- if (!s.equals(p)) {
- if (pl.getFlightManager().getTempBypassList().contains(p)) {
- pl.getFlightManager().getTempBypassList().remove(p);
- FlightControl.msg(s, "&e&lFlightControl &7» &eYou disabled " + p.getName() + "'s temporary bypass flight!");
- } else {
- // TODO timed temp-fly
-// if (args.length == 2) {
-// args[1] = args[1].toLowerCase();
-// if (args[1].matches("\\d+[smhd]")) {
-// char unit = args[1].charAt(args[1].length() - 1);
-// // Just in case it's a really
-// long time = Long.parseLong(args[1].substring(0, args[1].length() - 1)) * 1000;
-//
-// switch (unit) {
-// case 'm': time *= 60; break;
-// case 'h': time *= 3600; break;
-// case 'd': time *= 86400; break;
-// default: break;
-// }
-//
-// System.currentTimeMillis() + time
-// }
-// }
- pl.getFlightManager().getTempBypassList().add(p);
- FlightControl.msg(s, "&e&lFlightControl &7» &e" + p.getName() + " now has temporary bypass flight until the next server restart!");
- }
- } else FlightControl.msg(s, "&e&lFlightControl &7» &eControlling yourself is redundant... why don't you " +
- (pl.getConfigManager().isAutoUpdate() ? "let your flight automatically enable?" : "just do /fly?"));
+ // TODO Messages for self-tempfly (enabling it on yourself)
+ if (pl.getFlightManager().getTempBypassList().contains(p)) {
+ pl.getFlightManager().getTempBypassList().remove(p);
+ FlightControl.msg(s, "&e&lFlightControl &7» &eYou disabled " + p.getName() + "'s temporary bypass flight!");
+ } else {
+ // TODO timed temp-fly
+ // if (args.length == 2) {
+ // args[1] = args[1].toLowerCase();
+ // if (args[1].matches("\\d+[smhd]")) {
+ // char unit = args[1].charAt(args[1].length() - 1);
+ // // Just in case it's a really
+ // long time = Long.parseLong(args[1].substring(0, args[1].length() - 1)) * 1000;
+ //
+ // switch (unit) {
+ // case 'm': time *= 60; break;
+ // case 'h': time *= 3600; break;
+ // case 'd': time *= 86400; break;
+ // default: break;
+ // }
+ //
+ // System.currentTimeMillis() + time
+ // }
+ // }
+ pl.getFlightManager().getTempBypassList().add(p);
+ FlightControl.msg(s, "&e&lFlightControl &7» &e" + p.getName() + " now has temporary bypass flight until the next server restart!");
+ }
} else FlightControl.msg(s, "&e&lFlightControl &7» &eInvalid player! Please provide a valid player to give temporary bypass flight!");
} else FlightControl.msg(s, "&c&lFlightControl &7» &cPlease provide a player to give temporary bypass flight!");
} else FlightControl.msg(s, pl.getConfigManager().getNoPermission());