diff --git a/src/main/java/me/SuperRonanCraft/BetterRTP/BetterRTP.java b/src/main/java/me/SuperRonanCraft/BetterRTP/BetterRTP.java index 57e3c45..6010f5a 100644 --- a/src/main/java/me/SuperRonanCraft/BetterRTP/BetterRTP.java +++ b/src/main/java/me/SuperRonanCraft/BetterRTP/BetterRTP.java @@ -26,9 +26,7 @@ import org.bukkit.command.Command; import org.bukkit.command.CommandSender; import org.bukkit.plugin.java.JavaPlugin; - import java.util.List; -import java.util.logging.Level; public class BetterRTP extends JavaPlugin { @Getter private final Permissions perms = new Permissions(); diff --git a/src/main/java/me/SuperRonanCraft/BetterRTP/player/PlayerInfo.java b/src/main/java/me/SuperRonanCraft/BetterRTP/player/PlayerInfo.java index 0c3dbee..54331b4 100644 --- a/src/main/java/me/SuperRonanCraft/BetterRTP/player/PlayerInfo.java +++ b/src/main/java/me/SuperRonanCraft/BetterRTP/player/PlayerInfo.java @@ -1,17 +1,13 @@ package me.SuperRonanCraft.BetterRTP.player; -import lombok.Getter; -import lombok.Setter; -import me.SuperRonanCraft.BetterRTP.references.invs.RTP_INV_SETTINGS; -import me.SuperRonanCraft.BetterRTP.references.rtpinfo.CooldownData; -import org.bukkit.Location; +import java.util.HashMap; + import org.bukkit.World; import org.bukkit.entity.Player; import org.bukkit.inventory.Inventory; -import java.util.HashMap; -import java.util.List; -import java.util.UUID; +import lombok.Getter; +import me.SuperRonanCraft.BetterRTP.references.invs.RTP_INV_SETTINGS; public class PlayerInfo { diff --git a/src/main/java/me/SuperRonanCraft/BetterRTP/player/commands/Commands.java b/src/main/java/me/SuperRonanCraft/BetterRTP/player/commands/Commands.java index f9cdef4..8b80112 100644 --- a/src/main/java/me/SuperRonanCraft/BetterRTP/player/commands/Commands.java +++ b/src/main/java/me/SuperRonanCraft/BetterRTP/player/commands/Commands.java @@ -1,17 +1,17 @@ package me.SuperRonanCraft.BetterRTP.player.commands; +import java.util.ArrayList; +import java.util.List; + +import org.bukkit.Bukkit; +import org.bukkit.command.CommandSender; + import me.SuperRonanCraft.BetterRTP.BetterRTP; import me.SuperRonanCraft.BetterRTP.player.commands.types.CmdTeleport; import me.SuperRonanCraft.BetterRTP.references.PermissionNode; +import me.SuperRonanCraft.BetterRTP.references.customEvents.RTP_CommandEvent; import me.SuperRonanCraft.BetterRTP.references.customEvents.RTP_CommandEvent_After; -import me.SuperRonanCraft.BetterRTP.references.messages.Message; import me.SuperRonanCraft.BetterRTP.references.messages.MessagesCore; -import me.SuperRonanCraft.BetterRTP.references.customEvents.RTP_CommandEvent; -import org.bukkit.Bukkit; -import org.bukkit.command.CommandSender; - -import java.util.ArrayList; -import java.util.List; public class Commands { diff --git a/src/main/java/me/SuperRonanCraft/BetterRTP/player/commands/RTPCommand.java b/src/main/java/me/SuperRonanCraft/BetterRTP/player/commands/RTPCommand.java index 192a810..e8bbaee 100644 --- a/src/main/java/me/SuperRonanCraft/BetterRTP/player/commands/RTPCommand.java +++ b/src/main/java/me/SuperRonanCraft/BetterRTP/player/commands/RTPCommand.java @@ -1,12 +1,11 @@ package me.SuperRonanCraft.BetterRTP.player.commands; -import me.SuperRonanCraft.BetterRTP.references.PermissionCheck; -import me.SuperRonanCraft.BetterRTP.references.PermissionNode; +import java.util.List; + import org.bukkit.command.CommandSender; import org.jetbrains.annotations.NotNull; -import org.jetbrains.annotations.Nullable; -import java.util.List; +import me.SuperRonanCraft.BetterRTP.references.PermissionCheck; public interface RTPCommand { diff --git a/src/main/java/me/SuperRonanCraft/BetterRTP/player/commands/RTP_SETUP_TYPE.java b/src/main/java/me/SuperRonanCraft/BetterRTP/player/commands/RTP_SETUP_TYPE.java index 4d37991..b94631a 100644 --- a/src/main/java/me/SuperRonanCraft/BetterRTP/player/commands/RTP_SETUP_TYPE.java +++ b/src/main/java/me/SuperRonanCraft/BetterRTP/player/commands/RTP_SETUP_TYPE.java @@ -1,9 +1,5 @@ package me.SuperRonanCraft.BetterRTP.player.commands; -import org.bukkit.command.CommandSender; - -import java.util.List; - public enum RTP_SETUP_TYPE { DEFAULT, CUSTOM_WORLD, diff --git a/src/main/java/me/SuperRonanCraft/BetterRTP/player/commands/types/CmdEdit.java b/src/main/java/me/SuperRonanCraft/BetterRTP/player/commands/types/CmdEdit.java index 8ee0c9d..1ae4734 100644 --- a/src/main/java/me/SuperRonanCraft/BetterRTP/player/commands/types/CmdEdit.java +++ b/src/main/java/me/SuperRonanCraft/BetterRTP/player/commands/types/CmdEdit.java @@ -1,25 +1,28 @@ package me.SuperRonanCraft.BetterRTP.player.commands.types; +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; +import java.util.Map; + +import org.bukkit.Bukkit; +import org.bukkit.Material; +import org.bukkit.World; +import org.bukkit.command.CommandSender; +import org.bukkit.entity.Player; +import org.jetbrains.annotations.NotNull; + import me.SuperRonanCraft.BetterRTP.BetterRTP; +import me.SuperRonanCraft.BetterRTP.player.commands.RTPCommand; import me.SuperRonanCraft.BetterRTP.player.commands.RTPCommandHelpable; import me.SuperRonanCraft.BetterRTP.player.rtp.RTP_SHAPE; -import me.SuperRonanCraft.BetterRTP.player.commands.RTPCommand; import me.SuperRonanCraft.BetterRTP.references.PermissionNode; import me.SuperRonanCraft.BetterRTP.references.helpers.HelperRTP_EditWorlds; -import me.SuperRonanCraft.BetterRTP.references.messages.Message_RTP; import me.SuperRonanCraft.BetterRTP.references.messages.MessagesCore; import me.SuperRonanCraft.BetterRTP.references.messages.MessagesHelp; import me.SuperRonanCraft.BetterRTP.references.messages.MessagesUsage; import me.SuperRonanCraft.BetterRTP.references.rtpinfo.worlds.RTPWorld; import me.SuperRonanCraft.BetterRTP.references.rtpinfo.worlds.WORLD_TYPE; -import org.bukkit.Bukkit; -import org.bukkit.Material; -import org.bukkit.World; -import org.bukkit.command.CommandSender; -import org.bukkit.entity.Player; -import org.jetbrains.annotations.NotNull; - -import java.util.*; public class CmdEdit implements RTPCommand, RTPCommandHelpable { //Edit a worlds properties diff --git a/src/main/java/me/SuperRonanCraft/BetterRTP/player/commands/types/CmdInfo.java b/src/main/java/me/SuperRonanCraft/BetterRTP/player/commands/types/CmdInfo.java index d238b6b..b1b7d28 100644 --- a/src/main/java/me/SuperRonanCraft/BetterRTP/player/commands/types/CmdInfo.java +++ b/src/main/java/me/SuperRonanCraft/BetterRTP/player/commands/types/CmdInfo.java @@ -1,5 +1,22 @@ package me.SuperRonanCraft.BetterRTP.player.commands.types; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.concurrent.CompletableFuture; + +import org.bukkit.Bukkit; +import org.bukkit.ChatColor; +import org.bukkit.World; +import org.bukkit.command.CommandSender; +import org.bukkit.entity.Player; +import org.bukkit.potion.PotionEffectType; +import org.jetbrains.annotations.NotNull; +import org.json.simple.JSONObject; +import org.json.simple.parser.JSONParser; +import org.json.simple.parser.ParseException; + import me.SuperRonanCraft.BetterRTP.BetterRTP; import me.SuperRonanCraft.BetterRTP.player.commands.RTPCommand; import me.SuperRonanCraft.BetterRTP.player.commands.RTPCommandHelpable; @@ -21,25 +38,8 @@ import net.md_5.bungee.api.chat.ComponentBuilder; import net.md_5.bungee.api.chat.HoverEvent; import net.md_5.bungee.api.chat.TextComponent; -import org.bukkit.Bukkit; -import org.bukkit.ChatColor; -import org.bukkit.World; -import org.bukkit.command.CommandSender; -import org.bukkit.entity.Player; -import org.bukkit.potion.PotionEffectType; -import org.jetbrains.annotations.NotNull; -import org.json.simple.JSONObject; -import org.json.simple.parser.JSONParser; -import org.json.simple.parser.ParseException; -import scala.concurrent.impl.FutureConvertersImpl; import xyz.xenondevs.particle.ParticleEffect; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Collections; -import java.util.List; -import java.util.concurrent.CompletableFuture; - public class CmdInfo implements RTPCommand, RTPCommandHelpable { public String getName() { @@ -107,7 +107,7 @@ enum CmdInfoSub { //Sub commands, future expansions //Particles private void infoParticles(CommandSender sendi) { List info = new ArrayList<>(); - BetterRTP pl = BetterRTP.getInstance(); + // BetterRTP pl = BetterRTP.getInstance(); for (ParticleEffect eff : ParticleEffect.VALUES) { if (info.isEmpty() || info.size() % 2 == 0) { diff --git a/src/main/java/me/SuperRonanCraft/BetterRTP/player/commands/types/CmdPlayer.java b/src/main/java/me/SuperRonanCraft/BetterRTP/player/commands/types/CmdPlayer.java index 1039e10..0533724 100644 --- a/src/main/java/me/SuperRonanCraft/BetterRTP/player/commands/types/CmdPlayer.java +++ b/src/main/java/me/SuperRonanCraft/BetterRTP/player/commands/types/CmdPlayer.java @@ -1,24 +1,24 @@ package me.SuperRonanCraft.BetterRTP.player.commands.types; +import java.util.ArrayList; +import java.util.List; + +import org.bukkit.Bukkit; +import org.bukkit.World; +import org.bukkit.command.CommandSender; +import org.bukkit.entity.Player; +import org.jetbrains.annotations.NotNull; + import me.SuperRonanCraft.BetterRTP.BetterRTP; +import me.SuperRonanCraft.BetterRTP.player.commands.RTPCommand; import me.SuperRonanCraft.BetterRTP.player.commands.RTPCommandHelpable; import me.SuperRonanCraft.BetterRTP.player.rtp.RTP_PlayerInfo; import me.SuperRonanCraft.BetterRTP.player.rtp.RTP_TYPE; -import me.SuperRonanCraft.BetterRTP.player.commands.RTPCommand; import me.SuperRonanCraft.BetterRTP.references.PermissionNode; import me.SuperRonanCraft.BetterRTP.references.helpers.HelperRTP; -import me.SuperRonanCraft.BetterRTP.references.helpers.HelperRTP_Info; import me.SuperRonanCraft.BetterRTP.references.messages.MessagesCore; import me.SuperRonanCraft.BetterRTP.references.messages.MessagesHelp; import me.SuperRonanCraft.BetterRTP.references.messages.MessagesUsage; -import org.bukkit.Bukkit; -import org.bukkit.World; -import org.bukkit.command.CommandSender; -import org.bukkit.entity.Player; -import org.jetbrains.annotations.NotNull; - -import java.util.ArrayList; -import java.util.List; public class CmdPlayer implements RTPCommand, RTPCommandHelpable { diff --git a/src/main/java/me/SuperRonanCraft/BetterRTP/player/commands/types/CmdPlayerSudo.java b/src/main/java/me/SuperRonanCraft/BetterRTP/player/commands/types/CmdPlayerSudo.java index d9746d9..6d28049 100644 --- a/src/main/java/me/SuperRonanCraft/BetterRTP/player/commands/types/CmdPlayerSudo.java +++ b/src/main/java/me/SuperRonanCraft/BetterRTP/player/commands/types/CmdPlayerSudo.java @@ -1,23 +1,22 @@ package me.SuperRonanCraft.BetterRTP.player.commands.types; +import java.util.ArrayList; +import java.util.List; + +import org.bukkit.Bukkit; +import org.bukkit.World; +import org.bukkit.command.CommandSender; +import org.bukkit.entity.Player; +import org.jetbrains.annotations.NotNull; + import me.SuperRonanCraft.BetterRTP.BetterRTP; import me.SuperRonanCraft.BetterRTP.player.commands.RTPCommand; -import me.SuperRonanCraft.BetterRTP.player.commands.RTPCommandHelpable; import me.SuperRonanCraft.BetterRTP.player.rtp.RTP_PlayerInfo; import me.SuperRonanCraft.BetterRTP.player.rtp.RTP_TYPE; import me.SuperRonanCraft.BetterRTP.references.PermissionNode; import me.SuperRonanCraft.BetterRTP.references.helpers.HelperRTP; import me.SuperRonanCraft.BetterRTP.references.messages.MessagesCore; -import me.SuperRonanCraft.BetterRTP.references.messages.MessagesHelp; import me.SuperRonanCraft.BetterRTP.references.messages.MessagesUsage; -import org.bukkit.Bukkit; -import org.bukkit.World; -import org.bukkit.command.CommandSender; -import org.bukkit.entity.Player; -import org.jetbrains.annotations.NotNull; - -import java.util.ArrayList; -import java.util.List; public class CmdPlayerSudo implements RTPCommand { diff --git a/src/main/java/me/SuperRonanCraft/BetterRTP/player/commands/types/CmdWorld.java b/src/main/java/me/SuperRonanCraft/BetterRTP/player/commands/types/CmdWorld.java index 4d12e8d..8ab4315 100644 --- a/src/main/java/me/SuperRonanCraft/BetterRTP/player/commands/types/CmdWorld.java +++ b/src/main/java/me/SuperRonanCraft/BetterRTP/player/commands/types/CmdWorld.java @@ -1,23 +1,22 @@ package me.SuperRonanCraft.BetterRTP.player.commands.types; +import java.util.ArrayList; +import java.util.List; + +import org.bukkit.Bukkit; +import org.bukkit.World; +import org.bukkit.command.CommandSender; +import org.jetbrains.annotations.NotNull; + import me.SuperRonanCraft.BetterRTP.BetterRTP; import me.SuperRonanCraft.BetterRTP.player.commands.RTPCommand; import me.SuperRonanCraft.BetterRTP.player.commands.RTPCommandHelpable; -import me.SuperRonanCraft.BetterRTP.player.commands.RTPCommandType; import me.SuperRonanCraft.BetterRTP.references.PermissionCheck; import me.SuperRonanCraft.BetterRTP.references.PermissionNode; -import me.SuperRonanCraft.BetterRTP.references.helpers.HelperRTP; import me.SuperRonanCraft.BetterRTP.references.helpers.HelperRTP_Info; import me.SuperRonanCraft.BetterRTP.references.messages.MessagesCore; import me.SuperRonanCraft.BetterRTP.references.messages.MessagesHelp; import me.SuperRonanCraft.BetterRTP.references.messages.MessagesUsage; -import org.bukkit.Bukkit; -import org.bukkit.World; -import org.bukkit.command.CommandSender; -import org.jetbrains.annotations.NotNull; - -import java.util.ArrayList; -import java.util.List; public class CmdWorld implements RTPCommand, RTPCommandHelpable { diff --git a/src/main/java/me/SuperRonanCraft/BetterRTP/player/events/Teleport.java b/src/main/java/me/SuperRonanCraft/BetterRTP/player/events/Teleport.java index 9abb2ca..f31d266 100644 --- a/src/main/java/me/SuperRonanCraft/BetterRTP/player/events/Teleport.java +++ b/src/main/java/me/SuperRonanCraft/BetterRTP/player/events/Teleport.java @@ -10,5 +10,6 @@ public class Teleport { static void tpEvent(PlayerTeleportEvent e) { Player p = e.getPlayer(); PlayerData data = HelperPlayer.getData(p); + //Add data to database } } diff --git a/src/main/java/me/SuperRonanCraft/BetterRTP/player/rtp/RTP.java b/src/main/java/me/SuperRonanCraft/BetterRTP/player/rtp/RTP.java index 42426ae..1f0093b 100644 --- a/src/main/java/me/SuperRonanCraft/BetterRTP/player/rtp/RTP.java +++ b/src/main/java/me/SuperRonanCraft/BetterRTP/player/rtp/RTP.java @@ -1,24 +1,23 @@ package me.SuperRonanCraft.BetterRTP.player.rtp; +import java.util.HashMap; +import java.util.List; + +import org.bukkit.Bukkit; +import org.bukkit.command.CommandSender; +import org.bukkit.entity.Player; + import lombok.Getter; import me.SuperRonanCraft.BetterRTP.BetterRTP; -import me.SuperRonanCraft.BetterRTP.references.PermissionNode; -import me.SuperRonanCraft.BetterRTP.references.WarningHandler; import me.SuperRonanCraft.BetterRTP.references.customEvents.RTP_SettingUpEvent; import me.SuperRonanCraft.BetterRTP.references.file.FileOther; import me.SuperRonanCraft.BetterRTP.references.helpers.HelperRTP; import me.SuperRonanCraft.BetterRTP.references.helpers.HelperRTP_Check; -import me.SuperRonanCraft.BetterRTP.references.messages.MessagesCore; import me.SuperRonanCraft.BetterRTP.references.rtpinfo.PermissionGroup; -import me.SuperRonanCraft.BetterRTP.references.rtpinfo.worlds.*; -import org.bukkit.Bukkit; -import org.bukkit.World; -import org.bukkit.command.CommandSender; -import org.bukkit.entity.Player; - -import java.util.HashMap; -import java.util.List; -import java.util.Map; +import me.SuperRonanCraft.BetterRTP.references.rtpinfo.worlds.RTPWorld; +import me.SuperRonanCraft.BetterRTP.references.rtpinfo.worlds.WORLD_TYPE; +import me.SuperRonanCraft.BetterRTP.references.rtpinfo.worlds.WorldDefault; +import me.SuperRonanCraft.BetterRTP.references.rtpinfo.worlds.WorldPlayer; public class RTP { diff --git a/src/main/java/me/SuperRonanCraft/BetterRTP/player/rtp/RTPLoader.java b/src/main/java/me/SuperRonanCraft/BetterRTP/player/rtp/RTPLoader.java index 7272c57..828aec5 100644 --- a/src/main/java/me/SuperRonanCraft/BetterRTP/player/rtp/RTPLoader.java +++ b/src/main/java/me/SuperRonanCraft/BetterRTP/player/rtp/RTPLoader.java @@ -1,18 +1,22 @@ package me.SuperRonanCraft.BetterRTP.player.rtp; -import me.SuperRonanCraft.BetterRTP.BetterRTP; -import me.SuperRonanCraft.BetterRTP.references.file.FileOther; -import me.SuperRonanCraft.BetterRTP.references.rtpinfo.PermissionGroup; -import me.SuperRonanCraft.BetterRTP.references.rtpinfo.worlds.*; -import org.bukkit.Bukkit; -import org.bukkit.World; -import org.jetbrains.annotations.NotNull; - import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.concurrent.atomic.AtomicBoolean; +import org.bukkit.Bukkit; +import org.jetbrains.annotations.NotNull; + +import me.SuperRonanCraft.BetterRTP.BetterRTP; +import me.SuperRonanCraft.BetterRTP.references.file.FileOther; +import me.SuperRonanCraft.BetterRTP.references.rtpinfo.PermissionGroup; +import me.SuperRonanCraft.BetterRTP.references.rtpinfo.worlds.RTPWorld; +import me.SuperRonanCraft.BetterRTP.references.rtpinfo.worlds.WORLD_TYPE; +import me.SuperRonanCraft.BetterRTP.references.rtpinfo.worlds.WorldCustom; +import me.SuperRonanCraft.BetterRTP.references.rtpinfo.worlds.WorldDefault; +import me.SuperRonanCraft.BetterRTP.references.rtpinfo.worlds.WorldLocation; + public class RTPLoader { static void loadWorlds(@NotNull WorldDefault defaultWorld, @NotNull HashMap customWorlds) { diff --git a/src/main/java/me/SuperRonanCraft/BetterRTP/player/rtp/RTPPlayer.java b/src/main/java/me/SuperRonanCraft/BetterRTP/player/rtp/RTPPlayer.java index 62d3c35..3fb099b 100644 --- a/src/main/java/me/SuperRonanCraft/BetterRTP/player/rtp/RTPPlayer.java +++ b/src/main/java/me/SuperRonanCraft/BetterRTP/player/rtp/RTPPlayer.java @@ -1,28 +1,24 @@ package me.SuperRonanCraft.BetterRTP.player.rtp; +import java.util.concurrent.CompletableFuture; + +import org.bukkit.Bukkit; +import org.bukkit.Chunk; +import org.bukkit.Location; +import org.bukkit.command.CommandSender; +import org.bukkit.entity.Player; + import io.papermc.lib.PaperLib; import lombok.Getter; -import me.RonanCraft.Pueblos.resources.tools.HelperEvent; import me.SuperRonanCraft.BetterRTP.BetterRTP; import me.SuperRonanCraft.BetterRTP.references.customEvents.RTP_FailedEvent; import me.SuperRonanCraft.BetterRTP.references.customEvents.RTP_FindLocationEvent; -import me.SuperRonanCraft.BetterRTP.references.customEvents.RTP_SettingUpEvent; import me.SuperRonanCraft.BetterRTP.references.helpers.HelperRTP_Check; import me.SuperRonanCraft.BetterRTP.references.rtpinfo.QueueData; import me.SuperRonanCraft.BetterRTP.references.rtpinfo.QueueHandler; import me.SuperRonanCraft.BetterRTP.references.rtpinfo.RandomLocation; import me.SuperRonanCraft.BetterRTP.references.rtpinfo.worlds.WorldPlayer; import me.SuperRonanCraft.BetterRTP.versions.AsyncHandler; -import me.SuperRonanCraft.BetterRTP.versions.FoliaHandler; -import org.bukkit.Bukkit; -import org.bukkit.Chunk; -import org.bukkit.Location; -import org.bukkit.command.CommandSender; -import org.bukkit.entity.Player; - -import java.util.ArrayList; -import java.util.List; -import java.util.concurrent.CompletableFuture; public class RTPPlayer { diff --git a/src/main/java/me/SuperRonanCraft/BetterRTP/player/rtp/RTPTeleport.java b/src/main/java/me/SuperRonanCraft/BetterRTP/player/rtp/RTPTeleport.java index 687d207..7806d94 100644 --- a/src/main/java/me/SuperRonanCraft/BetterRTP/player/rtp/RTPTeleport.java +++ b/src/main/java/me/SuperRonanCraft/BetterRTP/player/rtp/RTPTeleport.java @@ -1,22 +1,22 @@ package me.SuperRonanCraft.BetterRTP.player.rtp; +import java.util.Arrays; + +import org.bukkit.Location; +import org.bukkit.command.CommandSender; +import org.bukkit.entity.Player; +import org.bukkit.scheduler.BukkitRunnable; + import io.papermc.lib.PaperLib; import me.SuperRonanCraft.BetterRTP.BetterRTP; -import me.SuperRonanCraft.BetterRTP.player.rtp.effects.*; +import me.SuperRonanCraft.BetterRTP.player.rtp.effects.RTPEffect_Titles; +import me.SuperRonanCraft.BetterRTP.player.rtp.effects.RTPEffects; import me.SuperRonanCraft.BetterRTP.references.PermissionNode; import me.SuperRonanCraft.BetterRTP.references.customEvents.RTP_TeleportEvent; import me.SuperRonanCraft.BetterRTP.references.customEvents.RTP_TeleportPostEvent; import me.SuperRonanCraft.BetterRTP.references.customEvents.RTP_TeleportPreEvent; import me.SuperRonanCraft.BetterRTP.references.messages.MessagesCore; -import me.SuperRonanCraft.BetterRTP.references.rtpinfo.worlds.WORLD_TYPE; import me.SuperRonanCraft.BetterRTP.references.rtpinfo.worlds.WorldPlayer; -import org.bukkit.Location; -import org.bukkit.command.CommandSender; -import org.bukkit.entity.Player; -import org.bukkit.event.Cancellable; -import org.bukkit.scheduler.BukkitRunnable; - -import java.util.Arrays; //--- //Credit to @PaperMC for PaperLib - https://github.com/PaperMC/PaperLib diff --git a/src/main/java/me/SuperRonanCraft/BetterRTP/references/PermissionNode.java b/src/main/java/me/SuperRonanCraft/BetterRTP/references/PermissionNode.java index a996380..ee7c873 100644 --- a/src/main/java/me/SuperRonanCraft/BetterRTP/references/PermissionNode.java +++ b/src/main/java/me/SuperRonanCraft/BetterRTP/references/PermissionNode.java @@ -1,12 +1,6 @@ package me.SuperRonanCraft.BetterRTP.references; -import com.griefdefender.api.permission.PermissionResult; import lombok.Getter; -import me.SuperRonanCraft.BetterRTP.BetterRTP; -import org.bukkit.Bukkit; -import org.bukkit.World; -import org.bukkit.command.CommandSender; -import org.jetbrains.annotations.NotNull; public enum PermissionNode implements PermissionCheck { diff --git a/src/main/java/me/SuperRonanCraft/BetterRTP/references/Permissions.java b/src/main/java/me/SuperRonanCraft/BetterRTP/references/Permissions.java index 13cd733..ab26be0 100644 --- a/src/main/java/me/SuperRonanCraft/BetterRTP/references/Permissions.java +++ b/src/main/java/me/SuperRonanCraft/BetterRTP/references/Permissions.java @@ -1,8 +1,6 @@ package me.SuperRonanCraft.BetterRTP.references; import me.SuperRonanCraft.BetterRTP.references.depends.DepPerms; -import org.bukkit.Bukkit; -import org.bukkit.World; import org.bukkit.command.CommandSender; public class Permissions { diff --git a/src/main/java/me/SuperRonanCraft/BetterRTP/references/customEvents/RTP_CommandEvent_After.java b/src/main/java/me/SuperRonanCraft/BetterRTP/references/customEvents/RTP_CommandEvent_After.java index 9fc9a71..26cd634 100644 --- a/src/main/java/me/SuperRonanCraft/BetterRTP/references/customEvents/RTP_CommandEvent_After.java +++ b/src/main/java/me/SuperRonanCraft/BetterRTP/references/customEvents/RTP_CommandEvent_After.java @@ -1,9 +1,8 @@ package me.SuperRonanCraft.BetterRTP.references.customEvents; -import me.SuperRonanCraft.BetterRTP.player.commands.RTPCommand; import org.bukkit.command.CommandSender; -import org.bukkit.event.Cancellable; -import org.bukkit.event.HandlerList; + +import me.SuperRonanCraft.BetterRTP.player.commands.RTPCommand; public class RTP_CommandEvent_After extends RTP_CommandEvent { diff --git a/src/main/java/me/SuperRonanCraft/BetterRTP/references/customEvents/RTP_FailedEvent.java b/src/main/java/me/SuperRonanCraft/BetterRTP/references/customEvents/RTP_FailedEvent.java index 8e91e91..90e04d0 100644 --- a/src/main/java/me/SuperRonanCraft/BetterRTP/references/customEvents/RTP_FailedEvent.java +++ b/src/main/java/me/SuperRonanCraft/BetterRTP/references/customEvents/RTP_FailedEvent.java @@ -1,12 +1,10 @@ package me.SuperRonanCraft.BetterRTP.references.customEvents; +import org.bukkit.entity.Player; + import lombok.Getter; import me.SuperRonanCraft.BetterRTP.player.rtp.RTPPlayer; import me.SuperRonanCraft.BetterRTP.references.rtpinfo.worlds.RTPWorld; -import org.bukkit.Location; -import org.bukkit.entity.Player; -import org.bukkit.event.Cancellable; -import org.jetbrains.annotations.Nullable; //Called when an rtp is finding a valid location @Getter public class RTP_FailedEvent extends RTPEvent { diff --git a/src/main/java/me/SuperRonanCraft/BetterRTP/references/database/DatabaseCooldowns.java b/src/main/java/me/SuperRonanCraft/BetterRTP/references/database/DatabaseCooldowns.java index 7b3e79b..8f68ebf 100644 --- a/src/main/java/me/SuperRonanCraft/BetterRTP/references/database/DatabaseCooldowns.java +++ b/src/main/java/me/SuperRonanCraft/BetterRTP/references/database/DatabaseCooldowns.java @@ -1,12 +1,5 @@ package me.SuperRonanCraft.BetterRTP.references.database; -import me.SuperRonanCraft.BetterRTP.BetterRTP; -import me.SuperRonanCraft.BetterRTP.references.helpers.HelperRTP; -import me.SuperRonanCraft.BetterRTP.references.rtpinfo.CooldownData; -import me.SuperRonanCraft.BetterRTP.references.rtpinfo.CooldownHandler; -import org.bukkit.Bukkit; -import org.bukkit.World; - import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.ResultSet; @@ -16,6 +9,12 @@ import java.util.UUID; import java.util.logging.Level; +import org.bukkit.Bukkit; +import org.bukkit.World; + +import me.SuperRonanCraft.BetterRTP.BetterRTP; +import me.SuperRonanCraft.BetterRTP.references.rtpinfo.CooldownData; + public class DatabaseCooldowns extends SQLite { public DatabaseCooldowns() { diff --git a/src/main/java/me/SuperRonanCraft/BetterRTP/references/database/DatabasePlayers.java b/src/main/java/me/SuperRonanCraft/BetterRTP/references/database/DatabasePlayers.java index 6fdedf1..47141fe 100644 --- a/src/main/java/me/SuperRonanCraft/BetterRTP/references/database/DatabasePlayers.java +++ b/src/main/java/me/SuperRonanCraft/BetterRTP/references/database/DatabasePlayers.java @@ -1,18 +1,16 @@ package me.SuperRonanCraft.BetterRTP.references.database; -import me.SuperRonanCraft.BetterRTP.BetterRTP; -import me.SuperRonanCraft.BetterRTP.references.player.playerdata.PlayerData; -import org.bukkit.World; - import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import java.util.ArrayList; import java.util.List; -import java.util.UUID; import java.util.logging.Level; +import me.SuperRonanCraft.BetterRTP.BetterRTP; +import me.SuperRonanCraft.BetterRTP.references.player.playerdata.PlayerData; + public class DatabasePlayers extends SQLite { public DatabasePlayers() { diff --git a/src/main/java/me/SuperRonanCraft/BetterRTP/references/depends/DepPlaceholderAPI.java b/src/main/java/me/SuperRonanCraft/BetterRTP/references/depends/DepPlaceholderAPI.java index f724248..5181918 100644 --- a/src/main/java/me/SuperRonanCraft/BetterRTP/references/depends/DepPlaceholderAPI.java +++ b/src/main/java/me/SuperRonanCraft/BetterRTP/references/depends/DepPlaceholderAPI.java @@ -1,19 +1,20 @@ package me.SuperRonanCraft.BetterRTP.references.depends; +import org.bukkit.Bukkit; +import org.bukkit.World; +import org.bukkit.entity.Player; +import org.jetbrains.annotations.NotNull; + import me.SuperRonanCraft.BetterRTP.BetterRTP; import me.SuperRonanCraft.BetterRTP.player.rtp.RTPSetupInformation; import me.SuperRonanCraft.BetterRTP.references.PermissionCheck; -import me.SuperRonanCraft.BetterRTP.references.PermissionNode; -import me.SuperRonanCraft.BetterRTP.references.helpers.*; +import me.SuperRonanCraft.BetterRTP.references.helpers.HelperDate; +import me.SuperRonanCraft.BetterRTP.references.helpers.HelperRTP; +import me.SuperRonanCraft.BetterRTP.references.helpers.HelperRTP_Check; import me.SuperRonanCraft.BetterRTP.references.player.HelperPlayer; import me.SuperRonanCraft.BetterRTP.references.player.playerdata.PlayerData; -import me.SuperRonanCraft.BetterRTP.references.rtpinfo.CooldownData; import me.SuperRonanCraft.BetterRTP.references.rtpinfo.worlds.WorldPlayer; import me.clip.placeholderapi.expansion.PlaceholderExpansion; -import org.bukkit.Bukkit; -import org.bukkit.World; -import org.bukkit.entity.Player; -import org.jetbrains.annotations.NotNull; public class DepPlaceholderAPI extends PlaceholderExpansion { diff --git a/src/main/java/me/SuperRonanCraft/BetterRTP/references/depends/regionPlugins/RTP_CrashClaim.java b/src/main/java/me/SuperRonanCraft/BetterRTP/references/depends/regionPlugins/RTP_CrashClaim.java index d789d59..31784ca 100644 --- a/src/main/java/me/SuperRonanCraft/BetterRTP/references/depends/regionPlugins/RTP_CrashClaim.java +++ b/src/main/java/me/SuperRonanCraft/BetterRTP/references/depends/regionPlugins/RTP_CrashClaim.java @@ -1,10 +1,9 @@ package me.SuperRonanCraft.BetterRTP.references.depends.regionPlugins; -import com.palmergames.bukkit.towny.TownyAPI; -import net.crashcraft.crashclaim.CrashClaim; -import net.crashcraft.crashclaim.api.CrashClaimAPI; import org.bukkit.Location; +import net.crashcraft.crashclaim.CrashClaim; + public class RTP_CrashClaim implements RegionPluginCheck { // NOT TESTED (3.6.9) diff --git a/src/main/java/me/SuperRonanCraft/BetterRTP/references/depends/regionPlugins/RTP_FactionsUUID.java b/src/main/java/me/SuperRonanCraft/BetterRTP/references/depends/regionPlugins/RTP_FactionsUUID.java index 2d2d512..1faebbe 100644 --- a/src/main/java/me/SuperRonanCraft/BetterRTP/references/depends/regionPlugins/RTP_FactionsUUID.java +++ b/src/main/java/me/SuperRonanCraft/BetterRTP/references/depends/regionPlugins/RTP_FactionsUUID.java @@ -1,11 +1,10 @@ package me.SuperRonanCraft.BetterRTP.references.depends.regionPlugins; +import org.bukkit.Location; + import com.massivecraft.factions.Board; import com.massivecraft.factions.FLocation; import com.massivecraft.factions.Faction; -import me.SuperRonanCraft.BetterRTP.BetterRTP; -import me.SuperRonanCraft.BetterRTP.references.settings.SoftDepends; -import org.bukkit.Location; public class RTP_FactionsUUID implements RegionPluginCheck { diff --git a/src/main/java/me/SuperRonanCraft/BetterRTP/references/depends/regionPlugins/RTP_Lands.java b/src/main/java/me/SuperRonanCraft/BetterRTP/references/depends/regionPlugins/RTP_Lands.java index 35be947..7d3981f 100644 --- a/src/main/java/me/SuperRonanCraft/BetterRTP/references/depends/regionPlugins/RTP_Lands.java +++ b/src/main/java/me/SuperRonanCraft/BetterRTP/references/depends/regionPlugins/RTP_Lands.java @@ -1,10 +1,9 @@ package me.SuperRonanCraft.BetterRTP.references.depends.regionPlugins; +import org.bukkit.Location; + import me.SuperRonanCraft.BetterRTP.BetterRTP; -import me.SuperRonanCraft.BetterRTP.references.settings.SoftDepends; import me.angeschossen.lands.api.LandsIntegration; -import org.bukkit.Bukkit; -import org.bukkit.Location; public class RTP_Lands implements RegionPluginCheck { diff --git a/src/main/java/me/SuperRonanCraft/BetterRTP/references/depends/regionPlugins/RTP_Pueblos.java b/src/main/java/me/SuperRonanCraft/BetterRTP/references/depends/regionPlugins/RTP_Pueblos.java index 4b8e366..d93aaf8 100644 --- a/src/main/java/me/SuperRonanCraft/BetterRTP/references/depends/regionPlugins/RTP_Pueblos.java +++ b/src/main/java/me/SuperRonanCraft/BetterRTP/references/depends/regionPlugins/RTP_Pueblos.java @@ -1,10 +1,9 @@ package me.SuperRonanCraft.BetterRTP.references.depends.regionPlugins; -import me.RonanCraft.Pueblos.Pueblos; -import me.SuperRonanCraft.BetterRTP.BetterRTP; -import me.SuperRonanCraft.BetterRTP.references.settings.SoftDepends; import org.bukkit.Location; +import me.RonanCraft.Pueblos.Pueblos; + public class RTP_Pueblos implements RegionPluginCheck { // NOT TESTED (3.1.0) diff --git a/src/main/java/me/SuperRonanCraft/BetterRTP/references/depends/regionPlugins/RTP_RedProtect.java b/src/main/java/me/SuperRonanCraft/BetterRTP/references/depends/regionPlugins/RTP_RedProtect.java index 6b0d95c..28c4a98 100644 --- a/src/main/java/me/SuperRonanCraft/BetterRTP/references/depends/regionPlugins/RTP_RedProtect.java +++ b/src/main/java/me/SuperRonanCraft/BetterRTP/references/depends/regionPlugins/RTP_RedProtect.java @@ -1,10 +1,9 @@ package me.SuperRonanCraft.BetterRTP.references.depends.regionPlugins; -import br.net.fabiozumbi12.RedProtect.Bukkit.RedProtect; -import me.SuperRonanCraft.BetterRTP.BetterRTP; -import me.SuperRonanCraft.BetterRTP.references.settings.SoftDepends; import org.bukkit.Location; +import br.net.fabiozumbi12.RedProtect.Bukkit.RedProtect; + public class RTP_RedProtect implements RegionPluginCheck { // TESTED (2.13.0) diff --git a/src/main/java/me/SuperRonanCraft/BetterRTP/references/depends/regionPlugins/RTP_SaberFactions.java b/src/main/java/me/SuperRonanCraft/BetterRTP/references/depends/regionPlugins/RTP_SaberFactions.java index 663067b..0b4efd3 100644 --- a/src/main/java/me/SuperRonanCraft/BetterRTP/references/depends/regionPlugins/RTP_SaberFactions.java +++ b/src/main/java/me/SuperRonanCraft/BetterRTP/references/depends/regionPlugins/RTP_SaberFactions.java @@ -1,11 +1,11 @@ package me.SuperRonanCraft.BetterRTP.references.depends.regionPlugins; -import com.massivecraft.factions.*; -import me.RonanCraft.Pueblos.Pueblos; -import me.SuperRonanCraft.BetterRTP.BetterRTP; -import me.SuperRonanCraft.BetterRTP.references.settings.SoftDepends; import org.bukkit.Location; +import com.massivecraft.factions.Board; +import com.massivecraft.factions.FLocation; +import com.massivecraft.factions.Faction; + public class RTP_SaberFactions implements RegionPluginCheck { // NOT TESTED (3.4.5) diff --git a/src/main/java/me/SuperRonanCraft/BetterRTP/references/depends/regionPlugins/RTP_Towny.java b/src/main/java/me/SuperRonanCraft/BetterRTP/references/depends/regionPlugins/RTP_Towny.java index 861b1ab..5984c9a 100644 --- a/src/main/java/me/SuperRonanCraft/BetterRTP/references/depends/regionPlugins/RTP_Towny.java +++ b/src/main/java/me/SuperRonanCraft/BetterRTP/references/depends/regionPlugins/RTP_Towny.java @@ -1,10 +1,9 @@ package me.SuperRonanCraft.BetterRTP.references.depends.regionPlugins; -import com.palmergames.bukkit.towny.TownyAPI; -import me.SuperRonanCraft.BetterRTP.BetterRTP; -import me.SuperRonanCraft.BetterRTP.references.settings.SoftDepends; import org.bukkit.Location; +import com.palmergames.bukkit.towny.TownyAPI; + public class RTP_Towny implements RegionPluginCheck { // NOT TESTED (2.13.0) diff --git a/src/main/java/me/SuperRonanCraft/BetterRTP/references/depends/regionPlugins/RTP_UltimateClaims.java b/src/main/java/me/SuperRonanCraft/BetterRTP/references/depends/regionPlugins/RTP_UltimateClaims.java index 03b53c4..657af2f 100644 --- a/src/main/java/me/SuperRonanCraft/BetterRTP/references/depends/regionPlugins/RTP_UltimateClaims.java +++ b/src/main/java/me/SuperRonanCraft/BetterRTP/references/depends/regionPlugins/RTP_UltimateClaims.java @@ -1,11 +1,11 @@ package me.SuperRonanCraft.BetterRTP.references.depends.regionPlugins; +import java.lang.reflect.Method; + import org.bukkit.Chunk; import org.bukkit.Location; import org.bukkit.plugin.java.JavaPlugin; -import java.lang.reflect.Method; - public class RTP_UltimateClaims implements RegionPluginCheck { // TESTED (v3.6.12) diff --git a/src/main/java/me/SuperRonanCraft/BetterRTP/references/helpers/HelperRTP.java b/src/main/java/me/SuperRonanCraft/BetterRTP/references/helpers/HelperRTP.java index e929537..6cbe751 100644 --- a/src/main/java/me/SuperRonanCraft/BetterRTP/references/helpers/HelperRTP.java +++ b/src/main/java/me/SuperRonanCraft/BetterRTP/references/helpers/HelperRTP.java @@ -1,16 +1,11 @@ package me.SuperRonanCraft.BetterRTP.references.helpers; -import me.SuperRonanCraft.BetterRTP.BetterRTP; -import me.SuperRonanCraft.BetterRTP.player.commands.types.CmdLocation; -import me.SuperRonanCraft.BetterRTP.player.rtp.*; -import me.SuperRonanCraft.BetterRTP.references.PermissionCheck; -import me.SuperRonanCraft.BetterRTP.references.PermissionNode; -import me.SuperRonanCraft.BetterRTP.references.WarningHandler; -import me.SuperRonanCraft.BetterRTP.references.messages.Message_RTP; -import me.SuperRonanCraft.BetterRTP.references.messages.MessagesCore; -import me.SuperRonanCraft.BetterRTP.references.messages.placeholder.Placeholders; -import me.SuperRonanCraft.BetterRTP.references.rtpinfo.PermissionGroup; -import me.SuperRonanCraft.BetterRTP.references.rtpinfo.worlds.*; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Random; + import org.bukkit.Bukkit; import org.bukkit.World; import org.bukkit.command.CommandSender; @@ -18,7 +13,23 @@ import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; -import java.util.*; +import me.SuperRonanCraft.BetterRTP.BetterRTP; +import me.SuperRonanCraft.BetterRTP.player.commands.types.CmdLocation; +import me.SuperRonanCraft.BetterRTP.player.rtp.RTP; +import me.SuperRonanCraft.BetterRTP.player.rtp.RTPSetupInformation; +import me.SuperRonanCraft.BetterRTP.player.rtp.RTP_ERROR_REQUEST_REASON; +import me.SuperRonanCraft.BetterRTP.player.rtp.RTP_PlayerInfo; +import me.SuperRonanCraft.BetterRTP.player.rtp.RTP_TYPE; +import me.SuperRonanCraft.BetterRTP.references.PermissionCheck; +import me.SuperRonanCraft.BetterRTP.references.WarningHandler; +import me.SuperRonanCraft.BetterRTP.references.messages.Message_RTP; +import me.SuperRonanCraft.BetterRTP.references.messages.placeholder.Placeholders; +import me.SuperRonanCraft.BetterRTP.references.rtpinfo.PermissionGroup; +import me.SuperRonanCraft.BetterRTP.references.rtpinfo.worlds.RTPWorld; +import me.SuperRonanCraft.BetterRTP.references.rtpinfo.worlds.WORLD_TYPE; +import me.SuperRonanCraft.BetterRTP.references.rtpinfo.worlds.WorldLocation; +import me.SuperRonanCraft.BetterRTP.references.rtpinfo.worlds.WorldPermissionGroup; +import me.SuperRonanCraft.BetterRTP.references.rtpinfo.worlds.WorldPlayer; public class HelperRTP { diff --git a/src/main/java/me/SuperRonanCraft/BetterRTP/references/helpers/HelperRTP_Check.java b/src/main/java/me/SuperRonanCraft/BetterRTP/references/helpers/HelperRTP_Check.java index 3ac9355..e21e584 100644 --- a/src/main/java/me/SuperRonanCraft/BetterRTP/references/helpers/HelperRTP_Check.java +++ b/src/main/java/me/SuperRonanCraft/BetterRTP/references/helpers/HelperRTP_Check.java @@ -1,16 +1,16 @@ package me.SuperRonanCraft.BetterRTP.references.helpers; +import org.bukkit.command.CommandSender; +import org.bukkit.entity.Player; + import me.SuperRonanCraft.BetterRTP.BetterRTP; import me.SuperRonanCraft.BetterRTP.player.rtp.RTP_ERROR_REQUEST_REASON; import me.SuperRonanCraft.BetterRTP.player.rtp.RTP_PlayerInfo; import me.SuperRonanCraft.BetterRTP.references.PermissionCheck; import me.SuperRonanCraft.BetterRTP.references.PermissionNode; -import me.SuperRonanCraft.BetterRTP.references.messages.MessagesCore; import me.SuperRonanCraft.BetterRTP.references.rtpinfo.CooldownData; import me.SuperRonanCraft.BetterRTP.references.rtpinfo.CooldownHandler; import me.SuperRonanCraft.BetterRTP.references.rtpinfo.worlds.WorldPlayer; -import org.bukkit.command.CommandSender; -import org.bukkit.entity.Player; public class HelperRTP_Check { diff --git a/src/main/java/me/SuperRonanCraft/BetterRTP/references/helpers/HelperRTP_Info.java b/src/main/java/me/SuperRonanCraft/BetterRTP/references/helpers/HelperRTP_Info.java index fdf5967..0be5140 100644 --- a/src/main/java/me/SuperRonanCraft/BetterRTP/references/helpers/HelperRTP_Info.java +++ b/src/main/java/me/SuperRonanCraft/BetterRTP/references/helpers/HelperRTP_Info.java @@ -1,13 +1,13 @@ package me.SuperRonanCraft.BetterRTP.references.helpers; -import me.SuperRonanCraft.BetterRTP.BetterRTP; -import me.SuperRonanCraft.BetterRTP.references.PermissionNode; -import me.SuperRonanCraft.BetterRTP.references.messages.MessagesCore; +import java.util.ArrayList; +import java.util.List; + import org.bukkit.block.Biome; import org.bukkit.command.CommandSender; -import java.util.ArrayList; -import java.util.List; +import me.SuperRonanCraft.BetterRTP.references.PermissionNode; +import me.SuperRonanCraft.BetterRTP.references.messages.MessagesCore; public class HelperRTP_Info { diff --git a/src/main/java/me/SuperRonanCraft/BetterRTP/references/invs/RTP_SETTINGS.java b/src/main/java/me/SuperRonanCraft/BetterRTP/references/invs/RTP_SETTINGS.java index 11c589b..f691f87 100644 --- a/src/main/java/me/SuperRonanCraft/BetterRTP/references/invs/RTP_SETTINGS.java +++ b/src/main/java/me/SuperRonanCraft/BetterRTP/references/invs/RTP_SETTINGS.java @@ -65,18 +65,4 @@ public SETTINGS_TYPE getType() { public FILETYPE getFiletype() { return filetype; } -} - -enum SETTINGS_TYPE { - BOOLEAN(Boolean.class), STRING(String.class), INTEGER(Integer.class); - - private Class cla; - - SETTINGS_TYPE(Class cla) { - this.cla = cla; - } - - Class getCla() { - return cla; - } } \ No newline at end of file diff --git a/src/main/java/me/SuperRonanCraft/BetterRTP/references/invs/SETTINGS_TYPE.java b/src/main/java/me/SuperRonanCraft/BetterRTP/references/invs/SETTINGS_TYPE.java new file mode 100644 index 0000000..280c445 --- /dev/null +++ b/src/main/java/me/SuperRonanCraft/BetterRTP/references/invs/SETTINGS_TYPE.java @@ -0,0 +1,15 @@ +package me.SuperRonanCraft.BetterRTP.references.invs; + +public enum SETTINGS_TYPE { + BOOLEAN(Boolean.class), STRING(String.class), INTEGER(Integer.class); + + private java.io.Serializable type; + + SETTINGS_TYPE(java.io.Serializable type) { + this.type = type; + } + + java.io.Serializable getType() { + return type; + } +} \ No newline at end of file diff --git a/src/main/java/me/SuperRonanCraft/BetterRTP/references/invs/enums/RTPInventory_Defaults.java b/src/main/java/me/SuperRonanCraft/BetterRTP/references/invs/enums/RTPInventory_Defaults.java index de2efc6..a403d5c 100644 --- a/src/main/java/me/SuperRonanCraft/BetterRTP/references/invs/enums/RTPInventory_Defaults.java +++ b/src/main/java/me/SuperRonanCraft/BetterRTP/references/invs/enums/RTPInventory_Defaults.java @@ -1,11 +1,7 @@ package me.SuperRonanCraft.BetterRTP.references.invs.enums; -import me.SuperRonanCraft.BetterRTP.references.invs.RTP_INV_SETTINGS; -import me.SuperRonanCraft.BetterRTP.BetterRTP; -import me.SuperRonanCraft.BetterRTP.references.messages.Message; -import me.SuperRonanCraft.BetterRTP.references.messages.Message_RTP; -import me.SuperRonanCraft.BetterRTP.references.player.HelperPlayer; -import me.SuperRonanCraft.BetterRTP.references.player.playerdata.PlayerData; +import java.util.List; + import org.bukkit.Bukkit; import org.bukkit.Material; import org.bukkit.entity.Player; @@ -14,7 +10,10 @@ import org.bukkit.inventory.ItemStack; import org.bukkit.inventory.meta.ItemMeta; -import java.util.List; +import me.SuperRonanCraft.BetterRTP.references.invs.RTP_INV_SETTINGS; +import me.SuperRonanCraft.BetterRTP.references.messages.Message; +import me.SuperRonanCraft.BetterRTP.references.player.HelperPlayer; +import me.SuperRonanCraft.BetterRTP.references.player.playerdata.PlayerData; public interface RTPInventory_Defaults { diff --git a/src/main/java/me/SuperRonanCraft/BetterRTP/references/invs/types/RTPInvCoordinates.java b/src/main/java/me/SuperRonanCraft/BetterRTP/references/invs/types/RTPInvCoordinates.java index 7019791..caed818 100644 --- a/src/main/java/me/SuperRonanCraft/BetterRTP/references/invs/types/RTPInvCoordinates.java +++ b/src/main/java/me/SuperRonanCraft/BetterRTP/references/invs/types/RTPInvCoordinates.java @@ -4,6 +4,7 @@ import me.SuperRonanCraft.BetterRTP.BetterRTP; import me.SuperRonanCraft.BetterRTP.references.file.FileOther.FILETYPE; import me.SuperRonanCraft.BetterRTP.references.invs.RTP_INV_SETTINGS; +import me.SuperRonanCraft.BetterRTP.references.invs.SETTINGS_TYPE; import me.SuperRonanCraft.BetterRTP.references.invs.enums.RTP_INV_ITEMS; import org.bukkit.entity.Player; import org.bukkit.event.inventory.InventoryClickEvent; @@ -129,18 +130,4 @@ public SETTINGS_TYPE getType() { public FILETYPE getFiletype() { return filetype; } - - enum SETTINGS_TYPE { - BOOLEAN(Boolean.class), STRING(String.class), INTEGER(Integer.class); - - private Class cla; - - SETTINGS_TYPE(Class cla) { - this.cla = cla; - } - - Class getCla() { - return cla; - } - } } \ No newline at end of file diff --git a/src/main/java/me/SuperRonanCraft/BetterRTP/references/messages/placeholder/PlaceholderAnalyzer.java b/src/main/java/me/SuperRonanCraft/BetterRTP/references/messages/placeholder/PlaceholderAnalyzer.java index 42649ab..e64e457 100644 --- a/src/main/java/me/SuperRonanCraft/BetterRTP/references/messages/placeholder/PlaceholderAnalyzer.java +++ b/src/main/java/me/SuperRonanCraft/BetterRTP/references/messages/placeholder/PlaceholderAnalyzer.java @@ -1,20 +1,18 @@ package me.SuperRonanCraft.BetterRTP.references.messages.placeholder; +import org.bukkit.Location; +import org.bukkit.World; +import org.bukkit.block.Biome; +import org.bukkit.command.CommandSender; +import org.bukkit.entity.Player; + import me.SuperRonanCraft.BetterRTP.BetterRTP; import me.SuperRonanCraft.BetterRTP.player.commands.RTPCommand; import me.SuperRonanCraft.BetterRTP.references.PermissionCheck; import me.SuperRonanCraft.BetterRTP.references.PermissionNode; -import me.SuperRonanCraft.BetterRTP.references.helpers.HelperDate; -import me.SuperRonanCraft.BetterRTP.references.player.playerdata.PlayerData; -import me.SuperRonanCraft.BetterRTP.references.rtpinfo.CooldownData; import me.SuperRonanCraft.BetterRTP.references.rtpinfo.worlds.RTPWorld; import me.SuperRonanCraft.BetterRTP.references.rtpinfo.worlds.WorldPlayer; import me.clip.placeholderapi.PlaceholderAPI; -import org.bukkit.Location; -import org.bukkit.World; -import org.bukkit.block.Biome; -import org.bukkit.command.CommandSender; -import org.bukkit.entity.Player; public class PlaceholderAnalyzer { diff --git a/src/main/java/me/SuperRonanCraft/BetterRTP/references/player/playerdata/PlayerData.java b/src/main/java/me/SuperRonanCraft/BetterRTP/references/player/playerdata/PlayerData.java index 56e2e9e..49753e6 100644 --- a/src/main/java/me/SuperRonanCraft/BetterRTP/references/player/playerdata/PlayerData.java +++ b/src/main/java/me/SuperRonanCraft/BetterRTP/references/player/playerdata/PlayerData.java @@ -1,14 +1,13 @@ package me.SuperRonanCraft.BetterRTP.references.player.playerdata; -import lombok.Getter; -import lombok.Setter; -import me.SuperRonanCraft.BetterRTP.references.rtpinfo.CooldownData; +import java.util.HashMap; + import org.bukkit.World; import org.bukkit.entity.Player; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; +import lombok.Getter; +import lombok.Setter; +import me.SuperRonanCraft.BetterRTP.references.rtpinfo.CooldownData; public class PlayerData { diff --git a/src/main/java/me/SuperRonanCraft/BetterRTP/references/rtpinfo/CooldownData.java b/src/main/java/me/SuperRonanCraft/BetterRTP/references/rtpinfo/CooldownData.java index bac6e22..9ffd91c 100644 --- a/src/main/java/me/SuperRonanCraft/BetterRTP/references/rtpinfo/CooldownData.java +++ b/src/main/java/me/SuperRonanCraft/BetterRTP/references/rtpinfo/CooldownData.java @@ -1,11 +1,9 @@ package me.SuperRonanCraft.BetterRTP.references.rtpinfo; +import java.util.UUID; + import lombok.Getter; import lombok.Setter; -import org.bukkit.World; - -import javax.annotation.Nullable; -import java.util.UUID; public class CooldownData { diff --git a/src/main/java/me/SuperRonanCraft/BetterRTP/references/rtpinfo/CooldownHandler.java b/src/main/java/me/SuperRonanCraft/BetterRTP/references/rtpinfo/CooldownHandler.java index 5570df5..1c66e40 100644 --- a/src/main/java/me/SuperRonanCraft/BetterRTP/references/rtpinfo/CooldownHandler.java +++ b/src/main/java/me/SuperRonanCraft/BetterRTP/references/rtpinfo/CooldownHandler.java @@ -1,8 +1,18 @@ package me.SuperRonanCraft.BetterRTP.references.rtpinfo; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; + +import javax.annotation.Nullable; + +import org.bukkit.Bukkit; +import org.bukkit.World; +import org.bukkit.command.CommandSender; +import org.bukkit.entity.Player; + import lombok.Getter; import me.SuperRonanCraft.BetterRTP.BetterRTP; -import me.SuperRonanCraft.BetterRTP.references.PermissionNode; import me.SuperRonanCraft.BetterRTP.references.database.DatabaseCooldowns; import me.SuperRonanCraft.BetterRTP.references.database.DatabaseHandler; import me.SuperRonanCraft.BetterRTP.references.file.FileOther; @@ -10,15 +20,6 @@ import me.SuperRonanCraft.BetterRTP.references.player.playerdata.PlayerData; import me.SuperRonanCraft.BetterRTP.references.rtpinfo.worlds.WorldPlayer; import me.SuperRonanCraft.BetterRTP.versions.AsyncHandler; -import org.bukkit.Bukkit; -import org.bukkit.World; -import org.bukkit.command.CommandSender; -import org.bukkit.entity.Player; - -import javax.annotation.Nullable; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; public class CooldownHandler { diff --git a/src/main/java/me/SuperRonanCraft/BetterRTP/references/rtpinfo/QueueData.java b/src/main/java/me/SuperRonanCraft/BetterRTP/references/rtpinfo/QueueData.java index 376e134..d133c12 100644 --- a/src/main/java/me/SuperRonanCraft/BetterRTP/references/rtpinfo/QueueData.java +++ b/src/main/java/me/SuperRonanCraft/BetterRTP/references/rtpinfo/QueueData.java @@ -1,10 +1,9 @@ package me.SuperRonanCraft.BetterRTP.references.rtpinfo; +import org.bukkit.Location; + import lombok.Getter; import lombok.Setter; -import me.SuperRonanCraft.BetterRTP.references.rtpinfo.worlds.RTPWorld; -import me.SuperRonanCraft.BetterRTP.references.rtpinfo.worlds.WorldPlayer; -import org.bukkit.Location; public class QueueData { diff --git a/src/main/java/me/SuperRonanCraft/BetterRTP/references/rtpinfo/QueueGenerator.java b/src/main/java/me/SuperRonanCraft/BetterRTP/references/rtpinfo/QueueGenerator.java index f97b069..4c76735 100644 --- a/src/main/java/me/SuperRonanCraft/BetterRTP/references/rtpinfo/QueueGenerator.java +++ b/src/main/java/me/SuperRonanCraft/BetterRTP/references/rtpinfo/QueueGenerator.java @@ -1,6 +1,16 @@ package me.SuperRonanCraft.BetterRTP.references.rtpinfo; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import org.bukkit.Bukkit; +import org.bukkit.Location; +import org.bukkit.World; +import org.jetbrains.annotations.Nullable; + import com.tcoded.folialib.wrapper.task.WrappedTask; + import io.papermc.lib.PaperLib; import me.SuperRonanCraft.BetterRTP.BetterRTP; import me.SuperRonanCraft.BetterRTP.player.commands.RTP_SETUP_TYPE; @@ -10,14 +20,6 @@ import me.SuperRonanCraft.BetterRTP.references.rtpinfo.worlds.RTPWorld; import me.SuperRonanCraft.BetterRTP.references.rtpinfo.worlds.WorldCustom; import me.SuperRonanCraft.BetterRTP.versions.AsyncHandler; -import org.bukkit.Bukkit; -import org.bukkit.Location; -import org.bukkit.World; -import org.jetbrains.annotations.Nullable; - -import java.util.HashMap; -import java.util.List; -import java.util.Map; public class QueueGenerator { @@ -134,6 +136,8 @@ private static HashMap getFromSetup(RTP_SETUP_TYPE type) { if (!rtp.getDisabledWorlds().contains(world.getName()) && !rtp.getRTPcustomWorld().containsKey(world.getName())) list.put(world.getName(), new WorldCustom(world, rtp.getRTPdefaultWorld())); return list; + default: + break; } return null; } @@ -143,6 +147,8 @@ private static String getId(RTP_SETUP_TYPE type, String id) { case CUSTOM_WORLD: return "custom_" + id; case LOCATION: return "location_" + id; case DEFAULT: return "default_" + id; + default: + break; } return "unknown_" + id; } diff --git a/src/main/java/me/SuperRonanCraft/BetterRTP/references/rtpinfo/worlds/RTPWorld.java b/src/main/java/me/SuperRonanCraft/BetterRTP/references/rtpinfo/worlds/RTPWorld.java index f9e5fee..65524f3 100644 --- a/src/main/java/me/SuperRonanCraft/BetterRTP/references/rtpinfo/worlds/RTPWorld.java +++ b/src/main/java/me/SuperRonanCraft/BetterRTP/references/rtpinfo/worlds/RTPWorld.java @@ -1,13 +1,12 @@ package me.SuperRonanCraft.BetterRTP.references.rtpinfo.worlds; -import lombok.NonNull; -import me.SuperRonanCraft.BetterRTP.BetterRTP; -import me.SuperRonanCraft.BetterRTP.player.commands.RTP_SETUP_TYPE; -import me.SuperRonanCraft.BetterRTP.player.rtp.RTP_SHAPE; +import java.util.List; + import org.bukkit.World; import org.jetbrains.annotations.Nullable; -import java.util.List; +import lombok.NonNull; +import me.SuperRonanCraft.BetterRTP.player.rtp.RTP_SHAPE; public interface RTPWorld { diff --git a/src/main/java/me/SuperRonanCraft/BetterRTP/references/rtpinfo/worlds/WorldCustom.java b/src/main/java/me/SuperRonanCraft/BetterRTP/references/rtpinfo/worlds/WorldCustom.java index 791f0a2..4a9d57b 100644 --- a/src/main/java/me/SuperRonanCraft/BetterRTP/references/rtpinfo/worlds/WorldCustom.java +++ b/src/main/java/me/SuperRonanCraft/BetterRTP/references/rtpinfo/worlds/WorldCustom.java @@ -1,16 +1,17 @@ package me.SuperRonanCraft.BetterRTP.references.rtpinfo.worlds; -import me.SuperRonanCraft.BetterRTP.BetterRTP; -import me.SuperRonanCraft.BetterRTP.player.rtp.RTP_SHAPE; -import me.SuperRonanCraft.BetterRTP.references.file.FileOther; -import me.SuperRonanCraft.BetterRTP.references.messages.Message_RTP; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + import org.bukkit.Bukkit; import org.bukkit.World; import org.jetbrains.annotations.NotNull; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; +import me.SuperRonanCraft.BetterRTP.BetterRTP; +import me.SuperRonanCraft.BetterRTP.player.rtp.RTP_SHAPE; +import me.SuperRonanCraft.BetterRTP.references.file.FileOther; +import me.SuperRonanCraft.BetterRTP.references.messages.Message_RTP; public class WorldCustom implements RTPWorld, RTPWorld_Defaulted { public World world; diff --git a/src/main/java/me/SuperRonanCraft/BetterRTP/references/web/LogUploader.java b/src/main/java/me/SuperRonanCraft/BetterRTP/references/web/LogUploader.java index 23dd8b0..22013d7 100644 --- a/src/main/java/me/SuperRonanCraft/BetterRTP/references/web/LogUploader.java +++ b/src/main/java/me/SuperRonanCraft/BetterRTP/references/web/LogUploader.java @@ -1,17 +1,18 @@ package me.SuperRonanCraft.BetterRTP.references.web; -import org.bukkit.configuration.InvalidConfigurationException; -import org.bukkit.configuration.file.FileConfiguration; -import org.bukkit.configuration.file.YamlConfiguration; -import org.jetbrains.annotations.Nullable; - -import java.io.*; +import java.io.BufferedReader; +import java.io.File; +import java.io.IOException; +import java.io.InputStreamReader; +import java.io.OutputStream; import java.net.HttpURLConnection; import java.net.URL; import java.nio.charset.StandardCharsets; import java.util.List; import java.util.Scanner; +import org.jetbrains.annotations.Nullable; + public class LogUploader { private static final String UPLOAD_URL = "https://logs.ronanplugins.com/documents"; @@ -66,6 +67,7 @@ public static String post(File file) { byte[] input = (str + System.lineSeparator()).getBytes(StandardCharsets.UTF_8); outputStream.write(input, 0, input.length); } + scan.close(); } StringBuilder response = new StringBuilder(); diff --git a/src/main/java/me/SuperRonanCraft/BetterRTP/references/web/Updater.java b/src/main/java/me/SuperRonanCraft/BetterRTP/references/web/Updater.java index d343e4b..8231a3a 100644 --- a/src/main/java/me/SuperRonanCraft/BetterRTP/references/web/Updater.java +++ b/src/main/java/me/SuperRonanCraft/BetterRTP/references/web/Updater.java @@ -17,7 +17,8 @@ public Updater(BetterRTP pl) { AsyncHandler.async(() -> { try { URLConnection con = new URL(getUrl() + project()).openConnection(); - updatedVersion = new BufferedReader(new InputStreamReader(con.getInputStream())).readLine(); + BufferedReader reader = new BufferedReader(new InputStreamReader(con.getInputStream())); + updatedVersion = reader.readLine(); } catch (Exception ex) { Bukkit.getConsoleSender().sendMessage("[BetterRTP] Failed to check for an update on spigot"); updatedVersion = pl.getDescription().getVersion();