From d9e98430699ff68e862893a3e33f971393772638 Mon Sep 17 00:00:00 2001 From: Rsl1122 Date: Sat, 13 Jan 2018 13:46:32 +0200 Subject: [PATCH] Abstracted ListenerSystem, moved Processors to new package --- .../main/java/com/djrapitops/plan/Plan.java | 26 +-- .../java/com/djrapitops/plan/PlanBungee.java | 11 +- .../java/com/djrapitops/plan/PlanPlugin.java | 2 +- .../plan/command/commands/InspectCommand.java | 2 +- .../commands/manage/ManageDisableCommand.java | 4 +- .../djrapitops/plan/system/BukkitSystem.java | 4 + .../djrapitops/plan/system/BungeeSystem.java | 4 + .../djrapitops/plan/system/PlanSystem.java | 17 +- .../listeners/BukkitListenerSystem.java | 32 ++++ .../listeners/BungeeListenerSystem.java | 23 +++ .../plan/system/listeners/ListenerSystem.java | 25 +++ .../system/listeners/bukkit/ChatListener.java | 61 +++++++ .../bukkit/CommandPreprocessListener.java | 77 +++++++++ .../listeners/bukkit/DeathEventListener.java | 133 +++++++++++++++ .../bukkit/GamemodeChangeListener.java | 60 +++++++ .../bukkit/PlayerOnlineListener.java | 154 ++++++++++++++++++ .../listeners/bukkit/WorldChangeListener.java | 42 +++++ .../bungee/PlayerOnlineListener.java} | 8 +- .../system/processing/ProcessingQueue.java | 2 +- .../processors}/CommandProcessor.java | 2 +- .../processors}/NewNickActionProcessor.java | 4 +- .../processing/processors}/Processor.java | 2 +- .../processors}/TPSInsertProcessor.java | 3 +- .../importing/ServerImportData.java | 2 +- .../processors}/importing/UserImportData.java | 2 +- .../importing/UserImportRefiner.java | 2 +- .../importing/importers/Importer.java | 8 +- .../importers/OfflinePlayerImporter.java | 6 +- .../info/InspectCacheRequestProcessor.java | 4 +- .../info/NetworkPageUpdateProcessor.java | 4 +- .../processors}/player/BanAndOpProcessor.java | 2 +- .../player/BungeePlayerRegisterProcessor.java | 2 +- .../processors}/player/DeathProcessor.java | 2 +- .../player/EndSessionProcessor.java | 2 +- .../player/FirstLeaveProcessor.java | 2 +- .../processors}/player/IPUpdateProcessor.java | 2 +- .../processors}/player/KickProcessor.java | 2 +- .../processors}/player/KillProcessor.java | 2 +- .../processors}/player/NameProcessor.java | 4 +- .../processors}/player/PlayerProcessor.java | 4 +- .../processors}/player/RegisterProcessor.java | 4 +- .../bungee/RequestPluginsTabWebAPI.java | 2 +- .../plan/systems/cache/SessionCache.java | 2 +- .../info/BukkitInformationManager.java | 2 +- .../plan/systems/info/ImporterManager.java | 2 +- .../BungeePluginChannelSenderProcessor.java | 39 ----- .../plan/systems/tasks/TPSCountTimer.java | 2 +- .../importer/ImportBuilderTest.java | 4 +- .../plan/system/database/DatabaseTest.java | 2 +- 49 files changed, 695 insertions(+), 114 deletions(-) create mode 100644 Plan/src/main/java/com/djrapitops/plan/system/listeners/BukkitListenerSystem.java create mode 100644 Plan/src/main/java/com/djrapitops/plan/system/listeners/BungeeListenerSystem.java create mode 100644 Plan/src/main/java/com/djrapitops/plan/system/listeners/ListenerSystem.java create mode 100644 Plan/src/main/java/com/djrapitops/plan/system/listeners/bukkit/ChatListener.java create mode 100644 Plan/src/main/java/com/djrapitops/plan/system/listeners/bukkit/CommandPreprocessListener.java create mode 100644 Plan/src/main/java/com/djrapitops/plan/system/listeners/bukkit/DeathEventListener.java create mode 100644 Plan/src/main/java/com/djrapitops/plan/system/listeners/bukkit/GamemodeChangeListener.java create mode 100644 Plan/src/main/java/com/djrapitops/plan/system/listeners/bukkit/PlayerOnlineListener.java create mode 100644 Plan/src/main/java/com/djrapitops/plan/system/listeners/bukkit/WorldChangeListener.java rename Plan/src/main/java/com/djrapitops/plan/{systems/listeners/BungeePlayerListener.java => system/listeners/bungee/PlayerOnlineListener.java} (81%) rename Plan/src/main/java/com/djrapitops/plan/{systems/processing => system/processing/processors}/CommandProcessor.java (92%) rename Plan/src/main/java/com/djrapitops/plan/{systems/processing => system/processing/processors}/NewNickActionProcessor.java (90%) rename Plan/src/main/java/com/djrapitops/plan/{systems/processing => system/processing/processors}/Processor.java (92%) rename Plan/src/main/java/com/djrapitops/plan/{systems/processing => system/processing/processors}/TPSInsertProcessor.java (94%) rename Plan/src/main/java/com/djrapitops/plan/{systems/processing => system/processing/processors}/importing/ServerImportData.java (97%) rename Plan/src/main/java/com/djrapitops/plan/{systems/processing => system/processing/processors}/importing/UserImportData.java (99%) rename Plan/src/main/java/com/djrapitops/plan/{systems/processing => system/processing/processors}/importing/UserImportRefiner.java (99%) rename Plan/src/main/java/com/djrapitops/plan/{systems/processing => system/processing/processors}/importing/importers/Importer.java (96%) rename Plan/src/main/java/com/djrapitops/plan/{systems/processing => system/processing/processors}/importing/importers/OfflinePlayerImporter.java (85%) rename Plan/src/main/java/com/djrapitops/plan/{systems/processing => system/processing/processors}/info/InspectCacheRequestProcessor.java (93%) rename Plan/src/main/java/com/djrapitops/plan/{systems/processing => system/processing/processors}/info/NetworkPageUpdateProcessor.java (81%) rename Plan/src/main/java/com/djrapitops/plan/{systems/processing => system/processing/processors}/player/BanAndOpProcessor.java (93%) rename Plan/src/main/java/com/djrapitops/plan/{systems/processing => system/processing/processors}/player/BungeePlayerRegisterProcessor.java (94%) rename Plan/src/main/java/com/djrapitops/plan/{systems/processing => system/processing/processors}/player/DeathProcessor.java (91%) rename Plan/src/main/java/com/djrapitops/plan/{systems/processing => system/processing/processors}/player/EndSessionProcessor.java (90%) rename Plan/src/main/java/com/djrapitops/plan/{systems/processing => system/processing/processors}/player/FirstLeaveProcessor.java (94%) rename Plan/src/main/java/com/djrapitops/plan/{systems/processing => system/processing/processors}/player/IPUpdateProcessor.java (94%) rename Plan/src/main/java/com/djrapitops/plan/{systems/processing => system/processing/processors}/player/KickProcessor.java (92%) rename Plan/src/main/java/com/djrapitops/plan/{systems/processing => system/processing/processors}/player/KillProcessor.java (96%) rename Plan/src/main/java/com/djrapitops/plan/{systems/processing => system/processing/processors}/player/NameProcessor.java (94%) rename Plan/src/main/java/com/djrapitops/plan/{systems/processing => system/processing/processors}/player/PlayerProcessor.java (81%) rename Plan/src/main/java/com/djrapitops/plan/{systems/processing => system/processing/processors}/player/RegisterProcessor.java (94%) delete mode 100644 Plan/src/main/java/com/djrapitops/plan/systems/processing/info/BungeePluginChannelSenderProcessor.java diff --git a/Plan/src/main/java/com/djrapitops/plan/Plan.java b/Plan/src/main/java/com/djrapitops/plan/Plan.java index a3cf97636..09b621232 100644 --- a/Plan/src/main/java/com/djrapitops/plan/Plan.java +++ b/Plan/src/main/java/com/djrapitops/plan/Plan.java @@ -27,10 +27,13 @@ import com.djrapitops.plan.settings.locale.Locale; import com.djrapitops.plan.settings.locale.Msg; import com.djrapitops.plan.settings.theme.PlanColorScheme; import com.djrapitops.plan.settings.theme.Theme; +import com.djrapitops.plan.system.BukkitSystem; import com.djrapitops.plan.system.database.DBSystem; import com.djrapitops.plan.system.database.databases.Database; import com.djrapitops.plan.system.file.FileSystem; import com.djrapitops.plan.system.processing.ProcessingQueue; +import com.djrapitops.plan.system.processing.processors.Processor; +import com.djrapitops.plan.system.processing.processors.importing.importers.OfflinePlayerImporter; import com.djrapitops.plan.system.settings.Settings; import com.djrapitops.plan.system.settings.config.ConfigSystem; import com.djrapitops.plan.system.update.VersionCheckSystem; @@ -44,9 +47,6 @@ import com.djrapitops.plan.systems.info.BukkitInformationManager; import com.djrapitops.plan.systems.info.ImporterManager; import com.djrapitops.plan.systems.info.InformationManager; import com.djrapitops.plan.systems.info.server.BukkitServerInfoManager; -import com.djrapitops.plan.systems.listeners.*; -import com.djrapitops.plan.systems.processing.Processor; -import com.djrapitops.plan.systems.processing.importing.importers.OfflinePlayerImporter; import com.djrapitops.plan.systems.tasks.TaskSystem; import com.djrapitops.plan.utilities.file.export.HtmlExport; import com.djrapitops.plan.utilities.metrics.BStats; @@ -180,11 +180,6 @@ public class Plan extends BukkitPlugin implements PlanPlugin { Benchmark.stop("Enable", "WebServer Initialization"); - if (!reloading) { - registerListeners(); - } - PlanPlayerListener.setCountKicks(true); - TaskSystem.getInstance().enable(); this.api = new API(this); @@ -273,18 +268,7 @@ public class Plan extends BukkitPlugin implements PlanPlugin { @Override public void onReload() { - ConfigSystem.reload(); - } - private void registerListeners() { - Benchmark.start("Register Listeners"); - registerListener(new PlanPlayerListener(this)); - registerListener(new PlanChatListener(this)); - registerListener(new PlanGamemodeChangeListener(this)); - registerListener(new PlanWorldChangeListener(this)); - registerListener(new PlanCommandPreprocessListener(this)); - registerListener(new PlanDeathEventListener(this)); - Benchmark.stop("Enable", "Register Listeners"); } /** @@ -434,4 +418,8 @@ public class Plan extends BukkitPlugin implements PlanPlugin { public Systems getSystems() { return systems; } + + public BukkitSystem getSystem() { + return system; + } } diff --git a/Plan/src/main/java/com/djrapitops/plan/PlanBungee.java b/Plan/src/main/java/com/djrapitops/plan/PlanBungee.java index ce8b1d1dc..28545d4e8 100644 --- a/Plan/src/main/java/com/djrapitops/plan/PlanBungee.java +++ b/Plan/src/main/java/com/djrapitops/plan/PlanBungee.java @@ -9,10 +9,12 @@ import com.djrapitops.plan.settings.locale.Locale; import com.djrapitops.plan.settings.locale.Msg; import com.djrapitops.plan.settings.theme.PlanColorScheme; import com.djrapitops.plan.settings.theme.Theme; +import com.djrapitops.plan.system.BungeeSystem; import com.djrapitops.plan.system.database.DBSystem; import com.djrapitops.plan.system.database.databases.Database; import com.djrapitops.plan.system.file.FileSystem; import com.djrapitops.plan.system.processing.ProcessingQueue; +import com.djrapitops.plan.system.processing.processors.Processor; import com.djrapitops.plan.system.settings.Settings; import com.djrapitops.plan.system.settings.config.ConfigSystem; import com.djrapitops.plan.system.update.VersionCheckSystem; @@ -22,8 +24,6 @@ import com.djrapitops.plan.systems.Systems; import com.djrapitops.plan.systems.info.BungeeInformationManager; import com.djrapitops.plan.systems.info.InformationManager; import com.djrapitops.plan.systems.info.server.BungeeServerInfoManager; -import com.djrapitops.plan.systems.listeners.BungeePlayerListener; -import com.djrapitops.plan.systems.processing.Processor; import com.djrapitops.plan.systems.tasks.TaskSystem; import com.djrapitops.plan.utilities.file.export.HtmlExport; import com.djrapitops.plugin.BungeePlugin; @@ -55,6 +55,7 @@ public class PlanBungee extends BungeePlugin implements PlanPlugin { private ProcessingQueue processingQueue; private boolean setupAllowed = false; + private BungeeSystem system; @Override public void onEnable() { @@ -94,8 +95,6 @@ public class PlanBungee extends BungeePlugin implements PlanPlugin { processingQueue = new ProcessingQueue(); - registerListener(new BungeePlayerListener(this)); - Log.logDebug("Enable", "WebServer Initialization"); Log.info(Locale.get(Msg.ENABLED).toString()); if (Settings.ANALYSIS_EXPORT.isTrue()) { @@ -211,4 +210,8 @@ public class PlanBungee extends BungeePlugin implements PlanPlugin { public void setSetupAllowed(boolean setupAllowed) { this.setupAllowed = setupAllowed; } + + public BungeeSystem getSystem() { + return system; + } } \ No newline at end of file diff --git a/Plan/src/main/java/com/djrapitops/plan/PlanPlugin.java b/Plan/src/main/java/com/djrapitops/plan/PlanPlugin.java index 0932ced16..751346904 100644 --- a/Plan/src/main/java/com/djrapitops/plan/PlanPlugin.java +++ b/Plan/src/main/java/com/djrapitops/plan/PlanPlugin.java @@ -6,10 +6,10 @@ package com.djrapitops.plan; import com.djrapitops.plan.system.database.databases.Database; import com.djrapitops.plan.system.processing.ProcessingQueue; +import com.djrapitops.plan.system.processing.processors.Processor; import com.djrapitops.plan.system.webserver.WebServer; import com.djrapitops.plan.systems.Systems; import com.djrapitops.plan.systems.info.InformationManager; -import com.djrapitops.plan.systems.processing.Processor; import com.djrapitops.plugin.IPlugin; import com.djrapitops.plugin.api.Check; import com.djrapitops.plugin.api.config.Config; diff --git a/Plan/src/main/java/com/djrapitops/plan/command/commands/InspectCommand.java b/Plan/src/main/java/com/djrapitops/plan/command/commands/InspectCommand.java index 71ef34beb..0cba2c0c7 100644 --- a/Plan/src/main/java/com/djrapitops/plan/command/commands/InspectCommand.java +++ b/Plan/src/main/java/com/djrapitops/plan/command/commands/InspectCommand.java @@ -4,8 +4,8 @@ import com.djrapitops.plan.Plan; import com.djrapitops.plan.command.ConditionUtils; import com.djrapitops.plan.settings.locale.Locale; import com.djrapitops.plan.settings.locale.Msg; +import com.djrapitops.plan.system.processing.processors.info.InspectCacheRequestProcessor; import com.djrapitops.plan.system.settings.Permissions; -import com.djrapitops.plan.systems.processing.info.InspectCacheRequestProcessor; import com.djrapitops.plan.utilities.Condition; import com.djrapitops.plan.utilities.MiscUtils; import com.djrapitops.plan.utilities.uuid.UUIDUtility; diff --git a/Plan/src/main/java/com/djrapitops/plan/command/commands/manage/ManageDisableCommand.java b/Plan/src/main/java/com/djrapitops/plan/command/commands/manage/ManageDisableCommand.java index 03e969ece..3fcd989f2 100644 --- a/Plan/src/main/java/com/djrapitops/plan/command/commands/manage/ManageDisableCommand.java +++ b/Plan/src/main/java/com/djrapitops/plan/command/commands/manage/ManageDisableCommand.java @@ -2,8 +2,8 @@ package com.djrapitops.plan.command.commands.manage; import com.djrapitops.plan.settings.locale.Locale; import com.djrapitops.plan.settings.locale.Msg; +import com.djrapitops.plan.system.listeners.bukkit.PlayerOnlineListener; import com.djrapitops.plan.system.settings.Permissions; -import com.djrapitops.plan.systems.listeners.PlanPlayerListener; import com.djrapitops.plan.utilities.Condition; import com.djrapitops.plugin.command.CommandType; import com.djrapitops.plugin.command.ISender; @@ -34,7 +34,7 @@ public class ManageDisableCommand extends SubCommand { } switch (args[0].toLowerCase()) { case "kickcount": - PlanPlayerListener.setCountKicks(false); + PlayerOnlineListener.setCountKicks(false); sender.sendMessage("§aDisabled Kick Counting temporarily until next plugin reload."); break; default: diff --git a/Plan/src/main/java/com/djrapitops/plan/system/BukkitSystem.java b/Plan/src/main/java/com/djrapitops/plan/system/BukkitSystem.java index d845f1310..7d3132b6f 100644 --- a/Plan/src/main/java/com/djrapitops/plan/system/BukkitSystem.java +++ b/Plan/src/main/java/com/djrapitops/plan/system/BukkitSystem.java @@ -23,4 +23,8 @@ public class BukkitSystem extends PlanSystem { configSystem = new BukkitConfigSystem(); databaseSystem = new BukkitDBSystem(); } + + public static BukkitSystem getInstance() { + return Plan.getInstance().getSystem(); + } } \ No newline at end of file diff --git a/Plan/src/main/java/com/djrapitops/plan/system/BungeeSystem.java b/Plan/src/main/java/com/djrapitops/plan/system/BungeeSystem.java index 895a1c394..1388475a0 100644 --- a/Plan/src/main/java/com/djrapitops/plan/system/BungeeSystem.java +++ b/Plan/src/main/java/com/djrapitops/plan/system/BungeeSystem.java @@ -23,4 +23,8 @@ public class BungeeSystem extends PlanSystem { configSystem = new BungeeConfigSystem(); databaseSystem = new BungeeDBSystem(); } + + public static BungeeSystem getInstance() { + return PlanBungee.getInstance().getSystem(); + } } \ No newline at end of file diff --git a/Plan/src/main/java/com/djrapitops/plan/system/PlanSystem.java b/Plan/src/main/java/com/djrapitops/plan/system/PlanSystem.java index 5310d11bc..774e19194 100644 --- a/Plan/src/main/java/com/djrapitops/plan/system/PlanSystem.java +++ b/Plan/src/main/java/com/djrapitops/plan/system/PlanSystem.java @@ -7,6 +7,7 @@ package com.djrapitops.plan.system; import com.djrapitops.plan.api.exceptions.EnableException; import com.djrapitops.plan.system.database.DBSystem; import com.djrapitops.plan.system.file.FileSystem; +import com.djrapitops.plan.system.listeners.ListenerSystem; import com.djrapitops.plan.system.processing.ProcessingQueue; import com.djrapitops.plan.system.settings.config.ConfigSystem; import com.djrapitops.plan.system.update.VersionCheckSystem; @@ -31,6 +32,8 @@ public abstract class PlanSystem implements SubSystem { protected ConfigSystem configSystem; protected DBSystem databaseSystem; + protected ListenerSystem listenerSystem; + public PlanSystem() { processingQueue = new ProcessingQueue(); } @@ -40,14 +43,19 @@ public abstract class PlanSystem implements SubSystem { checkSubSystemInitialization(); versionCheckSystem.enable(); + fileSystem.enable(); configSystem.enable(); + databaseSystem.enable(); processingQueue.enable(); + listenerSystem.enable(); } @Override public void disable() { processingQueue.disable(); + databaseSystem.disable(); configSystem.disable(); + fileSystem.disable(); versionCheckSystem.disable(); } @@ -62,6 +70,7 @@ public abstract class PlanSystem implements SubSystem { NullCheck.check(fileSystem, new IllegalStateException("File system was not initialized.")); NullCheck.check(configSystem, new IllegalStateException("Config system was not initialized.")); NullCheck.check(databaseSystem, new IllegalStateException("Database system was not initialized.")); + NullCheck.check(listenerSystem, new IllegalStateException("Listener system was not initialized.")); } catch (Exception e) { throw new EnableException("One of the subsystems is not initialized on enable for " + this.getClass().getSimpleName() + ".", e); } @@ -73,9 +82,9 @@ public abstract class PlanSystem implements SubSystem { if (bukkitAvailable && bungeeAvailable) { // TODO test system. } else if (bungeeAvailable) { - // todo bungee + return BungeeSystem.getInstance(); } else { - // Todo bukkit + return BukkitSystem.getInstance(); } throw new IllegalAccessError("PlanSystem is not available on this platform."); } @@ -101,4 +110,8 @@ public abstract class PlanSystem implements SubSystem { public DBSystem getDatabaseSystem() { return databaseSystem; } + + public ListenerSystem getListenerSystem() { + return listenerSystem; + } } \ No newline at end of file diff --git a/Plan/src/main/java/com/djrapitops/plan/system/listeners/BukkitListenerSystem.java b/Plan/src/main/java/com/djrapitops/plan/system/listeners/BukkitListenerSystem.java new file mode 100644 index 000000000..c2118f80f --- /dev/null +++ b/Plan/src/main/java/com/djrapitops/plan/system/listeners/BukkitListenerSystem.java @@ -0,0 +1,32 @@ +package com.djrapitops.plan.system.listeners; + +import com.djrapitops.plan.Plan; +import com.djrapitops.plan.system.listeners.bukkit.*; +import org.bukkit.event.HandlerList; + +public class BukkitListenerSystem extends ListenerSystem { + + private final Plan plugin; + + public BukkitListenerSystem(Plan plugin) { + this.plugin = plugin; + } + + @Override + protected void registerListeners() { + plugin.registerListener( + new PlayerOnlineListener(plugin), + new ChatListener(plugin), + new GamemodeChangeListener(plugin), + new WorldChangeListener(plugin), + new CommandPreprocessListener(plugin), + new DeathEventListener(plugin) + ); + PlayerOnlineListener.setCountKicks(true); + } + + @Override + protected void unregisterListeners() { + HandlerList.unregisterAll(plugin); + } +} diff --git a/Plan/src/main/java/com/djrapitops/plan/system/listeners/BungeeListenerSystem.java b/Plan/src/main/java/com/djrapitops/plan/system/listeners/BungeeListenerSystem.java new file mode 100644 index 000000000..99e4f6abc --- /dev/null +++ b/Plan/src/main/java/com/djrapitops/plan/system/listeners/BungeeListenerSystem.java @@ -0,0 +1,23 @@ +package com.djrapitops.plan.system.listeners; + +import com.djrapitops.plan.PlanBungee; +import com.djrapitops.plan.system.listeners.bungee.PlayerOnlineListener; + +public class BungeeListenerSystem extends ListenerSystem { + + private final PlanBungee plugin; + + public BungeeListenerSystem(PlanBungee plugin) { + this.plugin = plugin; + } + + @Override + protected void registerListeners() { + plugin.registerListener(new PlayerOnlineListener(plugin)); + } + + @Override + protected void unregisterListeners() { + plugin.getProxy().getPluginManager().unregisterListeners(plugin); + } +} diff --git a/Plan/src/main/java/com/djrapitops/plan/system/listeners/ListenerSystem.java b/Plan/src/main/java/com/djrapitops/plan/system/listeners/ListenerSystem.java new file mode 100644 index 000000000..4b4e717d1 --- /dev/null +++ b/Plan/src/main/java/com/djrapitops/plan/system/listeners/ListenerSystem.java @@ -0,0 +1,25 @@ +package com.djrapitops.plan.system.listeners; + +import com.djrapitops.plan.system.SubSystem; +import com.djrapitops.plugin.api.Benchmark; + +public abstract class ListenerSystem implements SubSystem { + + @Override + public void enable() { + Benchmark.start("Register Listeners"); + registerListeners(); + Benchmark.stop("Enable", "Register Listeners"); + } + + @Override + public void disable() { + unregisterListeners(); + } + + protected abstract void registerListeners(); + + protected abstract void unregisterListeners(); + + +} diff --git a/Plan/src/main/java/com/djrapitops/plan/system/listeners/bukkit/ChatListener.java b/Plan/src/main/java/com/djrapitops/plan/system/listeners/bukkit/ChatListener.java new file mode 100644 index 000000000..53c0ba645 --- /dev/null +++ b/Plan/src/main/java/com/djrapitops/plan/system/listeners/bukkit/ChatListener.java @@ -0,0 +1,61 @@ +package com.djrapitops.plan.system.listeners.bukkit; + +import com.djrapitops.plan.Plan; +import com.djrapitops.plan.system.processing.processors.player.NameProcessor; +import com.djrapitops.plan.systems.cache.DataCache; +import com.djrapitops.plugin.api.utility.log.Log; +import org.bukkit.entity.Player; +import org.bukkit.event.EventHandler; +import org.bukkit.event.EventPriority; +import org.bukkit.event.Listener; +import org.bukkit.event.player.AsyncPlayerChatEvent; + +import java.util.UUID; + +/** + * Event Listener for AsyncPlayerChatEvents. + * + * @author Rsl1122 + */ +public class ChatListener implements Listener { + + private final Plan plugin; + private final DataCache dataCache; + + /** + * Class Constructor. + * + * @param plugin Current instance of Plan + */ + public ChatListener(Plan plugin) { + this.plugin = plugin; + dataCache = plugin.getDataCache(); + } + + /** + * ChatEvent listener. + * + * @param event Fired Event + */ + @EventHandler(priority = EventPriority.MONITOR) + public void onChat(AsyncPlayerChatEvent event) { + if (event.isCancelled()) { + return; + } + + try { + Player p = event.getPlayer(); + UUID uuid = p.getUniqueId(); + String name = p.getName(); + String displayName = p.getDisplayName(); + + if (dataCache.isFirstSession(uuid)) { + dataCache.firstSessionMessageSent(uuid); + } + + plugin.addToProcessQueue(new NameProcessor(uuid, name, displayName)); + } catch (Exception e) { + Log.toLog(this.getClass(), e); + } + } +} diff --git a/Plan/src/main/java/com/djrapitops/plan/system/listeners/bukkit/CommandPreprocessListener.java b/Plan/src/main/java/com/djrapitops/plan/system/listeners/bukkit/CommandPreprocessListener.java new file mode 100644 index 000000000..0a20f3dec --- /dev/null +++ b/Plan/src/main/java/com/djrapitops/plan/system/listeners/bukkit/CommandPreprocessListener.java @@ -0,0 +1,77 @@ +package com.djrapitops.plan.system.listeners.bukkit; + +import com.djrapitops.plan.Plan; +import com.djrapitops.plan.system.processing.processors.CommandProcessor; +import com.djrapitops.plan.system.settings.Permissions; +import com.djrapitops.plan.system.settings.Settings; +import com.djrapitops.plugin.api.utility.log.Log; +import org.bukkit.command.Command; +import org.bukkit.entity.Player; +import org.bukkit.event.EventHandler; +import org.bukkit.event.EventPriority; +import org.bukkit.event.Listener; +import org.bukkit.event.player.PlayerCommandPreprocessEvent; + +/** + * Event Listener for PlayerCommandPreprocessEvents. + * + * @author Rsl1122 + */ +public class CommandPreprocessListener implements Listener { + + private final Plan plugin; + + /** + * Class Constructor. + * + * @param plugin Current instance of Plan + */ + public CommandPreprocessListener(Plan plugin) { + this.plugin = plugin; + } + + /** + * Command use listener. + * + * @param event Fired event. + */ + @EventHandler(priority = EventPriority.MONITOR) + public void onPlayerCommand(PlayerCommandPreprocessEvent event) { + if (event.isCancelled()) { + return; + } + Player player = event.getPlayer(); + + try { + if (player.hasPermission(Permissions.IGNORE_COMMANDUSE.getPermission())) { + return; + } + + String commandName = event.getMessage().substring(1).split(" ")[0].toLowerCase(); + + boolean logUnknownCommands = Settings.LOG_UNKNOWN_COMMANDS.isTrue(); + boolean combineCommandAliases = Settings.COMBINE_COMMAND_ALIASES.isTrue(); + + if (!logUnknownCommands || combineCommandAliases) { + Command command = plugin.getServer().getPluginCommand(commandName); + if (command == null) { + try { + command = plugin.getServer().getCommandMap().getCommand(commandName); + } catch (NoSuchMethodError ignored) { + /* Ignored, Bukkit 1.8 has no such method */ + } + } + if (command == null) { + if (!logUnknownCommands) { + return; + } + } else if (combineCommandAliases) { + commandName = command.getName(); + } + } + plugin.addToProcessQueue(new CommandProcessor(commandName)); + } catch (Exception e) { + Log.toLog(this.getClass(), e); + } + } +} diff --git a/Plan/src/main/java/com/djrapitops/plan/system/listeners/bukkit/DeathEventListener.java b/Plan/src/main/java/com/djrapitops/plan/system/listeners/bukkit/DeathEventListener.java new file mode 100644 index 000000000..9a3545f26 --- /dev/null +++ b/Plan/src/main/java/com/djrapitops/plan/system/listeners/bukkit/DeathEventListener.java @@ -0,0 +1,133 @@ +package com.djrapitops.plan.system.listeners.bukkit; + +import com.djrapitops.plan.Plan; +import com.djrapitops.plan.system.processing.processors.player.DeathProcessor; +import com.djrapitops.plan.system.processing.processors.player.KillProcessor; +import com.djrapitops.plan.utilities.MiscUtils; +import com.djrapitops.plugin.api.utility.log.Log; +import com.djrapitops.plugin.utilities.Format; +import org.bukkit.Material; +import org.bukkit.entity.*; +import org.bukkit.event.EventHandler; +import org.bukkit.event.EventPriority; +import org.bukkit.event.Listener; +import org.bukkit.event.entity.EntityDamageByEntityEvent; +import org.bukkit.event.entity.EntityDamageEvent; +import org.bukkit.event.entity.EntityDeathEvent; +import org.bukkit.projectiles.ProjectileSource; + +/** + * Event Listener for EntityDeathEvents. + * + * @author Rsl1122 + */ +public class DeathEventListener implements Listener { + + private final Plan plugin; + + /** + * Class Constructor. + * + * @param plugin Current instance of Plan + */ + public DeathEventListener(Plan plugin) { + this.plugin = plugin; + } + + /** + * Command use listener. + * + * @param event Fired event. + */ + @SuppressWarnings("deprecation") + @EventHandler(priority = EventPriority.MONITOR) + public void onDeath(EntityDeathEvent event) { + long time = MiscUtils.getTime(); + LivingEntity dead = event.getEntity(); + + if (dead instanceof Player) { + plugin.addToProcessQueue(new DeathProcessor(dead.getUniqueId())); + } + + try { + EntityDamageEvent entityDamageEvent = dead.getLastDamageCause(); + if (!(entityDamageEvent instanceof EntityDamageByEntityEvent)) { + return; + } + + EntityDamageByEntityEvent entityDamageByEntityEvent = (EntityDamageByEntityEvent) entityDamageEvent; + Entity killerEntity = entityDamageByEntityEvent.getDamager(); + + if (killerEntity instanceof Player) { + handlePlayerKill(time, dead, (Player) killerEntity); + } else if (killerEntity instanceof Wolf) { + handleWolfKill(time, dead, (Wolf) killerEntity); + } else if (killerEntity instanceof Arrow) { + handleArrowKill(time, dead, (Arrow) killerEntity); + } + } catch (Exception e) { + Log.toLog(this.getClass(), e); + } + } + + private void handlePlayerKill(long time, LivingEntity dead, Player killer) { + Material itemInHand; + try { + itemInHand = killer.getInventory().getItemInMainHand().getType(); + } catch (NoSuchMethodError e) { + try { + itemInHand = killer.getInventory().getItemInHand().getType(); // Support for non dual wielding versions. + } catch (Exception | NoSuchMethodError | NoSuchFieldError e2) { + itemInHand = Material.AIR; + } + } + + plugin.addToProcessQueue(new KillProcessor(killer.getUniqueId(), time, dead, normalizeMaterialName(itemInHand))); + } + + private void handleWolfKill(long time, LivingEntity dead, Wolf wolf) { + if (!wolf.isTamed()) { + return; + } + + AnimalTamer owner = wolf.getOwner(); + if (!(owner instanceof Player)) { + return; + } + + plugin.addToProcessQueue(new KillProcessor(owner.getUniqueId(), time, dead, "Wolf")); + } + + private void handleArrowKill(long time, LivingEntity dead, Arrow arrow) { + ProjectileSource source = arrow.getShooter(); + if (!(source instanceof Player)) { + return; + } + + Player player = (Player) source; + + plugin.addToProcessQueue(new KillProcessor(player.getUniqueId(), time, dead, "Bow")); + } + + /** + * Normalizes a material name + * + * @param material The material + * @return The normalized material name + */ + private String normalizeMaterialName(Material material) { + String[] parts = material.name().split("_"); + StringBuilder builder = new StringBuilder(); + + for (int i = 0; i < parts.length; i++) { + String part = new Format(parts[i]).capitalize().toString(); + builder.append(part); + if (i < parts.length - 1) { + builder.append(" "); + } + } + + return builder.toString(); + } +} + diff --git a/Plan/src/main/java/com/djrapitops/plan/system/listeners/bukkit/GamemodeChangeListener.java b/Plan/src/main/java/com/djrapitops/plan/system/listeners/bukkit/GamemodeChangeListener.java new file mode 100644 index 000000000..dbfdb6c95 --- /dev/null +++ b/Plan/src/main/java/com/djrapitops/plan/system/listeners/bukkit/GamemodeChangeListener.java @@ -0,0 +1,60 @@ +package com.djrapitops.plan.system.listeners.bukkit; + +import com.djrapitops.plan.Plan; +import com.djrapitops.plan.data.container.Session; +import com.djrapitops.plan.settings.WorldAliasSettings; +import com.djrapitops.plan.utilities.MiscUtils; +import com.djrapitops.plugin.api.utility.log.Log; +import org.bukkit.entity.Player; +import org.bukkit.event.EventHandler; +import org.bukkit.event.EventPriority; +import org.bukkit.event.Listener; +import org.bukkit.event.player.PlayerGameModeChangeEvent; + +import java.util.Optional; +import java.util.UUID; + +/** + * Event Listener for PlayerGameModeChangeEvents. + * + * @author Rsl1122 + */ +public class GamemodeChangeListener implements Listener { + + private final Plan plugin; + + /** + * Class Constructor. + * + * @param plugin Current instance of Plan + */ + public GamemodeChangeListener(Plan plugin) { + this.plugin = plugin; + } + + /** + * GM Change Event Listener. + * + * @param event Fired Event. + */ + @EventHandler(priority = EventPriority.MONITOR) + public void onGamemodeChange(PlayerGameModeChangeEvent event) { + if (event.isCancelled()) { + return; + } + try { + Player p = event.getPlayer(); + UUID uuid = p.getUniqueId(); + long time = MiscUtils.getTime(); + String gameMode = event.getNewGameMode().name(); + String worldName = p.getWorld().getName(); + + new WorldAliasSettings().addWorld(worldName); + + Optional cachedSession = plugin.getDataCache().getCachedSession(uuid); + cachedSession.ifPresent(session -> session.changeState(worldName, gameMode, time)); + } catch (Exception e) { + Log.toLog(this.getClass(), e); + } + } +} diff --git a/Plan/src/main/java/com/djrapitops/plan/system/listeners/bukkit/PlayerOnlineListener.java b/Plan/src/main/java/com/djrapitops/plan/system/listeners/bukkit/PlayerOnlineListener.java new file mode 100644 index 000000000..2a5aa8582 --- /dev/null +++ b/Plan/src/main/java/com/djrapitops/plan/system/listeners/bukkit/PlayerOnlineListener.java @@ -0,0 +1,154 @@ +package com.djrapitops.plan.system.listeners.bukkit; + +import com.djrapitops.plan.Plan; +import com.djrapitops.plan.data.container.Session; +import com.djrapitops.plan.system.processing.processors.info.NetworkPageUpdateProcessor; +import com.djrapitops.plan.system.processing.processors.player.*; +import com.djrapitops.plan.systems.cache.DataCache; +import com.djrapitops.plan.systems.tasks.TaskSystem; +import com.djrapitops.plan.utilities.MiscUtils; +import com.djrapitops.plugin.api.systems.NotificationCenter; +import com.djrapitops.plugin.api.utility.log.Log; +import org.bukkit.entity.Player; +import org.bukkit.event.EventHandler; +import org.bukkit.event.EventPriority; +import org.bukkit.event.Listener; +import org.bukkit.event.player.PlayerJoinEvent; +import org.bukkit.event.player.PlayerKickEvent; +import org.bukkit.event.player.PlayerLoginEvent; +import org.bukkit.event.player.PlayerQuitEvent; + +import java.util.UUID; + +/** + * Event Listener for PlayerJoin, PlayerQuit and PlayerKickEvents. + * + * @author Rsl1122 + * @since 2.0.0 + */ +public class PlayerOnlineListener implements Listener { + + private static boolean countKicks = true; + + private final Plan plugin; + private final DataCache cache; + + /** + * Class Constructor. + * + * @param plugin Current instance of Plan + */ + public PlayerOnlineListener(Plan plugin) { + this.plugin = plugin; + cache = plugin.getDataCache(); + } + + @EventHandler(priority = EventPriority.MONITOR) + public void onPlayerLogin(PlayerLoginEvent event) { + try { + PlayerLoginEvent.Result result = event.getResult(); + UUID uuid = event.getPlayer().getUniqueId(); + boolean op = event.getPlayer().isOp(); + if (result == PlayerLoginEvent.Result.KICK_BANNED) { + plugin.addToProcessQueue(new BanAndOpProcessor(uuid, true, op)); + } else { + plugin.addToProcessQueue(new BanAndOpProcessor(uuid, false, op)); + } + } catch (Exception e) { + Log.toLog(this.getClass(), e); + } + } + + /** + * PlayerKickEvent Listener. + *

+ * Adds processing information to the ProcessingQueue. + * After KickEvent, the QuitEvent is automatically called. + * + * @param event Fired event + */ + @EventHandler(priority = EventPriority.MONITOR) + public void onPlayerKick(PlayerKickEvent event) { + try { + if (!countKicks || event.isCancelled()) { + return; + } + UUID uuid = event.getPlayer().getUniqueId(); + plugin.addToProcessQueue(new KickProcessor(uuid)); + } catch (Exception e) { + Log.toLog(this.getClass(), e); + } + } + + /** + * PlayerJoinEvent Listener. + *

+ * Adds processing information to the ProcessingQueue. + * + * @param event The Fired event. + */ + @EventHandler(priority = EventPriority.MONITOR) + public void onPlayerJoin(PlayerJoinEvent event) { + try { + Player player = event.getPlayer(); + NotificationCenter.checkNotifications(player); + + UUID uuid = player.getUniqueId(); + long time = MiscUtils.getTime(); + + String world = player.getWorld().getName(); + String gm = player.getGameMode().name(); + + String ip = player.getAddress().getAddress().getHostAddress(); + + String playerName = player.getName(); + String displayName = player.getDisplayName(); + + int playersOnline = TaskSystem.getInstance().getTpsCountTimer().getLatestPlayersOnline(); + + cache.cacheSession(uuid, Session.start(time, world, gm)); + plugin.addToProcessQueue( + new RegisterProcessor(uuid, player.getFirstPlayed(), time, playerName, playersOnline, + new IPUpdateProcessor(uuid, ip, time), + new NameProcessor(uuid, playerName, displayName) + ), + new NetworkPageUpdateProcessor(plugin.getInfoManager()) + ); + } catch (Exception e) { + Log.toLog(this.getClass(), e); + } + } + + /** + * PlayerQuitEvent Listener. + *

+ * Adds processing information to the ProcessingQueue. + * + * @param event Fired event + */ + @EventHandler(priority = EventPriority.MONITOR) + public void onPlayerQuit(PlayerQuitEvent event) { + try { + long time = MiscUtils.getTime(); + Player player = event.getPlayer(); + UUID uuid = player.getUniqueId(); + + plugin.addToProcessQueue( + new BanAndOpProcessor(uuid, player.isBanned(), player.isOp()), + new EndSessionProcessor(uuid, time), + new NetworkPageUpdateProcessor(plugin.getInfoManager()) + ); + + if (cache.isFirstSession(uuid)) { + int messagesSent = plugin.getDataCache().getFirstSessionMsgCount(uuid); + plugin.addToProcessQueue(new FirstLeaveProcessor(uuid, time, messagesSent)); + } + } catch (Exception e) { + Log.toLog(this.getClass(), e); + } + } + + public static void setCountKicks(boolean value) { + countKicks = value; + } +} diff --git a/Plan/src/main/java/com/djrapitops/plan/system/listeners/bukkit/WorldChangeListener.java b/Plan/src/main/java/com/djrapitops/plan/system/listeners/bukkit/WorldChangeListener.java new file mode 100644 index 000000000..860465d83 --- /dev/null +++ b/Plan/src/main/java/com/djrapitops/plan/system/listeners/bukkit/WorldChangeListener.java @@ -0,0 +1,42 @@ +package com.djrapitops.plan.system.listeners.bukkit; + +import com.djrapitops.plan.Plan; +import com.djrapitops.plan.data.container.Session; +import com.djrapitops.plan.settings.WorldAliasSettings; +import com.djrapitops.plan.utilities.MiscUtils; +import com.djrapitops.plugin.api.utility.log.Log; +import org.bukkit.entity.Player; +import org.bukkit.event.EventHandler; +import org.bukkit.event.EventPriority; +import org.bukkit.event.Listener; +import org.bukkit.event.player.PlayerChangedWorldEvent; + +import java.util.Optional; +import java.util.UUID; + +public class WorldChangeListener implements Listener { + private final Plan plugin; + + public WorldChangeListener(Plan plugin) { + this.plugin = plugin; + } + + @EventHandler(priority = EventPriority.MONITOR) + public void onWorldChange(PlayerChangedWorldEvent event) { + try { + Player p = event.getPlayer(); + String worldName = p.getWorld().getName(); + + UUID uuid = p.getUniqueId(); + String gameMode = p.getGameMode().name(); + long time = MiscUtils.getTime(); + + new WorldAliasSettings().addWorld(worldName); + + Optional cachedSession = plugin.getDataCache().getCachedSession(uuid); + cachedSession.ifPresent(session -> session.changeState(worldName, gameMode, time)); + } catch (Exception e) { + Log.toLog(this.getClass(), e); + } + } +} diff --git a/Plan/src/main/java/com/djrapitops/plan/systems/listeners/BungeePlayerListener.java b/Plan/src/main/java/com/djrapitops/plan/system/listeners/bungee/PlayerOnlineListener.java similarity index 81% rename from Plan/src/main/java/com/djrapitops/plan/systems/listeners/BungeePlayerListener.java rename to Plan/src/main/java/com/djrapitops/plan/system/listeners/bungee/PlayerOnlineListener.java index c5f728c15..8937317f3 100644 --- a/Plan/src/main/java/com/djrapitops/plan/systems/listeners/BungeePlayerListener.java +++ b/Plan/src/main/java/com/djrapitops/plan/system/listeners/bungee/PlayerOnlineListener.java @@ -2,10 +2,10 @@ * Licence is provided in the jar as license.yml also here: * https://github.com/Rsl1122/Plan-PlayerAnalytics/blob/master/Plan/src/main/resources/license.yml */ -package com.djrapitops.plan.systems.listeners; +package com.djrapitops.plan.system.listeners.bungee; import com.djrapitops.plan.PlanBungee; -import com.djrapitops.plan.systems.processing.player.BungeePlayerRegisterProcessor; +import com.djrapitops.plan.system.processing.processors.player.BungeePlayerRegisterProcessor; import com.djrapitops.plan.utilities.MiscUtils; import com.djrapitops.plugin.api.utility.log.Log; import net.md_5.bungee.api.connection.ProxiedPlayer; @@ -20,11 +20,11 @@ import java.util.UUID; * * @author Rsl1122 */ -public class BungeePlayerListener implements Listener { +public class PlayerOnlineListener implements Listener { private final PlanBungee plugin; - public BungeePlayerListener(PlanBungee plugin) { + public PlayerOnlineListener(PlanBungee plugin) { this.plugin = plugin; } diff --git a/Plan/src/main/java/com/djrapitops/plan/system/processing/ProcessingQueue.java b/Plan/src/main/java/com/djrapitops/plan/system/processing/ProcessingQueue.java index d7c35a7c8..fa9a16e6f 100644 --- a/Plan/src/main/java/com/djrapitops/plan/system/processing/ProcessingQueue.java +++ b/Plan/src/main/java/com/djrapitops/plan/system/processing/ProcessingQueue.java @@ -3,7 +3,7 @@ package com.djrapitops.plan.system.processing; import com.djrapitops.plan.PlanPlugin; import com.djrapitops.plan.system.PlanSystem; import com.djrapitops.plan.system.SubSystem; -import com.djrapitops.plan.systems.processing.Processor; +import com.djrapitops.plan.system.processing.processors.Processor; import com.djrapitops.plan.systems.queue.Consumer; import com.djrapitops.plan.systems.queue.Queue; import com.djrapitops.plan.systems.queue.Setup; diff --git a/Plan/src/main/java/com/djrapitops/plan/systems/processing/CommandProcessor.java b/Plan/src/main/java/com/djrapitops/plan/system/processing/processors/CommandProcessor.java similarity index 92% rename from Plan/src/main/java/com/djrapitops/plan/systems/processing/CommandProcessor.java rename to Plan/src/main/java/com/djrapitops/plan/system/processing/processors/CommandProcessor.java index 397f0f530..00a01bc37 100644 --- a/Plan/src/main/java/com/djrapitops/plan/systems/processing/CommandProcessor.java +++ b/Plan/src/main/java/com/djrapitops/plan/system/processing/processors/CommandProcessor.java @@ -2,7 +2,7 @@ * Licence is provided in the jar as license.yml also here: * https://github.com/Rsl1122/Plan-PlayerAnalytics/blob/master/Plan/src/main/resources/license.yml */ -package com.djrapitops.plan.systems.processing; +package com.djrapitops.plan.system.processing.processors; import com.djrapitops.plan.Plan; import com.djrapitops.plugin.api.utility.log.Log; diff --git a/Plan/src/main/java/com/djrapitops/plan/systems/processing/NewNickActionProcessor.java b/Plan/src/main/java/com/djrapitops/plan/system/processing/processors/NewNickActionProcessor.java similarity index 90% rename from Plan/src/main/java/com/djrapitops/plan/systems/processing/NewNickActionProcessor.java rename to Plan/src/main/java/com/djrapitops/plan/system/processing/processors/NewNickActionProcessor.java index 03a160d7d..8229f432b 100644 --- a/Plan/src/main/java/com/djrapitops/plan/systems/processing/NewNickActionProcessor.java +++ b/Plan/src/main/java/com/djrapitops/plan/system/processing/processors/NewNickActionProcessor.java @@ -2,12 +2,12 @@ * Licence is provided in the jar as license.yml also here: * https://github.com/Rsl1122/Plan-PlayerAnalytics/blob/master/Plan/src/main/resources/license.yml */ -package com.djrapitops.plan.systems.processing; +package com.djrapitops.plan.system.processing.processors; import com.djrapitops.plan.Plan; import com.djrapitops.plan.data.container.Action; import com.djrapitops.plan.system.database.tables.Actions; -import com.djrapitops.plan.systems.processing.player.PlayerProcessor; +import com.djrapitops.plan.system.processing.processors.player.PlayerProcessor; import com.djrapitops.plan.utilities.MiscUtils; import com.djrapitops.plan.utilities.html.HtmlUtils; import com.djrapitops.plugin.api.utility.log.Log; diff --git a/Plan/src/main/java/com/djrapitops/plan/systems/processing/Processor.java b/Plan/src/main/java/com/djrapitops/plan/system/processing/processors/Processor.java similarity index 92% rename from Plan/src/main/java/com/djrapitops/plan/systems/processing/Processor.java rename to Plan/src/main/java/com/djrapitops/plan/system/processing/processors/Processor.java index f50feca71..88575dcd8 100644 --- a/Plan/src/main/java/com/djrapitops/plan/systems/processing/Processor.java +++ b/Plan/src/main/java/com/djrapitops/plan/system/processing/processors/Processor.java @@ -2,7 +2,7 @@ * Licence is provided in the jar as license.yml also here: * https://github.com/Rsl1122/Plan-PlayerAnalytics/blob/master/Plan/src/main/resources/license.yml */ -package com.djrapitops.plan.systems.processing; +package com.djrapitops.plan.system.processing.processors; import com.djrapitops.plan.system.processing.ProcessingQueue; diff --git a/Plan/src/main/java/com/djrapitops/plan/systems/processing/TPSInsertProcessor.java b/Plan/src/main/java/com/djrapitops/plan/system/processing/processors/TPSInsertProcessor.java similarity index 94% rename from Plan/src/main/java/com/djrapitops/plan/systems/processing/TPSInsertProcessor.java rename to Plan/src/main/java/com/djrapitops/plan/system/processing/processors/TPSInsertProcessor.java index 14cc30cfc..7b3664a26 100644 --- a/Plan/src/main/java/com/djrapitops/plan/systems/processing/TPSInsertProcessor.java +++ b/Plan/src/main/java/com/djrapitops/plan/system/processing/processors/TPSInsertProcessor.java @@ -2,8 +2,9 @@ * Licence is provided in the jar as license.yml also here: * https://github.com/Rsl1122/Plan-PlayerAnalytics/blob/master/Plan/src/main/resources/license.yml */ -package com.djrapitops.plan.systems.processing; +package com.djrapitops.plan.system.processing.processors; +import com.djrapitops.plan.PlanPlugin; import com.djrapitops.plan.data.container.TPS; import com.djrapitops.plan.utilities.analysis.MathUtils; import com.djrapitops.plugin.api.utility.log.Log; diff --git a/Plan/src/main/java/com/djrapitops/plan/systems/processing/importing/ServerImportData.java b/Plan/src/main/java/com/djrapitops/plan/system/processing/processors/importing/ServerImportData.java similarity index 97% rename from Plan/src/main/java/com/djrapitops/plan/systems/processing/importing/ServerImportData.java rename to Plan/src/main/java/com/djrapitops/plan/system/processing/processors/importing/ServerImportData.java index 6dbe9b1ca..1624d758f 100644 --- a/Plan/src/main/java/com/djrapitops/plan/systems/processing/importing/ServerImportData.java +++ b/Plan/src/main/java/com/djrapitops/plan/system/processing/processors/importing/ServerImportData.java @@ -2,7 +2,7 @@ * Licence is provided in the jar as license.yml also here: * https://github.com/Rsl1122/Plan-PlayerAnalytics/blob/master/Plan/src/main/resources/license.yml */ -package com.djrapitops.plan.systems.processing.importing; +package com.djrapitops.plan.system.processing.processors.importing; import com.djrapitops.plan.data.container.TPS; diff --git a/Plan/src/main/java/com/djrapitops/plan/systems/processing/importing/UserImportData.java b/Plan/src/main/java/com/djrapitops/plan/system/processing/processors/importing/UserImportData.java similarity index 99% rename from Plan/src/main/java/com/djrapitops/plan/systems/processing/importing/UserImportData.java rename to Plan/src/main/java/com/djrapitops/plan/system/processing/processors/importing/UserImportData.java index 8ab60be7f..572607797 100644 --- a/Plan/src/main/java/com/djrapitops/plan/systems/processing/importing/UserImportData.java +++ b/Plan/src/main/java/com/djrapitops/plan/system/processing/processors/importing/UserImportData.java @@ -2,7 +2,7 @@ * Licence is provided in the jar as license.yml also here: * https://github.com/Rsl1122/Plan-PlayerAnalytics/blob/master/Plan/src/main/resources/license.yml */ -package com.djrapitops.plan.systems.processing.importing; +package com.djrapitops.plan.system.processing.processors.importing; import com.djrapitops.plan.data.container.PlayerKill; import com.djrapitops.plan.data.time.GMTimes; diff --git a/Plan/src/main/java/com/djrapitops/plan/systems/processing/importing/UserImportRefiner.java b/Plan/src/main/java/com/djrapitops/plan/system/processing/processors/importing/UserImportRefiner.java similarity index 99% rename from Plan/src/main/java/com/djrapitops/plan/systems/processing/importing/UserImportRefiner.java rename to Plan/src/main/java/com/djrapitops/plan/system/processing/processors/importing/UserImportRefiner.java index 8bb791541..0afe68c08 100644 --- a/Plan/src/main/java/com/djrapitops/plan/systems/processing/importing/UserImportRefiner.java +++ b/Plan/src/main/java/com/djrapitops/plan/system/processing/processors/importing/UserImportRefiner.java @@ -2,7 +2,7 @@ * Licence is provided in the jar as license.yml also here: * https://github.com/Rsl1122/Plan-PlayerAnalytics/blob/master/Plan/src/main/resources/license.yml */ -package com.djrapitops.plan.systems.processing.importing; +package com.djrapitops.plan.system.processing.processors.importing; import com.djrapitops.plan.Plan; import com.djrapitops.plugin.api.Benchmark; diff --git a/Plan/src/main/java/com/djrapitops/plan/systems/processing/importing/importers/Importer.java b/Plan/src/main/java/com/djrapitops/plan/system/processing/processors/importing/importers/Importer.java similarity index 96% rename from Plan/src/main/java/com/djrapitops/plan/systems/processing/importing/importers/Importer.java rename to Plan/src/main/java/com/djrapitops/plan/system/processing/processors/importing/importers/Importer.java index ec40302bb..48e8c662e 100644 --- a/Plan/src/main/java/com/djrapitops/plan/systems/processing/importing/importers/Importer.java +++ b/Plan/src/main/java/com/djrapitops/plan/system/processing/processors/importing/importers/Importer.java @@ -2,7 +2,7 @@ * Licence is provided in the jar as license.yml also here: * https://github.com/Rsl1122/Plan-PlayerAnalytics/blob/master/Plan/src/main/resources/license.yml */ -package com.djrapitops.plan.systems.processing.importing.importers; +package com.djrapitops.plan.system.processing.processors.importing.importers; import com.djrapitops.plan.Plan; import com.djrapitops.plan.data.container.GeoInfo; @@ -10,10 +10,10 @@ import com.djrapitops.plan.data.container.Session; import com.djrapitops.plan.data.container.UserInfo; import com.djrapitops.plan.data.time.WorldTimes; import com.djrapitops.plan.system.database.databases.Database; +import com.djrapitops.plan.system.processing.processors.importing.ServerImportData; +import com.djrapitops.plan.system.processing.processors.importing.UserImportData; +import com.djrapitops.plan.system.processing.processors.importing.UserImportRefiner; import com.djrapitops.plan.systems.cache.GeolocationCache; -import com.djrapitops.plan.systems.processing.importing.ServerImportData; -import com.djrapitops.plan.systems.processing.importing.UserImportData; -import com.djrapitops.plan.systems.processing.importing.UserImportRefiner; import com.djrapitops.plan.utilities.MiscUtils; import com.djrapitops.plugin.api.Benchmark; import com.djrapitops.plugin.api.utility.log.Log; diff --git a/Plan/src/main/java/com/djrapitops/plan/systems/processing/importing/importers/OfflinePlayerImporter.java b/Plan/src/main/java/com/djrapitops/plan/system/processing/processors/importing/importers/OfflinePlayerImporter.java similarity index 85% rename from Plan/src/main/java/com/djrapitops/plan/systems/processing/importing/importers/OfflinePlayerImporter.java rename to Plan/src/main/java/com/djrapitops/plan/system/processing/processors/importing/importers/OfflinePlayerImporter.java index 200bbd353..ed7546cbe 100644 --- a/Plan/src/main/java/com/djrapitops/plan/systems/processing/importing/importers/OfflinePlayerImporter.java +++ b/Plan/src/main/java/com/djrapitops/plan/system/processing/processors/importing/importers/OfflinePlayerImporter.java @@ -2,10 +2,10 @@ * Licence is provided in the jar as license.yml also here: * https://github.com/Rsl1122/Plan-PlayerAnalytics/blob/master/Plan/src/main/resources/license.yml */ -package com.djrapitops.plan.systems.processing.importing.importers; +package com.djrapitops.plan.system.processing.processors.importing.importers; -import com.djrapitops.plan.systems.processing.importing.ServerImportData; -import com.djrapitops.plan.systems.processing.importing.UserImportData; +import com.djrapitops.plan.system.processing.processors.importing.ServerImportData; +import com.djrapitops.plan.system.processing.processors.importing.UserImportData; import org.bukkit.Bukkit; import org.bukkit.OfflinePlayer; diff --git a/Plan/src/main/java/com/djrapitops/plan/systems/processing/info/InspectCacheRequestProcessor.java b/Plan/src/main/java/com/djrapitops/plan/system/processing/processors/info/InspectCacheRequestProcessor.java similarity index 93% rename from Plan/src/main/java/com/djrapitops/plan/systems/processing/info/InspectCacheRequestProcessor.java rename to Plan/src/main/java/com/djrapitops/plan/system/processing/processors/info/InspectCacheRequestProcessor.java index 0c760249c..5e57630f0 100644 --- a/Plan/src/main/java/com/djrapitops/plan/systems/processing/info/InspectCacheRequestProcessor.java +++ b/Plan/src/main/java/com/djrapitops/plan/system/processing/processors/info/InspectCacheRequestProcessor.java @@ -2,14 +2,14 @@ * Licence is provided in the jar as license.yml also here: * https://github.com/Rsl1122/Plan-PlayerAnalytics/blob/master/Plan/src/main/resources/license.yml */ -package com.djrapitops.plan.systems.processing.info; +package com.djrapitops.plan.system.processing.processors.info; import com.djrapitops.plan.Plan; import com.djrapitops.plan.PlanPlugin; import com.djrapitops.plan.settings.locale.Locale; import com.djrapitops.plan.settings.locale.Msg; +import com.djrapitops.plan.system.processing.processors.player.PlayerProcessor; import com.djrapitops.plan.systems.cache.DataCache; -import com.djrapitops.plan.systems.processing.player.PlayerProcessor; import com.djrapitops.plugin.command.CommandUtils; import com.djrapitops.plugin.command.ISender; diff --git a/Plan/src/main/java/com/djrapitops/plan/systems/processing/info/NetworkPageUpdateProcessor.java b/Plan/src/main/java/com/djrapitops/plan/system/processing/processors/info/NetworkPageUpdateProcessor.java similarity index 81% rename from Plan/src/main/java/com/djrapitops/plan/systems/processing/info/NetworkPageUpdateProcessor.java rename to Plan/src/main/java/com/djrapitops/plan/system/processing/processors/info/NetworkPageUpdateProcessor.java index 6691675a6..a0c879c53 100644 --- a/Plan/src/main/java/com/djrapitops/plan/systems/processing/info/NetworkPageUpdateProcessor.java +++ b/Plan/src/main/java/com/djrapitops/plan/system/processing/processors/info/NetworkPageUpdateProcessor.java @@ -2,10 +2,10 @@ * Licence is provided in the jar as license.yml also here: * https://github.com/Rsl1122/Plan-PlayerAnalytics/blob/master/Plan/src/main/resources/license.yml */ -package com.djrapitops.plan.systems.processing.info; +package com.djrapitops.plan.system.processing.processors.info; +import com.djrapitops.plan.system.processing.processors.Processor; import com.djrapitops.plan.systems.info.InformationManager; -import com.djrapitops.plan.systems.processing.Processor; /** * //TODO Class Javadoc Comment diff --git a/Plan/src/main/java/com/djrapitops/plan/systems/processing/player/BanAndOpProcessor.java b/Plan/src/main/java/com/djrapitops/plan/system/processing/processors/player/BanAndOpProcessor.java similarity index 93% rename from Plan/src/main/java/com/djrapitops/plan/systems/processing/player/BanAndOpProcessor.java rename to Plan/src/main/java/com/djrapitops/plan/system/processing/processors/player/BanAndOpProcessor.java index c2f3adafb..6f1382759 100644 --- a/Plan/src/main/java/com/djrapitops/plan/systems/processing/player/BanAndOpProcessor.java +++ b/Plan/src/main/java/com/djrapitops/plan/system/processing/processors/player/BanAndOpProcessor.java @@ -2,7 +2,7 @@ * Licence is provided in the jar as license.yml also here: * https://github.com/Rsl1122/Plan-PlayerAnalytics/blob/master/Plan/src/main/resources/license.yml */ -package com.djrapitops.plan.systems.processing.player; +package com.djrapitops.plan.system.processing.processors.player; import com.djrapitops.plan.Plan; import com.djrapitops.plugin.api.utility.log.Log; diff --git a/Plan/src/main/java/com/djrapitops/plan/systems/processing/player/BungeePlayerRegisterProcessor.java b/Plan/src/main/java/com/djrapitops/plan/system/processing/processors/player/BungeePlayerRegisterProcessor.java similarity index 94% rename from Plan/src/main/java/com/djrapitops/plan/systems/processing/player/BungeePlayerRegisterProcessor.java rename to Plan/src/main/java/com/djrapitops/plan/system/processing/processors/player/BungeePlayerRegisterProcessor.java index 9087703de..4dbcad600 100644 --- a/Plan/src/main/java/com/djrapitops/plan/systems/processing/player/BungeePlayerRegisterProcessor.java +++ b/Plan/src/main/java/com/djrapitops/plan/system/processing/processors/player/BungeePlayerRegisterProcessor.java @@ -2,7 +2,7 @@ * Licence is provided in the jar as license.yml also here: * https://github.com/Rsl1122/Plan-PlayerAnalytics/blob/master/Plan/src/main/resources/license.yml */ -package com.djrapitops.plan.systems.processing.player; +package com.djrapitops.plan.system.processing.processors.player; import com.djrapitops.plan.PlanBungee; import com.djrapitops.plan.system.database.tables.UsersTable; diff --git a/Plan/src/main/java/com/djrapitops/plan/systems/processing/player/DeathProcessor.java b/Plan/src/main/java/com/djrapitops/plan/system/processing/processors/player/DeathProcessor.java similarity index 91% rename from Plan/src/main/java/com/djrapitops/plan/systems/processing/player/DeathProcessor.java rename to Plan/src/main/java/com/djrapitops/plan/system/processing/processors/player/DeathProcessor.java index c519e51f9..91c0464db 100644 --- a/Plan/src/main/java/com/djrapitops/plan/systems/processing/player/DeathProcessor.java +++ b/Plan/src/main/java/com/djrapitops/plan/system/processing/processors/player/DeathProcessor.java @@ -1,4 +1,4 @@ -package com.djrapitops.plan.systems.processing.player; +package com.djrapitops.plan.system.processing.processors.player; import com.djrapitops.plan.Plan; import com.djrapitops.plan.data.container.Session; diff --git a/Plan/src/main/java/com/djrapitops/plan/systems/processing/player/EndSessionProcessor.java b/Plan/src/main/java/com/djrapitops/plan/system/processing/processors/player/EndSessionProcessor.java similarity index 90% rename from Plan/src/main/java/com/djrapitops/plan/systems/processing/player/EndSessionProcessor.java rename to Plan/src/main/java/com/djrapitops/plan/system/processing/processors/player/EndSessionProcessor.java index bcbcac942..55e7e2f67 100644 --- a/Plan/src/main/java/com/djrapitops/plan/systems/processing/player/EndSessionProcessor.java +++ b/Plan/src/main/java/com/djrapitops/plan/system/processing/processors/player/EndSessionProcessor.java @@ -2,7 +2,7 @@ * Licence is provided in the jar as license.yml also here: * https://github.com/Rsl1122/Plan-PlayerAnalytics/blob/master/Plan/src/main/resources/license.yml */ -package com.djrapitops.plan.systems.processing.player; +package com.djrapitops.plan.system.processing.processors.player; import com.djrapitops.plan.Plan; diff --git a/Plan/src/main/java/com/djrapitops/plan/systems/processing/player/FirstLeaveProcessor.java b/Plan/src/main/java/com/djrapitops/plan/system/processing/processors/player/FirstLeaveProcessor.java similarity index 94% rename from Plan/src/main/java/com/djrapitops/plan/systems/processing/player/FirstLeaveProcessor.java rename to Plan/src/main/java/com/djrapitops/plan/system/processing/processors/player/FirstLeaveProcessor.java index 57b506530..90290109d 100644 --- a/Plan/src/main/java/com/djrapitops/plan/systems/processing/player/FirstLeaveProcessor.java +++ b/Plan/src/main/java/com/djrapitops/plan/system/processing/processors/player/FirstLeaveProcessor.java @@ -2,7 +2,7 @@ * Licence is provided in the jar as license.yml also here: * https://github.com/Rsl1122/Plan-PlayerAnalytics/blob/master/Plan/src/main/resources/license.yml */ -package com.djrapitops.plan.systems.processing.player; +package com.djrapitops.plan.system.processing.processors.player; import com.djrapitops.plan.Plan; import com.djrapitops.plan.data.container.Action; diff --git a/Plan/src/main/java/com/djrapitops/plan/systems/processing/player/IPUpdateProcessor.java b/Plan/src/main/java/com/djrapitops/plan/system/processing/processors/player/IPUpdateProcessor.java similarity index 94% rename from Plan/src/main/java/com/djrapitops/plan/systems/processing/player/IPUpdateProcessor.java rename to Plan/src/main/java/com/djrapitops/plan/system/processing/processors/player/IPUpdateProcessor.java index 15915b1c9..c1b5cc17a 100644 --- a/Plan/src/main/java/com/djrapitops/plan/systems/processing/player/IPUpdateProcessor.java +++ b/Plan/src/main/java/com/djrapitops/plan/system/processing/processors/player/IPUpdateProcessor.java @@ -2,7 +2,7 @@ * Licence is provided in the jar as license.yml also here: * https://github.com/Rsl1122/Plan-PlayerAnalytics/blob/master/Plan/src/main/resources/license.yml */ -package com.djrapitops.plan.systems.processing.player; +package com.djrapitops.plan.system.processing.processors.player; import com.djrapitops.plan.Plan; import com.djrapitops.plan.data.container.GeoInfo; diff --git a/Plan/src/main/java/com/djrapitops/plan/systems/processing/player/KickProcessor.java b/Plan/src/main/java/com/djrapitops/plan/system/processing/processors/player/KickProcessor.java similarity index 92% rename from Plan/src/main/java/com/djrapitops/plan/systems/processing/player/KickProcessor.java rename to Plan/src/main/java/com/djrapitops/plan/system/processing/processors/player/KickProcessor.java index e8339ed0c..79361ae92 100644 --- a/Plan/src/main/java/com/djrapitops/plan/systems/processing/player/KickProcessor.java +++ b/Plan/src/main/java/com/djrapitops/plan/system/processing/processors/player/KickProcessor.java @@ -2,7 +2,7 @@ * Licence is provided in the jar as license.yml also here: * https://github.com/Rsl1122/Plan-PlayerAnalytics/blob/master/Plan/src/main/resources/license.yml */ -package com.djrapitops.plan.systems.processing.player; +package com.djrapitops.plan.system.processing.processors.player; import com.djrapitops.plan.Plan; import com.djrapitops.plugin.api.utility.log.Log; diff --git a/Plan/src/main/java/com/djrapitops/plan/systems/processing/player/KillProcessor.java b/Plan/src/main/java/com/djrapitops/plan/system/processing/processors/player/KillProcessor.java similarity index 96% rename from Plan/src/main/java/com/djrapitops/plan/systems/processing/player/KillProcessor.java rename to Plan/src/main/java/com/djrapitops/plan/system/processing/processors/player/KillProcessor.java index ceffd2a07..ce2447382 100644 --- a/Plan/src/main/java/com/djrapitops/plan/systems/processing/player/KillProcessor.java +++ b/Plan/src/main/java/com/djrapitops/plan/system/processing/processors/player/KillProcessor.java @@ -1,4 +1,4 @@ -package com.djrapitops.plan.systems.processing.player; +package com.djrapitops.plan.system.processing.processors.player; import com.djrapitops.plan.Plan; import com.djrapitops.plan.data.container.PlayerKill; diff --git a/Plan/src/main/java/com/djrapitops/plan/systems/processing/player/NameProcessor.java b/Plan/src/main/java/com/djrapitops/plan/system/processing/processors/player/NameProcessor.java similarity index 94% rename from Plan/src/main/java/com/djrapitops/plan/systems/processing/player/NameProcessor.java rename to Plan/src/main/java/com/djrapitops/plan/system/processing/processors/player/NameProcessor.java index fc9f53b8e..0a74b71e0 100644 --- a/Plan/src/main/java/com/djrapitops/plan/systems/processing/player/NameProcessor.java +++ b/Plan/src/main/java/com/djrapitops/plan/system/processing/processors/player/NameProcessor.java @@ -2,13 +2,13 @@ * Licence is provided in the jar as license.yml also here: * https://github.com/Rsl1122/Plan-PlayerAnalytics/blob/master/Plan/src/main/resources/license.yml */ -package com.djrapitops.plan.systems.processing.player; +package com.djrapitops.plan.system.processing.processors.player; import com.djrapitops.plan.Plan; import com.djrapitops.plan.system.database.databases.Database; import com.djrapitops.plan.system.database.tables.NicknamesTable; +import com.djrapitops.plan.system.processing.processors.NewNickActionProcessor; import com.djrapitops.plan.systems.cache.DataCache; -import com.djrapitops.plan.systems.processing.NewNickActionProcessor; import com.djrapitops.plugin.api.utility.log.Log; import java.sql.SQLException; diff --git a/Plan/src/main/java/com/djrapitops/plan/systems/processing/player/PlayerProcessor.java b/Plan/src/main/java/com/djrapitops/plan/system/processing/processors/player/PlayerProcessor.java similarity index 81% rename from Plan/src/main/java/com/djrapitops/plan/systems/processing/player/PlayerProcessor.java rename to Plan/src/main/java/com/djrapitops/plan/system/processing/processors/player/PlayerProcessor.java index f0cbbe0ae..d65f4fd23 100644 --- a/Plan/src/main/java/com/djrapitops/plan/systems/processing/player/PlayerProcessor.java +++ b/Plan/src/main/java/com/djrapitops/plan/system/processing/processors/player/PlayerProcessor.java @@ -2,9 +2,9 @@ * Licence is provided in the jar as license.yml also here: * https://github.com/Rsl1122/Plan-PlayerAnalytics/blob/master/Plan/src/main/resources/license.yml */ -package com.djrapitops.plan.systems.processing.player; +package com.djrapitops.plan.system.processing.processors.player; -import com.djrapitops.plan.systems.processing.Processor; +import com.djrapitops.plan.system.processing.processors.Processor; import java.util.UUID; diff --git a/Plan/src/main/java/com/djrapitops/plan/systems/processing/player/RegisterProcessor.java b/Plan/src/main/java/com/djrapitops/plan/system/processing/processors/player/RegisterProcessor.java similarity index 94% rename from Plan/src/main/java/com/djrapitops/plan/systems/processing/player/RegisterProcessor.java rename to Plan/src/main/java/com/djrapitops/plan/system/processing/processors/player/RegisterProcessor.java index 1791d84ba..3ac0b095f 100644 --- a/Plan/src/main/java/com/djrapitops/plan/systems/processing/player/RegisterProcessor.java +++ b/Plan/src/main/java/com/djrapitops/plan/system/processing/processors/player/RegisterProcessor.java @@ -2,7 +2,7 @@ * Licence is provided in the jar as license.yml also here: * https://github.com/Rsl1122/Plan-PlayerAnalytics/blob/master/Plan/src/main/resources/license.yml */ -package com.djrapitops.plan.systems.processing.player; +package com.djrapitops.plan.system.processing.processors.player; import com.djrapitops.plan.Plan; import com.djrapitops.plan.data.container.Action; @@ -10,7 +10,7 @@ import com.djrapitops.plan.system.database.databases.Database; import com.djrapitops.plan.system.database.tables.Actions; import com.djrapitops.plan.system.database.tables.UserInfoTable; import com.djrapitops.plan.system.database.tables.UsersTable; -import com.djrapitops.plan.systems.processing.Processor; +import com.djrapitops.plan.system.processing.processors.Processor; import com.djrapitops.plugin.api.utility.log.Log; import java.sql.SQLException; diff --git a/Plan/src/main/java/com/djrapitops/plan/system/webserver/webapi/bungee/RequestPluginsTabWebAPI.java b/Plan/src/main/java/com/djrapitops/plan/system/webserver/webapi/bungee/RequestPluginsTabWebAPI.java index 91b53107a..f03d86e6c 100644 --- a/Plan/src/main/java/com/djrapitops/plan/system/webserver/webapi/bungee/RequestPluginsTabWebAPI.java +++ b/Plan/src/main/java/com/djrapitops/plan/system/webserver/webapi/bungee/RequestPluginsTabWebAPI.java @@ -7,11 +7,11 @@ package com.djrapitops.plan.system.webserver.webapi.bungee; import com.djrapitops.plan.PlanPlugin; import com.djrapitops.plan.api.exceptions.WebAPIException; +import com.djrapitops.plan.system.processing.processors.Processor; import com.djrapitops.plan.system.webserver.response.Response; import com.djrapitops.plan.system.webserver.webapi.WebAPI; import com.djrapitops.plan.system.webserver.webapi.bukkit.RequestInspectPluginsTabBukkitWebAPI; import com.djrapitops.plan.systems.info.server.ServerInfo; -import com.djrapitops.plan.systems.processing.Processor; import com.djrapitops.plugin.api.Check; import com.djrapitops.plugin.api.utility.log.Log; diff --git a/Plan/src/main/java/com/djrapitops/plan/systems/cache/SessionCache.java b/Plan/src/main/java/com/djrapitops/plan/systems/cache/SessionCache.java index 95740524d..3ace0c79c 100644 --- a/Plan/src/main/java/com/djrapitops/plan/systems/cache/SessionCache.java +++ b/Plan/src/main/java/com/djrapitops/plan/systems/cache/SessionCache.java @@ -2,7 +2,7 @@ package com.djrapitops.plan.systems.cache; import com.djrapitops.plan.Plan; import com.djrapitops.plan.data.container.Session; -import com.djrapitops.plan.systems.processing.Processor; +import com.djrapitops.plan.system.processing.processors.Processor; import com.djrapitops.plan.utilities.MiscUtils; import com.djrapitops.plugin.api.utility.log.Log; diff --git a/Plan/src/main/java/com/djrapitops/plan/systems/info/BukkitInformationManager.java b/Plan/src/main/java/com/djrapitops/plan/systems/info/BukkitInformationManager.java index 5ca1ade11..d5260fcf9 100644 --- a/Plan/src/main/java/com/djrapitops/plan/systems/info/BukkitInformationManager.java +++ b/Plan/src/main/java/com/djrapitops/plan/systems/info/BukkitInformationManager.java @@ -12,6 +12,7 @@ import com.djrapitops.plan.data.element.InspectContainer; import com.djrapitops.plan.data.plugin.HookHandler; import com.djrapitops.plan.data.plugin.PluginData; import com.djrapitops.plan.settings.theme.Theme; +import com.djrapitops.plan.system.processing.processors.Processor; import com.djrapitops.plan.system.settings.Settings; import com.djrapitops.plan.system.webserver.WebServer; import com.djrapitops.plan.system.webserver.WebServerSystem; @@ -32,7 +33,6 @@ import com.djrapitops.plan.system.webserver.webapi.universal.PingWebAPI; import com.djrapitops.plan.systems.cache.DataCache; import com.djrapitops.plan.systems.info.parsing.AnalysisPageParser; import com.djrapitops.plan.systems.info.parsing.InspectPageParser; -import com.djrapitops.plan.systems.processing.Processor; import com.djrapitops.plan.utilities.MiscUtils; import com.djrapitops.plan.utilities.analysis.Analysis; import com.djrapitops.plan.utilities.file.export.HtmlExport; diff --git a/Plan/src/main/java/com/djrapitops/plan/systems/info/ImporterManager.java b/Plan/src/main/java/com/djrapitops/plan/systems/info/ImporterManager.java index 1b214d07d..762a45a24 100644 --- a/Plan/src/main/java/com/djrapitops/plan/systems/info/ImporterManager.java +++ b/Plan/src/main/java/com/djrapitops/plan/systems/info/ImporterManager.java @@ -4,7 +4,7 @@ */ package com.djrapitops.plan.systems.info; -import com.djrapitops.plan.systems.processing.importing.importers.Importer; +import com.djrapitops.plan.system.processing.processors.importing.importers.Importer; import java.util.ArrayList; import java.util.List; diff --git a/Plan/src/main/java/com/djrapitops/plan/systems/processing/info/BungeePluginChannelSenderProcessor.java b/Plan/src/main/java/com/djrapitops/plan/systems/processing/info/BungeePluginChannelSenderProcessor.java deleted file mode 100644 index c26156546..000000000 --- a/Plan/src/main/java/com/djrapitops/plan/systems/processing/info/BungeePluginChannelSenderProcessor.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Licence is provided in the jar as license.yml also here: - * https://github.com/Rsl1122/Plan-PlayerAnalytics/blob/master/Plan/src/main/resources/license.yml - */ -package com.djrapitops.plan.systems.processing.info; - -import com.djrapitops.plan.Plan; -import com.djrapitops.plan.systems.processing.Processor; -import com.djrapitops.plugin.api.utility.log.Log; -import org.bukkit.entity.Player; - -import java.io.ByteArrayOutputStream; -import java.io.DataOutputStream; -import java.io.IOException; - -/** - * //TODO Class Javadoc Comment - * - * @author Rsl1122 - */ -public class BungeePluginChannelSenderProcessor extends Processor { - - public BungeePluginChannelSenderProcessor(Player object) { - super(object); - } - - @Override - public void process() { - Log.debug("Sending a Bungee Address get Request through plugin channel"); - try (ByteArrayOutputStream b = new ByteArrayOutputStream()) { - try (DataOutputStream out = new DataOutputStream(b)) { - out.writeUTF("bungee_address_get"); - object.sendPluginMessage(Plan.getInstance(), "BungeeCord", b.toByteArray()); - } - } catch (IOException e) { - Log.toLog(this.getClass().getName(), e); - } - } -} \ No newline at end of file diff --git a/Plan/src/main/java/com/djrapitops/plan/systems/tasks/TPSCountTimer.java b/Plan/src/main/java/com/djrapitops/plan/systems/tasks/TPSCountTimer.java index a950016ef..c41d2fc0b 100644 --- a/Plan/src/main/java/com/djrapitops/plan/systems/tasks/TPSCountTimer.java +++ b/Plan/src/main/java/com/djrapitops/plan/systems/tasks/TPSCountTimer.java @@ -4,7 +4,7 @@ import com.djrapitops.plan.Plan; import com.djrapitops.plan.PlanBungee; import com.djrapitops.plan.PlanPlugin; import com.djrapitops.plan.data.container.TPS; -import com.djrapitops.plan.systems.processing.TPSInsertProcessor; +import com.djrapitops.plan.system.processing.processors.TPSInsertProcessor; import com.djrapitops.plan.utilities.MiscUtils; import com.djrapitops.plan.utilities.analysis.MathUtils; import com.djrapitops.plugin.api.Check; diff --git a/Plan/test/main/java/com/djrapitops/plan/data/additional/importer/ImportBuilderTest.java b/Plan/test/main/java/com/djrapitops/plan/data/additional/importer/ImportBuilderTest.java index 42e728f0b..b6e1e5e9e 100644 --- a/Plan/test/main/java/com/djrapitops/plan/data/additional/importer/ImportBuilderTest.java +++ b/Plan/test/main/java/com/djrapitops/plan/data/additional/importer/ImportBuilderTest.java @@ -7,8 +7,8 @@ package com.djrapitops.plan.data.additional.importer; import com.djrapitops.plan.data.container.PlayerKill; import com.djrapitops.plan.data.container.TPS; import com.djrapitops.plan.data.time.GMTimes; -import com.djrapitops.plan.systems.processing.importing.ServerImportData; -import com.djrapitops.plan.systems.processing.importing.UserImportData; +import com.djrapitops.plan.system.processing.processors.importing.ServerImportData; +import com.djrapitops.plan.system.processing.processors.importing.UserImportData; import com.google.common.collect.ImmutableMap; import org.junit.Test; import test.utilities.RandomData; diff --git a/Plan/test/main/java/com/djrapitops/plan/system/database/DatabaseTest.java b/Plan/test/main/java/com/djrapitops/plan/system/database/DatabaseTest.java index feb51eaaf..6eaf5e7eb 100644 --- a/Plan/test/main/java/com/djrapitops/plan/system/database/DatabaseTest.java +++ b/Plan/test/main/java/com/djrapitops/plan/system/database/DatabaseTest.java @@ -16,9 +16,9 @@ import com.djrapitops.plan.system.database.databases.MySQLDB; import com.djrapitops.plan.system.database.databases.SQLDB; import com.djrapitops.plan.system.database.databases.SQLiteDB; import com.djrapitops.plan.system.database.tables.*; +import com.djrapitops.plan.system.processing.processors.player.RegisterProcessor; import com.djrapitops.plan.systems.cache.DataCache; import com.djrapitops.plan.systems.info.server.ServerInfo; -import com.djrapitops.plan.systems.processing.player.RegisterProcessor; import com.djrapitops.plan.utilities.ManageUtils; import com.djrapitops.plan.utilities.MiscUtils; import com.djrapitops.plan.utilities.analysis.MathUtils;