mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-12-24 17:47:44 +01:00
Clean up a few more things.
This commit is contained in:
parent
612308eb9a
commit
b2dd820507
@ -276,7 +276,7 @@ public class PlayerListener implements Listener {
|
||||
player.sendMessage(LocaleLoader.getString("XPRate.Event", Config.getInstance().getExperienceGainsGlobalMultiplier()));
|
||||
}
|
||||
|
||||
if (Permissions.updateNotifications(player) && mcMMO.p.updateAvailable) {
|
||||
if (Permissions.updateNotifications(player) && plugin.isUpdateAvailable()) {
|
||||
player.sendMessage(LocaleLoader.getString("UpdateChecker.outdated"));
|
||||
player.sendMessage(LocaleLoader.getString("UpdateChecker.newavailable"));
|
||||
}
|
||||
|
@ -21,6 +21,12 @@ import com.gmail.nossr50.util.blockmeta.conversion.BlockStoreConversionMain;
|
||||
public class WorldListener implements Listener {
|
||||
private ArrayList<BlockStoreConversionMain> converters = new ArrayList<BlockStoreConversionMain>();
|
||||
|
||||
private final mcMMO plugin;
|
||||
|
||||
public WorldListener(final mcMMO plugin) {
|
||||
this.plugin = plugin;
|
||||
}
|
||||
|
||||
/**
|
||||
* Monitor StructureGrow events.
|
||||
*
|
||||
@ -47,11 +53,11 @@ public class WorldListener implements Listener {
|
||||
World world = event.getWorld();
|
||||
File dataDir = new File(world.getWorldFolder(), "mcmmo_data");
|
||||
|
||||
if (!dataDir.exists() || mcMMO.p == null) {
|
||||
if (!dataDir.exists() || plugin == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
mcMMO.p.getLogger().info("Converting block storage for " + world.getName() + " to a new format.");
|
||||
plugin.getLogger().info("Converting block storage for " + world.getName() + " to a new format.");
|
||||
|
||||
BlockStoreConversionMain converter = new BlockStoreConversionMain(world);
|
||||
converter.run();
|
||||
|
@ -55,36 +55,38 @@ import com.gmail.nossr50.util.player.UserManager;
|
||||
import com.gmail.nossr50.util.spout.SpoutUtils;
|
||||
|
||||
public class mcMMO extends JavaPlugin {
|
||||
/* Listeners */
|
||||
private final PlayerListener playerListener = new PlayerListener(this);
|
||||
private final BlockListener blockListener = new BlockListener(this);
|
||||
private final EntityListener entityListener = new EntityListener(this);
|
||||
private final InventoryListener inventoryListener = new InventoryListener(this);
|
||||
private final WorldListener worldListener = new WorldListener(this);
|
||||
private final SelfListener selfListener = new SelfListener();
|
||||
private final WorldListener worldListener = new WorldListener();
|
||||
|
||||
public static mcMMO p;
|
||||
|
||||
/* Managers */
|
||||
private static ChunkManager placeStore;
|
||||
private static RepairableManager repairableManager;
|
||||
private static DatabaseManager databaseManager;
|
||||
|
||||
// Jar Stuff
|
||||
public static File mcmmo;
|
||||
|
||||
// File Paths
|
||||
/* File Paths */
|
||||
private static String mainDirectory;
|
||||
private static String flatFileDirectory;
|
||||
private static String usersFile;
|
||||
private static String modDirectory;
|
||||
|
||||
public static mcMMO p;
|
||||
|
||||
// Jar Stuff
|
||||
public static File mcmmo;
|
||||
|
||||
// Update Check
|
||||
public boolean updateAvailable;
|
||||
private boolean updateAvailable;
|
||||
|
||||
// Spout Check
|
||||
public static boolean spoutEnabled = false;
|
||||
public static boolean spoutEnabled;
|
||||
|
||||
// XP Event Check
|
||||
private boolean xpEventEnabled = false;
|
||||
private boolean xpEventEnabled;
|
||||
|
||||
// Metadata Values
|
||||
public final static String entityMetadataKey = "mcMMO: Spawned Entity";
|
||||
@ -206,6 +208,10 @@ public class mcMMO extends JavaPlugin {
|
||||
return modDirectory;
|
||||
}
|
||||
|
||||
public boolean isUpdateAvailable() {
|
||||
return updateAvailable;
|
||||
}
|
||||
|
||||
public boolean isXPEventEnabled() {
|
||||
return xpEventEnabled;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user