mirror of
https://gitlab.com/phoenix-dvpmt/mmocore.git
synced 2024-12-28 05:37:44 +01:00
Fixed not loading MMOItems properly, disabling some compatability.
(Mainly Custom Block Regen)
This commit is contained in:
parent
6888630355
commit
db05b391b0
@ -138,7 +138,7 @@ public class MMOCore extends JavaPlugin {
|
||||
public final MMOLoadManager loadManager = new MMOLoadManager();
|
||||
public RPGUtilHandler rpgUtilHandler = new DefaultRPGUtilHandler();
|
||||
|
||||
private boolean miLoaded;
|
||||
private boolean miLoaded, miChecked;
|
||||
|
||||
public void onLoad() {
|
||||
plugin = this;
|
||||
@ -363,8 +363,6 @@ public class MMOCore extends JavaPlugin {
|
||||
}
|
||||
}.runTaskTimerAsynchronously(MMOCore.plugin, autosave, autosave);
|
||||
}
|
||||
|
||||
miLoaded = Bukkit.getPluginManager().isPluginEnabled("MMOItems");
|
||||
}
|
||||
|
||||
public void onDisable() {
|
||||
@ -444,6 +442,11 @@ public class MMOCore extends JavaPlugin {
|
||||
}
|
||||
|
||||
public boolean isMILoaded() {
|
||||
if(!miChecked) {
|
||||
miLoaded = Bukkit.getPluginManager().isPluginEnabled("MMOItems");
|
||||
miChecked = true;
|
||||
}
|
||||
|
||||
return miLoaded;
|
||||
}
|
||||
}
|
||||
|
@ -64,7 +64,7 @@ public class BlockListener implements Listener {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!perms.canMine(getBlockName(block))) {
|
||||
if(!perms.canMine(getBlockName(block))) {
|
||||
MMOCore.plugin.configManager.getSimpleMessage("cannot-break").send(player);
|
||||
event.setCancelled(true);
|
||||
return;
|
||||
|
@ -60,7 +60,7 @@ public class CustomBlockManager extends MMOManager {
|
||||
if(MMOCore.plugin.isMILoaded())
|
||||
if(MMOItems.plugin.getCustomBlocks().isMushroomBlock(block.getType())) {
|
||||
CustomBlock cblock = CustomBlock.getFromData(block.getBlockData());
|
||||
if(block != null)
|
||||
if(cblock != null)
|
||||
return map.getOrDefault("mi-custom-" + cblock.getId(), map.getOrDefault(block.getType().name(), null));
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user