mirror of
https://github.com/Multiverse/Multiverse-Core.git
synced 2024-11-07 03:11:02 +01:00
Remove naming conflict with bukkit
This commit is contained in:
parent
3e10f18079
commit
cfdd1ac38c
@ -28,6 +28,7 @@ import org.bukkit.Location;
|
||||
import org.bukkit.World.Environment;
|
||||
import org.bukkit.command.Command;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.configuration.file.FileConfiguration;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.Event;
|
||||
import org.bukkit.event.Event.Priority;
|
||||
@ -35,7 +36,6 @@ import org.bukkit.plugin.PluginManager;
|
||||
import org.bukkit.plugin.java.JavaPlugin;
|
||||
import org.bukkit.util.config.Configuration;
|
||||
|
||||
import javax.persistence.EntityNotFoundException;
|
||||
import java.io.*;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
@ -121,7 +121,7 @@ public class MultiverseCore extends JavaPlugin implements MVPlugin, Core {
|
||||
debugLog = new DebugLog("Multiverse-Core", getDataFolder() + File.separator + "debug.log");
|
||||
}
|
||||
|
||||
public Configuration getConfig() {
|
||||
public Configuration getMVConfig() {
|
||||
return this.configMV;
|
||||
}
|
||||
|
||||
|
@ -25,7 +25,7 @@ public interface Core {
|
||||
*
|
||||
* @return The Multiverse config file.
|
||||
*/
|
||||
public Configuration getConfig();
|
||||
public Configuration getMVConfig();
|
||||
|
||||
/**
|
||||
* Gets the Banking system that Multiverse-Core has hooked into.
|
||||
|
@ -39,7 +39,7 @@ public class ConfigCommand extends MultiverseCommand {
|
||||
public void runCommand(CommandSender sender, List<String> args) {
|
||||
if (args.get(0).equalsIgnoreCase("messagecooldown") || args.get(0).equalsIgnoreCase("teleportcooldown") || args.get(0).equalsIgnoreCase("debug")) {
|
||||
try {
|
||||
this.plugin.getConfig().setProperty(args.get(0).toLowerCase(), Integer.parseInt(args.get(1)));
|
||||
this.plugin.getMVConfig().setProperty(args.get(0).toLowerCase(), Integer.parseInt(args.get(1)));
|
||||
this.plugin.loadConfigs();
|
||||
} catch (NumberFormatException e) {
|
||||
sender.sendMessage(ChatColor.RED + "Sorry, " + ChatColor.AQUA + args.get(0) + ChatColor.WHITE + " must be an integer!");
|
||||
@ -47,7 +47,7 @@ public class ConfigCommand extends MultiverseCommand {
|
||||
} else {
|
||||
if (ConfigProperty.valueOf(args.get(0).toLowerCase()) != null) {
|
||||
try {
|
||||
this.plugin.getConfig().setProperty(args.get(0).toLowerCase(), Boolean.parseBoolean(args.get(0)));
|
||||
this.plugin.getMVConfig().setProperty(args.get(0).toLowerCase(), Boolean.parseBoolean(args.get(0)));
|
||||
this.plugin.loadConfigs();
|
||||
} catch (Exception e) {
|
||||
sender.sendMessage(ChatColor.RED + "Sorry, " + ChatColor.AQUA + args.get(0) + ChatColor.WHITE + " must be true or false!");
|
||||
|
@ -54,13 +54,13 @@ public class VersionCommand extends MultiverseCommand {
|
||||
logAndAddToPasteBinBuffer("Multiverse Plugins Loaded: " + this.plugin.getPluginCount());
|
||||
logAndAddToPasteBinBuffer("Economy being used: " + this.plugin.getBank().getEconUsed());
|
||||
logAndAddToPasteBinBuffer("Permissions Plugin: " + this.plugin.getMVPerms().getType());
|
||||
logAndAddToPasteBinBuffer("Dumping Config Values: (version " + this.plugin.getConfig().getString("version", "NOT SET") + ")");
|
||||
logAndAddToPasteBinBuffer("messagecooldown: " + this.plugin.getConfig().getString("messagecooldown", "NOT SET"));
|
||||
logAndAddToPasteBinBuffer("teleportcooldown: " + this.plugin.getConfig().getString("teleportcooldown", "NOT SET"));
|
||||
logAndAddToPasteBinBuffer("worldnameprefix: " + this.plugin.getConfig().getString("worldnameprefix", "NOT SET"));
|
||||
logAndAddToPasteBinBuffer("opfallback: " + this.plugin.getConfig().getString("opfallback", "NOT SET"));
|
||||
logAndAddToPasteBinBuffer("disableautoheal: " + this.plugin.getConfig().getString("disableautoheal", "NOT SET"));
|
||||
logAndAddToPasteBinBuffer("fakepvp: " + this.plugin.getConfig().getString("fakepvp", "NOT SET"));
|
||||
logAndAddToPasteBinBuffer("Dumping Config Values: (version " + this.plugin.getMVConfig().getString("version", "NOT SET") + ")");
|
||||
logAndAddToPasteBinBuffer("messagecooldown: " + this.plugin.getMVConfig().getString("messagecooldown", "NOT SET"));
|
||||
logAndAddToPasteBinBuffer("teleportcooldown: " + this.plugin.getMVConfig().getString("teleportcooldown", "NOT SET"));
|
||||
logAndAddToPasteBinBuffer("worldnameprefix: " + this.plugin.getMVConfig().getString("worldnameprefix", "NOT SET"));
|
||||
logAndAddToPasteBinBuffer("opfallback: " + this.plugin.getMVConfig().getString("opfallback", "NOT SET"));
|
||||
logAndAddToPasteBinBuffer("disableautoheal: " + this.plugin.getMVConfig().getString("disableautoheal", "NOT SET"));
|
||||
logAndAddToPasteBinBuffer("fakepvp: " + this.plugin.getMVConfig().getString("fakepvp", "NOT SET"));
|
||||
logAndAddToPasteBinBuffer("Special Code: FRN001");
|
||||
|
||||
MVVersionRequestEvent versionEvent = new MVVersionRequestEvent(pasteBinBuffer);
|
||||
|
@ -82,7 +82,7 @@ public class MVEntityListener extends EntityListener {
|
||||
MultiverseWorld world = this.worldManager.getMVWorld(w.getName());
|
||||
|
||||
if (attacker instanceof Player) {
|
||||
if (!world.isPVPEnabled() && this.plugin.getConfig().getBoolean("fakepvp", false)) {
|
||||
if (!world.isPVPEnabled() && this.plugin.getMVConfig().getBoolean("fakepvp", false)) {
|
||||
((Player) attacker).sendMessage(ChatColor.RED + "PVP is disabled in this World.");
|
||||
event.setCancelled(true);
|
||||
}
|
||||
@ -96,7 +96,7 @@ public class MVEntityListener extends EntityListener {
|
||||
return;
|
||||
}
|
||||
RegainReason reason = event.getRegainReason();
|
||||
if (reason == RegainReason.REGEN && this.plugin.getConfig().getBoolean("disableautoheal", false)) {
|
||||
if (reason == RegainReason.REGEN && this.plugin.getMVConfig().getBoolean("disableautoheal", false)) {
|
||||
event.setCancelled(true);
|
||||
}
|
||||
}
|
||||
|
@ -38,8 +38,8 @@ public class MVPlayerListener extends PlayerListener {
|
||||
return;
|
||||
}
|
||||
// Check whether the Server is set to prefix the chat with the World name. If not we do nothing, if so we need to check if the World has an Alias.
|
||||
if (this.plugin.getConfig().getBoolean("worldnameprefix", true)) {
|
||||
this.plugin.getConfig().save();
|
||||
if (this.plugin.getMVConfig().getBoolean("worldnameprefix", true)) {
|
||||
this.plugin.getMVConfig().save();
|
||||
String world = event.getPlayer().getWorld().getName();
|
||||
String prefix = "";
|
||||
// If we're not a MV world, don't do anything
|
||||
@ -62,7 +62,7 @@ public class MVPlayerListener extends PlayerListener {
|
||||
return;
|
||||
}
|
||||
|
||||
if (event.isBedSpawn() && this.plugin.getConfig().getBoolean("bedrespawn", true)) {
|
||||
if (event.isBedSpawn() && this.plugin.getMVConfig().getBoolean("bedrespawn", true)) {
|
||||
this.plugin.log(Level.FINE, "Spawning " + event.getPlayer().getName() + " at their bed");
|
||||
return;
|
||||
}
|
||||
|
@ -16,7 +16,6 @@ import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.permissions.Permission;
|
||||
import org.bukkit.permissions.PermissionDefault;
|
||||
import sun.security.util.Debug;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.logging.Level;
|
||||
|
Loading…
Reference in New Issue
Block a user