Adhere to some conventions.

This commit is contained in:
Olof Larsson 2013-03-21 10:33:36 +01:00
parent ea17db7298
commit e1687d24a6
33 changed files with 110 additions and 87 deletions

View File

@ -1,5 +1,5 @@
name: mcore
version: 6.1.0
version: 6.1.1_dev
main: com.massivecraft.mcore.MCore
load: startup
permissions:

View File

@ -39,7 +39,7 @@ public class Conf extends SimpleConfig
public static int getTpdelay(Permissible permissible)
{
if (Permission.NOTPDELAY.has(permissible, false)) return 0;
if (Perm.NOTPDELAY.has(permissible, false)) return 0;
return Math.max(tpdelay, 0);
}
@ -49,6 +49,6 @@ public class Conf extends SimpleConfig
public static transient Conf i = new Conf();
private Conf()
{
super(MCore.p, new File("plugins/mcore/conf.json"));
super(MCore.get(), new File("plugins/mcore/conf.json"));
}
}

View File

@ -182,7 +182,7 @@ public class InternalListener implements Listener
{
// We do the schedule in order for the set to be correct through out the whole MONITOR priority state.
final String name = event.getPlayer().getName();
Bukkit.getScheduler().scheduleSyncDelayedTask(MCore.p, new Runnable()
Bukkit.getScheduler().scheduleSyncDelayedTask(MCore.get(), new Runnable()
{
@Override
public void run()
@ -213,7 +213,7 @@ public class InternalListener implements Listener
{
// We do the schedule in order for the set to be correct through out the whole MONITOR priority state.
final String name = event.getPlayer().getName();
Bukkit.getScheduler().scheduleSyncDelayedTask(MCore.p, new Runnable()
Bukkit.getScheduler().scheduleSyncDelayedTask(MCore.get(), new Runnable()
{
@Override
public void run()

View File

@ -47,7 +47,7 @@ public class MCore extends MPlugin
// INSTANCE & CONSTRUCT
// -------------------------------------------- //
public static MCore p;
private static MCore p;
public static MCore get() { return p; }
public MCore() { p = this; }
@ -125,8 +125,8 @@ public class MCore extends MPlugin
Bukkit.getScheduler().scheduleSyncRepeatingTask(this, this.collTickTask, 1, 1);
// Init internal collections
MultiverseColl.i.init();
AspectColl.i.init();
MultiverseColl.get().init();
AspectColl.get().init();
// Register commands
this.cmdUsys = new CmdUsys();

View File

@ -4,8 +4,12 @@ import org.bukkit.permissions.Permissible;
import com.massivecraft.mcore.util.PermUtil;
public enum Permission
public enum Perm
{
// -------------------------------------------- //
// ENUM
// -------------------------------------------- //
CMD_USYS("cmd.usys"),
CMD_USYS_MULTIVERSE("cmd.usys.multiverse"),
CMD_USYS_MULTIVERSE_LIST("cmd.usys.multiverse.list"),
@ -23,15 +27,29 @@ public enum Permission
CMD_USYS_ASPECT_USE("cmd.usys.aspect.use"),
CMD_MCORE("cmd.mcore"),
NOTPDELAY("notpdelay"),
// END OF LIST
;
// -------------------------------------------- //
// FIELDS
// -------------------------------------------- //
public final String node;
Permission(final String permissionNode)
// -------------------------------------------- //
// CONSTRUCT
// -------------------------------------------- //
Perm(final String permissionNode)
{
this.node = "mcore."+permissionNode;
}
// -------------------------------------------- //
// HAS
// -------------------------------------------- //
public boolean has(Permissible permissible, boolean informSenderIfNot)
{
return PermUtil.has(permissible, this.node, informSenderIfNot);

View File

@ -2,7 +2,7 @@ package com.massivecraft.mcore.cmd;
import com.massivecraft.mcore.Conf;
import com.massivecraft.mcore.MCore;
import com.massivecraft.mcore.Permission;
import com.massivecraft.mcore.Perm;
import com.massivecraft.mcore.cmd.req.ReqHasPerm;
public class CmdMcore extends MCommand
@ -12,13 +12,13 @@ public class CmdMcore extends MCommand
public CmdMcore()
{
this.addAliases(Conf.getCmdAliases(MCORE));
this.addRequirements(ReqHasPerm.get(Permission.CMD_MCORE.node));
this.addRequirements(ReqHasPerm.get(Perm.CMD_MCORE.node));
}
@Override
public void perform()
{
this.msg("<i>You are running %s", MCore.p.getDescription().getFullName());
this.msg("<i>You are running %s", MCore.get().getDescription().getFullName());
this.msg("<i>The id of this server is \"<h>%s<i>\".", Conf.serverid);
}
}

View File

@ -157,7 +157,7 @@ public abstract class MCommand
public boolean register()
{
return register(MCore.p, false);
return register(MCore.get(), false);
}
public boolean register(MPlugin mplugin)
@ -167,7 +167,7 @@ public abstract class MCommand
public boolean register(boolean override)
{
return this.register(MCore.p, override);
return this.register(MCore.get(), override);
}
public boolean register(MPlugin mplugin, boolean override)
@ -188,7 +188,7 @@ public abstract class MCommand
knownCommands.remove(lowerLabel);
}
if (scm.register(MCore.p.getDescription().getName(), bgc))
if (scm.register(MCore.get().getDescription().getName(), bgc))
{
ret = true;
}

View File

@ -4,7 +4,7 @@ import java.util.Collection;
import org.bukkit.command.CommandSender;
import com.massivecraft.mcore.Permission;
import com.massivecraft.mcore.Perm;
import com.massivecraft.mcore.usys.Aspect;
import com.massivecraft.mcore.usys.AspectColl;
@ -30,19 +30,19 @@ public class ARAspect extends ARAbstractSelect<Aspect>
@Override
public Aspect select(String arg, CommandSender sender)
{
return AspectColl.i.get(arg);
return AspectColl.get().get(arg);
}
@Override
public boolean canList(CommandSender sender)
{
return Permission.CMD_USYS_ASPECT_LIST.has(sender, false);
return Perm.CMD_USYS_ASPECT_LIST.has(sender, false);
}
@Override
public Collection<String> altNames(CommandSender sender)
{
return AspectColl.i.getIds();
return AspectColl.get().getIds();
}
}

View File

@ -4,7 +4,7 @@ import java.util.Collection;
import org.bukkit.command.CommandSender;
import com.massivecraft.mcore.Permission;
import com.massivecraft.mcore.Perm;
import com.massivecraft.mcore.usys.Multiverse;
import com.massivecraft.mcore.usys.MultiverseColl;
@ -30,19 +30,19 @@ public class ARMultiverse extends ARAbstractSelect<Multiverse>
@Override
public Multiverse select(String arg, CommandSender sender)
{
return MultiverseColl.i.get(arg);
return MultiverseColl.get().get(arg);
}
@Override
public boolean canList(CommandSender sender)
{
return Permission.CMD_USYS_MULTIVERSE_LIST.has(sender, false);
return Perm.CMD_USYS_MULTIVERSE_LIST.has(sender, false);
}
@Override
public Collection<String> altNames(CommandSender sender)
{
return MultiverseColl.i.getIds();
return MultiverseColl.get().getIds();
}
}

View File

@ -81,7 +81,7 @@ public class SenderIdMixinDefault extends SenderIdMixinAbstract implements Liste
this.onlineSenderIds.add(id);
}
Bukkit.getServer().getPluginManager().registerEvents(this, MCore.p);
Bukkit.getServer().getPluginManager().registerEvents(this, MCore.get());
long end = System.currentTimeMillis();
MCore.get().log(Txt.parse("<i>Setup of SenderIdMixinDefault took <h>%d<i>ms.", end-start));

View File

@ -744,7 +744,7 @@ public final class PS implements Cloneable, Serializable
public static boolean inSameUniverse(PS one, PS two, Aspect aspect)
{
return inSameUniverse(one, two, aspect.multiverse());
return inSameUniverse(one, two, aspect.getMultiverse());
}
// -------------------------------------------- //

View File

@ -30,7 +30,7 @@ public abstract class Colls<C extends Coll<E, L>, E, L extends Comparable<? supe
{
List<C> ret = new ArrayList<C>();
Aspect a = this.getAspect();
Multiverse m = a.multiverse();
Multiverse m = a.getMultiverse();
for (String universe : m.getUniverses())
{
ret.add(this.getForUniverse(universe));
@ -51,7 +51,7 @@ public abstract class Colls<C extends Coll<E, L>, E, L extends Comparable<? supe
{
if (worldName == null) throw new IllegalArgumentException("worldName may not be null.");
return this.getAspect().multiverse().getUniverseForWorldName(worldName);
return this.getAspect().getMultiverse().getUniverseForWorldName(worldName);
}
// -------------------------------------------- //

View File

@ -16,18 +16,18 @@ public class Aspect extends Entity<Aspect, String>
public static Aspect get(Object oid)
{
return AspectColl.i.get(oid);
return AspectColl.get().get(oid);
}
// -------------------------------------------- //
// TRANSIENT FIELDS
// -------------------------------------------- //
protected transient boolean registered = false;
private transient boolean registered = false;
public boolean isRegistered() { return this.registered; }
public void register() { this.registered = true; }
protected transient Collection<String> desc = new ArrayList<String>();
private transient Collection<String> desc = new ArrayList<String>();
public Collection<String> getDesc() { return this.desc; }
public void setDesc(Collection<String> val) { this.desc = val; }
public void setDesc(String... val) { this.desc = Arrays.asList(val); }
@ -37,16 +37,16 @@ public class Aspect extends Entity<Aspect, String>
// -------------------------------------------- //
@SerializedName("mid")
protected String multiverseId;
private String multiverseId;
public String getMultiverseId() { return this.multiverseId; }
public void setMultiverseId(String multiverseId) { this.multiverseId = multiverseId; }
public Multiverse multiverse()
public Multiverse getMultiverse()
{
Multiverse ret = MultiverseColl.i.get(this.multiverseId);
if (ret == null) ret = MultiverseColl.i.get(MCore.DEFAULT);
Multiverse ret = MultiverseColl.get().get(this.multiverseId);
if (ret == null) ret = MultiverseColl.get().get(MCore.DEFAULT);
return ret;
}
public void multiverse(Multiverse val) { this.multiverseId = val.getId(); }
public void setMultiverse(Multiverse val) { this.multiverseId = val.getId(); }
// -------------------------------------------- //
// CONSTRUCT

View File

@ -9,14 +9,14 @@ import com.massivecraft.mcore.store.Coll;
public class AspectColl extends Coll<Aspect, String>
{
// -------------------------------------------- //
// META
// INSTANCE & CONSTRUCT
// -------------------------------------------- //
public static AspectColl i = new AspectColl();
private static AspectColl i = new AspectColl();
public static AspectColl get() { return i; }
private AspectColl()
{
super(MCore.p, "ai", "usys_aspect", Aspect.class, String.class, false);
super(MCore.get(), "ai", "usys_aspect", Aspect.class, String.class, false);
}
// -------------------------------------------- //
@ -40,7 +40,7 @@ public class AspectColl extends Coll<Aspect, String>
for (Aspect aspect : this.getAll())
{
if(aspect.isRegistered() == false) continue;
if((aspect.multiverse() != multiverse) == normal) continue;
if((aspect.getMultiverse() != multiverse) == normal) continue;
ret.add(aspect);
}
return ret;

View File

@ -21,7 +21,7 @@ public class Multiverse extends Entity<Multiverse, String>
public static Multiverse get(Object oid)
{
return MultiverseColl.i.get(oid);
return MultiverseColl.get().get(oid);
}
// -------------------------------------------- //
@ -46,12 +46,12 @@ public class Multiverse extends Entity<Multiverse, String>
public List<Aspect> myAspects()
{
return AspectColl.i.getAllRegisteredForMultiverse(this, true);
return AspectColl.get().getAllRegisteredForMultiverse(this, true);
}
public List<Aspect> otherAspects()
{
return AspectColl.i.getAllRegisteredForMultiverse(this, false);
return AspectColl.get().getAllRegisteredForMultiverse(this, false);
}
// -------------------------------------------- //

View File

@ -6,15 +6,20 @@ import com.massivecraft.mcore.store.Coll;
public class MultiverseColl extends Coll<Multiverse, String>
{
// -------------------------------------------- //
// META
// INSTANCE & CONSTRUCT
// -------------------------------------------- //
public static MultiverseColl i = new MultiverseColl();
private static MultiverseColl i = new MultiverseColl();
public static MultiverseColl get() { return i; }
private MultiverseColl()
{
super(MCore.p, "ai", "usys_multiverse", Multiverse.class, String.class, false);
super(MCore.get(), "ai", "usys_multiverse", Multiverse.class, String.class, false);
}
// -------------------------------------------- //
// EXTRAS
// -------------------------------------------- //
@Override
public void init()
{

View File

@ -1,7 +1,7 @@
package com.massivecraft.mcore.usys.cmd;
import com.massivecraft.mcore.Conf;
import com.massivecraft.mcore.Permission;
import com.massivecraft.mcore.Perm;
import com.massivecraft.mcore.cmd.HelpCommand;
import com.massivecraft.mcore.cmd.MCommand;
import com.massivecraft.mcore.cmd.req.ReqHasPerm;
@ -26,7 +26,7 @@ public class CmdUsys extends MCommand
this.addSubCommand(this.cmdUsysWorld);
this.addSubCommand(this.cmdUsysAspect);
this.addRequirements(ReqHasPerm.get(Permission.CMD_USYS.node));
this.addRequirements(ReqHasPerm.get(Perm.CMD_USYS.node));
}
@Override

View File

@ -1,6 +1,6 @@
package com.massivecraft.mcore.usys.cmd;
import com.massivecraft.mcore.Permission;
import com.massivecraft.mcore.Perm;
import com.massivecraft.mcore.cmd.HelpCommand;
import com.massivecraft.mcore.cmd.MCommand;
import com.massivecraft.mcore.cmd.req.ReqHasPerm;
@ -20,7 +20,7 @@ public class CmdUsysAspect extends MCommand
this.addSubCommand(this.cmdUsysAspectShow);
this.addSubCommand(this.cmdUsysAspectUse);
this.addRequirements(ReqHasPerm.get(Permission.CMD_USYS_ASPECT.node));
this.addRequirements(ReqHasPerm.get(Perm.CMD_USYS_ASPECT.node));
}
@Override

View File

@ -3,7 +3,7 @@ package com.massivecraft.mcore.usys.cmd;
import java.util.ArrayList;
import java.util.List;
import com.massivecraft.mcore.Permission;
import com.massivecraft.mcore.Perm;
import com.massivecraft.mcore.cmd.MCommand;
import com.massivecraft.mcore.cmd.arg.ARInteger;
import com.massivecraft.mcore.cmd.req.ReqHasPerm;
@ -18,7 +18,7 @@ public class CmdUsysAspectList extends MCommand
this.addAliases("l", "list");
this.addOptionalArg("page", "1");
this.addRequirements(ReqHasPerm.get(Permission.CMD_USYS_ASPECT_LIST.node));
this.addRequirements(ReqHasPerm.get(Perm.CMD_USYS_ASPECT_LIST.node));
}
@Override
@ -30,9 +30,9 @@ public class CmdUsysAspectList extends MCommand
// Create Messages
List<String> lines = new ArrayList<String>();
for (Aspect aspect : AspectColl.i.getAllRegistered())
for (Aspect aspect : AspectColl.get().getAllRegistered())
{
lines.add("<h>"+aspect.getId()+" <white>--> <h>"+aspect.multiverse().getId());
lines.add("<h>"+aspect.getId()+" <white>--> <h>"+aspect.getMultiverse().getId());
}
// Send them

View File

@ -1,6 +1,6 @@
package com.massivecraft.mcore.usys.cmd;
import com.massivecraft.mcore.Permission;
import com.massivecraft.mcore.Perm;
import com.massivecraft.mcore.cmd.MCommand;
import com.massivecraft.mcore.cmd.arg.ARAspect;
import com.massivecraft.mcore.cmd.req.ReqHasPerm;
@ -14,7 +14,7 @@ public class CmdUsysAspectShow extends MCommand
this.addAliases("s", "show");
this.addRequiredArg("aspect");
this.addRequirements(ReqHasPerm.get(Permission.CMD_USYS_ASPECT_SHOW.node));
this.addRequirements(ReqHasPerm.get(Perm.CMD_USYS_ASPECT_SHOW.node));
}
@Override
@ -24,7 +24,7 @@ public class CmdUsysAspectShow extends MCommand
if (aspect == null) return;
msg(Txt.titleize("Aspect: "+aspect.getId()));
msg("<k>using multiverse: <v>%s",aspect.multiverse().getId());
msg("<k>using multiverse: <v>%s",aspect.getMultiverse().getId());
for (String descLine : aspect.getDesc())
{

View File

@ -1,6 +1,6 @@
package com.massivecraft.mcore.usys.cmd;
import com.massivecraft.mcore.Permission;
import com.massivecraft.mcore.Perm;
import com.massivecraft.mcore.cmd.MCommand;
import com.massivecraft.mcore.cmd.arg.ARAspect;
import com.massivecraft.mcore.cmd.arg.ARMultiverse;
@ -16,7 +16,7 @@ public class CmdUsysAspectUse extends MCommand
this.addRequiredArg("aspect");
this.addRequiredArg("multiverse");
this.addRequirements(ReqHasPerm.get(Permission.CMD_USYS_ASPECT_USE.node));
this.addRequirements(ReqHasPerm.get(Perm.CMD_USYS_ASPECT_USE.node));
}
@Override
@ -28,7 +28,7 @@ public class CmdUsysAspectUse extends MCommand
Multiverse multiverse = this.arg(1, ARMultiverse.get());
if (multiverse == null) return;
aspect.multiverse(multiverse);
aspect.setMultiverse(multiverse);
msg("<g>The aspect <h>%s<g> now use multiverse <h>%s<g>.", aspect.getId(), multiverse.getId());
}

View File

@ -1,6 +1,6 @@
package com.massivecraft.mcore.usys.cmd;
import com.massivecraft.mcore.Permission;
import com.massivecraft.mcore.Perm;
import com.massivecraft.mcore.cmd.HelpCommand;
import com.massivecraft.mcore.cmd.MCommand;
import com.massivecraft.mcore.cmd.req.ReqHasPerm;
@ -22,7 +22,7 @@ public class CmdUsysMultiverse extends MCommand
this.addSubCommand(this.cmdUsysMultiverseNew);
this.addSubCommand(this.cmdUsysMultiverseDel);
this.addRequirements(ReqHasPerm.get(Permission.CMD_USYS_MULTIVERSE.node));
this.addRequirements(ReqHasPerm.get(Perm.CMD_USYS_MULTIVERSE.node));
}
@Override

View File

@ -1,7 +1,7 @@
package com.massivecraft.mcore.usys.cmd;
import com.massivecraft.mcore.MCore;
import com.massivecraft.mcore.Permission;
import com.massivecraft.mcore.Perm;
import com.massivecraft.mcore.cmd.MCommand;
import com.massivecraft.mcore.cmd.arg.ARMultiverse;
import com.massivecraft.mcore.cmd.req.ReqHasPerm;
@ -14,7 +14,7 @@ public class CmdUsysMultiverseDel extends MCommand
this.addAliases("d", "del");
this.addRequiredArg("multiverse");
this.addRequirements(ReqHasPerm.get(Permission.CMD_USYS_MULTIVERSE_DEL.node));
this.addRequirements(ReqHasPerm.get(Perm.CMD_USYS_MULTIVERSE_DEL.node));
}
@Override

View File

@ -3,7 +3,7 @@ package com.massivecraft.mcore.usys.cmd;
import java.util.ArrayList;
import java.util.List;
import com.massivecraft.mcore.Permission;
import com.massivecraft.mcore.Perm;
import com.massivecraft.mcore.cmd.MCommand;
import com.massivecraft.mcore.cmd.arg.ARInteger;
import com.massivecraft.mcore.cmd.req.ReqHasPerm;
@ -18,7 +18,7 @@ public class CmdUsysMultiverseList extends MCommand
this.addAliases("l", "list");
this.addOptionalArg("page", "1");
this.addRequirements(ReqHasPerm.get(Permission.CMD_USYS_MULTIVERSE_LIST.node));
this.addRequirements(ReqHasPerm.get(Perm.CMD_USYS_MULTIVERSE_LIST.node));
}
@Override
@ -30,7 +30,7 @@ public class CmdUsysMultiverseList extends MCommand
// Create Messages
List<String> lines = new ArrayList<String>();
for (Multiverse multiverse : MultiverseColl.i.getAll())
for (Multiverse multiverse : MultiverseColl.get().getAll())
{
lines.add("<h>"+multiverse.getId()+" <i>has "+Txt.implodeCommaAndDot(multiverse.getUniverses(), "<aqua>%s", "<i>, ", " <i>and ", "<i>."));
}

View File

@ -1,6 +1,6 @@
package com.massivecraft.mcore.usys.cmd;
import com.massivecraft.mcore.Permission;
import com.massivecraft.mcore.Perm;
import com.massivecraft.mcore.cmd.MCommand;
import com.massivecraft.mcore.cmd.req.ReqHasPerm;
import com.massivecraft.mcore.usys.MultiverseColl;
@ -12,7 +12,7 @@ public class CmdUsysMultiverseNew extends MCommand
this.addAliases("n", "new");
this.addRequiredArg("multiverse");
this.addRequirements(ReqHasPerm.get(Permission.CMD_USYS_MULTIVERSE_NEW.node));
this.addRequirements(ReqHasPerm.get(Perm.CMD_USYS_MULTIVERSE_NEW.node));
}
@Override
@ -20,13 +20,13 @@ public class CmdUsysMultiverseNew extends MCommand
{
String id = this.arg(0);
if (MultiverseColl.i.containsId(id))
if (MultiverseColl.get().containsId(id))
{
msg("<b>The multiverse <h>%s<b> already exists.", id);
return;
}
MultiverseColl.i.create(id);
MultiverseColl.get().create(id);
msg("<g>Created multiverse <h>%s<g>.", id);
}

View File

@ -4,7 +4,7 @@ import java.util.ArrayList;
import java.util.List;
import com.massivecraft.mcore.MCore;
import com.massivecraft.mcore.Permission;
import com.massivecraft.mcore.Perm;
import com.massivecraft.mcore.cmd.MCommand;
import com.massivecraft.mcore.cmd.arg.ARMultiverse;
import com.massivecraft.mcore.cmd.req.ReqHasPerm;
@ -19,7 +19,7 @@ public class CmdUsysMultiverseShow extends MCommand
this.addAliases("s", "show");
this.addRequiredArg("multiverse");
this.addRequirements(ReqHasPerm.get(Permission.CMD_USYS_MULTIVERSE_SHOW.node));
this.addRequirements(ReqHasPerm.get(Perm.CMD_USYS_MULTIVERSE_SHOW.node));
}
@Override

