mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-25 22:56:45 +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()));
|
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.outdated"));
|
||||||
player.sendMessage(LocaleLoader.getString("UpdateChecker.newavailable"));
|
player.sendMessage(LocaleLoader.getString("UpdateChecker.newavailable"));
|
||||||
}
|
}
|
||||||
|
@ -21,6 +21,12 @@ import com.gmail.nossr50.util.blockmeta.conversion.BlockStoreConversionMain;
|
|||||||
public class WorldListener implements Listener {
|
public class WorldListener implements Listener {
|
||||||
private ArrayList<BlockStoreConversionMain> converters = new ArrayList<BlockStoreConversionMain>();
|
private ArrayList<BlockStoreConversionMain> converters = new ArrayList<BlockStoreConversionMain>();
|
||||||
|
|
||||||
|
private final mcMMO plugin;
|
||||||
|
|
||||||
|
public WorldListener(final mcMMO plugin) {
|
||||||
|
this.plugin = plugin;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Monitor StructureGrow events.
|
* Monitor StructureGrow events.
|
||||||
*
|
*
|
||||||
@ -47,11 +53,11 @@ public class WorldListener implements Listener {
|
|||||||
World world = event.getWorld();
|
World world = event.getWorld();
|
||||||
File dataDir = new File(world.getWorldFolder(), "mcmmo_data");
|
File dataDir = new File(world.getWorldFolder(), "mcmmo_data");
|
||||||
|
|
||||||
if (!dataDir.exists() || mcMMO.p == null) {
|
if (!dataDir.exists() || plugin == null) {
|
||||||
return;
|
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);
|
BlockStoreConversionMain converter = new BlockStoreConversionMain(world);
|
||||||
converter.run();
|
converter.run();
|
||||||
|
@ -55,36 +55,38 @@ import com.gmail.nossr50.util.player.UserManager;
|
|||||||
import com.gmail.nossr50.util.spout.SpoutUtils;
|
import com.gmail.nossr50.util.spout.SpoutUtils;
|
||||||
|
|
||||||
public class mcMMO extends JavaPlugin {
|
public class mcMMO extends JavaPlugin {
|
||||||
|
/* Listeners */
|
||||||
private final PlayerListener playerListener = new PlayerListener(this);
|
private final PlayerListener playerListener = new PlayerListener(this);
|
||||||
private final BlockListener blockListener = new BlockListener(this);
|
private final BlockListener blockListener = new BlockListener(this);
|
||||||
private final EntityListener entityListener = new EntityListener(this);
|
private final EntityListener entityListener = new EntityListener(this);
|
||||||
private final InventoryListener inventoryListener = new InventoryListener(this);
|
private final InventoryListener inventoryListener = new InventoryListener(this);
|
||||||
|
private final WorldListener worldListener = new WorldListener(this);
|
||||||
private final SelfListener selfListener = new SelfListener();
|
private final SelfListener selfListener = new SelfListener();
|
||||||
private final WorldListener worldListener = new WorldListener();
|
|
||||||
|
|
||||||
public static mcMMO p;
|
|
||||||
|
|
||||||
|
/* Managers */
|
||||||
private static ChunkManager placeStore;
|
private static ChunkManager placeStore;
|
||||||
private static RepairableManager repairableManager;
|
private static RepairableManager repairableManager;
|
||||||
private static DatabaseManager databaseManager;
|
private static DatabaseManager databaseManager;
|
||||||
|
|
||||||
// Jar Stuff
|
/* File Paths */
|
||||||
public static File mcmmo;
|
|
||||||
|
|
||||||
// File Paths
|
|
||||||
private static String mainDirectory;
|
private static String mainDirectory;
|
||||||
private static String flatFileDirectory;
|
private static String flatFileDirectory;
|
||||||
private static String usersFile;
|
private static String usersFile;
|
||||||
private static String modDirectory;
|
private static String modDirectory;
|
||||||
|
|
||||||
|
public static mcMMO p;
|
||||||
|
|
||||||
|
// Jar Stuff
|
||||||
|
public static File mcmmo;
|
||||||
|
|
||||||
// Update Check
|
// Update Check
|
||||||
public boolean updateAvailable;
|
private boolean updateAvailable;
|
||||||
|
|
||||||
// Spout Check
|
// Spout Check
|
||||||
public static boolean spoutEnabled = false;
|
public static boolean spoutEnabled;
|
||||||
|
|
||||||
// XP Event Check
|
// XP Event Check
|
||||||
private boolean xpEventEnabled = false;
|
private boolean xpEventEnabled;
|
||||||
|
|
||||||
// Metadata Values
|
// Metadata Values
|
||||||
public final static String entityMetadataKey = "mcMMO: Spawned Entity";
|
public final static String entityMetadataKey = "mcMMO: Spawned Entity";
|
||||||
@ -206,6 +208,10 @@ public class mcMMO extends JavaPlugin {
|
|||||||
return modDirectory;
|
return modDirectory;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean isUpdateAvailable() {
|
||||||
|
return updateAvailable;
|
||||||
|
}
|
||||||
|
|
||||||
public boolean isXPEventEnabled() {
|
public boolean isXPEventEnabled() {
|
||||||
return xpEventEnabled;
|
return xpEventEnabled;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user