From cedce3d1d06303c468b1e41d0efebdc62a4acce5 Mon Sep 17 00:00:00 2001 From: SrJss <31166687+jonagamerpro1234@users.noreply.github.com> Date: Wed, 30 Aug 2023 17:41:21 -0400 Subject: [PATCH] minor changes in code --- .../commands/subcommands/HelpCommand.java | 2 +- .../jss/customjoinandquitmessage/files/GroupFile.java | 8 -------- .../listeners/chat/JoinListener.java | 1 - .../customjoinandquitmessage/managers/GroupManager.java | 1 + 4 files changed, 2 insertions(+), 10 deletions(-) diff --git a/bukkit/src/main/java/jss/customjoinandquitmessage/commands/subcommands/HelpCommand.java b/bukkit/src/main/java/jss/customjoinandquitmessage/commands/subcommands/HelpCommand.java index 5ad0b10..6a3bc7b 100644 --- a/bukkit/src/main/java/jss/customjoinandquitmessage/commands/subcommands/HelpCommand.java +++ b/bukkit/src/main/java/jss/customjoinandquitmessage/commands/subcommands/HelpCommand.java @@ -8,7 +8,7 @@ public class HelpCommand extends SubCommand { - private CustomJoinAndQuitMessage plugin = CustomJoinAndQuitMessage.get(); + private final CustomJoinAndQuitMessage plugin = CustomJoinAndQuitMessage.get(); public String name() { return "help"; diff --git a/bukkit/src/main/java/jss/customjoinandquitmessage/files/GroupFile.java b/bukkit/src/main/java/jss/customjoinandquitmessage/files/GroupFile.java index 423a920..d0c6f1f 100644 --- a/bukkit/src/main/java/jss/customjoinandquitmessage/files/GroupFile.java +++ b/bukkit/src/main/java/jss/customjoinandquitmessage/files/GroupFile.java @@ -17,14 +17,6 @@ public class GroupFile { private File file; private FileConfiguration config; - public void create() { - this.file = new File(plugin.getDataFolder(), "groups.yml"); - if (!this.file.exists()) { - getConfig().options().copyDefaults(true); - saveConfig(); - } - } - public FileConfiguration getConfig() { if (this.config == null) { reloadConfig(); diff --git a/bukkit/src/main/java/jss/customjoinandquitmessage/listeners/chat/JoinListener.java b/bukkit/src/main/java/jss/customjoinandquitmessage/listeners/chat/JoinListener.java index 71be176..11a3441 100644 --- a/bukkit/src/main/java/jss/customjoinandquitmessage/listeners/chat/JoinListener.java +++ b/bukkit/src/main/java/jss/customjoinandquitmessage/listeners/chat/JoinListener.java @@ -13,7 +13,6 @@ public class JoinListener implements Listener { - private static final CustomJoinAndQuitMessage plugin = CustomJoinAndQuitMessage.get(); private final JoinQuitMessageHandlerFactory handlerFactory = JoinQuitMessageHandlerFactory.getInstance(); @EventHandler(priority = EventPriority.HIGH, ignoreCancelled = true) diff --git a/bukkit/src/main/java/jss/customjoinandquitmessage/managers/GroupManager.java b/bukkit/src/main/java/jss/customjoinandquitmessage/managers/GroupManager.java index 2c2a7fb..7f76b15 100644 --- a/bukkit/src/main/java/jss/customjoinandquitmessage/managers/GroupManager.java +++ b/bukkit/src/main/java/jss/customjoinandquitmessage/managers/GroupManager.java @@ -6,4 +6,5 @@ public void getName(){ } + }