diff --git a/pom.xml b/pom.xml index 2070ef2..c2b5d99 100644 --- a/pom.xml +++ b/pom.xml @@ -29,9 +29,9 @@ - com.destroystokyo.paper - paper-api - 1.15.2-R0.1-SNAPSHOT + org.spigotmc + spigot-api + 1.16.1-R0.1-SNAPSHOT provided @@ -59,8 +59,8 @@ - papermc - https://papermc.io/repo/repository/maven-public/ + spigotmc-repo + https://hub.spigotmc.org/nexus/content/groups/public/ etztech-repo diff --git a/src/main/java/xyz/etztech/qol/QoL.java b/src/main/java/xyz/etztech/qol/QoL.java index 8edbfce..029b356 100644 --- a/src/main/java/xyz/etztech/qol/QoL.java +++ b/src/main/java/xyz/etztech/qol/QoL.java @@ -44,8 +44,7 @@ public class QoL extends JavaPlugin { private static boolean timeout = false; private static List audits = new ArrayList<>(); private static List links = new ArrayList<>(); - - private static Map viewDistances = new HashMap<>(); + private GriefAlert griefAlert; public void onEnable() { @@ -90,73 +89,39 @@ public class QoL extends JavaPlugin { if( isEnabled() ) { // Add listeners - ServerListPingListener serverListPingListener = new ServerListPingListener(this); - getServer().getPluginManager().registerEvents(serverListPingListener, this); - AsyncPlayerChatListener asyncPlayerChatListener = new AsyncPlayerChatListener(this); - getServer().getPluginManager().registerEvents(asyncPlayerChatListener, this); - LoginListener loginListener = new LoginListener(this); - getServer().getPluginManager().registerEvents(loginListener, this); - JoinListener joinListener = new JoinListener(this); - getServer().getPluginManager().registerEvents(joinListener, this); - BlockIgniteListener blockIgniteListener = new BlockIgniteListener(this); - getServer().getPluginManager().registerEvents(blockIgniteListener, this); - CommandPreprocessListener commandPreprocessListener = new CommandPreprocessListener(this); - getServer().getPluginManager().registerEvents(commandPreprocessListener, this); - DeathListener deathListener = new DeathListener(this); - getServer().getPluginManager().registerEvents(deathListener, this); - PlayerBucketEmptyListener playerBucketEmptyListener = new PlayerBucketEmptyListener(this); - getServer().getPluginManager().registerEvents(playerBucketEmptyListener, this); - BlockPlaceListener blockPlaceListener = new BlockPlaceListener(this); - getServer().getPluginManager().registerEvents(blockPlaceListener, this); - PlayerChangedWorldListener playerChangedWorldListener = new PlayerChangedWorldListener(this); - getServer().getPluginManager().registerEvents(playerChangedWorldListener, this); + new ServerListPingListener(this); + new AsyncPlayerChatListener(this); + new LoginListener(this); + new JoinListener(this); + new BlockIgniteListener(this); + new CommandPreprocessListener(this); + new DeathListener(this); + new PlayerBucketEmptyListener(this); + new BlockPlaceListener(this); + new PlayerChangedWorldListener(this); // Add commands - MainCommand mainCommand = new MainCommand(this); - this.getCommand("qol").setExecutor(mainCommand); - UUIDCommand uuidCommand = new UUIDCommand(this); - this.getCommand("uuid").setExecutor(uuidCommand); - NameHistoryCommand nameHistoryCommand = new NameHistoryCommand(this); - this.getCommand("history").setExecutor(nameHistoryCommand); - PortalCommand portalCommand = new PortalCommand(this); - this.getCommand("portal").setExecutor(portalCommand); - SudoCommand sudoCommand = new SudoCommand(this); - this.getCommand("sudo").setExecutor(sudoCommand); - MakeMeCommand makeMeCommand = new MakeMeCommand(this); - this.getCommand("makeme").setExecutor(makeMeCommand); - ShadowMuteCommand shadowMuteCommand = new ShadowMuteCommand(this); - this.getCommand("shadowmute").setExecutor(shadowMuteCommand); - WhitelistCommand whitelistCommand = new WhitelistCommand(this); - this.getCommand("whitelist").setExecutor(whitelistCommand); - TimeoutCommand timeoutCommand = new TimeoutCommand(this); - this.getCommand("timeout").setExecutor(timeoutCommand); - ColorsCommand colorsCommand = new ColorsCommand(this); - this.getCommand("colors").setExecutor(colorsCommand); - WorldInfoCommand worldInfoCommand = new WorldInfoCommand(this); - this.getCommand("worldinfo").setExecutor(worldInfoCommand); - DeathMuteCommand deathMuteCommand = new DeathMuteCommand(this); - this.getCommand("deathmute").setExecutor(deathMuteCommand); - KaratTrophyCommand karatTrophyCommand = new KaratTrophyCommand(this); - this.getCommand("karattrophy").setExecutor(karatTrophyCommand); - CheckupCommand checkupCommand = new CheckupCommand(this); - this.getCommand("checkup").setExecutor(checkupCommand); - DynmapLinkCommand dynmapLinkCommand = new DynmapLinkCommand(this); - this.getCommand("dynmaplink").setExecutor(dynmapLinkCommand); + new MainCommand(this); + new UUIDCommand(this); + new NameHistoryCommand(this); + new PortalCommand(this); + new SudoCommand(this); + new MakeMeCommand(this); + new ShadowMuteCommand(this); + new WhitelistCommand(this); + new TimeoutCommand(this); + new ColorsCommand(this); + new WorldInfoCommand(this); + new DeathMuteCommand(this); + new CheckupCommand(this); + new DynmapLinkCommand(this); if (dynmap != null) { - MarkerCommand markerCommand = new MarkerCommand(this); - this.getCommand("marker").setExecutor(markerCommand); - this.getCommand("marker").setTabCompleter(markerCommand); + new MarkerCommand(this); } - if (getConfig().getStringList("list").size() > 0) { - ListCommand listCommand = new ListCommand(this); - this.getCommand("list").setExecutor(listCommand); - } - if (getConfig().getStringList("plugins").size() > 0) { - PluginsCommand pluginsCommand = new PluginsCommand(this); - this.getCommand("plugins").setExecutor(pluginsCommand); + new ListCommand(this); } @@ -223,17 +188,6 @@ public class QoL extends JavaPlugin { links.add(LinkCommand.fromString(raw)); } - viewDistances = new HashMap<>(); - - ConfigurationSection view_distances = config.getConfigurationSection("view-distances"); - - for (String worldName : view_distances.getKeys(false)) { - - int viewDistance = view_distances.getInt(worldName); - - viewDistances.put(worldName, viewDistance); - } - qolMarkerIcon = config.getString("dynmap.marker_icon", "blueflag"); qolMarkerLayerShow = config.getBoolean("dynmap.marker_set_show", false); qolMarkerSetLabel = config.getString("dynmap.marker_set_label", "QoL Markers"); @@ -341,18 +295,10 @@ public class QoL extends JavaPlugin { return griefAlert; } - public static Map getViewDistances() { - return viewDistances; - } - public void runTask(final String command) { Bukkit.getScheduler().runTask(QoL.instance, () -> Bukkit.dispatchCommand(Bukkit.getConsoleSender(), command)); } - public void updatePlayerViewDistance(Player player) { - //player.setViewDistance(viewDistances.getOrDefault(player.getWorld().getName().toLowerCase(), getServer().getViewDistance())); - } - public MarkerSet getPlayerMarkerSet() { return playerMarkerSet; } diff --git a/src/main/java/xyz/etztech/qol/commands/CheckupCommand.java b/src/main/java/xyz/etztech/qol/commands/CheckupCommand.java index aa2e38d..c652a38 100644 --- a/src/main/java/xyz/etztech/qol/commands/CheckupCommand.java +++ b/src/main/java/xyz/etztech/qol/commands/CheckupCommand.java @@ -22,9 +22,9 @@ public class CheckupCommand implements CommandExecutor { QoL plugin; private static HashMap checkups = new HashMap<>(); - public CheckupCommand(QoL paramQoL) - { + public CheckupCommand(QoL paramQoL) { this.plugin = paramQoL; + plugin.getCommand("checkup").setExecutor(this); } public static void join(Player player) { diff --git a/src/main/java/xyz/etztech/qol/commands/ColorsCommand.java b/src/main/java/xyz/etztech/qol/commands/ColorsCommand.java index e30d65f..ef9a8bf 100644 --- a/src/main/java/xyz/etztech/qol/commands/ColorsCommand.java +++ b/src/main/java/xyz/etztech/qol/commands/ColorsCommand.java @@ -12,6 +12,7 @@ public class ColorsCommand implements CommandExecutor { public ColorsCommand(QoL plugin) { this.plugin = plugin; + plugin.getCommand("colors").setExecutor(this); } @Override diff --git a/src/main/java/xyz/etztech/qol/commands/DeathMuteCommand.java b/src/main/java/xyz/etztech/qol/commands/DeathMuteCommand.java index add16b2..fe46f86 100644 --- a/src/main/java/xyz/etztech/qol/commands/DeathMuteCommand.java +++ b/src/main/java/xyz/etztech/qol/commands/DeathMuteCommand.java @@ -14,9 +14,9 @@ public class DeathMuteCommand implements CommandExecutor { QoL plugin; - public DeathMuteCommand(QoL paramQoL) - { + public DeathMuteCommand(QoL paramQoL) { this.plugin = paramQoL; + plugin.getCommand("deathmute").setExecutor(this); } @Override diff --git a/src/main/java/xyz/etztech/qol/commands/DynmapLinkCommand.java b/src/main/java/xyz/etztech/qol/commands/DynmapLinkCommand.java index b6b9903..116af35 100644 --- a/src/main/java/xyz/etztech/qol/commands/DynmapLinkCommand.java +++ b/src/main/java/xyz/etztech/qol/commands/DynmapLinkCommand.java @@ -18,6 +18,7 @@ public class DynmapLinkCommand implements CommandExecutor { public DynmapLinkCommand(QoL plugin) { this.plugin = plugin; + plugin.getCommand("dynmaplink").setExecutor(this); } @Override diff --git a/src/main/java/xyz/etztech/qol/commands/KaratTrophyCommand.java b/src/main/java/xyz/etztech/qol/commands/KaratTrophyCommand.java deleted file mode 100644 index 322f95a..0000000 --- a/src/main/java/xyz/etztech/qol/commands/KaratTrophyCommand.java +++ /dev/null @@ -1,50 +0,0 @@ -package xyz.etztech.qol.commands; - -import org.bukkit.Bukkit; -import org.bukkit.ChatColor; -import org.bukkit.advancement.Advancement; -import org.bukkit.command.Command; -import org.bukkit.command.CommandExecutor; -import org.bukkit.command.CommandSender; -import org.bukkit.entity.Player; -import org.bukkit.NamespacedKey; -import xyz.etztech.qol.EtzTechUtil; -import xyz.etztech.qol.Lang; -import xyz.etztech.qol.QoL; - -public class KaratTrophyCommand implements CommandExecutor { - - QoL plugin; - - public KaratTrophyCommand(QoL plugin) { - this.plugin = plugin; - } - - @Override - public boolean onCommand(CommandSender commandSender, Command command, String s, String args[]) { - if (!commandSender.hasPermission("qol.karattrophy")) { - EtzTechUtil.sms(commandSender, Lang.NO_PERMISSION.getDef()); - return true; - } - - Player argPlayer = Bukkit.getPlayer(args[0]); - - if (argPlayer == null) { - EtzTechUtil.sms(commandSender, ChatColor.RED + "No player found."); - return true; - } - - final Player player = argPlayer; - - Advancement adv = Bukkit.getAdvancement(new NamespacedKey("carrotcraft", "24_karat_trophy")); - - if (!player.getAdvancementProgress(adv).isDone()) { - EtzTechUtil.sms(commandSender, ChatColor.GREEN + "Awarding 24 Karat Trophy to " + player.getName()); - player.getAdvancementProgress(adv).awardCriteria("win"); - } else { - EtzTechUtil.sms(commandSender, ChatColor.RED + player.getName() + " already has the 24 Karat Trophy"); - } - - return true; - } -} diff --git a/src/main/java/xyz/etztech/qol/commands/ListCommand.java b/src/main/java/xyz/etztech/qol/commands/ListCommand.java index 4bd6b1b..36e643c 100644 --- a/src/main/java/xyz/etztech/qol/commands/ListCommand.java +++ b/src/main/java/xyz/etztech/qol/commands/ListCommand.java @@ -17,6 +17,7 @@ public class ListCommand implements CommandExecutor { public ListCommand(QoL plugin) { this.plugin = plugin; + plugin.getCommand("list").setExecutor(this); } @Override diff --git a/src/main/java/xyz/etztech/qol/commands/MainCommand.java b/src/main/java/xyz/etztech/qol/commands/MainCommand.java index 06150f4..451d0dd 100644 --- a/src/main/java/xyz/etztech/qol/commands/MainCommand.java +++ b/src/main/java/xyz/etztech/qol/commands/MainCommand.java @@ -15,9 +15,9 @@ public class MainCommand implements CommandExecutor { QoL plugin; - public MainCommand(QoL paramQoL) - { + public MainCommand(QoL paramQoL) { this.plugin = paramQoL; + plugin.getCommand("qol").setExecutor(this); } @Override diff --git a/src/main/java/xyz/etztech/qol/commands/MakeMeCommand.java b/src/main/java/xyz/etztech/qol/commands/MakeMeCommand.java index 381e776..2d8fc1c 100644 --- a/src/main/java/xyz/etztech/qol/commands/MakeMeCommand.java +++ b/src/main/java/xyz/etztech/qol/commands/MakeMeCommand.java @@ -15,9 +15,9 @@ public class MakeMeCommand implements CommandExecutor { QoL plugin; - public MakeMeCommand(QoL paramQoL) - { + public MakeMeCommand(QoL paramQoL) { this.plugin = paramQoL; + plugin.getCommand("makeme").setExecutor(this); } @Override diff --git a/src/main/java/xyz/etztech/qol/commands/MarkerCommand.java b/src/main/java/xyz/etztech/qol/commands/MarkerCommand.java index 90507a7..6bf1c12 100644 --- a/src/main/java/xyz/etztech/qol/commands/MarkerCommand.java +++ b/src/main/java/xyz/etztech/qol/commands/MarkerCommand.java @@ -21,9 +21,10 @@ public class MarkerCommand implements CommandExecutor, TabExecutor{ QoL plugin; List subCommandList = Arrays.asList("set", "remove", "list"); - public MarkerCommand(QoL paramQoL) - { + public MarkerCommand(QoL paramQoL) { this.plugin = paramQoL; + plugin.getCommand("marker").setExecutor(this); + plugin.getCommand("marker").setTabCompleter(this); } @Override diff --git a/src/main/java/xyz/etztech/qol/commands/NameHistoryCommand.java b/src/main/java/xyz/etztech/qol/commands/NameHistoryCommand.java index d0473ea..e8e9892 100644 --- a/src/main/java/xyz/etztech/qol/commands/NameHistoryCommand.java +++ b/src/main/java/xyz/etztech/qol/commands/NameHistoryCommand.java @@ -24,9 +24,9 @@ public class NameHistoryCommand implements CommandExecutor { QoL plugin; - public NameHistoryCommand(QoL paramQoL) - { + public NameHistoryCommand(QoL paramQoL) { this.plugin = paramQoL; + plugin.getCommand("history").setExecutor(this); } @Override diff --git a/src/main/java/xyz/etztech/qol/commands/PluginsCommand.java b/src/main/java/xyz/etztech/qol/commands/PluginsCommand.java deleted file mode 100644 index 38a4faa..0000000 --- a/src/main/java/xyz/etztech/qol/commands/PluginsCommand.java +++ /dev/null @@ -1,27 +0,0 @@ -package xyz.etztech.qol.commands; - -import org.apache.commons.lang.StringUtils; -import org.bukkit.ChatColor; -import org.bukkit.command.Command; -import org.bukkit.command.CommandExecutor; -import org.bukkit.command.CommandSender; -import xyz.etztech.qol.QoL; - -public class PluginsCommand implements CommandExecutor { - - QoL plugin; - - public PluginsCommand(QoL plugin) { - this.plugin = plugin; - } - - @Override - public boolean onCommand(CommandSender commandSender, Command command, String s, String[] strings) { - - commandSender.sendMessage(ChatColor.GOLD + "Plugins: " + ChatColor.YELLOW + - StringUtils.join(plugin.getConfig().getStringList("plugins"), ", ")); - - return true; - } -} - diff --git a/src/main/java/xyz/etztech/qol/commands/PortalCommand.java b/src/main/java/xyz/etztech/qol/commands/PortalCommand.java index 2b939ff..f9f9c2c 100644 --- a/src/main/java/xyz/etztech/qol/commands/PortalCommand.java +++ b/src/main/java/xyz/etztech/qol/commands/PortalCommand.java @@ -18,9 +18,9 @@ public class PortalCommand implements CommandExecutor { QoL plugin; - public PortalCommand(QoL paramQoL) - { + public PortalCommand(QoL paramQoL) { this.plugin = paramQoL; + plugin.getCommand("portal").setExecutor(this); } @Override diff --git a/src/main/java/xyz/etztech/qol/commands/ShadowMuteCommand.java b/src/main/java/xyz/etztech/qol/commands/ShadowMuteCommand.java index 160f75c..b201e40 100644 --- a/src/main/java/xyz/etztech/qol/commands/ShadowMuteCommand.java +++ b/src/main/java/xyz/etztech/qol/commands/ShadowMuteCommand.java @@ -16,9 +16,9 @@ public class ShadowMuteCommand implements CommandExecutor { QoL plugin; - public ShadowMuteCommand(QoL paramQoL) - { + public ShadowMuteCommand(QoL paramQoL) { this.plugin = paramQoL; + plugin.getCommand("shadowmute").setExecutor(this); } @Override diff --git a/src/main/java/xyz/etztech/qol/commands/SudoCommand.java b/src/main/java/xyz/etztech/qol/commands/SudoCommand.java index 713ec52..20bfe66 100644 --- a/src/main/java/xyz/etztech/qol/commands/SudoCommand.java +++ b/src/main/java/xyz/etztech/qol/commands/SudoCommand.java @@ -16,9 +16,9 @@ public class SudoCommand implements CommandExecutor { QoL plugin; - public SudoCommand(QoL paramQoL) - { + public SudoCommand(QoL paramQoL) { this.plugin = paramQoL; + plugin.getCommand("sudo").setExecutor(this); } @Override diff --git a/src/main/java/xyz/etztech/qol/commands/TimeoutCommand.java b/src/main/java/xyz/etztech/qol/commands/TimeoutCommand.java index 086d7a0..4095625 100644 --- a/src/main/java/xyz/etztech/qol/commands/TimeoutCommand.java +++ b/src/main/java/xyz/etztech/qol/commands/TimeoutCommand.java @@ -20,9 +20,9 @@ public class TimeoutCommand implements CommandExecutor { QoL plugin; - public TimeoutCommand(QoL paramQoL) - { + public TimeoutCommand(QoL paramQoL) { this.plugin = paramQoL; + plugin.getCommand("timeout").setExecutor(this); } @Override diff --git a/src/main/java/xyz/etztech/qol/commands/UUIDCommand.java b/src/main/java/xyz/etztech/qol/commands/UUIDCommand.java index 18d9fc6..e113230 100644 --- a/src/main/java/xyz/etztech/qol/commands/UUIDCommand.java +++ b/src/main/java/xyz/etztech/qol/commands/UUIDCommand.java @@ -23,9 +23,9 @@ public class UUIDCommand implements CommandExecutor { QoL plugin; - public UUIDCommand(QoL paramQoL) - { + public UUIDCommand(QoL paramQoL) { this.plugin = paramQoL; + plugin.getCommand("uuid").setExecutor(this); } @Override diff --git a/src/main/java/xyz/etztech/qol/commands/WhitelistCommand.java b/src/main/java/xyz/etztech/qol/commands/WhitelistCommand.java index c8c94e5..0d96ea7 100644 --- a/src/main/java/xyz/etztech/qol/commands/WhitelistCommand.java +++ b/src/main/java/xyz/etztech/qol/commands/WhitelistCommand.java @@ -20,9 +20,9 @@ public class WhitelistCommand implements CommandExecutor { QoL plugin; - public WhitelistCommand(QoL paramQoL) - { + public WhitelistCommand(QoL paramQoL) { this.plugin = paramQoL; + plugin.getCommand("whitelist").setExecutor(this); } @Override diff --git a/src/main/java/xyz/etztech/qol/commands/WorldInfoCommand.java b/src/main/java/xyz/etztech/qol/commands/WorldInfoCommand.java index c5e7554..73902de 100644 --- a/src/main/java/xyz/etztech/qol/commands/WorldInfoCommand.java +++ b/src/main/java/xyz/etztech/qol/commands/WorldInfoCommand.java @@ -20,6 +20,7 @@ public class WorldInfoCommand implements CommandExecutor { public WorldInfoCommand(QoL plugin) { this.plugin = plugin; + plugin.getCommand("worldinfo").setExecutor(this); } @Override diff --git a/src/main/java/xyz/etztech/qol/listeners/AsyncPlayerChatListener.java b/src/main/java/xyz/etztech/qol/listeners/AsyncPlayerChatListener.java index ebd3849..08ebfed 100644 --- a/src/main/java/xyz/etztech/qol/listeners/AsyncPlayerChatListener.java +++ b/src/main/java/xyz/etztech/qol/listeners/AsyncPlayerChatListener.java @@ -27,6 +27,7 @@ public class AsyncPlayerChatListener implements Listener { public AsyncPlayerChatListener(QoL plugin) { this.plugin = plugin; + plugin.getServer().getPluginManager().registerEvents(this, plugin); } @EventHandler(priority=EventPriority.HIGH, ignoreCancelled=true) diff --git a/src/main/java/xyz/etztech/qol/listeners/BlockIgniteListener.java b/src/main/java/xyz/etztech/qol/listeners/BlockIgniteListener.java index 5b06043..be9da71 100644 --- a/src/main/java/xyz/etztech/qol/listeners/BlockIgniteListener.java +++ b/src/main/java/xyz/etztech/qol/listeners/BlockIgniteListener.java @@ -11,6 +11,7 @@ public class BlockIgniteListener implements Listener { public BlockIgniteListener(QoL plugin) { this.plugin = plugin; + plugin.getServer().getPluginManager().registerEvents(this, plugin); } @EventHandler diff --git a/src/main/java/xyz/etztech/qol/listeners/BlockPlaceListener.java b/src/main/java/xyz/etztech/qol/listeners/BlockPlaceListener.java index c5309a9..aeec12d 100644 --- a/src/main/java/xyz/etztech/qol/listeners/BlockPlaceListener.java +++ b/src/main/java/xyz/etztech/qol/listeners/BlockPlaceListener.java @@ -14,6 +14,7 @@ public class BlockPlaceListener implements Listener { public BlockPlaceListener(QoL plugin) { this.plugin = plugin; + plugin.getServer().getPluginManager().registerEvents(this, plugin); } @EventHandler diff --git a/src/main/java/xyz/etztech/qol/listeners/CommandPreprocessListener.java b/src/main/java/xyz/etztech/qol/listeners/CommandPreprocessListener.java index d9566c6..a5bbeb7 100644 --- a/src/main/java/xyz/etztech/qol/listeners/CommandPreprocessListener.java +++ b/src/main/java/xyz/etztech/qol/listeners/CommandPreprocessListener.java @@ -25,6 +25,7 @@ public class CommandPreprocessListener implements Listener { public CommandPreprocessListener(QoL plugin) { this.plugin = plugin; + plugin.getServer().getPluginManager().registerEvents(this, plugin); } @EventHandler diff --git a/src/main/java/xyz/etztech/qol/listeners/DeathListener.java b/src/main/java/xyz/etztech/qol/listeners/DeathListener.java index 116db78..885db62 100644 --- a/src/main/java/xyz/etztech/qol/listeners/DeathListener.java +++ b/src/main/java/xyz/etztech/qol/listeners/DeathListener.java @@ -21,6 +21,7 @@ public class DeathListener implements Listener { public DeathListener(QoL plugin) { this.plugin = plugin; + plugin.getServer().getPluginManager().registerEvents(this, plugin); } @EventHandler diff --git a/src/main/java/xyz/etztech/qol/listeners/JoinListener.java b/src/main/java/xyz/etztech/qol/listeners/JoinListener.java index b88de77..a368d77 100644 --- a/src/main/java/xyz/etztech/qol/listeners/JoinListener.java +++ b/src/main/java/xyz/etztech/qol/listeners/JoinListener.java @@ -20,6 +20,7 @@ public class JoinListener implements Listener { public JoinListener(QoL plugin) { this.plugin = plugin; + plugin.getServer().getPluginManager().registerEvents(this, plugin); } @EventHandler diff --git a/src/main/java/xyz/etztech/qol/listeners/LoginListener.java b/src/main/java/xyz/etztech/qol/listeners/LoginListener.java index d4df350..56a08f3 100644 --- a/src/main/java/xyz/etztech/qol/listeners/LoginListener.java +++ b/src/main/java/xyz/etztech/qol/listeners/LoginListener.java @@ -14,6 +14,7 @@ public class LoginListener implements Listener { public LoginListener(QoL plugin) { this.plugin = plugin; + plugin.getServer().getPluginManager().registerEvents(this, plugin); } @EventHandler diff --git a/src/main/java/xyz/etztech/qol/listeners/PlayerBucketEmptyListener.java b/src/main/java/xyz/etztech/qol/listeners/PlayerBucketEmptyListener.java index 1acfbbf..9cef25a 100644 --- a/src/main/java/xyz/etztech/qol/listeners/PlayerBucketEmptyListener.java +++ b/src/main/java/xyz/etztech/qol/listeners/PlayerBucketEmptyListener.java @@ -14,6 +14,7 @@ public class PlayerBucketEmptyListener implements Listener { public PlayerBucketEmptyListener(QoL plugin) { this.plugin = plugin; + plugin.getServer().getPluginManager().registerEvents(this, plugin); } @EventHandler diff --git a/src/main/java/xyz/etztech/qol/listeners/PlayerChangedWorldListener.java b/src/main/java/xyz/etztech/qol/listeners/PlayerChangedWorldListener.java index 4c41a93..f935c74 100644 --- a/src/main/java/xyz/etztech/qol/listeners/PlayerChangedWorldListener.java +++ b/src/main/java/xyz/etztech/qol/listeners/PlayerChangedWorldListener.java @@ -13,6 +13,7 @@ public class PlayerChangedWorldListener implements Listener { public PlayerChangedWorldListener(QoL plugin) { this.plugin = plugin; + plugin.getServer().getPluginManager().registerEvents(this, plugin); } @EventHandler diff --git a/src/main/java/xyz/etztech/qol/listeners/ServerListPingListener.java b/src/main/java/xyz/etztech/qol/listeners/ServerListPingListener.java index d4f3adb..2afb2cf 100644 --- a/src/main/java/xyz/etztech/qol/listeners/ServerListPingListener.java +++ b/src/main/java/xyz/etztech/qol/listeners/ServerListPingListener.java @@ -21,6 +21,7 @@ public class ServerListPingListener implements Listener { public ServerListPingListener(QoL plugin) { this.plugin = plugin; + plugin.getServer().getPluginManager().registerEvents(this, plugin); } @EventHandler diff --git a/src/main/resources/config.yml b/src/main/resources/config.yml index 6da7a24..a3696db 100644 --- a/src/main/resources/config.yml +++ b/src/main/resources/config.yml @@ -19,11 +19,6 @@ list: # - mod # - member -# A list of plugins to show, overriding the Vanilla /pl -# Leave blank to disable -plugins: -# - QoL - # A list of permissions to check, followed by a list of commands to run on login if a player has the specified permission # Special variables are for the player logging in queue: @@ -90,10 +85,6 @@ disable-fire: ender_crystal: false explosion: false -# Overrides view distance per world, format is [World Name]: [View Distance] -view-distances: - world: 2 - # A list of commands to confirm before using if the user isn't in spectator mode spec-confirm: - "tp" diff --git a/src/main/resources/plugin.yml b/src/main/resources/plugin.yml index c666af0..726c496 100644 --- a/src/main/resources/plugin.yml +++ b/src/main/resources/plugin.yml @@ -13,9 +13,6 @@ commands: list: description: See a list of players aliases: [players, playerlist] - plugins: - description: See a list of plugins - aliases: [pl] history: description: Name History utility command aliases: [names, name] @@ -40,9 +37,6 @@ commands: description: Whitelist command timeout: description: Timeout command - karattrophy: - description: 24 karat trophy command - aliases: [trophy] checkup: description: Checkup command dynmaplink: @@ -85,9 +79,6 @@ permissions: qol.deathmute: description: Ability to use the Death Mute command default: op - qol.karattrophy: - description: Ability to use the Karat Trophy Command - default: op qol.checkup: description: Ability to use the Checkup Command default: op