mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-22 05:06:44 +01:00
Move FAWE detection before guice injection/configuration
This commit is contained in:
parent
4ba1217b84
commit
9bd14b142b
@ -258,6 +258,20 @@ public final class BukkitPlatform extends JavaPlugin implements Listener, PlotPl
|
||||
|
||||
final PlotSquared plotSquared = new PlotSquared(this, "Bukkit");
|
||||
|
||||
// FAWE
|
||||
if (Settings.FAWE_Components.FAWE_HOOK) {
|
||||
Plugin fawe = getServer().getPluginManager().getPlugin("FastAsyncWorldEdit");
|
||||
if (fawe != null) {
|
||||
try {
|
||||
Class.forName("com.boydti.fawe.bukkit.regions.plotsquared.FaweQueueCoordinator");
|
||||
faweHook = true;
|
||||
} catch (Exception ignored) {
|
||||
LOGGER.error("Incompatible version of FAWE to enable hook, please upgrade: https://ci.athion" +
|
||||
".net/job/FastAsyncWorldEdit-P2-V6/");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// We create the injector after PlotSquared has been initialized, so that we have access
|
||||
// to generated instances and settings
|
||||
this.injector = Guice
|
||||
@ -326,20 +340,6 @@ public final class BukkitPlatform extends JavaPlugin implements Listener, PlotPl
|
||||
}
|
||||
}
|
||||
|
||||
// FAWE
|
||||
if (Settings.FAWE_Components.FAWE_HOOK) {
|
||||
Plugin fawe = getServer().getPluginManager().getPlugin("FastAsyncWorldEdit");
|
||||
if (fawe != null) {
|
||||
try {
|
||||
Class.forName("com.boydti.fawe.bukkit.regions.plotsquared.FaweQueueCoordinator");
|
||||
faweHook = true;
|
||||
} catch (Exception ignored) {
|
||||
LOGGER.error("Incompatible version of FAWE to enable hook, please upgrade: https://ci.athion" +
|
||||
".net/job/FastAsyncWorldEdit-P2-V6/");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (Settings.Enabled_Components.EVENTS) {
|
||||
getServer().getPluginManager().registerEvents(injector().getInstance(PlayerEventListener.class), this);
|
||||
getServer().getPluginManager().registerEvents(injector().getInstance(BlockEventListener.class), this);
|
||||
|
Loading…
Reference in New Issue
Block a user