mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-22 21:26:45 +01:00
Fix scripting
This commit is contained in:
parent
bfd9b53555
commit
6165469e76
@ -182,10 +182,6 @@ public class PS {
|
|||||||
PS.debug("Incompatible version of WorldEdit, please upgrade: http://builds.enginehub.org/job/worldedit?branch=master");
|
PS.debug("Incompatible version of WorldEdit, please upgrade: http://builds.enginehub.org/job/worldedit?branch=master");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Commands
|
|
||||||
if (Settings.Enabled_Components.COMMANDS) {
|
|
||||||
this.IMP.registerCommands();
|
|
||||||
}
|
|
||||||
if (Settings.Enabled_Components.EVENTS) {
|
if (Settings.Enabled_Components.EVENTS) {
|
||||||
this.IMP.registerPlayerEvents();
|
this.IMP.registerPlayerEvents();
|
||||||
this.IMP.registerInventoryEvents();
|
this.IMP.registerInventoryEvents();
|
||||||
@ -232,6 +228,10 @@ public class PS {
|
|||||||
AbstractTitle.TITLE_CLASS = this.IMP.initTitleManager();
|
AbstractTitle.TITLE_CLASS = this.IMP.initTitleManager();
|
||||||
// Chat
|
// Chat
|
||||||
ChatManager.manager = this.IMP.initChatManager();
|
ChatManager.manager = this.IMP.initChatManager();
|
||||||
|
// Commands
|
||||||
|
if (Settings.Enabled_Components.COMMANDS) {
|
||||||
|
this.IMP.registerCommands();
|
||||||
|
}
|
||||||
// Economy
|
// Economy
|
||||||
if (Settings.Enabled_Components.ECONOMY) {
|
if (Settings.Enabled_Components.ECONOMY) {
|
||||||
TaskManager.runTask(new Runnable() {
|
TaskManager.runTask(new Runnable() {
|
||||||
|
@ -60,11 +60,15 @@ public abstract class PlotPlayer implements CommandCaller, OfflinePlotPlayer {
|
|||||||
* @param value
|
* @param value
|
||||||
*/
|
*/
|
||||||
public void setMeta(String key, Object value) {
|
public void setMeta(String key, Object value) {
|
||||||
|
if (value == null) {
|
||||||
|
deleteMeta(key);
|
||||||
|
} else {
|
||||||
if (this.meta == null) {
|
if (this.meta == null) {
|
||||||
this.meta = new ConcurrentHashMap<>();
|
this.meta = new ConcurrentHashMap<>();
|
||||||
}
|
}
|
||||||
this.meta.put(key, value);
|
this.meta.put(key, value);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the session metadata for a key.
|
* Get the session metadata for a key.
|
||||||
|
@ -59,6 +59,9 @@ public abstract class Command {
|
|||||||
this.required = required;
|
this.required = required;
|
||||||
this.category = cat;
|
this.category = cat;
|
||||||
this.aliases = Arrays.asList(id);
|
this.aliases = Arrays.asList(id);
|
||||||
|
if (this.parent != null) {
|
||||||
|
this.parent.register(this);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public Command(Command parent, boolean isStatic) {
|
public Command(Command parent, boolean isStatic) {
|
||||||
|
Loading…
Reference in New Issue
Block a user