diff --git a/pom.xml b/pom.xml
index 92fec06..63d42ef 100644
--- a/pom.xml
+++ b/pom.xml
@@ -85,6 +85,7 @@
+
maven-compiler-plugin
@@ -94,11 +95,17 @@
-parameters
+
org.projectlombok
lombok-maven-plugin
1.18.20.0
+
+ ${project.basedir}/src/main/java
+ ${project.build.directory}/delombok
+ false
+
generate-sources
@@ -108,17 +115,26 @@
+
+ org.apache.maven.plugins
maven-javadoc-plugin
3.3.0
-
- nl/SBDeveloper/V10Lift/api/*.java
- nl/SBDeveloper/V10Lift/api/objects/*.java
-
+ ${project.build.directory}/delombok
+
+
+
+ nl/SBDeveloper/V10Lift/*.java
+ nl/SBDeveloper/V10Lift/commands/*.java
+ nl/SBDeveloper/V10Lift/listeners/*.java
+ nl/SBDeveloper/V10Lift/sbutils/*.java
+ nl/SBDeveloper/V10Lift/utils/*.java
+
+
maven-deploy-plugin
@@ -127,6 +143,7 @@
true
+
org.sonatype.plugins
diff --git a/src/main/lombok/nl/SBDeveloper/V10Lift/V10LiftPlugin.java b/src/main/java/nl/SBDeveloper/V10Lift/V10LiftPlugin.java
similarity index 97%
rename from src/main/lombok/nl/SBDeveloper/V10Lift/V10LiftPlugin.java
rename to src/main/java/nl/SBDeveloper/V10Lift/V10LiftPlugin.java
index 4cf287d..fbcf7fb 100644
--- a/src/main/lombok/nl/SBDeveloper/V10Lift/V10LiftPlugin.java
+++ b/src/main/java/nl/SBDeveloper/V10Lift/V10LiftPlugin.java
@@ -28,7 +28,6 @@ public class V10LiftPlugin extends JavaPlugin {
private static YamlFile config;
private static DBManager dbManager;
private static YamlFile messages;
- private static V10LiftAPI api;
private static boolean vault = false;
@Override
@@ -60,9 +59,6 @@ public class V10LiftPlugin extends JavaPlugin {
e.printStackTrace();
}
- //Load the API
- api = new V10LiftAPI();
-
//Load vault if found
if (VaultManager.setupPermissions()) {
Bukkit.getLogger().info("[V10Lift] Loading Vault hook for group whitelist support.");
@@ -128,7 +124,7 @@ public class V10LiftPlugin extends JavaPlugin {
@Override
public void onDisable() {
- dbManager.save();
+ dbManager.save(true);
dbManager.closeConnection();
instance = null;
@@ -150,10 +146,6 @@ public class V10LiftPlugin extends JavaPlugin {
return messages;
}
- public static V10LiftAPI getAPI() {
- return api;
- }
-
public static boolean isVaultEnabled() {
return vault;
}
diff --git a/src/main/lombok/nl/SBDeveloper/V10Lift/api/V10LiftAPI.java b/src/main/java/nl/SBDeveloper/V10Lift/api/V10LiftAPI.java
similarity index 99%
rename from src/main/lombok/nl/SBDeveloper/V10Lift/api/V10LiftAPI.java
rename to src/main/java/nl/SBDeveloper/V10Lift/api/V10LiftAPI.java
index 26d6445..5cb42ba 100644
--- a/src/main/lombok/nl/SBDeveloper/V10Lift/api/V10LiftAPI.java
+++ b/src/main/java/nl/SBDeveloper/V10Lift/api/V10LiftAPI.java
@@ -25,6 +25,15 @@ import java.util.*;
/** The Main API class, for all the API methods */
public class V10LiftAPI {
+ private static V10LiftAPI instance;
+
+ private V10LiftAPI() {}
+
+ public static V10LiftAPI getInstance() {
+ if (instance == null) instance = new V10LiftAPI();
+ return instance;
+ }
+
/* Private API methods */
private void sortFloors(@Nonnull Lift lift) {
ArrayList> as = new ArrayList<>(lift.getFloors().entrySet());
@@ -101,7 +110,7 @@ public class V10LiftAPI {
}
DataManager.removeLift(liftName);
- V10LiftPlugin.getDBManager().removeFromData(liftName);
+ V10LiftPlugin.getDBManager().remove(liftName);
return true;
}
diff --git a/src/main/lombok/nl/SBDeveloper/V10Lift/api/enums/LiftDirection.java b/src/main/java/nl/SBDeveloper/V10Lift/api/enums/LiftDirection.java
similarity index 100%
rename from src/main/lombok/nl/SBDeveloper/V10Lift/api/enums/LiftDirection.java
rename to src/main/java/nl/SBDeveloper/V10Lift/api/enums/LiftDirection.java
diff --git a/src/main/java/nl/SBDeveloper/V10Lift/api/enums/package-info.java b/src/main/java/nl/SBDeveloper/V10Lift/api/enums/package-info.java
new file mode 100644
index 0000000..c09a256
--- /dev/null
+++ b/src/main/java/nl/SBDeveloper/V10Lift/api/enums/package-info.java
@@ -0,0 +1,4 @@
+/**
+ * All the enums used for V10Lift
+ */
+package nl.SBDeveloper.V10Lift.api.enums;
\ No newline at end of file
diff --git a/src/main/lombok/nl/SBDeveloper/V10Lift/api/objects/Floor.java b/src/main/java/nl/SBDeveloper/V10Lift/api/objects/Floor.java
similarity index 100%
rename from src/main/lombok/nl/SBDeveloper/V10Lift/api/objects/Floor.java
rename to src/main/java/nl/SBDeveloper/V10Lift/api/objects/Floor.java
diff --git a/src/main/lombok/nl/SBDeveloper/V10Lift/api/objects/Lift.java b/src/main/java/nl/SBDeveloper/V10Lift/api/objects/Lift.java
similarity index 100%
rename from src/main/lombok/nl/SBDeveloper/V10Lift/api/objects/Lift.java
rename to src/main/java/nl/SBDeveloper/V10Lift/api/objects/Lift.java
diff --git a/src/main/lombok/nl/SBDeveloper/V10Lift/api/objects/LiftBlock.java b/src/main/java/nl/SBDeveloper/V10Lift/api/objects/LiftBlock.java
similarity index 100%
rename from src/main/lombok/nl/SBDeveloper/V10Lift/api/objects/LiftBlock.java
rename to src/main/java/nl/SBDeveloper/V10Lift/api/objects/LiftBlock.java
diff --git a/src/main/lombok/nl/SBDeveloper/V10Lift/api/objects/LiftRope.java b/src/main/java/nl/SBDeveloper/V10Lift/api/objects/LiftRope.java
similarity index 100%
rename from src/main/lombok/nl/SBDeveloper/V10Lift/api/objects/LiftRope.java
rename to src/main/java/nl/SBDeveloper/V10Lift/api/objects/LiftRope.java
diff --git a/src/main/lombok/nl/SBDeveloper/V10Lift/api/objects/LiftSign.java b/src/main/java/nl/SBDeveloper/V10Lift/api/objects/LiftSign.java
similarity index 100%
rename from src/main/lombok/nl/SBDeveloper/V10Lift/api/objects/LiftSign.java
rename to src/main/java/nl/SBDeveloper/V10Lift/api/objects/LiftSign.java
diff --git a/src/main/lombok/nl/SBDeveloper/V10Lift/api/objects/V10Entity.java b/src/main/java/nl/SBDeveloper/V10Lift/api/objects/V10Entity.java
similarity index 100%
rename from src/main/lombok/nl/SBDeveloper/V10Lift/api/objects/V10Entity.java
rename to src/main/java/nl/SBDeveloper/V10Lift/api/objects/V10Entity.java
diff --git a/src/main/lombok/nl/SBDeveloper/V10Lift/api/objects/package-info.java b/src/main/java/nl/SBDeveloper/V10Lift/api/objects/package-info.java
similarity index 100%
rename from src/main/lombok/nl/SBDeveloper/V10Lift/api/objects/package-info.java
rename to src/main/java/nl/SBDeveloper/V10Lift/api/objects/package-info.java
diff --git a/src/main/lombok/nl/SBDeveloper/V10Lift/api/package-info.java b/src/main/java/nl/SBDeveloper/V10Lift/api/package-info.java
similarity index 100%
rename from src/main/lombok/nl/SBDeveloper/V10Lift/api/package-info.java
rename to src/main/java/nl/SBDeveloper/V10Lift/api/package-info.java
diff --git a/src/main/lombok/nl/SBDeveloper/V10Lift/api/runnables/DoorCloser.java b/src/main/java/nl/SBDeveloper/V10Lift/api/runnables/DoorCloser.java
similarity index 88%
rename from src/main/lombok/nl/SBDeveloper/V10Lift/api/runnables/DoorCloser.java
rename to src/main/java/nl/SBDeveloper/V10Lift/api/runnables/DoorCloser.java
index 3f71096..301ac7d 100644
--- a/src/main/lombok/nl/SBDeveloper/V10Lift/api/runnables/DoorCloser.java
+++ b/src/main/java/nl/SBDeveloper/V10Lift/api/runnables/DoorCloser.java
@@ -1,6 +1,7 @@
package nl.SBDeveloper.V10Lift.api.runnables;
import nl.SBDeveloper.V10Lift.V10LiftPlugin;
+import nl.SBDeveloper.V10Lift.api.V10LiftAPI;
import nl.SBDeveloper.V10Lift.managers.DataManager;
import org.bukkit.Bukkit;
@@ -18,7 +19,7 @@ public class DoorCloser implements Runnable {
@Override
public void run() {
- if (V10LiftPlugin.getAPI().closeDoor(liftName)) stop();
+ if (V10LiftAPI.getInstance().closeDoor(liftName)) stop();
}
public void stop() {
diff --git a/src/main/lombok/nl/SBDeveloper/V10Lift/api/runnables/MoveLift.java b/src/main/java/nl/SBDeveloper/V10Lift/api/runnables/MoveLift.java
similarity index 97%
rename from src/main/lombok/nl/SBDeveloper/V10Lift/api/runnables/MoveLift.java
rename to src/main/java/nl/SBDeveloper/V10Lift/api/runnables/MoveLift.java
index 386e34b..c2816ff 100644
--- a/src/main/lombok/nl/SBDeveloper/V10Lift/api/runnables/MoveLift.java
+++ b/src/main/java/nl/SBDeveloper/V10Lift/api/runnables/MoveLift.java
@@ -3,6 +3,7 @@ package nl.SBDeveloper.V10Lift.api.runnables;
import com.cryptomorin.xseries.XMaterial;
import com.cryptomorin.xseries.XSound;
import nl.SBDeveloper.V10Lift.V10LiftPlugin;
+import nl.SBDeveloper.V10Lift.api.V10LiftAPI;
import nl.SBDeveloper.V10Lift.api.enums.LiftDirection;
import nl.SBDeveloper.V10Lift.api.objects.*;
import nl.SBDeveloper.V10Lift.managers.AntiCopyBlockManager;
@@ -119,7 +120,7 @@ public class MoveLift implements Runnable {
if (changeOfDefect > 0.0D) {
double chance = ThreadLocalRandom.current().nextDouble(100);
if (chance < changeOfDefect) {
- V10LiftPlugin.getAPI().setDefective(liftName, true);
+ V10LiftAPI.getInstance().setDefective(liftName, true);
return;
}
}
@@ -141,7 +142,7 @@ public class MoveLift implements Runnable {
List antiCopyBlocks = new ArrayList<>();
if (direction == LiftDirection.UP || direction == LiftDirection.DOWN) {
- if (!V10LiftPlugin.getAPI().closeDoor(liftName)) return;
+ if (!V10LiftAPI.getInstance().closeDoor(liftName)) return;
if (direction == LiftDirection.UP) {
//MOVE ROPES
@@ -149,7 +150,7 @@ public class MoveLift implements Runnable {
if (rope.getCurrently() > rope.getMaxY()) {
Bukkit.getLogger().info("[V10Lift] Lift " + liftName + " reaches the upper rope end but won't stop!!");
- V10LiftPlugin.getAPI().setDefective(liftName, true);
+ V10LiftAPI.getInstance().setDefective(liftName, true);
lift.getToMove().clear();
queueIterator.remove();
return;
@@ -328,7 +329,7 @@ public class MoveLift implements Runnable {
if (rope.getCurrently() < rope.getMinY()) {
Bukkit.getLogger().info("[V10Lift] Lift " + liftName + " reaches the upper rope end but won't stop!!");
- V10LiftPlugin.getAPI().setDefective(liftName, true);
+ V10LiftAPI.getInstance().setDefective(liftName, true);
lift.getToMove().clear();
queueIterator.remove();
@@ -420,7 +421,7 @@ public class MoveLift implements Runnable {
ls.setState((byte) 0);
}
- V10LiftPlugin.getAPI().openDoor(lift, liftName, floorTo);
+ V10LiftAPI.getInstance().openDoor(lift, liftName, floorTo);
if (lift.isRealistic()) lift.setCounter(ft);
diff --git a/src/main/lombok/nl/SBDeveloper/V10Lift/api/runnables/package-info.java b/src/main/java/nl/SBDeveloper/V10Lift/api/runnables/package-info.java
similarity index 100%
rename from src/main/lombok/nl/SBDeveloper/V10Lift/api/runnables/package-info.java
rename to src/main/java/nl/SBDeveloper/V10Lift/api/runnables/package-info.java
diff --git a/src/main/lombok/nl/SBDeveloper/V10Lift/commands/V10LiftCommand.java b/src/main/java/nl/SBDeveloper/V10Lift/commands/V10LiftCommand.java
similarity index 96%
rename from src/main/lombok/nl/SBDeveloper/V10Lift/commands/V10LiftCommand.java
rename to src/main/java/nl/SBDeveloper/V10Lift/commands/V10LiftCommand.java
index 2b98847..1254cac 100644
--- a/src/main/lombok/nl/SBDeveloper/V10Lift/commands/V10LiftCommand.java
+++ b/src/main/java/nl/SBDeveloper/V10Lift/commands/V10LiftCommand.java
@@ -2,6 +2,7 @@ package nl.SBDeveloper.V10Lift.commands;
import com.cryptomorin.xseries.XMaterial;
import nl.SBDeveloper.V10Lift.V10LiftPlugin;
+import nl.SBDeveloper.V10Lift.api.V10LiftAPI;
import nl.SBDeveloper.V10Lift.api.objects.Floor;
import nl.SBDeveloper.V10Lift.api.objects.Lift;
import nl.SBDeveloper.V10Lift.api.objects.LiftBlock;
@@ -261,7 +262,7 @@ public class V10LiftCommand implements CommandExecutor {
return true;
}
- V10LiftPlugin.getAPI().setDefective(liftName, true);
+ V10LiftAPI.getInstance().setDefective(liftName, true);
ConfigUtil.sendMessage(sender, "Disable.Disabled");
return true;
}
@@ -271,7 +272,7 @@ public class V10LiftCommand implements CommandExecutor {
if (args.length == 1 && sender instanceof Player) {
//v10lift stop -> Get liftName from loc and floorName from sign
Player p = (Player) sender;
- liftName = V10LiftPlugin.getAPI().getLiftByLocation(p.getLocation());
+ liftName = V10LiftAPI.getInstance().getLiftByLocation(p.getLocation());
} else if (args.length == 1) {
ConfigUtil.sendMessage(sender, "Stop.NonPlayer");
return true;
@@ -303,7 +304,7 @@ public class V10LiftCommand implements CommandExecutor {
if (args.length == 1 && sender instanceof Player) {
//v10lift start -> Get liftName from loc and floorName from sign
Player p = (Player) sender;
- liftName = V10LiftPlugin.getAPI().getLiftByLocation(p.getLocation());
+ liftName = V10LiftAPI.getInstance().getLiftByLocation(p.getLocation());
} else if (args.length == 1) {
ConfigUtil.sendMessage(sender, "Start.NonPlayer");
return true;
@@ -341,7 +342,7 @@ public class V10LiftCommand implements CommandExecutor {
}
Floor f = lift.getFloors().get(floorName);
- V10LiftPlugin.getAPI().addToQueue(liftName, f, floorName);
+ V10LiftAPI.getInstance().addToQueue(liftName, f, floorName);
ConfigUtil.sendMessage(sender, "Start.Started", Collections.singletonMap("%Name%", liftName));
return true;
}
@@ -354,13 +355,13 @@ public class V10LiftCommand implements CommandExecutor {
}
e.getValue().setQueue(null);
- V10LiftPlugin.getAPI().sortLiftBlocks(lift);
+ V10LiftAPI.getInstance().sortLiftBlocks(lift);
}
DataManager.clearMovingTasks();
V10LiftPlugin.getSConfig().reloadConfig();
try {
- V10LiftPlugin.getDBManager().save();
+ V10LiftPlugin.getDBManager().save(true);
V10LiftPlugin.getDBManager().load();
} catch (SQLException e) {
e.printStackTrace();
@@ -406,7 +407,7 @@ public class V10LiftCommand implements CommandExecutor {
if (DataManager.containsBuilderPlayer(p.getUniqueId())) {
DataManager.removeBuilderPlayer(p.getUniqueId());
- V10LiftPlugin.getAPI().sortLiftBlocks(DataManager.getEditPlayer(p.getUniqueId()));
+ V10LiftAPI.getInstance().sortLiftBlocks(DataManager.getEditPlayer(p.getUniqueId()));
abort = true;
}
@@ -473,7 +474,7 @@ public class V10LiftCommand implements CommandExecutor {
}
}
}
- V10LiftPlugin.getAPI().setDefective(liftName, false);
+ V10LiftAPI.getInstance().setDefective(liftName, false);
ConfigUtil.sendMessage(sender, "Repair.Repaired");
return true;
}
@@ -557,7 +558,7 @@ public class V10LiftCommand implements CommandExecutor {
if (!DataManager.containsLift(liftName)) {
ConfigUtil.sendMessage(sender, "Whois.DoesntExists");
} else {
- V10LiftPlugin.getAPI().sendLiftInfo(sender, liftName);
+ V10LiftAPI.getInstance().sendLiftInfo(sender, liftName);
}
}
return true;
@@ -731,7 +732,7 @@ public class V10LiftCommand implements CommandExecutor {
if (DataManager.containsBuilderPlayer(p.getUniqueId())) {
DataManager.removeBuilderPlayer(p.getUniqueId());
- V10LiftPlugin.getAPI().sortLiftBlocks(DataManager.getEditPlayer(p.getUniqueId()));
+ V10LiftAPI.getInstance().sortLiftBlocks(DataManager.getEditPlayer(p.getUniqueId()));
ConfigUtil.sendMessage(sender, "Build.Disabled");
} else {
DataManager.addBuilderPlayer(p.getUniqueId());
@@ -754,7 +755,7 @@ public class V10LiftCommand implements CommandExecutor {
}
Bukkit.dispatchCommand(sender, "v10lift edit");
- V10LiftPlugin.getAPI().renameLift(liftName, args[1]);
+ V10LiftAPI.getInstance().renameLift(liftName, args[1]);
Bukkit.dispatchCommand(sender, "v10lift edit " + args[1]);
ConfigUtil.sendMessage(sender, "Rename.Renamed");
@@ -877,7 +878,7 @@ public class V10LiftCommand implements CommandExecutor {
if (args[1].equalsIgnoreCase("add")) {
Block b = p.getLocation().getBlock();
String floorName = args[2];
- int response = V10LiftPlugin.getAPI().addFloor(liftName, floorName, new Floor(b.getY() - 1, b.getWorld().getName()));
+ int response = V10LiftAPI.getInstance().addFloor(liftName, floorName, new Floor(b.getY() - 1, b.getWorld().getName()));
switch (response) {
case 0:
ConfigUtil.sendMessage(sender, "Floor.Added");
@@ -894,7 +895,7 @@ public class V10LiftCommand implements CommandExecutor {
}
} else if (args[1].equalsIgnoreCase("del")) {
String floorName = args[2];
- if (!V10LiftPlugin.getAPI().removeFloor(liftName, floorName)) {
+ if (!V10LiftAPI.getInstance().removeFloor(liftName, floorName)) {
ConfigUtil.sendMessage(sender, "General.InternalError");
} else {
ConfigUtil.sendMessage(sender, "Floor.Removed");
@@ -907,7 +908,7 @@ public class V10LiftCommand implements CommandExecutor {
String floorName = args[2];
String newFloorName = args[3];
- int response = V10LiftPlugin.getAPI().renameFloor(liftName, floorName, newFloorName);
+ int response = V10LiftAPI.getInstance().renameFloor(liftName, floorName, newFloorName);
switch (response) {
case 0:
ConfigUtil.sendMessage(sender, "Floor.Renamed");
@@ -948,7 +949,7 @@ public class V10LiftCommand implements CommandExecutor {
DataManager.removeOfflineRemovesPlayer(p.getUniqueId());
if (DataManager.containsBuilderPlayer(p.getUniqueId())) {
DataManager.removeBuilderPlayer(p.getUniqueId());
- V10LiftPlugin.getAPI().sortLiftBlocks(liftName);
+ V10LiftAPI.getInstance().sortLiftBlocks(liftName);
}
DataManager.removeRopeEditPlayer(p.getUniqueId());
DataManager.removeRopeRemovesPlayer(p.getUniqueId());
@@ -1048,7 +1049,7 @@ public class V10LiftCommand implements CommandExecutor {
return true;
}
- if (!V10LiftPlugin.getAPI().removeLift(args[1])) {
+ if (!V10LiftAPI.getInstance().removeLift(args[1])) {
ConfigUtil.sendMessage(sender, "Delete.NotRemoved", Collections.singletonMap("%Name%", args[1]));
return true;
}
@@ -1072,15 +1073,15 @@ public class V10LiftCommand implements CommandExecutor {
return true;
}
- if (!V10LiftPlugin.getAPI().createLift(p, args[1])) {
+ if (!V10LiftAPI.getInstance().createLift(p, args[1])) {
ConfigUtil.sendMessage(sender, "General.AlreadyExists");
return true;
}
TreeSet blcks = DataManager.getLift(args[1]).getBlocks();
- blocks.forEach(block -> V10LiftPlugin.getAPI().addBlockToLift(blcks, block));
- V10LiftPlugin.getAPI().sortLiftBlocks(args[1]);
+ blocks.forEach(block -> V10LiftAPI.getInstance().addBlockToLift(blcks, block));
+ V10LiftAPI.getInstance().sortLiftBlocks(args[1]);
DataManager.removePlayer(p.getUniqueId());
ConfigUtil.sendMessage(p, "Create.Created", Collections.singletonMap("%Name%", args[1]));
p.performCommand("v10lift edit " + args[1]);
diff --git a/src/main/lombok/nl/SBDeveloper/V10Lift/commands/V10LiftTabCompleter.java b/src/main/java/nl/SBDeveloper/V10Lift/commands/V10LiftTabCompleter.java
similarity index 100%
rename from src/main/lombok/nl/SBDeveloper/V10Lift/commands/V10LiftTabCompleter.java
rename to src/main/java/nl/SBDeveloper/V10Lift/commands/V10LiftTabCompleter.java
diff --git a/src/main/lombok/nl/SBDeveloper/V10Lift/commands/package-info.java b/src/main/java/nl/SBDeveloper/V10Lift/commands/package-info.java
similarity index 100%
rename from src/main/lombok/nl/SBDeveloper/V10Lift/commands/package-info.java
rename to src/main/java/nl/SBDeveloper/V10Lift/commands/package-info.java
diff --git a/src/main/lombok/nl/SBDeveloper/V10Lift/listeners/BlockBreakListener.java b/src/main/java/nl/SBDeveloper/V10Lift/listeners/BlockBreakListener.java
similarity index 96%
rename from src/main/lombok/nl/SBDeveloper/V10Lift/listeners/BlockBreakListener.java
rename to src/main/java/nl/SBDeveloper/V10Lift/listeners/BlockBreakListener.java
index ded06ed..331b555 100644
--- a/src/main/lombok/nl/SBDeveloper/V10Lift/listeners/BlockBreakListener.java
+++ b/src/main/java/nl/SBDeveloper/V10Lift/listeners/BlockBreakListener.java
@@ -1,5 +1,6 @@
package nl.SBDeveloper.V10Lift.listeners;
+import nl.SBDeveloper.V10Lift.api.V10LiftAPI;
import nl.SBDeveloper.V10Lift.api.objects.Floor;
import nl.SBDeveloper.V10Lift.api.objects.Lift;
import nl.SBDeveloper.V10Lift.api.objects.LiftBlock;
@@ -22,7 +23,7 @@ public class BlockBreakListener implements Listener {
@EventHandler(priority = EventPriority.HIGH, ignoreCancelled = true)
public void onBlockBreak(BlockBreakEvent e) {
Block b = e.getBlock();
- if (V10LiftPlugin.getAPI().isRope(b)) {
+ if (V10LiftAPI.getInstance().isRope(b)) {
ConfigUtil.sendMessage(e.getPlayer(), "General.RemoveRopeFirst");
e.setCancelled(true);
return;
diff --git a/src/main/lombok/nl/SBDeveloper/V10Lift/listeners/EntityDamageListener.java b/src/main/java/nl/SBDeveloper/V10Lift/listeners/EntityDamageListener.java
similarity index 100%
rename from src/main/lombok/nl/SBDeveloper/V10Lift/listeners/EntityDamageListener.java
rename to src/main/java/nl/SBDeveloper/V10Lift/listeners/EntityDamageListener.java
diff --git a/src/main/lombok/nl/SBDeveloper/V10Lift/listeners/PlayerInteractListener.java b/src/main/java/nl/SBDeveloper/V10Lift/listeners/PlayerInteractListener.java
similarity index 93%
rename from src/main/lombok/nl/SBDeveloper/V10Lift/listeners/PlayerInteractListener.java
rename to src/main/java/nl/SBDeveloper/V10Lift/listeners/PlayerInteractListener.java
index b02cc89..e8d7073 100644
--- a/src/main/lombok/nl/SBDeveloper/V10Lift/listeners/PlayerInteractListener.java
+++ b/src/main/java/nl/SBDeveloper/V10Lift/listeners/PlayerInteractListener.java
@@ -2,6 +2,7 @@ package nl.SBDeveloper.V10Lift.listeners;
import com.cryptomorin.xseries.XMaterial;
import nl.SBDeveloper.V10Lift.V10LiftPlugin;
+import nl.SBDeveloper.V10Lift.api.V10LiftAPI;
import nl.SBDeveloper.V10Lift.api.objects.Floor;
import nl.SBDeveloper.V10Lift.api.objects.Lift;
import nl.SBDeveloper.V10Lift.api.objects.LiftBlock;
@@ -52,7 +53,7 @@ public class PlayerInteractListener implements Listener {
for (LiftBlock lb : lift.getOfflineInputs()) {
if (world.equals(lb.getWorld()) && x == lb.getX() && y == lb.getY() && z == lb.getZ()) {
lb.setActive(!lb.isActive());
- V10LiftPlugin.getAPI().setOffline(entry.getKey(), lb.isActive());
+ V10LiftAPI.getInstance().setOffline(entry.getKey(), lb.isActive());
return;
}
}
@@ -61,7 +62,7 @@ public class PlayerInteractListener implements Listener {
for (LiftBlock lb : lift.getInputs()) {
if (world.equals(lb.getWorld()) && x == lb.getX() && y == lb.getY() && z == lb.getZ()) {
- V10LiftPlugin.getAPI().addToQueue(entry.getKey(), lift.getFloors().get(lb.getFloor()), lb.getFloor());
+ V10LiftAPI.getInstance().addToQueue(entry.getKey(), lift.getFloors().get(lb.getFloor()), lb.getFloor());
e.setCancelled(true);
return;
}
@@ -121,13 +122,13 @@ public class PlayerInteractListener implements Listener {
return;
}
- if (!floor.getGroupWhitelist().isEmpty() && !VaultManager.userHasAnyGroup(p, floor.getGroupWhitelist()) && !p.hasPermission("v10lift.admin")) {
+ if (!floor.getGroupWhitelist().isEmpty() && !VaultManager.inAnyGroup(p, floor.getGroupWhitelist()) && !p.hasPermission("v10lift.admin")) {
ConfigUtil.sendMessage(e.getPlayer(), "General.NoWhitelistPermission");
e.setCancelled(true);
return;
}
- V10LiftPlugin.getAPI().addToQueue(liftName, lift.getFloors().get(f), f);
+ V10LiftAPI.getInstance().addToQueue(liftName, lift.getFloors().get(f), f);
}
//BLOCK ADD
@@ -140,7 +141,7 @@ public class PlayerInteractListener implements Listener {
if (DataManager.containsPlayer(p.getUniqueId())) {
if (e.getAction() != Action.RIGHT_CLICK_BLOCK) return;
e.setCancelled(true);
- int res = V10LiftPlugin.getAPI().switchBlockAtLift(DataManager.getPlayer(p.getUniqueId()), e.getClickedBlock());
+ int res = V10LiftAPI.getInstance().switchBlockAtLift(DataManager.getPlayer(p.getUniqueId()), e.getClickedBlock());
switch (res) {
case 0:
ConfigUtil.sendMessage(e.getPlayer(), "Build.BlockAdded");
@@ -210,7 +211,7 @@ public class PlayerInteractListener implements Listener {
} else if (DataManager.containsBuilderPlayer(p.getUniqueId())) {
if (e.getAction() != Action.RIGHT_CLICK_BLOCK) return;
e.setCancelled(true);
- int res = V10LiftPlugin.getAPI().switchBlockAtLift(DataManager.getEditPlayer(p.getUniqueId()), e.getClickedBlock());
+ int res = V10LiftAPI.getInstance().switchBlockAtLift(DataManager.getEditPlayer(p.getUniqueId()), e.getClickedBlock());
switch (res) {
case 0:
ConfigUtil.sendMessage(e.getPlayer(), "Build.BlockAdded");
@@ -241,7 +242,7 @@ public class PlayerInteractListener implements Listener {
ConfigUtil.sendMessage(e.getPlayer(), "Rope.OnlyUp");
return;
}
- int res = V10LiftPlugin.getAPI().addRope(DataManager.getEditPlayer(p.getUniqueId()), now.getWorld(), start.getX(), now.getY(), start.getY(), start.getZ());
+ int res = V10LiftAPI.getInstance().addRope(DataManager.getEditPlayer(p.getUniqueId()), now.getWorld(), start.getX(), now.getY(), start.getY(), start.getZ());
switch (res) {
case 0:
ConfigUtil.sendMessage(e.getPlayer(), "Rope.Created");
@@ -266,11 +267,11 @@ public class PlayerInteractListener implements Listener {
e.setCancelled(true);
Block block = e.getClickedBlock();
String liftName = DataManager.getEditPlayer(p.getUniqueId());
- if (!V10LiftPlugin.getAPI().containsRope(liftName, block)) {
+ if (!V10LiftAPI.getInstance().containsRope(liftName, block)) {
ConfigUtil.sendMessage(e.getPlayer(), "Rope.NotARope");
return;
}
- V10LiftPlugin.getAPI().removeRope(liftName, block);
+ V10LiftAPI.getInstance().removeRope(liftName, block);
DataManager.removeRopeRemovesPlayer(p.getUniqueId());
ConfigUtil.sendMessage(e.getPlayer(), "Rope.Removed");
} else if (DataManager.containsDoorEditPlayer(p.getUniqueId())) {
@@ -314,7 +315,7 @@ public class PlayerInteractListener implements Listener {
for (Map.Entry entry : DataManager.getLifts().entrySet()) {
Lift lift = entry.getValue();
if (lift.getBlocks().contains(lb) || lift.getInputs().contains(lb) || lift.getSigns().contains(lb) || lift.getRopes().contains(lb) || lift.getOfflineInputs().contains(lb)) {
- V10LiftPlugin.getAPI().sendLiftInfo(p, entry.getKey(), lift);
+ V10LiftAPI.getInstance().sendLiftInfo(p, entry.getKey(), lift);
return;
}
}
@@ -360,7 +361,7 @@ public class PlayerInteractListener implements Listener {
}
p.getInventory().remove(new ItemStack(masterItem, masterAmount));
}
- V10LiftPlugin.getAPI().setDefective(liftName, false);
+ V10LiftAPI.getInstance().setDefective(liftName, false);
}
e.setCancelled(true);
return;
@@ -391,7 +392,7 @@ public class PlayerInteractListener implements Listener {
sign.setLine(3, ChatColor.GREEN + f2);
} else if (!floor.getUserWhitelist().isEmpty() && !floor.getUserWhitelist().contains(p.getUniqueId()) && !p.hasPermission("v10lift.admin")) {
sign.setLine(3, ChatColor.RED + f2);
- } else if (!floor.getGroupWhitelist().isEmpty() && !VaultManager.userHasAnyGroup(p, floor.getGroupWhitelist()) && !p.hasPermission("v10lift.admin")) {
+ } else if (!floor.getGroupWhitelist().isEmpty() && !VaultManager.inAnyGroup(p, floor.getGroupWhitelist()) && !p.hasPermission("v10lift.admin")) {
sign.setLine(3, ChatColor.RED + f2);
} else {
sign.setLine(3, ChatColor.YELLOW + f2);
@@ -410,13 +411,13 @@ public class PlayerInteractListener implements Listener {
return;
}
- if (!floor.getGroupWhitelist().isEmpty() && !VaultManager.userHasAnyGroup(p, floor.getGroupWhitelist()) && !p.hasPermission("v10lift.admin")) {
+ if (!floor.getGroupWhitelist().isEmpty() && !VaultManager.inAnyGroup(p, floor.getGroupWhitelist()) && !p.hasPermission("v10lift.admin")) {
ConfigUtil.sendMessage(e.getPlayer(), "General.NoWhitelistPermission");
e.setCancelled(true);
return;
}
- V10LiftPlugin.getAPI().addToQueue(liftName, lift.getFloors().get(f), f);
+ V10LiftAPI.getInstance().addToQueue(liftName, lift.getFloors().get(f), f);
}
}
}
diff --git a/src/main/lombok/nl/SBDeveloper/V10Lift/listeners/SignChangeListener.java b/src/main/java/nl/SBDeveloper/V10Lift/listeners/SignChangeListener.java
similarity index 100%
rename from src/main/lombok/nl/SBDeveloper/V10Lift/listeners/SignChangeListener.java
rename to src/main/java/nl/SBDeveloper/V10Lift/listeners/SignChangeListener.java
diff --git a/src/main/lombok/nl/SBDeveloper/V10Lift/listeners/package-info.java b/src/main/java/nl/SBDeveloper/V10Lift/listeners/package-info.java
similarity index 100%
rename from src/main/lombok/nl/SBDeveloper/V10Lift/listeners/package-info.java
rename to src/main/java/nl/SBDeveloper/V10Lift/listeners/package-info.java
diff --git a/src/main/lombok/nl/SBDeveloper/V10Lift/managers/AntiCopyBlockManager.java b/src/main/java/nl/SBDeveloper/V10Lift/managers/AntiCopyBlockManager.java
similarity index 93%
rename from src/main/lombok/nl/SBDeveloper/V10Lift/managers/AntiCopyBlockManager.java
rename to src/main/java/nl/SBDeveloper/V10Lift/managers/AntiCopyBlockManager.java
index f799a90..08ea76f 100644
--- a/src/main/lombok/nl/SBDeveloper/V10Lift/managers/AntiCopyBlockManager.java
+++ b/src/main/java/nl/SBDeveloper/V10Lift/managers/AntiCopyBlockManager.java
@@ -5,6 +5,9 @@ import org.bukkit.Material;
import java.util.HashSet;
+/**
+ * This class contains a set with all the blocks who may not be copied
+ */
public class AntiCopyBlockManager {
private static final HashSet antiCopy = new HashSet<>();
@@ -79,6 +82,12 @@ public class AntiCopyBlockManager {
antiCopy.add(XMaterial.JUKEBOX);
}
+ /**
+ * Check if this block may not be copied
+ *
+ * @param mat The material to check for
+ * @return true = not copy this block
+ */
public static boolean isAntiCopy(Material mat) {
XMaterial xmat = XMaterial.matchXMaterial(mat);
return antiCopy.contains(xmat);
diff --git a/src/main/lombok/nl/SBDeveloper/V10Lift/managers/DBManager.java b/src/main/java/nl/SBDeveloper/V10Lift/managers/DBManager.java
similarity index 52%
rename from src/main/lombok/nl/SBDeveloper/V10Lift/managers/DBManager.java
rename to src/main/java/nl/SBDeveloper/V10Lift/managers/DBManager.java
index 8a9b2ee..f38876a 100644
--- a/src/main/lombok/nl/SBDeveloper/V10Lift/managers/DBManager.java
+++ b/src/main/java/nl/SBDeveloper/V10Lift/managers/DBManager.java
@@ -12,12 +12,20 @@ import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.Map;
+/**
+ * The DBManager manages the database
+ */
public class DBManager {
private static final Gson gson = new Gson();
private static SQLiteDB data;
private static Connection con;
+ /**
+ * Construct the database manager
+ *
+ * @param name The name of the sqlite database file
+ */
public DBManager(String name) {
data = new SQLiteDB(name);
@@ -32,6 +40,11 @@ public class DBManager {
}
}
+ /**
+ * Load the database from data
+ *
+ * @throws SQLException If the SQL SELECT fails
+ */
public void load() throws SQLException {
String query = "SELECT * FROM lifts";
PreparedStatement statement = con.prepareStatement(query);
@@ -56,15 +69,20 @@ public class DBManager {
}
}
- public void removeFromData(String name) {
- if (!DataManager.containsLift(name)) {
- Bukkit.getLogger().info("[V10Lift] Removing lift " + name + " to data...");
+ /**
+ * Remove a lift from data
+ *
+ * @param liftName The name of the lift
+ */
+ public void remove(String liftName) {
+ if (!DataManager.containsLift(liftName)) {
+ Bukkit.getLogger().info("[V10Lift] Removing lift " + liftName + " to data...");
Bukkit.getScheduler().runTaskAsynchronously(V10LiftPlugin.getInstance(), () -> {
try {
String query = "DELETE FROM lifts WHERE liftName = ?";
PreparedStatement statement = con.prepareStatement(query);
- statement.setString(1, name);
+ statement.setString(1, liftName);
statement.executeUpdate();
} catch (SQLException e) {
e.printStackTrace();
@@ -73,66 +91,74 @@ public class DBManager {
}
}
+ /**
+ * Save all lifts to data
+ * This is done async
+ */
public void save() {
- for (Map.Entry entry : DataManager.getLifts().entrySet()) {
- byte[] blob = gson.toJson(entry.getValue()).getBytes();
-
- Bukkit.getLogger().info("[V10Lift] Saving lift " + entry.getKey() + " to data...");
+ save(false);
+ }
+ /**
+ * Save all lifts to data
+ * @param force true if sync, false if async
+ */
+ public void save(boolean force) {
+ if (!force) {
Bukkit.getScheduler().runTaskAsynchronously(V10LiftPlugin.getInstance(), () -> {
- try {
- String query = "INSERT INTO lifts (liftName, liftData) VALUES (?, ?)";
- PreparedStatement statement = con.prepareStatement(query);
- statement.setString(1, entry.getKey());
- statement.setBytes(2, blob);
- statement.executeUpdate();
- } catch (SQLException ignored) {
- }
- });
-
- Bukkit.getScheduler().runTaskAsynchronously(V10LiftPlugin.getInstance(), () -> {
- try {
- String query2 = "UPDATE lifts SET liftData = ? WHERE liftName = ?";
- PreparedStatement statement2 = con.prepareStatement(query2);
- statement2.setBytes(1, blob);
- statement2.setString(2, entry.getKey());
- statement2.executeUpdate();
- } catch (SQLException e) {
- e.printStackTrace();
+ for (Map.Entry entry : DataManager.getLifts().entrySet()) {
+ saveLift(entry.getKey(), entry.getValue());
}
});
+ } else {
+ for (Map.Entry entry : DataManager.getLifts().entrySet()) {
+ saveLift(entry.getKey(), entry.getValue());
+ }
}
}
- public void saveLift(String name, Lift lift) {
+ /**
+ * Save a lift to data
+ *
+ * @param liftName The name of the lift
+ * @param lift The lift itself
+ */
+ public void saveLift(String liftName, Lift lift) {
+ Bukkit.getLogger().info("[V10Lift] Saving lift " + liftName + " to data...");
+
byte[] blob = gson.toJson(lift).getBytes();
-
- Bukkit.getLogger().info("[V10Lift] Saving lift " + name + " to data...");
-
- Bukkit.getScheduler().runTaskAsynchronously(V10LiftPlugin.getInstance(), () -> {
- try {
- String query = "INSERT INTO lifts (liftName, liftData) VALUES (?, ?)";
- PreparedStatement statement = con.prepareStatement(query);
- statement.setString(1, name);
- statement.setBytes(2, blob);
- statement.executeUpdate();
- } catch (SQLException ignored) {
- }
- });
-
- Bukkit.getScheduler().runTaskAsynchronously(V10LiftPlugin.getInstance(), () -> {
- try {
- String query2 = "UPDATE lifts SET liftData = ? WHERE liftName = ?";
- PreparedStatement statement2 = con.prepareStatement(query2);
- statement2.setBytes(1, blob);
- statement2.setString(2, name);
- statement2.executeUpdate();
- } catch (SQLException e) {
- e.printStackTrace();
- }
- });
+ Bukkit.getScheduler().runTaskAsynchronously(V10LiftPlugin.getInstance(), () -> updateLift(liftName, blob));
}
+ /**
+ * Update a lift in data
+ *
+ * @param liftName The name of the lift
+ * @param liftData The JSON blob of the lift object
+ */
+ private void updateLift(String liftName, byte[] liftData) {
+ try {
+ String query = "INSERT INTO lifts (liftName, liftData) VALUES (?, ?)";
+ PreparedStatement statement = con.prepareStatement(query);
+ statement.setString(1, liftName);
+ statement.setBytes(2, liftData);
+ statement.executeUpdate();
+ } catch (SQLException ignored) {}
+
+ try {
+ String query2 = "UPDATE lifts SET liftData = ? WHERE liftName = ?";
+ PreparedStatement statement2 = con.prepareStatement(query2);
+ statement2.setBytes(1, liftData);
+ statement2.setString(2, liftName);
+ statement2.executeUpdate();
+ } catch (SQLException e) {
+ e.printStackTrace();
+ }
+ }
+
+ /**
+ * Close the connection with the database
+ */
public void closeConnection() {
data.closeSource();
}
diff --git a/src/main/lombok/nl/SBDeveloper/V10Lift/managers/DataManager.java b/src/main/java/nl/SBDeveloper/V10Lift/managers/DataManager.java
similarity index 100%
rename from src/main/lombok/nl/SBDeveloper/V10Lift/managers/DataManager.java
rename to src/main/java/nl/SBDeveloper/V10Lift/managers/DataManager.java
diff --git a/src/main/lombok/nl/SBDeveloper/V10Lift/managers/ForbiddenBlockManager.java b/src/main/java/nl/SBDeveloper/V10Lift/managers/ForbiddenBlockManager.java
similarity index 87%
rename from src/main/lombok/nl/SBDeveloper/V10Lift/managers/ForbiddenBlockManager.java
rename to src/main/java/nl/SBDeveloper/V10Lift/managers/ForbiddenBlockManager.java
index 7437e37..602c805 100644
--- a/src/main/lombok/nl/SBDeveloper/V10Lift/managers/ForbiddenBlockManager.java
+++ b/src/main/java/nl/SBDeveloper/V10Lift/managers/ForbiddenBlockManager.java
@@ -5,6 +5,9 @@ import org.bukkit.Material;
import java.util.HashSet;
+/**
+ * This class contains a set with all the blocks who may not be placed in a lift
+ */
public class ForbiddenBlockManager {
private static final HashSet forbidden = new HashSet<>();
@@ -41,6 +44,12 @@ public class ForbiddenBlockManager {
forbidden.add(XMaterial.STICKY_PISTON);
}
+ /**
+ * Check if this block may not be placed in a lift
+ *
+ * @param mat The material to check for
+ * @return true = not place this block
+ */
public static boolean isForbidden(Material mat) {
XMaterial xmat = XMaterial.matchXMaterial(mat);
return forbidden.contains(xmat);
diff --git a/src/main/lombok/nl/SBDeveloper/V10Lift/managers/VaultManager.java b/src/main/java/nl/SBDeveloper/V10Lift/managers/VaultManager.java
similarity index 62%
rename from src/main/lombok/nl/SBDeveloper/V10Lift/managers/VaultManager.java
rename to src/main/java/nl/SBDeveloper/V10Lift/managers/VaultManager.java
index b354f85..7834c9f 100644
--- a/src/main/lombok/nl/SBDeveloper/V10Lift/managers/VaultManager.java
+++ b/src/main/java/nl/SBDeveloper/V10Lift/managers/VaultManager.java
@@ -13,6 +13,11 @@ import java.util.List;
public class VaultManager {
private static Permission perms = null;
+ /**
+ * Setup the Vault permission API
+ *
+ * @return true if success, false if Vault not found
+ */
public static boolean setupPermissions() {
if (Bukkit.getServer().getPluginManager().getPlugin("Vault") == null) {
return false;
@@ -22,17 +27,35 @@ public class VaultManager {
return true;
}
+ /**
+ * Get all the groups in the server
+ *
+ * @return A list with all the names of all the groups in the server
+ */
public static List getGroups() {
return Arrays.asList(perms.getGroups());
}
+ /**
+ * Check if a group exists
+ *
+ * @param groupName The name of the group
+ * @return true if exists
+ */
public static boolean isGroup(String groupName) {
return Arrays.asList(perms.getGroups()).contains(groupName);
}
- public static boolean userHasAnyGroup(Player player, HashSet whitelistSet) {
+ /**
+ * Check if a user is in any of the groups provided
+ *
+ * @param player The player to check for
+ * @param groups The groups to check for
+ * @return true if in a group
+ */
+ public static boolean inAnyGroup(Player player, HashSet groups) {
boolean found = false;
- for (String group : whitelistSet) {
+ for (String group : groups) {
found = Arrays.asList(perms.getPlayerGroups(player)).contains(group);
}
return found;
diff --git a/src/main/lombok/nl/SBDeveloper/V10Lift/managers/package-info.java b/src/main/java/nl/SBDeveloper/V10Lift/managers/package-info.java
similarity index 100%
rename from src/main/lombok/nl/SBDeveloper/V10Lift/managers/package-info.java
rename to src/main/java/nl/SBDeveloper/V10Lift/managers/package-info.java
diff --git a/src/main/lombok/nl/SBDeveloper/V10Lift/package-info.java b/src/main/java/nl/SBDeveloper/V10Lift/package-info.java
similarity index 100%
rename from src/main/lombok/nl/SBDeveloper/V10Lift/package-info.java
rename to src/main/java/nl/SBDeveloper/V10Lift/package-info.java
diff --git a/src/main/lombok/nl/SBDeveloper/V10Lift/sbutils/ConfigUpdater.java b/src/main/java/nl/SBDeveloper/V10Lift/sbutils/ConfigUpdater.java
similarity index 100%
rename from src/main/lombok/nl/SBDeveloper/V10Lift/sbutils/ConfigUpdater.java
rename to src/main/java/nl/SBDeveloper/V10Lift/sbutils/ConfigUpdater.java
diff --git a/src/main/lombok/nl/SBDeveloper/V10Lift/sbutils/LocationSerializer.java b/src/main/java/nl/SBDeveloper/V10Lift/sbutils/LocationSerializer.java
similarity index 100%
rename from src/main/lombok/nl/SBDeveloper/V10Lift/sbutils/LocationSerializer.java
rename to src/main/java/nl/SBDeveloper/V10Lift/sbutils/LocationSerializer.java
diff --git a/src/main/lombok/nl/SBDeveloper/V10Lift/sbutils/SQLiteDB.java b/src/main/java/nl/SBDeveloper/V10Lift/sbutils/SQLiteDB.java
similarity index 96%
rename from src/main/lombok/nl/SBDeveloper/V10Lift/sbutils/SQLiteDB.java
rename to src/main/java/nl/SBDeveloper/V10Lift/sbutils/SQLiteDB.java
index 31a8d02..2bf235f 100644
--- a/src/main/lombok/nl/SBDeveloper/V10Lift/sbutils/SQLiteDB.java
+++ b/src/main/java/nl/SBDeveloper/V10Lift/sbutils/SQLiteDB.java
@@ -64,9 +64,9 @@ public class SQLiteDB {
/**
* Get the connection, to execute queries
*
- * CREATE TABLE -> execute()
- * SELECT -> executeQuery()
- * UPDATE -> executeUpdate()
+ * CREATE TABLE - execute()
+ * SELECT - executeQuery()
+ * UPDATE - executeUpdate()
*
* @return Connection
*/
diff --git a/src/main/lombok/nl/SBDeveloper/V10Lift/sbutils/UpdateManager.java b/src/main/java/nl/SBDeveloper/V10Lift/sbutils/UpdateManager.java
similarity index 100%
rename from src/main/lombok/nl/SBDeveloper/V10Lift/sbutils/UpdateManager.java
rename to src/main/java/nl/SBDeveloper/V10Lift/sbutils/UpdateManager.java
diff --git a/src/main/lombok/nl/SBDeveloper/V10Lift/sbutils/YamlFile.java b/src/main/java/nl/SBDeveloper/V10Lift/sbutils/YamlFile.java
similarity index 100%
rename from src/main/lombok/nl/SBDeveloper/V10Lift/sbutils/YamlFile.java
rename to src/main/java/nl/SBDeveloper/V10Lift/sbutils/YamlFile.java
diff --git a/src/main/java/nl/SBDeveloper/V10Lift/sbutils/package-info.java b/src/main/java/nl/SBDeveloper/V10Lift/sbutils/package-info.java
new file mode 100644
index 0000000..9da825b
--- /dev/null
+++ b/src/main/java/nl/SBDeveloper/V10Lift/sbutils/package-info.java
@@ -0,0 +1,4 @@
+/**
+ * The package with all the SBDevelopment utils
+ */
+package nl.SBDeveloper.V10Lift.sbutils;
\ No newline at end of file
diff --git a/src/main/lombok/nl/SBDeveloper/V10Lift/utils/ConfigUtil.java b/src/main/java/nl/SBDeveloper/V10Lift/utils/ConfigUtil.java
similarity index 97%
rename from src/main/lombok/nl/SBDeveloper/V10Lift/utils/ConfigUtil.java
rename to src/main/java/nl/SBDeveloper/V10Lift/utils/ConfigUtil.java
index 43f9d53..5e7f915 100644
--- a/src/main/lombok/nl/SBDeveloper/V10Lift/utils/ConfigUtil.java
+++ b/src/main/java/nl/SBDeveloper/V10Lift/utils/ConfigUtil.java
@@ -52,7 +52,7 @@ public class ConfigUtil {
*
* @param p The commandsender to send it to
* @param path The path to look for
- * @param replacement The replacements -> key: %Name% = value: TheName
+ * @param replacement The replacements - key: %Name% = value: TheName
*/
public static void sendMessage(CommandSender p, @Nonnull String path, Map replacement) {
if (V10LiftPlugin.getMessages().getFile().get(path) == null) {
diff --git a/src/main/lombok/nl/SBDeveloper/V10Lift/utils/DirectionUtil.java b/src/main/java/nl/SBDeveloper/V10Lift/utils/DirectionUtil.java
similarity index 100%
rename from src/main/lombok/nl/SBDeveloper/V10Lift/utils/DirectionUtil.java
rename to src/main/java/nl/SBDeveloper/V10Lift/utils/DirectionUtil.java
diff --git a/src/main/lombok/nl/SBDeveloper/V10Lift/utils/DoorUtil.java b/src/main/java/nl/SBDeveloper/V10Lift/utils/DoorUtil.java
similarity index 98%
rename from src/main/lombok/nl/SBDeveloper/V10Lift/utils/DoorUtil.java
rename to src/main/java/nl/SBDeveloper/V10Lift/utils/DoorUtil.java
index 15db4e3..5932181 100644
--- a/src/main/lombok/nl/SBDeveloper/V10Lift/utils/DoorUtil.java
+++ b/src/main/java/nl/SBDeveloper/V10Lift/utils/DoorUtil.java
@@ -13,7 +13,7 @@ import javax.annotation.Nonnull;
public class DoorUtil {
/**
- * Open a door, with 1.12.x < and 1.13.x > support
+ * Open a door, with 1.12.x- and 1.13.x+ support
* @param b The block (door)
* @return true if opened, false if not opened
*/
@@ -51,7 +51,7 @@ public class DoorUtil {
}
/**
- * Close a door, with 1.12.x < and 1.13.x > support
+ * Close a door, with 1.12.x- and 1.13.x+ support
* @param b The block (door)
* @return true if opened, false if not opened
*/
diff --git a/src/main/lombok/nl/SBDeveloper/V10Lift/utils/package-info.java b/src/main/java/nl/SBDeveloper/V10Lift/utils/package-info.java
similarity index 100%
rename from src/main/lombok/nl/SBDeveloper/V10Lift/utils/package-info.java
rename to src/main/java/nl/SBDeveloper/V10Lift/utils/package-info.java