This commit is contained in:
Olof Larsson 2014-06-04 13:58:40 +02:00
parent 47ebbce40e
commit 37ee04936f
551 changed files with 2723 additions and 2758 deletions

View File

@ -1,3 +1,3 @@
<a href="http://massivecraft.com/mcore">
![MCore Logotype](https://raw.github.com/MassiveCraft/mcore/master/media/logo300.png)<br>
<b>http://massivecraft.com/mcore</b></a>
<a href="http://massivecraft.com/MassiveCore">
![MassiveCore Logotype](https://raw.github.com/MassiveCraft/MassiveCore/master/media/logo300.png)<br>
<b>http://massivecraft.com/MassiveCore</b></a>

View File

@ -1,134 +1,134 @@
main: com.massivecraft.mcore.MCore
name: mcore
main: com.massivecraft.massivecore.MassiveCore
name: MassiveCore
version: 7.2.1
website: http://massivecraft.com/mcore
website: http://massivecraft.com/massivecore
authors: [Cayorion]
description: §eMCore stands for MassiveCraft Core and is a plugin that contains libraries and features that other plugins make use of. §aCayorion §efrom the minecraft server §aMassiveCraft §eis the lead programmer. Feel free to visit us at §bhttp://massivecraft.com
description: §eMassiveCore is a plugin that contains libraries and features that other plugins make use of. §aCayorion §efrom the minecraft server §aMassiveCraft §eis the lead programmer. Feel free to visit us at §bhttp://massivecraft.com
load: startup
permissions:
# -------------------------------------------- #
# THE REAL NODES
# -------------------------------------------- #
# cmd
mcore.basecommand: {description: use the MCore base command, default: false}
mcore.test: {description: run developer test, default: false}
mcore.id: {description: see the server id, default: false}
mcore.version: {description: diplay plugin version, default: false}
mcore.hearsound: {description: hear a sound, default: false}
mcore.mstore: {description: use the mstore command, default: false}
mcore.mstore.stats: {description: show mstore statistics, default: false}
mcore.mstore.listcolls: {description: list collections in a database, default: false}
mcore.mstore.copydb: {description: copy database content, default: false}
mcore.usys: {description: use the usys command, default: false}
mcore.usys.multiverse: {description: manage multiverses, default: false}
mcore.usys.multiverse.list: {description: list multiverses, default: false}
mcore.usys.multiverse.show: {description: show multiverse, default: false}
mcore.usys.multiverse.new: {description: create new multiverse, default: false}
mcore.usys.multiverse.del: {description: delete multiverse, default: false}
mcore.usys.universe: {description: manage universes, default: false}
mcore.usys.universe.new: {description: create new universe in multiverse, default: false}
mcore.usys.universe.del: {description: delete universe in multiverse, default: false}
mcore.usys.universe.clear: {description: clear universe in multiverse, default: false}
mcore.usys.world: {description: set a worlds universe in a multiverse, default: false}
mcore.usys.aspect: {description: manage aspects, default: false}
mcore.usys.aspect.list: {description: list aspects, default: false}
mcore.usys.aspect.show: {description: show aspect, default: false}
mcore.usys.aspect.use: {description: set multiverse for aspect, default: false}
mcore.buffer: {description: use the buffer command, default: false}
mcore.buffer.print: {description: print buffer, default: false}
mcore.buffer.clear: {description: clear buffer, default: false}
mcore.buffer.set: {description: set buffer, default: false}
mcore.buffer.add: {description: add to buffer, default: false}
mcore.buffer.whitespace: {description: add whitespace to buffer, default: false}
massivecore.basecommand: {description: use the MassiveCore base command, default: false}
massivecore.test: {description: run developer test, default: false}
massivecore.id: {description: see the server id, default: false}
massivecore.version: {description: diplay plugin version, default: false}
massivecore.hearsound: {description: hear a sound, default: false}
massivecore.store: {description: use the mstore command, default: false}
massivecore.store.stats: {description: show mstore statistics, default: false}
massivecore.store.listcolls: {description: list collections in a database, default: false}
massivecore.store.copydb: {description: copy database content, default: false}
massivecore.usys: {description: use the usys command, default: false}
massivecore.usys.multiverse: {description: manage multiverses, default: false}
massivecore.usys.multiverse.list: {description: list multiverses, default: false}
massivecore.usys.multiverse.show: {description: show multiverse, default: false}
massivecore.usys.multiverse.new: {description: create new multiverse, default: false}
massivecore.usys.multiverse.del: {description: delete multiverse, default: false}
massivecore.usys.universe: {description: manage universes, default: false}
massivecore.usys.universe.new: {description: create new universe in multiverse, default: false}
massivecore.usys.universe.del: {description: delete universe in multiverse, default: false}
massivecore.usys.universe.clear: {description: clear universe in multiverse, default: false}
massivecore.usys.world: {description: set a worlds universe in a multiverse, default: false}
massivecore.usys.aspect: {description: manage aspects, default: false}
massivecore.usys.aspect.list: {description: list aspects, default: false}
massivecore.usys.aspect.show: {description: show aspect, default: false}
massivecore.usys.aspect.use: {description: set multiverse for aspect, default: false}
massivecore.buffer: {description: use the buffer command, default: false}
massivecore.buffer.print: {description: print buffer, default: false}
massivecore.buffer.clear: {description: clear buffer, default: false}
massivecore.buffer.set: {description: set buffer, default: false}
massivecore.buffer.add: {description: add to buffer, default: false}
massivecore.buffer.whitespace: {description: add whitespace to buffer, default: false}
# misc
mcore.notpdelay: {description: teleport without delay, default: false}
mcore.variable.book: {description: replace ***book*** with content of book in your hand, default: false}
mcore.variable.buffer: {description: replace ***buffer*** with content of your buffer, default: false}
massivecore.notpdelay: {description: teleport without delay, default: false}
massivecore.variable.book: {description: replace ***book*** with content of book in your hand, default: false}
massivecore.variable.buffer: {description: replace ***buffer*** with content of your buffer, default: false}
# -------------------------------------------- #
# STAR NOTATION
# -------------------------------------------- #
mcore.*:
massivecore.*:
default: false
children:
mcore.basecommand: true
mcore.test: true
mcore.id: true
mcore.version: true
mcore.hearsound: true
mcore.mstore: true
mcore.mstore.stats: true
mcore.mstore.listcolls: true
mcore.mstore.copydb: true
mcore.usys: true
mcore.usys.multiverse: true
mcore.usys.multiverse.list: true
mcore.usys.multiverse.show: true
mcore.usys.multiverse.new: true
mcore.usys.multiverse.del: true
mcore.usys.universe: true
mcore.usys.universe.new: true
mcore.usys.universe.del: true
mcore.usys.universe.clear: true
mcore.usys.world: true
mcore.usys.aspect: true
mcore.usys.aspect.list: true
mcore.usys.aspect.show: true
mcore.usys.aspect.use: true
mcore.buffer: true
mcore.buffer.print: true
mcore.buffer.clear: true
mcore.buffer.set: true
mcore.buffer.add: true
mcore.buffer.whitespace: true
mcore.notpdelay: true
mcore.variable.book: true
mcore.variable.buffer: true
massivecore.basecommand: true
massivecore.test: true
massivecore.id: true
massivecore.version: true
massivecore.hearsound: true
massivecore.store: true
massivecore.store.stats: true
massivecore.store.listcolls: true
massivecore.store.copydb: true
massivecore.usys: true
massivecore.usys.multiverse: true
massivecore.usys.multiverse.list: true
massivecore.usys.multiverse.show: true
massivecore.usys.multiverse.new: true
massivecore.usys.multiverse.del: true
massivecore.usys.universe: true
massivecore.usys.universe.new: true
massivecore.usys.universe.del: true
massivecore.usys.universe.clear: true
massivecore.usys.world: true
massivecore.usys.aspect: true
massivecore.usys.aspect.list: true
massivecore.usys.aspect.show: true
massivecore.usys.aspect.use: true
massivecore.buffer: true
massivecore.buffer.print: true
massivecore.buffer.clear: true
massivecore.buffer.set: true
massivecore.buffer.add: true
massivecore.buffer.whitespace: true
massivecore.notpdelay: true
massivecore.variable.book: true
massivecore.variable.buffer: true
# -------------------------------------------- #
# KITS
# -------------------------------------------- #
mcore.kit.operator:
massivecore.kit.operator:
default: op
children:
mcore.*: true
mcore.kit.rank3:
massivecore.*: true
massivecore.kit.rank3:
default: false
children:
mcore.kit.rank2: true
mcore.kit.rank2:
massivecore.kit.rank2: true
massivecore.kit.rank2:
default: false
children:
mcore.kit.rank1: true
mcore.kit.rank1:
massivecore.kit.rank1: true
massivecore.kit.rank1:
default: false
children:
mcore.kit.rank0: true
mcore.id: true
mcore.mstore: true
mcore.mstore.stats: true
mcore.mstore.listcolls: true
mcore.usys: true
mcore.usys.multiverse: true
mcore.usys.multiverse.list: true
mcore.usys.multiverse.show: true
mcore.usys.aspect: true
mcore.usys.aspect.list: true
mcore.usys.aspect.show: true
mcore.buffer: true
mcore.buffer.print: true
mcore.buffer.clear: true
mcore.buffer.set: true
mcore.buffer.add: true
mcore.buffer.whitespace: true
mcore.notpdelay: true
mcore.variable.book: true
mcore.variable.buffer: true
mcore.kit.rank0:
massivecore.kit.rank0: true
massivecore.id: true
massivecore.store: true
massivecore.store.stats: true
massivecore.store.listcolls: true
massivecore.usys: true
massivecore.usys.multiverse: true
massivecore.usys.multiverse.list: true
massivecore.usys.multiverse.show: true
massivecore.usys.aspect: true
massivecore.usys.aspect.list: true
massivecore.usys.aspect.show: true
massivecore.buffer: true
massivecore.buffer.print: true
massivecore.buffer.clear: true
massivecore.buffer.set: true
massivecore.buffer.add: true
massivecore.buffer.whitespace: true
massivecore.notpdelay: true
massivecore.variable.book: true
massivecore.variable.buffer: true
massivecore.kit.rank0:
default: false
children:
mcore.basecommand: true
mcore.hearsound: true
mcore.version: true
mcore.kit.default:
massivecore.basecommand: true
massivecore.hearsound: true
massivecore.version: true
massivecore.kit.default:
default: true
children:
mcore.kit.rank0: true
massivecore.kit.rank0: true

View File

@ -1,11 +1,11 @@
package com.massivecraft.mcore;
package com.massivecraft.massivecore;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import com.massivecraft.mcore.store.Entity;
import com.massivecraft.mcore.xlib.gson.annotations.SerializedName;
import com.massivecraft.massivecore.store.Entity;
import com.massivecraft.massivecore.xlib.gson.annotations.SerializedName;
public class Aspect extends Entity<Aspect>
{
@ -42,7 +42,7 @@ public class Aspect extends Entity<Aspect>
public Multiverse getMultiverse()
{
Multiverse ret = MultiverseColl.get().get(this.multiverseId);
if (ret == null) ret = MultiverseColl.get().get(MCore.DEFAULT);
if (ret == null) ret = MultiverseColl.get().get(MassiveCore.DEFAULT);
return ret;
}
public void setMultiverse(Multiverse val) { this.multiverseId = val.getId(); }

View File

@ -1,10 +1,10 @@
package com.massivecraft.mcore;
package com.massivecraft.massivecore;
import java.util.ArrayList;
import java.util.List;
import com.massivecraft.mcore.store.Coll;
import com.massivecraft.mcore.store.MStore;
import com.massivecraft.massivecore.store.Coll;
import com.massivecraft.massivecore.store.MStore;
public class AspectColl extends Coll<Aspect>
{
@ -16,7 +16,7 @@ public class AspectColl extends Coll<Aspect>
public static AspectColl get() { return i; }
private AspectColl()
{
super("mcore_aspect", Aspect.class, MStore.getDb("default"), MCore.get());
super("massivecore_aspect", Aspect.class, MStore.getDb("default"), MassiveCore.get());
}
// -------------------------------------------- //

View File

@ -1,9 +1,9 @@
package com.massivecraft.mcore;
package com.massivecraft.massivecore;
import java.util.Map;
import java.util.UUID;
import com.massivecraft.mcore.util.MUtil;
import com.massivecraft.massivecore.util.MUtil;
public class ConfServer extends SimpleConfig
{
@ -13,7 +13,7 @@ public class ConfServer extends SimpleConfig
private static transient ConfServer i = new ConfServer();
public static ConfServer get() { return i; }
public ConfServer() { super(MCore.get()); }
public ConfServer() { super(MassiveCore.get()); }
// -------------------------------------------- //
// FIELDS

View File

@ -1,9 +1,9 @@
package com.massivecraft.mcore;
package com.massivecraft.massivecore;
import java.io.Serializable;
import java.util.Map.Entry;
import com.massivecraft.mcore.util.MUtil;
import com.massivecraft.massivecore.util.MUtil;
public class Couple<A, B> implements Entry<A, B>, Cloneable, Serializable
{

View File

@ -1,4 +1,4 @@
package com.massivecraft.mcore;
package com.massivecraft.massivecore;
import org.bukkit.event.Listener;
import org.bukkit.plugin.Plugin;

View File

@ -1,4 +1,4 @@
package com.massivecraft.mcore;
package com.massivecraft.massivecore;
import org.bukkit.Bukkit;
import org.bukkit.event.HandlerList;

View File

@ -0,0 +1,24 @@
package com.massivecraft.massivecore;
import java.util.*;
public class HashCodeComparator implements Comparator<Object>
{
// -------------------------------------------- //
// INSTANCE & CONSTRUCT
// -------------------------------------------- //
private static transient HashCodeComparator i = new HashCodeComparator();
public static HashCodeComparator get() { return i; }
// -------------------------------------------- //
// OVERRIDE
// -------------------------------------------- //
@Override
public int compare(Object o1, Object o2)
{
return o2.hashCode() - o1.hashCode();
}
}

View File

@ -1,4 +1,4 @@
package com.massivecraft.mcore;
package com.massivecraft.massivecore;
public final class HeatData
{

View File

@ -1,4 +1,4 @@
package com.massivecraft.mcore;
package com.massivecraft.massivecore;
public abstract class Heatable
{

View File

@ -1,4 +1,4 @@
package com.massivecraft.mcore;
package com.massivecraft.massivecore;
public class Lang
{

View File

@ -1,4 +1,4 @@
package com.massivecraft.mcore;
package com.massivecraft.massivecore;
import java.lang.reflect.Modifier;
import java.util.ArrayList;
@ -12,40 +12,40 @@ import org.bukkit.inventory.Inventory;
import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.PlayerInventory;
import com.massivecraft.mcore.adapter.InventoryAdapter;
import com.massivecraft.mcore.adapter.ItemStackAdapter;
import com.massivecraft.mcore.adapter.JsonElementAdapter;
import com.massivecraft.mcore.adapter.ModdedEnumTypeAdapter;
import com.massivecraft.mcore.adapter.ObjectIdAdapter;
import com.massivecraft.mcore.adapter.PlayerInventoryAdapter;
import com.massivecraft.mcore.adapter.UUIDAdapter;
import com.massivecraft.mcore.event.MCoreUuidUpdateEvent;
import com.massivecraft.mcore.fetcher.Fetcher;
import com.massivecraft.mcore.fetcher.IdAndName;
import com.massivecraft.mcore.integration.protocollib.ProtocolLibFeatures;
import com.massivecraft.mcore.integration.vault.VaultFeatures;
import com.massivecraft.mcore.mcorecmd.CmdMCore;
import com.massivecraft.mcore.mcorecmd.CmdMCoreBuffer;
import com.massivecraft.mcore.mcorecmd.CmdMCoreMStore;
import com.massivecraft.mcore.mcorecmd.CmdMCoreUsys;
import com.massivecraft.mcore.mixin.EngineTeleportMixinCause;
import com.massivecraft.mcore.ps.PS;
import com.massivecraft.mcore.ps.PSAdapter;
import com.massivecraft.mcore.store.Coll;
import com.massivecraft.mcore.store.ExamineThread;
import com.massivecraft.mcore.teleport.EngineScheduledTeleport;
import com.massivecraft.mcore.util.IdUtil;
import com.massivecraft.mcore.util.PlayerUtil;
import com.massivecraft.mcore.util.Txt;
import com.massivecraft.mcore.xlib.bson.types.ObjectId;
import com.massivecraft.mcore.xlib.gson.Gson;
import com.massivecraft.mcore.xlib.gson.GsonBuilder;
import com.massivecraft.mcore.xlib.gson.JsonArray;
import com.massivecraft.mcore.xlib.gson.JsonNull;
import com.massivecraft.mcore.xlib.gson.JsonObject;
import com.massivecraft.mcore.xlib.gson.JsonPrimitive;
import com.massivecraft.massivecore.adapter.InventoryAdapter;
import com.massivecraft.massivecore.adapter.ItemStackAdapter;
import com.massivecraft.massivecore.adapter.JsonElementAdapter;
import com.massivecraft.massivecore.adapter.ModdedEnumTypeAdapter;
import com.massivecraft.massivecore.adapter.ObjectIdAdapter;
import com.massivecraft.massivecore.adapter.PlayerInventoryAdapter;
import com.massivecraft.massivecore.adapter.UUIDAdapter;
import com.massivecraft.massivecore.cmd.massivecore.CmdMassiveCore;
import com.massivecraft.massivecore.cmd.massivecore.CmdMassiveCoreBuffer;
import com.massivecraft.massivecore.cmd.massivecore.CmdMassiveCoreStore;
import com.massivecraft.massivecore.cmd.massivecore.CmdMassiveCoreUsys;
import com.massivecraft.massivecore.event.EventMassiveCoreUuidUpdate;
import com.massivecraft.massivecore.fetcher.Fetcher;
import com.massivecraft.massivecore.fetcher.IdAndName;
import com.massivecraft.massivecore.integration.protocollib.IntegrationProtocolLib;
import com.massivecraft.massivecore.integration.vault.IntegrationVault;
import com.massivecraft.massivecore.mixin.EngineTeleportMixinCause;
import com.massivecraft.massivecore.ps.PS;
import com.massivecraft.massivecore.ps.PSAdapter;
import com.massivecraft.massivecore.store.Coll;
import com.massivecraft.massivecore.store.ExamineThread;
import com.massivecraft.massivecore.teleport.EngineScheduledTeleport;
import com.massivecraft.massivecore.util.IdUtil;
import com.massivecraft.massivecore.util.PlayerUtil;
import com.massivecraft.massivecore.util.Txt;
import com.massivecraft.massivecore.xlib.bson.types.ObjectId;
import com.massivecraft.massivecore.xlib.gson.Gson;
import com.massivecraft.massivecore.xlib.gson.GsonBuilder;
import com.massivecraft.massivecore.xlib.gson.JsonArray;
import com.massivecraft.massivecore.xlib.gson.JsonNull;
import com.massivecraft.massivecore.xlib.gson.JsonObject;
import com.massivecraft.massivecore.xlib.gson.JsonPrimitive;
public class MCore extends MPlugin
public class MassiveCore extends MassivePlugin
{
// -------------------------------------------- //
// COMMON CONSTANTS
@ -58,18 +58,18 @@ public class MCore extends MPlugin
// INSTANCE & CONSTRUCT
// -------------------------------------------- //
private static MCore i;
public static MCore get() { return i; }
public MCore() { i = this; }
private static MassiveCore i;
public static MassiveCore get() { return i; }
public MassiveCore() { i = this; }
// -------------------------------------------- //
// STATIC
// -------------------------------------------- //
public static Random random = new Random();
public static Gson gson = getMCoreGsonBuilder().create();
public static Gson gson = getMassiveCoreGsonBuilder().create();
public static GsonBuilder getMCoreGsonBuilder()
public static GsonBuilder getMassiveCoreGsonBuilder()
{
return new GsonBuilder()
.setPrettyPrinting()
@ -97,17 +97,17 @@ public class MCore extends MPlugin
// -------------------------------------------- //
// Commands
private CmdMCore outerCmdMCore;
public CmdMCore getOuterCmdMCore() { return this.outerCmdMCore; }
private CmdMassiveCore outerCmdMassiveCore;
public CmdMassiveCore getOuterCmdMassiveCore() { return this.outerCmdMassiveCore; }
private CmdMCoreUsys outerCmdMCoreUsys;
public CmdMCoreUsys getOuterCmdMCoreUsys() { return this.outerCmdMCoreUsys; }
private CmdMassiveCoreUsys outerCmdMassiveCoreUsys;
public CmdMassiveCoreUsys getOuterCmdMassiveCoreUsys() { return this.outerCmdMassiveCoreUsys; }
private CmdMCoreMStore outerCmdMCoreMStore;
public CmdMCoreMStore getOuterCmdMCoreMStore() { return this.outerCmdMCoreMStore; }
private CmdMassiveCoreStore outerCmdMassiveCoreStore;
public CmdMassiveCoreStore getOuterCmdMassiveCoreStore() { return this.outerCmdMassiveCoreStore; }
private CmdMCoreBuffer outerCmdMCoreBuffer;
public CmdMCoreBuffer getOuterCmdMCoreBuffer() { return this.outerCmdMCoreBuffer; }
private CmdMassiveCoreBuffer outerCmdMassiveCoreBuffer;
public CmdMassiveCoreBuffer getOuterCmdMassiveCoreBuffer() { return this.outerCmdMassiveCoreBuffer; }
// Runnables
// TODO: Make this one a singleton
@ -161,12 +161,12 @@ public class MCore extends MPlugin
IdUtil.setup();
// Register events
MCoreEngineMain.get().activate();
MCoreEngineVariable.get().activate();
MassiveCoreEngineMain.get().activate();
MassiveCoreEngineVariable.get().activate();
EngineScheduledTeleport.get().activate();
EngineTeleportMixinCause.get().activate();
MCoreEngineWorldNameSet.get().activate();
MCoreEngineCommandRegistration.get().activate();
MassiveCoreEngineWorldNameSet.get().activate();
MassiveCoreEngineCommandRegistration.get().activate();
PlayerUtil.get().activate();
// Tasks
@ -175,30 +175,30 @@ public class MCore extends MPlugin
// Collections
MultiverseColl.get().init();
AspectColl.get().init();
MCoreConfColl.get().init();
MassiveCoreMConfColl.get().init();
// Register commands
this.outerCmdMCore = new CmdMCore() { public List<String> getAliases() { return MCoreConf.get().aliasesOuterMCore; } };
this.outerCmdMCore.register();
this.outerCmdMassiveCore = new CmdMassiveCore() { public List<String> getAliases() { return MassiveCoreMConf.get().aliasesOuterMassiveCore; } };
this.outerCmdMassiveCore.register();
this.outerCmdMCoreUsys = new CmdMCoreUsys() { public List<String> getAliases() { return MCoreConf.get().aliasesOuterMCoreUsys; } };
this.outerCmdMCoreUsys.register();
this.outerCmdMassiveCoreUsys = new CmdMassiveCoreUsys() { public List<String> getAliases() { return MassiveCoreMConf.get().aliasesOuterMassiveCoreUsys; } };
this.outerCmdMassiveCoreUsys.register();
this.outerCmdMCoreMStore = new CmdMCoreMStore() { public List<String> getAliases() { return MCoreConf.get().aliasesOuterMCoreMStore; } };
this.outerCmdMCoreMStore.register();
this.outerCmdMassiveCoreStore = new CmdMassiveCoreStore() { public List<String> getAliases() { return MassiveCoreMConf.get().aliasesOuterMassiveCoreStore; } };
this.outerCmdMassiveCoreStore.register();
this.outerCmdMCoreBuffer = new CmdMCoreBuffer() { public List<String> getAliases() { return MCoreConf.get().aliasesOuterMCoreBuffer; } };
this.outerCmdMCoreBuffer.register();
this.outerCmdMassiveCoreBuffer = new CmdMassiveCoreBuffer() { public List<String> getAliases() { return MassiveCoreMConf.get().aliasesOuterMassiveCoreBuffer; } };
this.outerCmdMassiveCoreBuffer.register();
// Integration
this.integrate(
ProtocolLibFeatures.get(),
VaultFeatures.get()
IntegrationProtocolLib.get(),
IntegrationVault.get()
);
// Delete Files (at once and additionally after all plugins loaded)
TaskDeleteFiles.get().run();
Bukkit.getScheduler().scheduleSyncDelayedTask(this, TaskDeleteFiles.get());
MassiveCoreTaskDeleteFiles.get().run();
Bukkit.getScheduler().scheduleSyncDelayedTask(this, MassiveCoreTaskDeleteFiles.get());
// test();
@ -216,7 +216,7 @@ public class MCore extends MPlugin
log(Txt.parse("<i>Now updating database for plugins that are ready ..."));
MCoreUuidUpdateEvent event = new MCoreUuidUpdateEvent();
EventMassiveCoreUuidUpdate event = new EventMassiveCoreUuidUpdate();
event.run();
log(Txt.parse("<g> ... done!"));
@ -308,7 +308,7 @@ public class MCore extends MPlugin
{
super.onDisable();
ExamineThread.get().interrupt();
TaskDeleteFiles.get().run();
MassiveCoreTaskDeleteFiles.get().run();
IdUtil.saveCachefileDatas();
}

View File

@ -1,4 +1,4 @@
package com.massivecraft.mcore;
package com.massivecraft.massivecore;
import java.lang.reflect.Field;
import java.util.Iterator;
@ -11,17 +11,17 @@ import org.bukkit.command.Command;
import org.bukkit.command.SimpleCommandMap;
import org.bukkit.plugin.Plugin;
import com.massivecraft.mcore.cmd.MCommand;
import com.massivecraft.mcore.cmd.MCoreBukkitCommand;
import com.massivecraft.massivecore.cmd.MassiveCommand;
import com.massivecraft.massivecore.cmd.MassiveCoreBukkitCommand;
public class MCoreEngineCommandRegistration extends EngineAbstract
public class MassiveCoreEngineCommandRegistration extends EngineAbstract
{
// -------------------------------------------- //
// INSTANCE & CONSTRUCT
// -------------------------------------------- //
private static MCoreEngineCommandRegistration i = new MCoreEngineCommandRegistration();
public static MCoreEngineCommandRegistration get() { return i; }
private static MassiveCoreEngineCommandRegistration i = new MassiveCoreEngineCommandRegistration();
public static MassiveCoreEngineCommandRegistration get() { return i; }
// -------------------------------------------- //
// OVERRIDE
@ -30,7 +30,7 @@ public class MCoreEngineCommandRegistration extends EngineAbstract
@Override
public Plugin getPlugin()
{
return MCore.get();
return MassiveCore.get();
}
@Override
@ -66,8 +66,8 @@ public class MCoreEngineCommandRegistration extends EngineAbstract
Entry<String, Command> entry = iter.next();
Command command = entry.getValue();
// ... if this command is a MCoreBukkitCommand ...
if (!(command instanceof MCoreBukkitCommand)) continue;
// ... if this command is a MassiveCoreBukkitCommand ...
if (!(command instanceof MassiveCoreBukkitCommand)) continue;
// ... unregister it.
command.unregister(simpleCommandMap);
@ -75,7 +75,7 @@ public class MCoreEngineCommandRegistration extends EngineAbstract
}
// For each MCommand that is supposed to be registered ...
for (MCommand mcommand : MCommand.getRegisteredCommands())
for (MassiveCommand mcommand : MassiveCommand.getRegisteredCommands())
{
// ... and for each of it's aliases ...
for (String alias : mcommand.getAliases())
@ -90,11 +90,11 @@ public class MCoreEngineCommandRegistration extends EngineAbstract
previousOccupant.unregister(simpleCommandMap);
}
// ... create a new MCoreBukkitCommand ...
MCoreBukkitCommand command = new MCoreBukkitCommand(alias, mcommand);
// ... create a new MassiveCoreBukkitCommand ...
MassiveCoreBukkitCommand command = new MassiveCoreBukkitCommand(alias, mcommand);
// ... and finally register it.
simpleCommandMap.register("MCore", command);
simpleCommandMap.register("MassiveCore", command);
}
}
}

View File

@ -1,4 +1,4 @@
package com.massivecraft.mcore;
package com.massivecraft.massivecore;
import java.util.HashMap;
import java.util.HashSet;
@ -23,27 +23,27 @@ import org.bukkit.event.player.PlayerRespawnEvent;
import org.bukkit.event.player.PlayerTeleportEvent;
import org.bukkit.plugin.Plugin;
import com.massivecraft.mcore.event.MCoreAfterPlayerRespawnEvent;
import com.massivecraft.mcore.event.MCoreAfterPlayerTeleportEvent;
import com.massivecraft.mcore.event.MCorePermissionDeniedFormatEvent;
import com.massivecraft.mcore.event.MCorePlayerLeaveEvent;
import com.massivecraft.mcore.event.MCorePlayerToRecipientChatEvent;
import com.massivecraft.mcore.event.MCoreSenderRegisterEvent;
import com.massivecraft.mcore.event.MCoreSenderUnregisterEvent;
import com.massivecraft.mcore.mixin.Mixin;
import com.massivecraft.mcore.store.Coll;
import com.massivecraft.mcore.store.SenderColl;
import com.massivecraft.mcore.util.IdUtil;
import com.massivecraft.mcore.util.SmokeUtil;
import com.massivecraft.massivecore.event.EventMassiveCoreAfterPlayerRespawn;
import com.massivecraft.massivecore.event.EventMassiveCoreAfterPlayerTeleport;
import com.massivecraft.massivecore.event.EventMassiveCorePermissionDeniedFormat;
import com.massivecraft.massivecore.event.EventMassiveCorePlayerLeave;
import com.massivecraft.massivecore.event.EventMassiveCorePlayerToRecipientChat;
import com.massivecraft.massivecore.event.EventMassiveCoreSenderRegister;
import com.massivecraft.massivecore.event.EventMassiveCoreSenderUnregister;
import com.massivecraft.massivecore.mixin.Mixin;
import com.massivecraft.massivecore.store.Coll;
import com.massivecraft.massivecore.store.SenderColl;
import com.massivecraft.massivecore.util.IdUtil;
import com.massivecraft.massivecore.util.SmokeUtil;
public class MCoreEngineMain extends EngineAbstract
public class MassiveCoreEngineMain extends EngineAbstract
{
// -------------------------------------------- //
// INSTANCE & CONSTRUCT
// -------------------------------------------- //
private static MCoreEngineMain i = new MCoreEngineMain();
public static MCoreEngineMain get() { return i; }
private static MassiveCoreEngineMain i = new MassiveCoreEngineMain();
public static MassiveCoreEngineMain get() { return i; }
// -------------------------------------------- //
// OVERRIDE
@ -52,14 +52,14 @@ public class MCoreEngineMain extends EngineAbstract
@Override
public Plugin getPlugin()
{
return MCore.get();
return MassiveCore.get();
}
@Override
public void activate()
{
super.activate();
MCorePlayerLeaveEvent.player2event.clear();
EventMassiveCorePlayerLeave.player2event.clear();
}
// -------------------------------------------- //
@ -73,10 +73,10 @@ public class MCoreEngineMain extends EngineAbstract
public void recipientChat(final AsyncPlayerChatEvent event)
{
// Return unless we are using the recipient chat event
if (!MCoreConf.get().usingRecipientChatEvent) return;
if (!MassiveCoreMConf.get().usingRecipientChatEvent) return;
// Prepare vars
MCorePlayerToRecipientChatEvent recipientEvent;
EventMassiveCorePlayerToRecipientChat recipientEvent;
final Player sender = event.getPlayer();
String message = event.getMessage();
String format = event.getFormat();
@ -89,7 +89,7 @@ public class MCoreEngineMain extends EngineAbstract
for (Player recipient : players)
{
// Run the event for this unique recipient
recipientEvent = new MCorePlayerToRecipientChatEvent(event.isAsynchronous(), sender, recipient, message, format);
recipientEvent = new EventMassiveCorePlayerToRecipientChat(event.isAsynchronous(), sender, recipient, message, format);
recipientEvent.run();
// Format and send with the format and message from this recipient's own event.
@ -98,7 +98,7 @@ public class MCoreEngineMain extends EngineAbstract
}
// For the console
recipientEvent = new MCorePlayerToRecipientChatEvent(event.isAsynchronous(), sender, Bukkit.getConsoleSender(), message, format);
recipientEvent = new EventMassiveCorePlayerToRecipientChat(event.isAsynchronous(), sender, Bukkit.getConsoleSender(), message, format);
recipientEvent.run();
event.setMessage(recipientEvent.getMessage());
event.setFormat(recipientEvent.getFormat());
@ -109,13 +109,13 @@ public class MCoreEngineMain extends EngineAbstract
// -------------------------------------------- //
@EventHandler(priority = EventPriority.NORMAL)
public void permissionDeniedFormat(MCorePermissionDeniedFormatEvent event)
public void permissionDeniedFormat(EventMassiveCorePermissionDeniedFormat event)
{
// If noone set a format already ...
if (event.hasFormat()) return;
// ... and we have a custom format in the config ...
String customFormat = MCoreConf.get().getPermissionDeniedFormat(event.getPermissionName());
String customFormat = MassiveCoreMConf.get().getPermissionDeniedFormat(event.getPermissionName());
if (customFormat == null) return;
// ... then make use of that format.
@ -210,13 +210,13 @@ public class MCoreEngineMain extends EngineAbstract
}
@EventHandler(priority = EventPriority.MONITOR)
public void setSenderReferencesRegisterMonitor(MCoreSenderRegisterEvent event)
public void setSenderReferencesRegisterMonitor(EventMassiveCoreSenderRegister event)
{
setSenderReferences(event.getSender(), event.getSender());
}
@EventHandler(priority = EventPriority.MONITOR)
public void setSenderReferencesUnregisterMonitor(MCoreSenderUnregisterEvent event)
public void setSenderReferencesUnregisterMonitor(EventMassiveCoreSenderUnregister event)
{
setSenderReferences(event.getSender(), null);
}
@ -228,13 +228,13 @@ public class MCoreEngineMain extends EngineAbstract
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
public void after(PlayerTeleportEvent event)
{
Bukkit.getScheduler().scheduleSyncDelayedTask(MCore.get(), new MCoreAfterPlayerTeleportEvent(event), 0);
Bukkit.getScheduler().scheduleSyncDelayedTask(MassiveCore.get(), new EventMassiveCoreAfterPlayerTeleport(event), 0);
}
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
public void after(PlayerRespawnEvent event)
{
Bukkit.getScheduler().scheduleSyncDelayedTask(MCore.get(), new MCoreAfterPlayerRespawnEvent(event, event.getPlayer().getLocation()), 0);
Bukkit.getScheduler().scheduleSyncDelayedTask(MassiveCore.get(), new EventMassiveCoreAfterPlayerRespawn(event, event.getPlayer().getLocation()), 0);
}
// -------------------------------------------- //
@ -255,7 +255,7 @@ public class MCoreEngineMain extends EngineAbstract
{
// 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.get(), new Runnable()
Bukkit.getScheduler().scheduleSyncDelayedTask(MassiveCore.get(), new Runnable()
{
@Override
public void run()
@ -272,13 +272,13 @@ public class MCoreEngineMain extends EngineAbstract
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
public void leaveEventKickCall(PlayerKickEvent event)
{
new MCorePlayerLeaveEvent(event.getPlayer(), true, "kick", event.getReason()).run();
new EventMassiveCorePlayerLeave(event.getPlayer(), true, "kick", event.getReason()).run();
}
@EventHandler(priority = EventPriority.MONITOR)
public void leaveEventQuitCall(PlayerQuitEvent event)
{
new MCorePlayerLeaveEvent(event.getPlayer(), false, "quit", null).run();
new EventMassiveCorePlayerLeave(event.getPlayer(), false, "quit", null).run();
}
@EventHandler(priority = EventPriority.MONITOR)
@ -286,12 +286,12 @@ public class MCoreEngineMain extends EngineAbstract
{
// 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.get(), new Runnable()
Bukkit.getScheduler().scheduleSyncDelayedTask(MassiveCore.get(), new Runnable()
{
@Override
public void run()
{
MCorePlayerLeaveEvent.player2event.remove(name);
EventMassiveCorePlayerLeave.player2event.remove(name);
}
});
}
@ -303,14 +303,14 @@ public class MCoreEngineMain extends EngineAbstract
@EventHandler(priority = EventPriority.LOWEST, ignoreCancelled = true)
public void syncOnPlayerLogin(PlayerLoginEvent event)
{
//MCore.get().log("LOWEST syncOnPlayerLogin", event.getPlayer().getName());
//MassiveCore.get().log("LOWEST syncOnPlayerLogin", event.getPlayer().getName());
this.syncAllForPlayer(event.getPlayer());
}
@EventHandler(priority = EventPriority.MONITOR)
public void syncOnPlayerLeave(MCorePlayerLeaveEvent event)
public void syncOnPlayerLeave(EventMassiveCorePlayerLeave event)
{
//MCore.get().log("MONITOR syncOnPlayerLeave", event.getPlayer().getName());
//MassiveCore.get().log("MONITOR syncOnPlayerLeave", event.getPlayer().getName());
this.syncAllForPlayer(event.getPlayer());
}

View File

@ -1,4 +1,4 @@
package com.massivecraft.mcore;
package com.massivecraft.massivecore;
import java.util.HashMap;
import java.util.List;
@ -17,17 +17,17 @@ import org.bukkit.inventory.meta.BookMeta;
import org.bukkit.inventory.meta.ItemMeta;
import org.bukkit.plugin.Plugin;
import com.massivecraft.mcore.util.IdUtil;
import com.massivecraft.mcore.util.Txt;
import com.massivecraft.massivecore.util.IdUtil;
import com.massivecraft.massivecore.util.Txt;
public class MCoreEngineVariable extends EngineAbstract
public class MassiveCoreEngineVariable extends EngineAbstract
{
// -------------------------------------------- //
// INSTANCE & CONSTRUCT
// -------------------------------------------- //
private static MCoreEngineVariable i = new MCoreEngineVariable();
public static MCoreEngineVariable get() { return i; }
private static MassiveCoreEngineVariable i = new MassiveCoreEngineVariable();
public static MassiveCoreEngineVariable get() { return i; }
// -------------------------------------------- //
// OVERRIDE
@ -36,7 +36,7 @@ public class MCoreEngineVariable extends EngineAbstract
@Override
public Plugin getPlugin()
{
return MCore.get();
return MassiveCore.get();
}
// -------------------------------------------- //
@ -87,17 +87,17 @@ public class MCoreEngineVariable extends EngineAbstract
public static String variableBook(Player player, String message)
{
// If we are using this variable ...
if (!MCoreConf.get().usingVariableBook) return message;
if (!MassiveCoreMConf.get().usingVariableBook) return message;
// ... get the variable content ...
String content = getBookText(player);
if (content == null) return message;
// ... check use permission ...
if (!MCorePerm.VARIABLE_BOOK.has(player, false)) return message;
if (!MassiveCorePerm.VARIABLE_BOOK.has(player, false)) return message;
// ... and replace.
return StringUtils.replace(message, MCoreConf.get().variableBook, content);
return StringUtils.replace(message, MassiveCoreMConf.get().variableBook, content);
}
// -------------------------------------------- //
@ -124,16 +124,16 @@ public class MCoreEngineVariable extends EngineAbstract
public static String variableBuffer(Player player, String message)
{
// If we are using this variable ...
if (!MCoreConf.get().usingVariableBuffer) return message;
if (!MassiveCoreMConf.get().usingVariableBuffer) return message;
// ... get the variable content ...
String content = getBuffer(player);
if (content == null) return message;
// ... check use permission ...
if (!MCorePerm.VARIABLE_BUFFER.has(player, false)) return message;
if (!MassiveCorePerm.VARIABLE_BUFFER.has(player, false)) return message;
// ... and replace.
return StringUtils.replace(message, MCoreConf.get().variableBuffer, content);
return StringUtils.replace(message, MassiveCoreMConf.get().variableBuffer, content);
}
}

View File

@ -1,4 +1,4 @@
package com.massivecraft.mcore;
package com.massivecraft.massivecore;
import java.util.Collections;
import java.util.Set;
@ -12,14 +12,14 @@ import org.bukkit.event.world.WorldLoadEvent;
import org.bukkit.event.world.WorldUnloadEvent;
import org.bukkit.plugin.Plugin;
public class MCoreEngineWorldNameSet extends EngineAbstract
public class MassiveCoreEngineWorldNameSet extends EngineAbstract
{
// -------------------------------------------- //
// INSTANCE & CONSTRUCT
// -------------------------------------------- //
private static MCoreEngineWorldNameSet i = new MCoreEngineWorldNameSet();
public static MCoreEngineWorldNameSet get() { return i; }
private static MassiveCoreEngineWorldNameSet i = new MassiveCoreEngineWorldNameSet();
public static MassiveCoreEngineWorldNameSet get() { return i; }
// -------------------------------------------- //
// OVERRIDE
@ -28,7 +28,7 @@ public class MCoreEngineWorldNameSet extends EngineAbstract
@Override
public Plugin getPlugin()
{
return MCore.get();
return MassiveCore.get();
}
@Override

View File

@ -1,4 +1,4 @@
package com.massivecraft.mcore;
package com.massivecraft.massivecore;
import java.util.ArrayList;
import java.util.List;
@ -6,31 +6,31 @@ import java.util.Map;
import org.bukkit.permissions.Permissible;
import com.massivecraft.mcore.store.Entity;
import com.massivecraft.mcore.util.MUtil;
import com.massivecraft.mcore.util.PermUtil;
import com.massivecraft.mcore.xlib.mongodb.WriteConcern;
import com.massivecraft.massivecore.store.Entity;
import com.massivecraft.massivecore.util.MUtil;
import com.massivecraft.massivecore.util.PermUtil;
import com.massivecraft.massivecore.xlib.mongodb.WriteConcern;
public class MCoreConf extends Entity<MCoreConf>
public class MassiveCoreMConf extends Entity<MassiveCoreMConf>
{
// -------------------------------------------- //
// META
// -------------------------------------------- //
protected static transient MCoreConf i;
public static MCoreConf get() { return i; }
protected static transient MassiveCoreMConf i;
public static MassiveCoreMConf get() { return i; }
// -------------------------------------------- //
// FIELDS
// -------------------------------------------- //
public List<String> aliasesOuterMCore = MUtil.list("mcore");
public List<String> aliasesOuterMassiveCore = MUtil.list("massivecore", "mcore", "massivec", "mc");
public List<String> aliasesOuterMCoreUsys = MUtil.list("usys");
public List<String> aliasesOuterMassiveCoreUsys = MUtil.list("usys");
public List<String> aliasesOuterMCoreMStore = MUtil.list("mstore");
public List<String> aliasesOuterMassiveCoreStore = MUtil.list("massivestore", "mstore");
public List<String> aliasesOuterMCoreBuffer = MUtil.list("buffer");
public List<String> aliasesOuterMassiveCoreBuffer = MUtil.list("buffer");
public boolean usingRecipientChatEvent = true;
@ -52,7 +52,7 @@ public class MCoreConf extends Entity<MCoreConf>
}
public Map<String, Integer> permissionToTpdelay = MUtil.map(
"mcore.notpdelay", 0,
"massivecore.notpdelay", 0,
"default", 10
);

View File

@ -0,0 +1,38 @@
package com.massivecraft.massivecore;
import com.massivecraft.massivecore.MassiveCore;
import com.massivecraft.massivecore.store.Coll;
import com.massivecraft.massivecore.store.MStore;
public class MassiveCoreMConfColl extends Coll<MassiveCoreMConf>
{
// -------------------------------------------- //
// INSTANCE & CONSTRUCT
// -------------------------------------------- //
private static MassiveCoreMConfColl i = new MassiveCoreMConfColl();
public static MassiveCoreMConfColl get() { return i; }
private MassiveCoreMConfColl()
{
super("massivecore_mconf", MassiveCoreMConf.class, MStore.getDb(ConfServer.dburi), MassiveCore.get());
}
// -------------------------------------------- //
// OVERRIDE
// -------------------------------------------- //
@Override
public void init()
{
super.init();
MassiveCoreMConf.i = this.get(MassiveCore.INSTANCE, true);
}
@Override
public synchronized void loadFromRemote(Object oid)
{
super.loadFromRemote(oid);
if ( ! this.inited()) return;
}
}

View File

@ -1,10 +1,10 @@
package com.massivecraft.mcore;
package com.massivecraft.massivecore;
import org.bukkit.permissions.Permissible;
import com.massivecraft.mcore.util.PermUtil;
import com.massivecraft.massivecore.util.PermUtil;
public enum MCorePerm
public enum MassiveCorePerm
{
// -------------------------------------------- //
// ENUM
@ -15,10 +15,10 @@ public enum MCorePerm
ID("id"),
VERSION("version"),
HEARSOUND("hearsound"),
MSTORE("mstore"),
MSTORE_STATS("mstore.stats"),
MSTORE_LISTCOLLS("mstore.listcolls"),
MSTORE_COPYDB("mstore.copydb"),
STORE("store"),
STORE_STATS("store.stats"),
STORE_LISTCOLLS("store.listcolls"),
STORE_COPYDB("store.copydb"),
USYS("usys"),
USYS_MULTIVERSE("usys.multiverse"),
USYS_MULTIVERSE_LIST("usys.multiverse.list"),
@ -57,9 +57,9 @@ public enum MCorePerm
// CONSTRUCT
// -------------------------------------------- //
MCorePerm(final String permissionNode)
MassiveCorePerm(final String permissionNode)
{
this.node = "mcore."+permissionNode;
this.node = "massivecore."+permissionNode;
}
// -------------------------------------------- //

View File

@ -1,15 +1,15 @@
package com.massivecraft.mcore;
package com.massivecraft.massivecore;
import java.io.File;
public class TaskDeleteFiles implements Runnable
public class MassiveCoreTaskDeleteFiles implements Runnable
{
// -------------------------------------------- //
// INSTANCE & CONSTRUCT
// -------------------------------------------- //
private static TaskDeleteFiles i = new TaskDeleteFiles();
public static TaskDeleteFiles get() { return i; }
private static MassiveCoreTaskDeleteFiles i = new MassiveCoreTaskDeleteFiles();
public static MassiveCoreTaskDeleteFiles get() { return i; }
// -------------------------------------------- //
// OVERRIDE
@ -18,7 +18,7 @@ public class TaskDeleteFiles implements Runnable
@Override
public void run()
{
for (String deleteFile : MCoreConf.get().deleteFiles)
for (String deleteFile : MassiveCoreMConf.get().deleteFiles)
{
File file = new File(deleteFile);
file.delete();

View File

@ -1,4 +1,4 @@
package com.massivecraft.mcore;
package com.massivecraft.massivecore;
import java.util.logging.Level;
import java.util.logging.Logger;
@ -9,14 +9,14 @@ import org.bukkit.command.ConsoleCommandSender;
import org.bukkit.event.Listener;
import org.bukkit.plugin.java.JavaPlugin;
import com.massivecraft.mcore.integration.Integration;
import com.massivecraft.mcore.integration.IntegrationFeatures;
import com.massivecraft.mcore.store.Coll;
import com.massivecraft.mcore.util.Txt;
import com.massivecraft.mcore.xlib.gson.Gson;
import com.massivecraft.mcore.xlib.gson.GsonBuilder;
import com.massivecraft.massivecore.integration.IntegrationGlue;
import com.massivecraft.massivecore.integration.Integration;
import com.massivecraft.massivecore.store.Coll;
import com.massivecraft.massivecore.util.Txt;
import com.massivecraft.massivecore.xlib.gson.Gson;
import com.massivecraft.massivecore.xlib.gson.GsonBuilder;
public abstract class MPlugin extends JavaPlugin implements Listener
public abstract class MassivePlugin extends JavaPlugin implements Listener
{
// Gson
public Gson gson;
@ -80,7 +80,7 @@ public abstract class MPlugin extends JavaPlugin implements Listener
public GsonBuilder getGsonBuilder()
{
return MCore.getMCoreGsonBuilder();
return MassiveCore.getMassiveCoreGsonBuilder();
}
// -------------------------------------------- //
@ -93,11 +93,11 @@ public abstract class MPlugin extends JavaPlugin implements Listener
Bukkit.getPluginManager().disablePlugin(this);
}
public void integrate(IntegrationFeatures... features)
public void integrate(Integration... features)
{
for (IntegrationFeatures f : features)
for (Integration f : features)
{
new Integration(this, f);
new IntegrationGlue(this, f);
}
}

View File

@ -1,4 +1,4 @@
package com.massivecraft.mcore;
package com.massivecraft.massivecore;
import java.util.List;

View File

@ -1,4 +1,4 @@
package com.massivecraft.mcore;
package com.massivecraft.massivecore;
import org.bukkit.Bukkit;
import org.bukkit.plugin.Plugin;

View File

@ -1,4 +1,4 @@
package com.massivecraft.mcore;
package com.massivecraft.massivecore;
import java.util.HashMap;
import java.util.HashSet;
@ -8,9 +8,9 @@ import java.util.Map.Entry;
import java.util.Set;
import java.util.TreeSet;
import com.massivecraft.mcore.cmd.arg.ARUniverse;
import com.massivecraft.mcore.store.Entity;
import com.massivecraft.mcore.util.MUtil;
import com.massivecraft.massivecore.cmd.arg.ARUniverse;
import com.massivecraft.massivecore.store.Entity;
import com.massivecraft.massivecore.util.MUtil;
public class Multiverse extends Entity<Multiverse>
{
@ -64,7 +64,7 @@ public class Multiverse extends Entity<Multiverse>
public Set<String> newUniverse(String universe)
{
if (universe.equals(MCore.DEFAULT)) return null;
if (universe.equals(MassiveCore.DEFAULT)) return null;
Set<String> ret = this.uw.get(universe);
if (ret == null)
{
@ -83,7 +83,7 @@ public class Multiverse extends Entity<Multiverse>
{
Set<String> ret = new TreeSet<String>();
ret.addAll(this.uw.keySet());
ret.add(MCore.DEFAULT);
ret.add(MassiveCore.DEFAULT);
return ret;
}
@ -95,7 +95,7 @@ public class Multiverse extends Entity<Multiverse>
Set<String> worlds = entry.getValue();
if (worlds.contains(worldName)) return universe;
}
return MCore.DEFAULT;
return MassiveCore.DEFAULT;
}
public String getUniverse(Object worldNameExtractable)
@ -120,7 +120,7 @@ public class Multiverse extends Entity<Multiverse>
{
if (this.getUniverseForWorldName(worldName).equals(universe)) return false;
this.removeWorld(worldName);
if (!universe.equals(MCore.DEFAULT))
if (!universe.equals(MassiveCore.DEFAULT))
{
this.newUniverse(universe).add(worldName);
}

View File

@ -1,7 +1,7 @@
package com.massivecraft.mcore;
package com.massivecraft.massivecore;
import com.massivecraft.mcore.store.Coll;
import com.massivecraft.mcore.store.MStore;
import com.massivecraft.massivecore.store.Coll;
import com.massivecraft.massivecore.store.MStore;
public class MultiverseColl extends Coll<Multiverse>
{
@ -13,7 +13,7 @@ public class MultiverseColl extends Coll<Multiverse>
public static MultiverseColl get() { return i; }
private MultiverseColl()
{
super("mcore_multiverse", Multiverse.class, MStore.getDb("default"), MCore.get());
super("massivecore_multiverse", Multiverse.class, MStore.getDb("default"), MassiveCore.get());
}
// -------------------------------------------- //
@ -26,7 +26,7 @@ public class MultiverseColl extends Coll<Multiverse>
super.init();
// Ensure the default multiverse exits
this.get(MCore.DEFAULT, true);
this.get(MassiveCore.DEFAULT, true);
}
}

View File

@ -23,11 +23,11 @@
*/
/*
This version has been slightly modified for usage in the MCore library.
This version has been slightly modified for usage in the MassiveCore library.
Check out the original at: https://github.com/paour/natorder/blob/master/NaturalOrderComparator.java
*/
package com.massivecraft.mcore;
package com.massivecraft.massivecore;
import java.util.*;

View File

@ -1,4 +1,4 @@
package com.massivecraft.mcore;
package com.massivecraft.massivecore;
public interface Predictate<T>
{

View File

@ -1,4 +1,4 @@
package com.massivecraft.mcore;
package com.massivecraft.massivecore;
import java.util.ArrayList;
import java.util.Arrays;

View File

@ -1,6 +1,6 @@
package com.massivecraft.mcore;
package com.massivecraft.massivecore;
import com.massivecraft.mcore.store.Entity;
import com.massivecraft.massivecore.store.Entity;
public class PredictateIsntDefaultEntity implements Predictate<Entity<?>>
{

View File

@ -1,4 +1,4 @@
package com.massivecraft.mcore;
package com.massivecraft.massivecore;
public interface Prioritized
{

View File

@ -1,4 +1,4 @@
package com.massivecraft.mcore;
package com.massivecraft.massivecore;
import java.util.Comparator;

View File

@ -1,11 +1,11 @@
package com.massivecraft.mcore;
package com.massivecraft.massivecore;
import java.util.Collections;
import java.util.Map;
import java.util.Map.Entry;
import com.massivecraft.mcore.util.MUtil;
import com.massivecraft.mcore.util.Txt;
import com.massivecraft.massivecore.util.MUtil;
import com.massivecraft.massivecore.util.Txt;
public class Progressbar
{

View File

@ -1,4 +1,4 @@
package com.massivecraft.mcore;
package com.massivecraft.massivecore;
import java.util.Comparator;

View File

@ -1,12 +1,12 @@
package com.massivecraft.mcore;
package com.massivecraft.massivecore;
import java.io.File;
import org.bukkit.plugin.Plugin;
import com.massivecraft.mcore.store.accessor.Accessor;
import com.massivecraft.mcore.util.DiscUtil;
import com.massivecraft.mcore.xlib.gson.Gson;
import com.massivecraft.massivecore.store.accessor.Accessor;
import com.massivecraft.massivecore.util.DiscUtil;
import com.massivecraft.massivecore.xlib.gson.Gson;
public class SimpleConfig
{
@ -42,11 +42,11 @@ public class SimpleConfig
private Gson getGson()
{
if (this.plugin instanceof MPlugin)
if (this.plugin instanceof MassivePlugin)
{
return ((MPlugin)this.plugin).gson;
return ((MassivePlugin)this.plugin).gson;
}
return MCore.gson;
return MassiveCore.gson;
}
protected static boolean contentRequestsDefaults(String content)

View File

@ -1,4 +1,4 @@
package com.massivecraft.mcore;
package com.massivecraft.massivecore;
import java.io.Serializable;
import java.util.Collection;
@ -7,7 +7,7 @@ import org.bukkit.Location;
import org.bukkit.Sound;
import org.bukkit.entity.Player;
import com.massivecraft.mcore.cmd.arg.ARSound;
import com.massivecraft.massivecore.cmd.arg.ARSound;
public final class SoundEffect implements Cloneable, Serializable
{

View File

@ -1,8 +1,8 @@
package com.massivecraft.mcore;
package com.massivecraft.massivecore;
import java.io.Serializable;
import com.massivecraft.mcore.util.MUtil;
import com.massivecraft.massivecore.util.MUtil;
public class Triple<A, B, C> implements Cloneable, Serializable
{

View File

@ -1,4 +1,4 @@
package com.massivecraft.mcore.adapter;
package com.massivecraft.massivecore.adapter;
import java.util.ArrayList;
import java.util.Collection;
@ -10,11 +10,11 @@ import org.bukkit.Color;
import org.bukkit.FireworkEffect;
import org.bukkit.FireworkEffect.Type;
import com.massivecraft.mcore.util.MUtil;
import com.massivecraft.mcore.xlib.gson.JsonArray;
import com.massivecraft.mcore.xlib.gson.JsonElement;
import com.massivecraft.mcore.xlib.gson.JsonObject;
import com.massivecraft.mcore.xlib.gson.JsonPrimitive;
import com.massivecraft.massivecore.util.MUtil;
import com.massivecraft.massivecore.xlib.gson.JsonArray;
import com.massivecraft.massivecore.xlib.gson.JsonElement;
import com.massivecraft.massivecore.xlib.gson.JsonObject;
import com.massivecraft.massivecore.xlib.gson.JsonPrimitive;
public class FireworkEffectAdapter
{

View File

@ -1,4 +1,4 @@
package com.massivecraft.mcore.adapter;
package com.massivecraft.massivecore.adapter;
import java.lang.reflect.Type;
@ -8,16 +8,16 @@ import org.bukkit.inventory.Inventory;
import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.PlayerInventory;
import com.massivecraft.mcore.MCore;
import com.massivecraft.mcore.inventory.MCorePlayerInventory;
import com.massivecraft.mcore.xlib.gson.JsonDeserializationContext;
import com.massivecraft.mcore.xlib.gson.JsonDeserializer;
import com.massivecraft.mcore.xlib.gson.JsonElement;
import com.massivecraft.mcore.xlib.gson.JsonObject;
import com.massivecraft.mcore.xlib.gson.JsonParseException;
import com.massivecraft.mcore.xlib.gson.JsonPrimitive;
import com.massivecraft.mcore.xlib.gson.JsonSerializationContext;
import com.massivecraft.mcore.xlib.gson.JsonSerializer;
import com.massivecraft.massivecore.MassiveCore;
import com.massivecraft.massivecore.inventory.MassiveCorePlayerInventory;
import com.massivecraft.massivecore.xlib.gson.JsonDeserializationContext;
import com.massivecraft.massivecore.xlib.gson.JsonDeserializer;
import com.massivecraft.massivecore.xlib.gson.JsonElement;
import com.massivecraft.massivecore.xlib.gson.JsonObject;
import com.massivecraft.massivecore.xlib.gson.JsonParseException;
import com.massivecraft.massivecore.xlib.gson.JsonPrimitive;
import com.massivecraft.massivecore.xlib.gson.JsonSerializationContext;
import com.massivecraft.massivecore.xlib.gson.JsonSerializer;
/**
* This is my Gson adapter for Inventories.
@ -90,7 +90,7 @@ public class InventoryAdapter implements JsonDeserializer<Inventory>, JsonSerial
itemStack = psrc.getHelmet();
if (itemStack != null)
{
jsonItemStack = MCore.gson.toJsonTree(itemStack, ItemStack.class);
jsonItemStack = MassiveCore.gson.toJsonTree(itemStack, ItemStack.class);
jsonInventory.add(HELMET, jsonItemStack);
}
@ -98,7 +98,7 @@ public class InventoryAdapter implements JsonDeserializer<Inventory>, JsonSerial
itemStack = psrc.getChestplate();
if (itemStack != null)
{
jsonItemStack = MCore.gson.toJsonTree(itemStack, ItemStack.class);
jsonItemStack = MassiveCore.gson.toJsonTree(itemStack, ItemStack.class);
jsonInventory.add(CHESTPLATE, jsonItemStack);
}
@ -106,7 +106,7 @@ public class InventoryAdapter implements JsonDeserializer<Inventory>, JsonSerial
itemStack = psrc.getLeggings();
if (itemStack != null)
{
jsonItemStack = MCore.gson.toJsonTree(itemStack, ItemStack.class);
jsonItemStack = MassiveCore.gson.toJsonTree(itemStack, ItemStack.class);
jsonInventory.add(LEGGINGS, jsonItemStack);
}
@ -114,7 +114,7 @@ public class InventoryAdapter implements JsonDeserializer<Inventory>, JsonSerial
itemStack = psrc.getBoots();
if (itemStack != null)
{
jsonItemStack = MCore.gson.toJsonTree(itemStack, ItemStack.class);
jsonItemStack = MassiveCore.gson.toJsonTree(itemStack, ItemStack.class);
jsonInventory.add(BOOTS, jsonItemStack);
}
}
@ -128,7 +128,7 @@ public class InventoryAdapter implements JsonDeserializer<Inventory>, JsonSerial
for (int i = 0; i < itemStacks.length; i++)
{
itemStack = itemStacks[i];
jsonItemStack = MCore.gson.toJsonTree(itemStack, ItemStack.class);
jsonItemStack = MassiveCore.gson.toJsonTree(itemStack, ItemStack.class);
if (jsonItemStack == null) continue;
jsonInventory.add(String.valueOf(i), jsonItemStack);
}
@ -162,14 +162,14 @@ public class InventoryAdapter implements JsonDeserializer<Inventory>, JsonSerial
size = 36;
// This is a PlayerInventory
ret = new CraftInventoryPlayer(new MCorePlayerInventory());
ret = new CraftInventoryPlayer(new MassiveCorePlayerInventory());
PlayerInventory pret = (PlayerInventory)ret;
// helmet
if (jsonInventory.has(HELMET))
{
jsonItemStack = jsonInventory.get(HELMET);
itemStack = MCore.gson.fromJson(jsonItemStack, ItemStack.class);
itemStack = MassiveCore.gson.fromJson(jsonItemStack, ItemStack.class);
pret.setHelmet(itemStack);
}
@ -177,7 +177,7 @@ public class InventoryAdapter implements JsonDeserializer<Inventory>, JsonSerial
if (jsonInventory.has(CHESTPLATE))
{
jsonItemStack = jsonInventory.get(CHESTPLATE);
itemStack = MCore.gson.fromJson(jsonItemStack, ItemStack.class);
itemStack = MassiveCore.gson.fromJson(jsonItemStack, ItemStack.class);
pret.setChestplate(itemStack);
}
@ -185,7 +185,7 @@ public class InventoryAdapter implements JsonDeserializer<Inventory>, JsonSerial
if (jsonInventory.has(LEGGINGS))
{
jsonItemStack = jsonInventory.get(LEGGINGS);
itemStack = MCore.gson.fromJson(jsonItemStack, ItemStack.class);
itemStack = MassiveCore.gson.fromJson(jsonItemStack, ItemStack.class);
pret.setLeggings(itemStack);
}
@ -193,7 +193,7 @@ public class InventoryAdapter implements JsonDeserializer<Inventory>, JsonSerial
if (jsonInventory.has(BOOTS))
{
jsonItemStack = jsonInventory.get(BOOTS);
itemStack = MCore.gson.fromJson(jsonItemStack, ItemStack.class);
itemStack = MassiveCore.gson.fromJson(jsonItemStack, ItemStack.class);
pret.setBoots(itemStack);
}
}
@ -213,7 +213,7 @@ public class InventoryAdapter implements JsonDeserializer<Inventory>, JsonSerial
// Fetch the jsonItemStack or mark it as empty and continue
String stackIdx = String.valueOf(i);
jsonItemStack = jsonInventory.get(stackIdx);
itemStack = MCore.gson.fromJson(jsonItemStack, ItemStack.class);
itemStack = MassiveCore.gson.fromJson(jsonItemStack, ItemStack.class);
itemStacks[i] = itemStack;
}
ret.setContents(itemStacks);

View File

@ -1,4 +1,4 @@
package com.massivecraft.mcore.adapter;
package com.massivecraft.massivecore.adapter;
import java.lang.reflect.Type;
import java.util.ArrayList;
@ -26,15 +26,15 @@ import org.bukkit.inventory.meta.Repairable;
import org.bukkit.inventory.meta.SkullMeta;
import org.bukkit.potion.PotionEffect;
import com.massivecraft.mcore.xlib.gson.JsonArray;
import com.massivecraft.mcore.xlib.gson.JsonDeserializationContext;
import com.massivecraft.mcore.xlib.gson.JsonDeserializer;
import com.massivecraft.mcore.xlib.gson.JsonElement;
import com.massivecraft.mcore.xlib.gson.JsonObject;
import com.massivecraft.mcore.xlib.gson.JsonParseException;
import com.massivecraft.mcore.xlib.gson.JsonPrimitive;
import com.massivecraft.mcore.xlib.gson.JsonSerializationContext;
import com.massivecraft.mcore.xlib.gson.JsonSerializer;
import com.massivecraft.massivecore.xlib.gson.JsonArray;
import com.massivecraft.massivecore.xlib.gson.JsonDeserializationContext;
import com.massivecraft.massivecore.xlib.gson.JsonDeserializer;
import com.massivecraft.massivecore.xlib.gson.JsonElement;
import com.massivecraft.massivecore.xlib.gson.JsonObject;
import com.massivecraft.massivecore.xlib.gson.JsonParseException;
import com.massivecraft.massivecore.xlib.gson.JsonPrimitive;
import com.massivecraft.massivecore.xlib.gson.JsonSerializationContext;
import com.massivecraft.massivecore.xlib.gson.JsonSerializer;
/**
* This is a GSON serializer/deserializer for the Bukkit ItemStack. Why not use

View File

@ -1,13 +1,13 @@
package com.massivecraft.mcore.adapter;
package com.massivecraft.massivecore.adapter;
import java.lang.reflect.Type;
import com.massivecraft.mcore.xlib.gson.JsonDeserializationContext;
import com.massivecraft.mcore.xlib.gson.JsonDeserializer;
import com.massivecraft.mcore.xlib.gson.JsonElement;
import com.massivecraft.mcore.xlib.gson.JsonParseException;
import com.massivecraft.mcore.xlib.gson.JsonSerializationContext;
import com.massivecraft.mcore.xlib.gson.JsonSerializer;
import com.massivecraft.massivecore.xlib.gson.JsonDeserializationContext;
import com.massivecraft.massivecore.xlib.gson.JsonDeserializer;
import com.massivecraft.massivecore.xlib.gson.JsonElement;
import com.massivecraft.massivecore.xlib.gson.JsonParseException;
import com.massivecraft.massivecore.xlib.gson.JsonSerializationContext;
import com.massivecraft.massivecore.xlib.gson.JsonSerializer;
public class JsonElementAdapter implements JsonDeserializer<JsonElement>, JsonSerializer<JsonElement>
{

View File

@ -1,13 +1,13 @@
package com.massivecraft.mcore.adapter;
package com.massivecraft.massivecore.adapter;
import com.massivecraft.mcore.xlib.gson.Gson;
import com.massivecraft.mcore.xlib.gson.TypeAdapter;
import com.massivecraft.mcore.xlib.gson.TypeAdapterFactory;
import com.massivecraft.mcore.xlib.gson.annotations.SerializedName;
import com.massivecraft.mcore.xlib.gson.reflect.TypeToken;
import com.massivecraft.mcore.xlib.gson.stream.JsonReader;
import com.massivecraft.mcore.xlib.gson.stream.JsonToken;
import com.massivecraft.mcore.xlib.gson.stream.JsonWriter;
import com.massivecraft.massivecore.xlib.gson.Gson;
import com.massivecraft.massivecore.xlib.gson.TypeAdapter;
import com.massivecraft.massivecore.xlib.gson.TypeAdapterFactory;
import com.massivecraft.massivecore.xlib.gson.annotations.SerializedName;
import com.massivecraft.massivecore.xlib.gson.reflect.TypeToken;
import com.massivecraft.massivecore.xlib.gson.stream.JsonReader;
import com.massivecraft.massivecore.xlib.gson.stream.JsonToken;
import com.massivecraft.massivecore.xlib.gson.stream.JsonWriter;
import java.io.IOException;
import java.util.HashMap;
@ -15,10 +15,10 @@ import java.util.Map;
/**
* This type adapter and factory handles modified Java Enums.
* It's based upon: https://github.com/MassiveCraft/mcore/blob/91f9ec7c0c7d9a11a35db905be520f5cf6b6743e/src/com/massivecraft/mcore/xlib/gson/internal/bind/TypeAdapters.java#L670
* It's based upon: https://github.com/MassiveCraft/MassiveCore/blob/91f9ec7c0c7d9a11a35db905be520f5cf6b6743e/src/com/massivecraft/MassiveCore/xlib/gson/internal/bind/TypeAdapters.java#L670
* The only change is the try-catch around the annotation code.
*
* https://github.com/MassiveCraft/mcore/pull/62
* https://github.com/MassiveCraft/MassiveCore/pull/62
*
* # Problem
* The problem that was occurring is Forge modifies Vanilla Minecraft Enums
@ -47,12 +47,12 @@ public final class ModdedEnumTypeAdapter<T extends Enum<T>> extends TypeAdapter<
public ModdedEnumTypeAdapter(Class<T> classOfT) {
for (T constant : classOfT.getEnumConstants()) {
String name = constant.name();
try { // MCore - Ignore when the field can't be found since modified enums won't have it.
try { // MassiveCore - Ignore when the field can't be found since modified enums won't have it.
SerializedName annotation = classOfT.getField(name).getAnnotation(SerializedName.class);
if (annotation != null) {
name = annotation.value();
}
} catch (NoSuchFieldException ex) {} // MCore
} catch (NoSuchFieldException ex) {} // MassiveCore
nameToConstant.put(name, constant);
constantToName.put(constant, name);
}

View File

@ -1,15 +1,15 @@
package com.massivecraft.mcore.adapter;
package com.massivecraft.massivecore.adapter;
import java.lang.reflect.Type;
import com.massivecraft.mcore.xlib.bson.types.ObjectId;
import com.massivecraft.mcore.xlib.gson.JsonDeserializationContext;
import com.massivecraft.mcore.xlib.gson.JsonDeserializer;
import com.massivecraft.mcore.xlib.gson.JsonElement;
import com.massivecraft.mcore.xlib.gson.JsonParseException;
import com.massivecraft.mcore.xlib.gson.JsonPrimitive;
import com.massivecraft.mcore.xlib.gson.JsonSerializationContext;
import com.massivecraft.mcore.xlib.gson.JsonSerializer;
import com.massivecraft.massivecore.xlib.bson.types.ObjectId;
import com.massivecraft.massivecore.xlib.gson.JsonDeserializationContext;
import com.massivecraft.massivecore.xlib.gson.JsonDeserializer;
import com.massivecraft.massivecore.xlib.gson.JsonElement;
import com.massivecraft.massivecore.xlib.gson.JsonParseException;
import com.massivecraft.massivecore.xlib.gson.JsonPrimitive;
import com.massivecraft.massivecore.xlib.gson.JsonSerializationContext;
import com.massivecraft.massivecore.xlib.gson.JsonSerializer;
public class ObjectIdAdapter implements JsonDeserializer<ObjectId>, JsonSerializer<ObjectId>
{

View File

@ -1,15 +1,15 @@
package com.massivecraft.mcore.adapter;
package com.massivecraft.massivecore.adapter;
import java.lang.reflect.Type;
import org.bukkit.inventory.PlayerInventory;
import com.massivecraft.mcore.xlib.gson.JsonDeserializationContext;
import com.massivecraft.mcore.xlib.gson.JsonDeserializer;
import com.massivecraft.mcore.xlib.gson.JsonElement;
import com.massivecraft.mcore.xlib.gson.JsonParseException;
import com.massivecraft.mcore.xlib.gson.JsonSerializationContext;
import com.massivecraft.mcore.xlib.gson.JsonSerializer;
import com.massivecraft.massivecore.xlib.gson.JsonDeserializationContext;
import com.massivecraft.massivecore.xlib.gson.JsonDeserializer;
import com.massivecraft.massivecore.xlib.gson.JsonElement;
import com.massivecraft.massivecore.xlib.gson.JsonParseException;
import com.massivecraft.massivecore.xlib.gson.JsonSerializationContext;
import com.massivecraft.massivecore.xlib.gson.JsonSerializer;
public class PlayerInventoryAdapter implements JsonDeserializer<PlayerInventory>, JsonSerializer<PlayerInventory>
{

View File

@ -1,16 +1,16 @@
package com.massivecraft.mcore.adapter;
package com.massivecraft.massivecore.adapter;
import java.lang.reflect.Type;
import com.massivecraft.mcore.xlib.gson.JsonDeserializationContext;
import com.massivecraft.mcore.xlib.gson.JsonDeserializer;
import com.massivecraft.mcore.xlib.gson.JsonElement;
import com.massivecraft.mcore.xlib.gson.JsonNull;
import com.massivecraft.mcore.xlib.gson.JsonObject;
import com.massivecraft.mcore.xlib.gson.JsonParseException;
import com.massivecraft.mcore.xlib.gson.JsonPrimitive;
import com.massivecraft.mcore.xlib.gson.JsonSerializationContext;
import com.massivecraft.mcore.xlib.gson.JsonSerializer;
import com.massivecraft.massivecore.xlib.gson.JsonDeserializationContext;
import com.massivecraft.massivecore.xlib.gson.JsonDeserializer;
import com.massivecraft.massivecore.xlib.gson.JsonElement;
import com.massivecraft.massivecore.xlib.gson.JsonNull;
import com.massivecraft.massivecore.xlib.gson.JsonObject;
import com.massivecraft.massivecore.xlib.gson.JsonParseException;
import com.massivecraft.massivecore.xlib.gson.JsonPrimitive;
import com.massivecraft.massivecore.xlib.gson.JsonSerializationContext;
import com.massivecraft.massivecore.xlib.gson.JsonSerializer;
public class PolymorphicAdapter<T> implements JsonDeserializer<T>, JsonSerializer<T>
{

View File

@ -1,10 +1,10 @@
package com.massivecraft.mcore.adapter;
package com.massivecraft.massivecore.adapter;
import org.bukkit.potion.PotionEffect;
import org.bukkit.potion.PotionEffectType;
import com.massivecraft.mcore.xlib.gson.JsonElement;
import com.massivecraft.mcore.xlib.gson.JsonObject;
import com.massivecraft.massivecore.xlib.gson.JsonElement;
import com.massivecraft.massivecore.xlib.gson.JsonObject;
@SuppressWarnings("deprecation")
public class PotionEffectAdapter

View File

@ -1,15 +1,15 @@
package com.massivecraft.mcore.adapter;
package com.massivecraft.massivecore.adapter;
import java.lang.reflect.Type;
import java.util.UUID;
import com.massivecraft.mcore.xlib.gson.JsonDeserializationContext;
import com.massivecraft.mcore.xlib.gson.JsonDeserializer;
import com.massivecraft.mcore.xlib.gson.JsonElement;
import com.massivecraft.mcore.xlib.gson.JsonParseException;
import com.massivecraft.mcore.xlib.gson.JsonPrimitive;
import com.massivecraft.mcore.xlib.gson.JsonSerializationContext;
import com.massivecraft.mcore.xlib.gson.JsonSerializer;
import com.massivecraft.massivecore.xlib.gson.JsonDeserializationContext;
import com.massivecraft.massivecore.xlib.gson.JsonDeserializer;
import com.massivecraft.massivecore.xlib.gson.JsonElement;
import com.massivecraft.massivecore.xlib.gson.JsonParseException;
import com.massivecraft.massivecore.xlib.gson.JsonPrimitive;
import com.massivecraft.massivecore.xlib.gson.JsonSerializationContext;
import com.massivecraft.massivecore.xlib.gson.JsonSerializer;
public class UUIDAdapter implements JsonDeserializer<UUID>, JsonSerializer<UUID>
{

View File

@ -1,12 +1,12 @@
package com.massivecraft.mcore.cmd;
package com.massivecraft.massivecore.cmd;
import java.util.ArrayList;
import com.massivecraft.mcore.cmd.MCommand;
import com.massivecraft.mcore.cmd.arg.ARInteger;
import com.massivecraft.mcore.util.Txt;
import com.massivecraft.massivecore.cmd.MassiveCommand;
import com.massivecraft.massivecore.cmd.arg.ARInteger;
import com.massivecraft.massivecore.util.Txt;
public class HelpCommand extends MCommand
public class HelpCommand extends MassiveCommand
{
// -------------------------------------------- //
// INSTANCE & CONSTRUCT
@ -29,7 +29,7 @@ public class HelpCommand extends MCommand
public void perform()
{
if (this.getCommandChain().size() == 0) return;
MCommand parentCommand = this.getCommandChain().get(this.getCommandChain().size()-1);
MassiveCommand parentCommand = this.getCommandChain().get(this.getCommandChain().size()-1);
ArrayList<String> lines = new ArrayList<String>();
@ -38,7 +38,7 @@ public class HelpCommand extends MCommand
lines.add(Txt.parse("<a>#<i> "+helpline));
}
for (MCommand subCommand : parentCommand.getSubCommands())
for (MassiveCommand subCommand : parentCommand.getSubCommands())
{
if (subCommand.visibleTo(sender))
{

View File

@ -1,4 +1,4 @@
package com.massivecraft.mcore.cmd;
package com.massivecraft.massivecore.cmd;
import java.util.*;
import java.util.Map.Entry;
@ -6,21 +6,21 @@ import java.util.Map.Entry;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import com.massivecraft.mcore.Lang;
import com.massivecraft.mcore.cmd.arg.ArgReader;
import com.massivecraft.mcore.cmd.arg.ArgResult;
import com.massivecraft.mcore.cmd.req.Req;
import com.massivecraft.mcore.cmd.req.ReqHasPerm;
import com.massivecraft.mcore.mixin.Mixin;
import com.massivecraft.mcore.util.PermUtil;
import com.massivecraft.mcore.util.Txt;
import com.massivecraft.massivecore.Lang;
import com.massivecraft.massivecore.cmd.arg.ArgReader;
import com.massivecraft.massivecore.cmd.arg.ArgResult;
import com.massivecraft.massivecore.cmd.req.Req;
import com.massivecraft.massivecore.cmd.req.ReqHasPerm;
import com.massivecraft.massivecore.mixin.Mixin;
import com.massivecraft.massivecore.util.PermUtil;
import com.massivecraft.massivecore.util.Txt;
public class MCommand
public class MassiveCommand
{
// -------------------------------------------- //
// REGISTER
// -------------------------------------------- //
// MCore commands are a bit special when it comes to registration.
// MassiveCore commands are a bit special when it comes to registration.
//
// I want my users to be able to edit the command aliases and I want
// them to be able to do so during server runtime without having to use the /reload command.
@ -29,12 +29,12 @@ public class MCommand
// As such these config files are polled for changes and loaded into the server automatically.
// If someone changed the command aliases we must update all Bukkit command registrations.
//
// In order to achieve this we run a task once a second (see com.massivecraft.mcore.EngineCommandRegistration).
// In order to achieve this we run a task once a second (see com.massivecraft.massivecore.MassiveCoreEngineCommandRegistration).
// This task unregisters /all/ registered MCommands and then register them all again.
// When registering again we use the fresh and current aliases.
private static transient Set<MCommand> registeredCommands = new LinkedHashSet<MCommand>();
public static Set<MCommand> getRegisteredCommands() { return registeredCommands; }
private static transient Set<MassiveCommand> registeredCommands = new LinkedHashSet<MassiveCommand>();
public static Set<MassiveCommand> getRegisteredCommands() { return registeredCommands; }
public void register() { getRegisteredCommands().add(this); }
public void unregister() { getRegisteredCommands().remove(this); }
@ -44,11 +44,11 @@ public class MCommand
// FIELD: subCommands
// The sub-commands to this command
protected List<MCommand> subCommands;
public List<MCommand> getSubCommands() { return this.subCommands; }
public void setSubCommands(List<MCommand> subCommands) { this.subCommands = subCommands; }
protected List<MassiveCommand> subCommands;
public List<MassiveCommand> getSubCommands() { return this.subCommands; }
public void setSubCommands(List<MassiveCommand> subCommands) { this.subCommands = subCommands; }
public void addSubCommand(MCommand subCommand)
public void addSubCommand(MassiveCommand subCommand)
{
subCommand.commandChain.addAll(this.commandChain);
subCommand.commandChain.add(this);
@ -170,9 +170,9 @@ public class MCommand
// FIELD: commandChain
// The command chain used to execute this command
protected List<MCommand> commandChain = new ArrayList<MCommand>();
public List<MCommand> getCommandChain() { return this.commandChain; }
public void setCommandChain(List<MCommand> commandChain) { this.commandChain = commandChain; }
protected List<MassiveCommand> commandChain = new ArrayList<MassiveCommand>();
public List<MassiveCommand> getCommandChain() { return this.commandChain; }
public void setCommandChain(List<MassiveCommand> commandChain) { this.commandChain = commandChain; }
// FIELDS: sender, me, senderIsConsole
public CommandSender sender;
@ -183,9 +183,9 @@ public class MCommand
// CONSTRUCTORS AND EXECUTOR
// -------------------------------------------- //
public MCommand()
public MassiveCommand()
{
this.subCommands = new ArrayList<MCommand>();
this.subCommands = new ArrayList<MassiveCommand>();
this.aliases = new ArrayList<String>();
@ -205,7 +205,7 @@ public class MCommand
}
// The commandChain is a list of the parent command chain used to get to this command.
public void execute(CommandSender sender, List<String> args, List<MCommand> commandChain)
public void execute(CommandSender sender, List<String> args, List<MassiveCommand> commandChain)
{
// Set the execution-time specific variables
this.sender = sender;
@ -225,7 +225,7 @@ public class MCommand
// Is there a matching sub command?
if (args.size() > 0)
{
for (MCommand subCommand: this.getSubCommands())
for (MassiveCommand subCommand: this.getSubCommands())
{
for (String alias : subCommand.getAliases())
{
@ -249,7 +249,7 @@ public class MCommand
public void execute(CommandSender sender, List<String> args)
{
execute(sender, args, new ArrayList<MCommand>());
execute(sender, args, new ArrayList<MassiveCommand>());
}
// This is where the command action is performed.
@ -340,11 +340,11 @@ public class MCommand
// HELP AND USAGE INFORMATION
// -------------------------------------------- //
public String getUseageTemplate(List<MCommand> commandChain, boolean addDesc, boolean onlyFirstAlias, CommandSender sender)
public String getUseageTemplate(List<MassiveCommand> commandChain, boolean addDesc, boolean onlyFirstAlias, CommandSender sender)
{
StringBuilder ret = new StringBuilder();
List<MCommand> commands = new ArrayList<MCommand>(commandChain);
List<MassiveCommand> commands = new ArrayList<MassiveCommand>(commandChain);
commands.add(this);
String commandGoodColor = Txt.parse("<c>");
@ -354,10 +354,10 @@ public class MCommand
ret.append('/');
boolean first = true;
Iterator<MCommand> iter = commands.iterator();
Iterator<MassiveCommand> iter = commands.iterator();
while(iter.hasNext())
{
MCommand mc = iter.next();
MassiveCommand mc = iter.next();
if (sender != null && !mc.requirementsAreMet(sender, false))
{
ret.append(commandBadColor);
@ -422,12 +422,12 @@ public class MCommand
return ret.toString();
}
public String getUseageTemplate(List<MCommand> commandChain, boolean addDesc, boolean onlyFirstAlias)
public String getUseageTemplate(List<MassiveCommand> commandChain, boolean addDesc, boolean onlyFirstAlias)
{
return getUseageTemplate(commandChain, addDesc, onlyFirstAlias, null);
}
public String getUseageTemplate(List<MCommand> commandChain, boolean addDesc)
public String getUseageTemplate(List<MassiveCommand> commandChain, boolean addDesc)
{
return getUseageTemplate(commandChain, addDesc, false);
}

View File

@ -1,4 +1,4 @@
package com.massivecraft.mcore.cmd;
package com.massivecraft.massivecore.cmd;
import java.util.ArrayList;
import java.util.Arrays;
@ -9,24 +9,24 @@ import java.util.TreeSet;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import com.massivecraft.mcore.mixin.Mixin;
import com.massivecraft.mcore.util.IdUtil;
import com.massivecraft.mcore.util.Txt;
import com.massivecraft.massivecore.mixin.Mixin;
import com.massivecraft.massivecore.util.IdUtil;
import com.massivecraft.massivecore.util.Txt;
public class MCoreBukkitCommand extends Command
public class MassiveCoreBukkitCommand extends Command
{
// -------------------------------------------- //
// FIELDS
// -------------------------------------------- //
private final MCommand mcommand;
public MCommand getMcommand() { return this.mcommand; }
private final MassiveCommand mcommand;
public MassiveCommand getMcommand() { return this.mcommand; }
// -------------------------------------------- //
// CONSTRUCT
// -------------------------------------------- //
public MCoreBukkitCommand(String name, MCommand mcommand)
public MassiveCoreBukkitCommand(String name, MassiveCommand mcommand)
{
super(
name,

View File

@ -1,4 +1,4 @@
package com.massivecraft.mcore.cmd;
package com.massivecraft.massivecore.cmd;
import java.util.Collection;
import java.util.List;
@ -6,11 +6,11 @@ import java.util.List;
import org.bukkit.plugin.Plugin;
import org.bukkit.plugin.PluginDescriptionFile;
import com.massivecraft.mcore.cmd.MCommand;
import com.massivecraft.mcore.cmd.req.ReqHasPerm;
import com.massivecraft.mcore.util.Txt;
import com.massivecraft.massivecore.cmd.MassiveCommand;
import com.massivecraft.massivecore.cmd.req.ReqHasPerm;
import com.massivecraft.massivecore.util.Txt;
public class VersionCommand extends MCommand
public class VersionCommand extends MassiveCommand
{
// -------------------------------------------- //
// CONSTANTS

View File

@ -1,4 +1,4 @@
package com.massivecraft.mcore.cmd;
package com.massivecraft.massivecore.cmd;
public enum VisibilityMode
{

View File

@ -1,4 +1,4 @@
package com.massivecraft.mcore.cmd.arg;
package com.massivecraft.massivecore.cmd.arg;
import org.bukkit.command.CommandSender;

View File

@ -1,10 +1,10 @@
package com.massivecraft.mcore.cmd.arg;
package com.massivecraft.massivecore.cmd.arg;
import java.util.Collection;
import org.bukkit.command.CommandSender;
import com.massivecraft.mcore.util.Txt;
import com.massivecraft.massivecore.util.Txt;
public abstract class ARAbstractSelect<T> extends ArgReaderAbstract<T>
{

View File

@ -1,12 +1,12 @@
package com.massivecraft.mcore.cmd.arg;
package com.massivecraft.massivecore.cmd.arg;
import java.util.Collection;
import org.bukkit.command.CommandSender;
import com.massivecraft.mcore.Aspect;
import com.massivecraft.mcore.AspectColl;
import com.massivecraft.mcore.MCorePerm;
import com.massivecraft.massivecore.Aspect;
import com.massivecraft.massivecore.AspectColl;
import com.massivecraft.massivecore.MassiveCorePerm;
public class ARAspect extends ARAbstractSelect<Aspect>
{
@ -36,7 +36,7 @@ public class ARAspect extends ARAbstractSelect<Aspect>
@Override
public boolean canList(CommandSender sender)
{
return MCorePerm.USYS_ASPECT_LIST.has(sender, false);
return MassiveCorePerm.USYS_ASPECT_LIST.has(sender, false);
}
@Override

View File

@ -1,4 +1,4 @@
package com.massivecraft.mcore.cmd.arg;
package com.massivecraft.massivecore.cmd.arg;
import java.util.ArrayList;
import java.util.Collection;

View File

@ -1,4 +1,4 @@
package com.massivecraft.mcore.cmd.arg;
package com.massivecraft.massivecore.cmd.arg;
public class ARBoolean extends ARAbstractPrimitive<Boolean>
{

View File

@ -1,4 +1,4 @@
package com.massivecraft.mcore.cmd.arg;
package com.massivecraft.massivecore.cmd.arg;
public class ARByte extends ARAbstractPrimitive<Byte>
{

View File

@ -1,4 +1,4 @@
package com.massivecraft.mcore.cmd.arg;
package com.massivecraft.massivecore.cmd.arg;
import java.util.ArrayList;
import java.util.Collection;

View File

@ -1,10 +1,10 @@
package com.massivecraft.mcore.cmd.arg;
package com.massivecraft.massivecore.cmd.arg;
import java.util.Collection;
import org.bukkit.command.CommandSender;
import com.massivecraft.mcore.store.Coll;
import com.massivecraft.massivecore.store.Coll;
public class ARColl extends ARAbstractSelect<Coll<?>>
{

View File

@ -1,4 +1,4 @@
package com.massivecraft.mcore.cmd.arg;
package com.massivecraft.massivecore.cmd.arg;
import java.text.DateFormat;
import java.text.SimpleDateFormat;

View File

@ -1,11 +1,11 @@
package com.massivecraft.mcore.cmd.arg;
package com.massivecraft.massivecore.cmd.arg;
import java.util.Collection;
import org.bukkit.Difficulty;
import org.bukkit.command.CommandSender;
import com.massivecraft.mcore.util.MUtil;
import com.massivecraft.massivecore.util.MUtil;
public class ARDifficulty extends ARAbstractSelect<Difficulty>
{

View File

@ -1,4 +1,4 @@
package com.massivecraft.mcore.cmd.arg;
package com.massivecraft.massivecore.cmd.arg;
public class ARDouble extends ARAbstractPrimitive<Double>
{

View File

@ -1,4 +1,4 @@
package com.massivecraft.mcore.cmd.arg;
package com.massivecraft.massivecore.cmd.arg;
import java.util.ArrayList;
import java.util.Collection;

View File

@ -1,4 +1,4 @@
package com.massivecraft.mcore.cmd.arg;
package com.massivecraft.massivecore.cmd.arg;
import java.lang.reflect.Method;
import java.util.ArrayList;
@ -7,7 +7,7 @@ import java.util.List;
import org.bukkit.command.CommandSender;
import com.massivecraft.mcore.util.Txt;
import com.massivecraft.massivecore.util.Txt;
public class AREnum<T> extends ARAbstractSelect<T>
{

View File

@ -1,11 +1,11 @@
package com.massivecraft.mcore.cmd.arg;
package com.massivecraft.massivecore.cmd.arg;
import java.util.Collection;
import org.bukkit.World.Environment;
import org.bukkit.command.CommandSender;
import com.massivecraft.mcore.util.MUtil;
import com.massivecraft.massivecore.util.MUtil;
public class AREnvironment extends ARAbstractSelect<Environment>
{

View File

@ -1,4 +1,4 @@
package com.massivecraft.mcore.cmd.arg;
package com.massivecraft.massivecore.cmd.arg;
public class ARFloat extends ARAbstractPrimitive<Float>
{

View File

@ -1,11 +1,11 @@
package com.massivecraft.mcore.cmd.arg;
package com.massivecraft.massivecore.cmd.arg;
import java.util.Collection;
import org.bukkit.GameMode;
import org.bukkit.command.CommandSender;
import com.massivecraft.mcore.util.MUtil;
import com.massivecraft.massivecore.util.MUtil;
public class ARGameMode extends ARAbstractSelect<GameMode>
{

View File

@ -1,4 +1,4 @@
package com.massivecraft.mcore.cmd.arg;
package com.massivecraft.massivecore.cmd.arg;
public class ARInteger extends ARAbstractPrimitive<Integer>
{

View File

@ -1,4 +1,4 @@
package com.massivecraft.mcore.cmd.arg;
package com.massivecraft.massivecore.cmd.arg;
public class ARLong extends ARAbstractPrimitive<Long>
{

View File

@ -1,4 +1,4 @@
package com.massivecraft.mcore.cmd.arg;
package com.massivecraft.massivecore.cmd.arg;
import org.bukkit.Material;
import org.bukkit.command.CommandSender;

View File

@ -1,9 +1,9 @@
package com.massivecraft.mcore.cmd.arg;
package com.massivecraft.massivecore.cmd.arg;
import org.bukkit.command.CommandSender;
import com.massivecraft.mcore.util.TimeDiffUtil;
import com.massivecraft.mcore.util.Txt;
import com.massivecraft.massivecore.util.TimeDiffUtil;
import com.massivecraft.massivecore.util.Txt;
public class ARMillisDiff extends ArgReaderAbstract<Long>
{

View File

@ -1,12 +1,12 @@
package com.massivecraft.mcore.cmd.arg;
package com.massivecraft.massivecore.cmd.arg;
import java.util.Collection;
import org.bukkit.command.CommandSender;
import com.massivecraft.mcore.Multiverse;
import com.massivecraft.mcore.MultiverseColl;
import com.massivecraft.mcore.MCorePerm;
import com.massivecraft.massivecore.MassiveCorePerm;
import com.massivecraft.massivecore.Multiverse;
import com.massivecraft.massivecore.MultiverseColl;
public class ARMultiverse extends ARAbstractSelect<Multiverse>
{
@ -36,7 +36,7 @@ public class ARMultiverse extends ARAbstractSelect<Multiverse>
@Override
public boolean canList(CommandSender sender)
{
return MCorePerm.USYS_MULTIVERSE_LIST.has(sender, false);
return MassiveCorePerm.USYS_MULTIVERSE_LIST.has(sender, false);
}
@Override

View File

@ -1,4 +1,4 @@
package com.massivecraft.mcore.cmd.arg;
package com.massivecraft.massivecore.cmd.arg;
import org.bukkit.Bukkit;
import org.bukkit.command.CommandSender;

View File

@ -1,10 +1,10 @@
package com.massivecraft.mcore.cmd.arg;
package com.massivecraft.massivecore.cmd.arg;
import org.bukkit.entity.Player;
import com.massivecraft.mcore.store.SenderIdSource;
import com.massivecraft.mcore.store.SenderIdSourceMixinAllSenderIds;
import com.massivecraft.mcore.util.IdUtil;
import com.massivecraft.massivecore.store.SenderIdSource;
import com.massivecraft.massivecore.store.SenderIdSourceMixinAllSenderIds;
import com.massivecraft.massivecore.util.IdUtil;
public class ARPlayer extends ARSenderIdAbstractPredsource<Player>
{

View File

@ -1,10 +1,10 @@
package com.massivecraft.mcore.cmd.arg;
package com.massivecraft.massivecore.cmd.arg;
import org.bukkit.command.CommandSender;
import com.massivecraft.mcore.store.SenderIdSource;
import com.massivecraft.mcore.store.SenderIdSourceMixinAllSenderIds;
import com.massivecraft.mcore.util.IdUtil;
import com.massivecraft.massivecore.store.SenderIdSource;
import com.massivecraft.massivecore.store.SenderIdSourceMixinAllSenderIds;
import com.massivecraft.massivecore.util.IdUtil;
public class ARSender extends ARSenderIdAbstractPredsource<CommandSender>
{

View File

@ -1,9 +1,9 @@
package com.massivecraft.mcore.cmd.arg;
package com.massivecraft.massivecore.cmd.arg;
import com.massivecraft.mcore.store.SenderColl;
import com.massivecraft.mcore.store.SenderEntity;
import com.massivecraft.mcore.store.SenderIdSource;
import com.massivecraft.mcore.util.IdUtil;
import com.massivecraft.massivecore.store.SenderColl;
import com.massivecraft.massivecore.store.SenderEntity;
import com.massivecraft.massivecore.store.SenderIdSource;
import com.massivecraft.massivecore.util.IdUtil;
public class ARSenderEntity<T extends SenderEntity<T>> extends ARSenderIdAbstractPredsource<T>
{

View File

@ -1,8 +1,8 @@
package com.massivecraft.mcore.cmd.arg;
package com.massivecraft.massivecore.cmd.arg;
import com.massivecraft.mcore.store.SenderIdSource;
import com.massivecraft.mcore.store.SenderIdSourceMixinAllSenderIds;
import com.massivecraft.mcore.util.IdUtil;
import com.massivecraft.massivecore.store.SenderIdSource;
import com.massivecraft.massivecore.store.SenderIdSourceMixinAllSenderIds;
import com.massivecraft.massivecore.util.IdUtil;
public class ARSenderId extends ARSenderIdAbstractPredsource<String>
{

View File

@ -1,11 +1,11 @@
package com.massivecraft.mcore.cmd.arg;
package com.massivecraft.massivecore.cmd.arg;
import java.util.Collection;
import org.bukkit.command.CommandSender;
import com.massivecraft.mcore.util.IdUtil;
import com.massivecraft.mcore.util.Txt;
import com.massivecraft.massivecore.util.IdUtil;
import com.massivecraft.massivecore.util.Txt;
public abstract class ARSenderIdAbstract<T> extends ArgReaderAbstract<T>
{

View File

@ -1,11 +1,11 @@
package com.massivecraft.mcore.cmd.arg;
package com.massivecraft.massivecore.cmd.arg;
import java.util.Collection;
import java.util.TreeSet;
import org.bukkit.command.CommandSender;
import com.massivecraft.mcore.store.SenderIdSource;
import com.massivecraft.massivecore.store.SenderIdSource;
public abstract class ARSenderIdAbstractPredsource<T> extends ARSenderIdAbstract<T>
{

View File

@ -1,4 +1,4 @@
package com.massivecraft.mcore.cmd.arg;
package com.massivecraft.massivecore.cmd.arg;
import org.bukkit.Sound;
import org.bukkit.command.CommandSender;

View File

@ -1,9 +1,9 @@
package com.massivecraft.mcore.cmd.arg;
package com.massivecraft.massivecore.cmd.arg;
import org.bukkit.command.CommandSender;
import com.massivecraft.mcore.SoundEffect;
import com.massivecraft.mcore.util.Txt;
import com.massivecraft.massivecore.SoundEffect;
import com.massivecraft.massivecore.util.Txt;
public class ARSoundEffect extends ArgReaderAbstract<SoundEffect>
{

View File

@ -1,4 +1,4 @@
package com.massivecraft.mcore.cmd.arg;
package com.massivecraft.massivecore.cmd.arg;
import java.util.ArrayList;
import java.util.Arrays;
@ -6,8 +6,8 @@ import java.util.List;
import org.bukkit.command.CommandSender;
import com.massivecraft.mcore.SoundEffect;
import com.massivecraft.mcore.util.Txt;
import com.massivecraft.massivecore.SoundEffect;
import com.massivecraft.massivecore.util.Txt;
public class ARSoundEffects extends ArgReaderAbstract<List<SoundEffect>>
{

View File

@ -1,4 +1,4 @@
package com.massivecraft.mcore.cmd.arg;
package com.massivecraft.massivecore.cmd.arg;
public class ARString extends ARAbstractPrimitive<String>
{

View File

@ -1,12 +1,12 @@
package com.massivecraft.mcore.cmd.arg;
package com.massivecraft.massivecore.cmd.arg;
import java.util.ArrayList;
import java.util.Collection;
import org.bukkit.command.CommandSender;
import com.massivecraft.mcore.Multiverse;
import com.massivecraft.mcore.util.Txt;
import com.massivecraft.massivecore.Multiverse;
import com.massivecraft.massivecore.util.Txt;
public class ARUniverse extends ArgReaderAbstract<String>
{

View File

@ -1,4 +1,4 @@
package com.massivecraft.mcore.cmd.arg;
package com.massivecraft.massivecore.cmd.arg;
import org.bukkit.Bukkit;
import org.bukkit.World;

View File

@ -1,11 +1,11 @@
package com.massivecraft.mcore.cmd.arg;
package com.massivecraft.massivecore.cmd.arg;
import java.util.ArrayList;
import java.util.List;
import org.bukkit.command.CommandSender;
import com.massivecraft.mcore.mixin.Mixin;
import com.massivecraft.massivecore.mixin.Mixin;
public class ARWorldId extends ARAbstractSelect<String>
{

View File

@ -1,11 +1,11 @@
package com.massivecraft.mcore.cmd.arg;
package com.massivecraft.massivecore.cmd.arg;
import java.util.Collection;
import org.bukkit.WorldType;
import org.bukkit.command.CommandSender;
import com.massivecraft.mcore.util.MUtil;
import com.massivecraft.massivecore.util.MUtil;
public class ARWorldType extends ARAbstractSelect<WorldType>
{

View File

@ -1,4 +1,4 @@
package com.massivecraft.mcore.cmd.arg;
package com.massivecraft.massivecore.cmd.arg;
import org.bukkit.command.CommandSender;

View File

@ -1,4 +1,4 @@
package com.massivecraft.mcore.cmd.arg;
package com.massivecraft.massivecore.cmd.arg;
import org.bukkit.command.CommandSender;

View File

@ -1,4 +1,4 @@
package com.massivecraft.mcore.cmd.arg;
package com.massivecraft.massivecore.cmd.arg;
import org.bukkit.command.CommandSender;

View File

@ -1,8 +1,8 @@
package com.massivecraft.mcore.cmd.arg;
package com.massivecraft.massivecore.cmd.arg;
import org.bukkit.command.CommandSender;
import com.massivecraft.mcore.mixin.Mixin;
import com.massivecraft.massivecore.mixin.Mixin;
public class ArgPredictateStringIsOnlineSenderId implements ArgPredictate<String>
{

View File

@ -1,4 +1,4 @@
package com.massivecraft.mcore.cmd.arg;
package com.massivecraft.massivecore.cmd.arg;
import org.bukkit.command.CommandSender;

View File

@ -1,4 +1,4 @@
package com.massivecraft.mcore.cmd.arg;
package com.massivecraft.massivecore.cmd.arg;
import org.bukkit.command.CommandSender;

View File

@ -1,4 +1,4 @@
package com.massivecraft.mcore.cmd.arg;
package com.massivecraft.massivecore.cmd.arg;
import org.bukkit.command.CommandSender;

View File

@ -1,4 +1,4 @@
package com.massivecraft.mcore.cmd.arg;
package com.massivecraft.massivecore.cmd.arg;
import java.util.ArrayList;
import java.util.Arrays;

View File

@ -0,0 +1,42 @@
package com.massivecraft.massivecore.cmd.massivecore;
import com.massivecraft.massivecore.MassiveCore;
import com.massivecraft.massivecore.MassiveCorePerm;
import com.massivecraft.massivecore.cmd.MassiveCommand;
import com.massivecraft.massivecore.cmd.VersionCommand;
import com.massivecraft.massivecore.cmd.req.ReqHasPerm;
public class CmdMassiveCore extends MassiveCommand
{
// -------------------------------------------- //
// FIELDS
// -------------------------------------------- //
public CmdMassiveCoreUsys cmdMassiveCoreUsys = new CmdMassiveCoreUsys();
public CmdMassiveCoreStore cmdMassiveCoreMStore = new CmdMassiveCoreStore();
public CmdMassiveCoreId cmdMassiveCoreId = new CmdMassiveCoreId();
public CmdMassiveCoreTest cmdMassiveCoreTest = new CmdMassiveCoreTest();
public CmdMassiveCoreHearsound cmdMassiveCoreHearsound = new CmdMassiveCoreHearsound();
public CmdMassiveCoreBuffer cmdMassiveCoreBuffer = new CmdMassiveCoreBuffer();
public VersionCommand cmdMassiveCoreVersion = new VersionCommand(MassiveCore.get(), MassiveCorePerm.VERSION.node, "v", "version");
// -------------------------------------------- //
// CONSTRUCT
// -------------------------------------------- //
public CmdMassiveCore()
{
// SubCommands
this.addSubCommand(this.cmdMassiveCoreUsys);
this.addSubCommand(this.cmdMassiveCoreMStore);
this.addSubCommand(this.cmdMassiveCoreId);
this.addSubCommand(this.cmdMassiveCoreTest);
this.addSubCommand(this.cmdMassiveCoreHearsound);
this.addSubCommand(this.cmdMassiveCoreBuffer);
this.addSubCommand(this.cmdMassiveCoreVersion);
// Requirements
this.addRequirements(ReqHasPerm.get(MassiveCorePerm.BASECOMMAND.node));
}
}

View File

@ -0,0 +1,39 @@
package com.massivecraft.massivecore.cmd.massivecore;
import com.massivecraft.massivecore.MassiveCorePerm;
import com.massivecraft.massivecore.cmd.MassiveCommand;
import com.massivecraft.massivecore.cmd.req.ReqHasPerm;
public class CmdMassiveCoreBuffer extends MassiveCommand
{
// -------------------------------------------- //
// FIELDS
// -------------------------------------------- //
public CmdMassiveCoreBufferPrint cmdMassiveCoreBufferPrint = new CmdMassiveCoreBufferPrint();
public CmdMassiveCoreBufferClear cmdMassiveCoreBufferClear = new CmdMassiveCoreBufferClear();
public CmdMassiveCoreBufferSet cmdMassiveCoreBufferSet = new CmdMassiveCoreBufferSet();
public CmdMassiveCoreBufferAdd cmdMassiveCoreBufferAdd = new CmdMassiveCoreBufferAdd();
public CmdMassiveCoreBufferWhitespace cmdMassiveCoreBufferWhitespace = new CmdMassiveCoreBufferWhitespace();
// -------------------------------------------- //
// CONSTRUCT
// -------------------------------------------- //
public CmdMassiveCoreBuffer()
{
// SubCommands
this.addSubCommand(this.cmdMassiveCoreBufferPrint);
this.addSubCommand(this.cmdMassiveCoreBufferClear);
this.addSubCommand(this.cmdMassiveCoreBufferSet);
this.addSubCommand(this.cmdMassiveCoreBufferAdd);
this.addSubCommand(this.cmdMassiveCoreBufferWhitespace);
// Aliases
this.addAliases("buffer");
// Requirements
this.addRequirements(ReqHasPerm.get(MassiveCorePerm.BUFFER.node));
}
}

View File

@ -0,0 +1,44 @@
package com.massivecraft.massivecore.cmd.massivecore;
import com.massivecraft.massivecore.MassiveCoreEngineVariable;
import com.massivecraft.massivecore.MassiveCorePerm;
import com.massivecraft.massivecore.cmd.MassiveCommand;
import com.massivecraft.massivecore.cmd.req.ReqHasPerm;
public class CmdMassiveCoreBufferAdd extends MassiveCommand
{
// -------------------------------------------- //
// CONSTRUCT
// -------------------------------------------- //
public CmdMassiveCoreBufferAdd()
{
// Aliases
this.addAliases("a", "add");
// Args
this.addRequiredArg("string");
this.setErrorOnToManyArgs(false);
// Requirements
this.addRequirements(ReqHasPerm.get(MassiveCorePerm.BUFFER_ADD.node));
}
// -------------------------------------------- //
// OVERRIDE
// -------------------------------------------- //
@Override
public void perform()
{
String string = this.argConcatFrom(0);
if (string == null) return;
String buffer = MassiveCoreEngineVariable.getBuffer(sender);
buffer += string;
MassiveCoreEngineVariable.setBuffer(sender, buffer);
msg("<i>Buffer Add");
}
}

View File

@ -0,0 +1,35 @@
package com.massivecraft.massivecore.cmd.massivecore;
import com.massivecraft.massivecore.MassiveCoreEngineVariable;
import com.massivecraft.massivecore.MassiveCorePerm;
import com.massivecraft.massivecore.cmd.MassiveCommand;
import com.massivecraft.massivecore.cmd.req.ReqHasPerm;
public class CmdMassiveCoreBufferClear extends MassiveCommand
{
// -------------------------------------------- //
// CONSTRUCT
// -------------------------------------------- //
public CmdMassiveCoreBufferClear()
{
// Aliases
this.addAliases("c", "clear");
// Requirements
this.addRequirements(ReqHasPerm.get(MassiveCorePerm.BUFFER_CLEAR.node));
}
// -------------------------------------------- //
// OVERRIDE
// -------------------------------------------- //
@Override
public void perform()
{
MassiveCoreEngineVariable.setBuffer(sender, "");
msg("<i>Buffer Clear");
}
}

Some files were not shown because too many files have changed in this diff Show More