#421 Create PluginHooks

- PluginHooks manages third-party plugins and allows to perform actions and queries on them, instead of public fields on the AuthMe main class
This commit is contained in:
ljacqu
2016-03-12 08:50:26 +01:00
parent 45fd241517
commit 8b27444a49
12 changed files with 273 additions and 186 deletions
@@ -1,6 +1,5 @@
package fr.xephi.authme.settings;
import com.onarandombox.MultiverseCore.api.MVWorldManager;
import fr.xephi.authme.AuthMe;
import fr.xephi.authme.cache.auth.PlayerCache;
import fr.xephi.authme.util.StringUtils;
@@ -117,11 +116,8 @@ public class Spawn extends CustomConfiguration {
}
break;
case "multiverse":
if (Settings.multiverse && plugin.multiverse != null) {
MVWorldManager manager = plugin.multiverse.getMVWorldManager();
if (manager.isMVWorld(world)) {
spawnLoc = manager.getMVWorld(world).getSpawnLocation();
}
if (Settings.multiverse) {
spawnLoc = plugin.getPluginHooks().getMultiverseSpawn(world);
}
break;
case "essentials":