mirror of
https://github.com/darksaid98/HuskHomes.git
synced 2026-12-03 06:28:49 +00:00
Refactor event dispatch system
This commit is contained in:
27 files changed
+329
-404
No files matched your search
@@ -56,7 +56,7 @@ import java.util.concurrent.atomic.AtomicBoolean;
|
||||
import java.util.logging.Level;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
public class BukkitHuskHomes extends JavaPlugin implements HuskHomes, PluginMessageListener, BukkitTaskRunner {
|
||||
public class BukkitHuskHomes extends JavaPlugin implements HuskHomes, BukkitTaskRunner, BukkitEventDispatcher, PluginMessageListener {
|
||||
|
||||
/**
|
||||
* Metrics ID for <a href="https://bstats.org/plugin/bukkit/HuskHomes/8430">HuskHomes on Bukkit</a>.
|
||||
@@ -72,7 +72,6 @@ public class BukkitHuskHomes extends JavaPlugin implements HuskHomes, PluginMess
|
||||
private RandomTeleportEngine randomTeleportEngine;
|
||||
private Spawn serverSpawn;
|
||||
private UnsafeBlocks unsafeBlocks;
|
||||
private EventDispatcher eventDispatcher;
|
||||
private Set<PluginHook> pluginHooks;
|
||||
private List<Command> registeredCommands;
|
||||
private Server server;
|
||||
@@ -141,9 +140,6 @@ public class BukkitHuskHomes extends JavaPlugin implements HuskHomes, PluginMess
|
||||
// Prepare the validator
|
||||
this.validator = new Validator(this);
|
||||
|
||||
// Prepare the event dispatcher
|
||||
this.eventDispatcher = new BukkitEventDispatcher(this);
|
||||
|
||||
// Initialize the cache
|
||||
this.cache = new Cache(this);
|
||||
|
||||
@@ -337,12 +333,6 @@ public class BukkitHuskHomes extends JavaPlugin implements HuskHomes, PluginMess
|
||||
this.randomTeleportEngine = randomTeleportEngine;
|
||||
}
|
||||
|
||||
@Override
|
||||
@NotNull
|
||||
public EventDispatcher getEventDispatcher() {
|
||||
return eventDispatcher;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Optional<Spawn> getLocalCachedSpawn() {
|
||||
return Optional.ofNullable(serverSpawn);
|
||||
|
||||
Reference in new issue
Block a user