Skip to content

Commit

Permalink
Fix mcmmo command >:(
Browse files Browse the repository at this point in the history
  • Loading branch information
Fortifier42 committed Dec 28, 2015
1 parent fed7559 commit c2801e2
Showing 1 changed file with 3 additions and 3 deletions.
Expand Up @@ -101,15 +101,15 @@ else if (!scriptEntry.hasObject("type")
if (!scriptEntry.hasObject("type"))
throw new InvalidArgumentsException("Must specify a valid type!");

scriptEntry.defaultObject("state", State.TOGGLE)
scriptEntry.defaultObject("state", new Element("TOGGLE"))
.defaultObject("qty", new Element(-1));

}

@Override
public void execute(ScriptEntry scriptEntry) throws CommandExecutionException {

BukkitScriptEntryData scriptEntryData = (BukkitScriptEntryData) scriptEntry.getData();
BukkitScriptEntryData scriptEntryData = (BukkitScriptEntryData) scriptEntry.entryData;

// Get objects
Element action = scriptEntry.getElement("action");
Expand All @@ -122,7 +122,7 @@ public void execute(ScriptEntry scriptEntry) throws CommandExecutionException {
dPlayer player = scriptEntryData.getPlayer();

// Report to dB
dB.report(scriptEntry, getName(), action.debug() + type.debug() + state.debug() + qty.debug()
dB.report(scriptEntry, getName(), action.debug() + type.debug() + (state != null ? state.debug() : "") + qty.debug()
+ (party != null ? party.debug() : "") + (skill != null ? skill.debug() : ""));

switch (Action.valueOf(action.asString().toUpperCase())) {
Expand Down

0 comments on commit c2801e2

Please sign in to comment.