View File

@ -1,6 +1,6 @@
package com.massivecraft.mcore.usys.cmd;
import com.massivecraft.mcore.Permission;
import com.massivecraft.mcore.Perm;
import com.massivecraft.mcore.cmd.HelpCommand;
import com.massivecraft.mcore.cmd.MCommand;
import com.massivecraft.mcore.cmd.req.ReqHasPerm;
@ -20,7 +20,7 @@ public class CmdUsysUniverse extends MCommand
this.addSubCommand(this.cmdUsysUniverseDel);
this.addSubCommand(this.cmdUsysUniverseClear);
this.addRequirements(ReqHasPerm.get(Permission.CMD_USYS_UNIVERSE.node));
this.addRequirements(ReqHasPerm.get(Perm.CMD_USYS_UNIVERSE.node));
}
@Override

View File

@ -1,7 +1,7 @@
package com.massivecraft.mcore.usys.cmd;
import com.massivecraft.mcore.MCore;
import com.massivecraft.mcore.Permission;
import com.massivecraft.mcore.Perm;
import com.massivecraft.mcore.cmd.MCommand;
import com.massivecraft.mcore.cmd.arg.ARMultiverse;
import com.massivecraft.mcore.cmd.req.ReqHasPerm;
@ -15,7 +15,7 @@ public class CmdUsysUniverseClear extends MCommand
this.addRequiredArg("universe");
this.addRequiredArg("multiverse");
this.addRequirements(ReqHasPerm.get(Permission.CMD_USYS_UNIVERSE_CLEAR.node));
this.addRequirements(ReqHasPerm.get(Perm.CMD_USYS_UNIVERSE_CLEAR.node));
}
@Override

View File

@ -1,7 +1,7 @@
package com.massivecraft.mcore.usys.cmd;
import com.massivecraft.mcore.MCore;
import com.massivecraft.mcore.Permission;
import com.massivecraft.mcore.Perm;
import com.massivecraft.mcore.cmd.MCommand;
import com.massivecraft.mcore.cmd.arg.ARMultiverse;
import com.massivecraft.mcore.cmd.req.ReqHasPerm;
@ -15,7 +15,7 @@ public class CmdUsysUniverseDel extends MCommand
this.addRequiredArg("universe");
this.addRequiredArg("multiverse");
this.addRequirements(ReqHasPerm.get(Permission.CMD_USYS_MULTIVERSE_DEL.node));
this.addRequirements(ReqHasPerm.get(Perm.CMD_USYS_MULTIVERSE_DEL.node));
}
@Override

View File

@ -1,6 +1,6 @@
package com.massivecraft.mcore.usys.cmd;
import com.massivecraft.mcore.Permission;
import com.massivecraft.mcore.Perm;
import com.massivecraft.mcore.cmd.MCommand;
import com.massivecraft.mcore.cmd.arg.ARMultiverse;
import com.massivecraft.mcore.cmd.req.ReqHasPerm;
@ -14,7 +14,7 @@ public class CmdUsysUniverseNew extends MCommand
this.addRequiredArg("universe");
this.addRequiredArg("multiverse");
this.addRequirements(ReqHasPerm.get(Permission.CMD_USYS_UNIVERSE_NEW.node));
this.addRequirements(ReqHasPerm.get(Perm.CMD_USYS_UNIVERSE_NEW.node));
}
@Override

View File

@ -1,6 +1,6 @@
package com.massivecraft.mcore.usys.cmd;
import com.massivecraft.mcore.Permission;
import com.massivecraft.mcore.Perm;
import com.massivecraft.mcore.cmd.MCommand;
import com.massivecraft.mcore.cmd.arg.ARMultiverse;
import com.massivecraft.mcore.cmd.req.ReqHasPerm;
@ -15,7 +15,7 @@ public class CmdUsysWorld extends MCommand
this.addRequiredArg("universe");
this.addRequiredArg("multiverse");
this.addRequirements(ReqHasPerm.get(Permission.CMD_USYS_WORLD.node));
this.addRequirements(ReqHasPerm.get(Perm.CMD_USYS_WORLD.node));
}
@Override

View File

@ -26,10 +26,10 @@ public class LibLoader
File parent = file.getParentFile();
if (parent != null && !parent.exists()) parent.mkdirs();
MCore.p.log("Downloading library "+filename);
MCore.get().log("Downloading library "+filename);
if ( ! DiscUtil.downloadUrl(url, file))
{
MCore.p.log(Txt.parse("<b>Failed to download <h>%s", filename));
MCore.get().log(Txt.parse("<b>Failed to download <h>%s", filename));
return false;
}
}

View File

@ -103,7 +103,7 @@ public class PermUtil
}
else
{
permissible.addAttachment(MCore.p, permissionName, true);
permissible.addAttachment(MCore.get(), permissionName, true);
}
}