Skip to content

Commit

Permalink
organize command files a bit
Browse files Browse the repository at this point in the history
  • Loading branch information
mcmonkey4eva committed Jun 26, 2019
1 parent 30d8439 commit e638abc
Show file tree
Hide file tree
Showing 23 changed files with 55 additions and 48 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package net.aufdemrand.denizencore.objects;

import net.aufdemrand.denizencore.scripts.commands.core.Comparable;
import net.aufdemrand.denizencore.scripts.commands.queue.Comparable;
import net.aufdemrand.denizencore.scripts.queues.ScriptQueue;
import net.aufdemrand.denizencore.tags.Attribute;
import net.aufdemrand.denizencore.tags.TagContext;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
import net.aufdemrand.denizencore.interfaces.RegistrationableInstance;
import net.aufdemrand.denizencore.interfaces.dRegistry;
import net.aufdemrand.denizencore.scripts.commands.core.*;
import net.aufdemrand.denizencore.scripts.commands.file.FileCopyCommand;
import net.aufdemrand.denizencore.scripts.commands.file.LogCommand;
import net.aufdemrand.denizencore.scripts.commands.file.YamlCommand;
import net.aufdemrand.denizencore.scripts.commands.queue.*;
import net.aufdemrand.denizencore.utilities.CoreUtilities;
import net.aufdemrand.denizencore.utilities.debugging.dB;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package net.aufdemrand.denizencore.scripts.commands.core;
package net.aufdemrand.denizencore.scripts.commands.file;

import net.aufdemrand.denizencore.DenizenCore;
import net.aufdemrand.denizencore.exceptions.InvalidArgumentsException;
Expand All @@ -22,7 +22,7 @@ public class FileCopyCommand extends AbstractCommand implements Holdable {
// @Syntax filecopy [origin:<origin>] [destination:<destination>] (overwrite)
// @Required 2
// @Short Copies a file from one location to another.
// @Group core
// @Group file
//
// @Description
// Copies a file from one location to another.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package net.aufdemrand.denizencore.scripts.commands.core;
package net.aufdemrand.denizencore.scripts.commands.file;

import net.aufdemrand.denizencore.DenizenCore;
import net.aufdemrand.denizencore.exceptions.InvalidArgumentsException;
Expand All @@ -22,7 +22,7 @@ public class LogCommand extends AbstractCommand {
// @Syntax log [<text>] (type:{info}/severe/warning/fine/finer/finest/none/clear) [file:<name>]
// @Required 2
// @Short Logs some debugging info to a file.
// @Group core
// @Group file
//
// @Description
// This is a quick and simple way to store debugging information for admins to read.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package net.aufdemrand.denizencore.scripts.commands.core;
package net.aufdemrand.denizencore.scripts.commands.file;

import net.aufdemrand.denizencore.DenizenCore;
import net.aufdemrand.denizencore.exceptions.InvalidArgumentsException;
Expand Down Expand Up @@ -29,7 +29,7 @@ public class YamlCommand extends AbstractCommand implements Holdable {
// @Syntax yaml [create]/[load:<file> (fix_formatting)]/[loadtext:<text> (fix_formatting)]/[unload]/[savefile:<file>]/[copykey:<source key> <target key> (to_id:<name>)]/[set <key>([<#>])(:<action>):<value>] [id:<name>]
// @Required 2
// @Short Edits a YAML configuration file.
// @Group core
// @Group file
//
// @Description
// Edits a YAML configuration file.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package net.aufdemrand.denizencore.scripts.commands.core;
package net.aufdemrand.denizencore.scripts.commands.queue;

import net.aufdemrand.denizencore.exceptions.InvalidArgumentsException;
import net.aufdemrand.denizencore.scripts.ScriptEntry;
Expand All @@ -16,7 +16,7 @@ public class AsyncCommand extends BracedCommand implements Holdable {
// @Required 0
// @Short Runs commands asynchronously. Inverse of <@link command sync>. (WARNING: DO NOT USE. See description for safety warning!)
// @Warning Do NOT use this. This is VERY dangerous. It is added purely as a tech experiment, not something to use in serious code!
// @Group core
// @Group queue
//
// @Description
// Runs commands asynchronously. This means that anything executed within will run off the main
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package net.aufdemrand.denizencore.scripts.commands.core;
package net.aufdemrand.denizencore.scripts.commands.queue;

import net.aufdemrand.denizencore.exceptions.InvalidArgumentsException;
import net.aufdemrand.denizencore.objects.Element;
Expand All @@ -18,7 +18,7 @@ public class ChooseCommand extends BracedCommand {
// @Syntax choose [<option>] [<cases>]
// @Required 1
// @Short Chooses an option from the list of cases.
// @Group core
// @Group queue

// @Description
// Chooses an option from the list of cases.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package net.aufdemrand.denizencore.scripts.commands.core;
package net.aufdemrand.denizencore.scripts.commands.queue;

import net.aufdemrand.denizencore.DenizenCore;
import net.aufdemrand.denizencore.objects.Duration;
Expand Down Expand Up @@ -72,12 +72,12 @@ public static enum Logic {
REGULAR, NEGATIVE
}

Logic logic = Logic.REGULAR;
Bridge bridge = Bridge.FIRST;
Object comparable = null;
Operator operator = Operator.EQUALS;
Object comparedto = "true";
Boolean outcome = null;
public Logic logic = Logic.REGULAR;
public Bridge bridge = Bridge.FIRST;
public Object comparable = null;
public Operator operator = Operator.EQUALS;
public Object comparedto = "true";
public Boolean outcome = null;


public void setNegativeLogic() {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package net.aufdemrand.denizencore.scripts.commands.core;
package net.aufdemrand.denizencore.scripts.commands.queue;

import net.aufdemrand.denizencore.exceptions.InvalidArgumentsException;
import net.aufdemrand.denizencore.objects.Element;
Expand All @@ -23,7 +23,7 @@ public class DefineCommand extends AbstractCommand {
// @Syntax define [<id>](:<action>)[:<value>]
// @Required 1
// @Short Creates a temporary variable inside a script queue.
// @Group core
// @Group queue
//
// @Description
// Definitions are queue-level (or script-level) 'variables' that can be used throughout a script, once
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package net.aufdemrand.denizencore.scripts.commands.core;
package net.aufdemrand.denizencore.scripts.commands.queue;

import net.aufdemrand.denizencore.exceptions.InvalidArgumentsException;
import net.aufdemrand.denizencore.objects.Element;
Expand All @@ -16,7 +16,7 @@ public class DetermineCommand extends AbstractCommand {
// @Syntax determine (passively) [<value>]
// @Required 1
// @Short Sets the outcome of a world event.
// @Group core
// @Group queue
//
// @Description
// TODO: Document Command Details
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package net.aufdemrand.denizencore.scripts.commands.core;
package net.aufdemrand.denizencore.scripts.commands.queue;

import net.aufdemrand.denizencore.exceptions.InvalidArgumentsException;
import net.aufdemrand.denizencore.scripts.ScriptEntry;
Expand All @@ -12,13 +12,16 @@ public class ElseCommand extends AbstractCommand {
// @Syntax else (if <comparison logic>)
// @Required 0
// @Short Helper command for usage with the if command.
// @Group core
// @Group queue
// @Video /denizen/vids/Alternate/Dynamic%20Actions:%20The%20If%20Command
//
// @Description
// A helper command for ':' syntax if commands.
// See IF command documentation.
//
// @Tags
// See IF command documentation.
//
// @Usage
// See IF command documentation.
// -->
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package net.aufdemrand.denizencore.scripts.commands.core;
package net.aufdemrand.denizencore.scripts.commands.queue;

import net.aufdemrand.denizencore.exceptions.InvalidArgumentsException;
import net.aufdemrand.denizencore.objects.Element;
Expand All @@ -18,7 +18,7 @@ public class ForeachCommand extends BracedCommand {
// @Syntax foreach [stop/next/<object>|...] (as:<name>) [<commands>]
// @Required 1
// @Short Loops through a dList, running a set of commands for each item.
// @Group core
// @Group queue
// @Video /denizen/vids/Loops
//
// @Description
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package net.aufdemrand.denizencore.scripts.commands.core;
package net.aufdemrand.denizencore.scripts.commands.queue;

import net.aufdemrand.denizencore.exceptions.InvalidArgumentsException;
import net.aufdemrand.denizencore.objects.Element;
Expand All @@ -16,7 +16,7 @@ public class GotoCommand extends AbstractCommand {
// @Syntax goto [<name>]
// @Required 1
// @Short Jump forward to a location marked by <@link command mark>.
// @Group core
// @Group queue
//
// @Description
// Jumps forward to a marked location in the script.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package net.aufdemrand.denizencore.scripts.commands.core;
package net.aufdemrand.denizencore.scripts.commands.queue;

import net.aufdemrand.denizencore.DenizenCore;
import net.aufdemrand.denizencore.exceptions.InvalidArgumentsException;
Expand All @@ -19,7 +19,7 @@ public class IfCommand extends BracedCommand {
// @Syntax if [<value>] (!)(<operator> <value>) (&&/|| ...) [<commands>] (else <commands>)
// @Required 1
// @Short Compares values, and runs one script if they match, or a different script if they don't match.
// @Group core
// @Group queue
// @Video /denizen/vids/Alternate/Dynamic%20Actions:%20The%20If%20Command
//
// @Description
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package net.aufdemrand.denizencore.scripts.commands.core;
package net.aufdemrand.denizencore.scripts.commands.queue;

import net.aufdemrand.denizencore.exceptions.InvalidArgumentsException;
import net.aufdemrand.denizencore.objects.Element;
Expand All @@ -18,7 +18,7 @@ public class InjectCommand extends AbstractCommand {
// @Required 1
// @Short Runs a script in the current ScriptQueue.
// @Video /denizen/vids/Run%20And%20Inject
// @Group core
// @Group queue
//
// @Description
// Injects a script into the current ScriptQueue.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package net.aufdemrand.denizencore.scripts.commands.core;
package net.aufdemrand.denizencore.scripts.commands.queue;

import net.aufdemrand.denizencore.exceptions.InvalidArgumentsException;
import net.aufdemrand.denizencore.objects.Element;
Expand All @@ -14,7 +14,7 @@ public class MarkCommand extends AbstractCommand {
// @Syntax mark [<name>]
// @Required 1
// @Short Marks a location for <@link command goto>.
// @Group core
// @Group queue
//
// @Description
// Marks a location for the goto command. See <@link command goto> for details.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package net.aufdemrand.denizencore.scripts.commands.core;
package net.aufdemrand.denizencore.scripts.commands.queue;

import net.aufdemrand.denizencore.exceptions.InvalidArgumentsException;
import net.aufdemrand.denizencore.objects.Duration;
Expand All @@ -16,7 +16,7 @@ public class QueueCommand extends AbstractCommand {
// @Syntax queue (<queue>) [clear/stop/pause/resume/delay:<#>]
// @Required 1
// @Short Modifies the current state of a script queue.
// @Group core
// @Group queue
//
// @Description
// Allows queues to be modified during their run. It can also be used to modify other queues currently running
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package net.aufdemrand.denizencore.scripts.commands.core;
package net.aufdemrand.denizencore.scripts.commands.queue;

import net.aufdemrand.denizencore.exceptions.InvalidArgumentsException;
import net.aufdemrand.denizencore.objects.Element;
Expand All @@ -18,7 +18,7 @@ public class RandomCommand extends BracedCommand {
// @Syntax random [<#>/<commands>]
// @Required 0
// @Short Selects a random choice from the following script commands.
// @Group core
// @Group queue
//
// @Description
// The random command picks one of the following script command
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package net.aufdemrand.denizencore.scripts.commands.core;
package net.aufdemrand.denizencore.scripts.commands.queue;

import net.aufdemrand.denizencore.exceptions.InvalidArgumentsException;
import net.aufdemrand.denizencore.objects.Element;
Expand All @@ -16,7 +16,7 @@ public class RepeatCommand extends BracedCommand {
// @Syntax repeat [stop/next/<amount>] [<commands>] (as:<name>)
// @Required 1
// @Short Runs a series of braced commands several times.
// @Group core
// @Group queue
// @Video /denizen/vids/Loops
//
// @Description
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package net.aufdemrand.denizencore.scripts.commands.core;
package net.aufdemrand.denizencore.scripts.commands.queue;

import net.aufdemrand.denizencore.DenizenCore;
import net.aufdemrand.denizencore.exceptions.InvalidArgumentsException;
Expand All @@ -21,7 +21,7 @@ public class RunCommand extends AbstractCommand implements Holdable {
// @Required 1
// @Short Runs a script in a new ScriptQueue.
// @Video /denizen/vids/Run%20And%20Inject
// @Group core
// @Group queue
//
// @Description
// Runs a new script queue, either in the local script or in a different task script.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package net.aufdemrand.denizencore.scripts.commands.core;
package net.aufdemrand.denizencore.scripts.commands.queue;

import net.aufdemrand.denizencore.DenizenCore;
import net.aufdemrand.denizencore.exceptions.InvalidArgumentsException;
Expand All @@ -19,7 +19,7 @@ public class SyncCommand extends BracedCommand implements Holdable {
// @Syntax sync [<commands>]
// @Required 0
// @Short Runs commands synchronously. Inverse of <@link command async>.
// @Group core
// @Group queue
//
// @Description
// Runs commands synchronously. This means that anything executed within will run on the
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package net.aufdemrand.denizencore.scripts.commands.core;
package net.aufdemrand.denizencore.scripts.commands.queue;

import net.aufdemrand.denizencore.exceptions.InvalidArgumentsException;
import net.aufdemrand.denizencore.objects.Duration;
Expand All @@ -16,7 +16,7 @@ public class WaitCommand extends AbstractCommand {
// @Syntax wait (<duration>) (queue:<name>)
// @Required 0
// @Short Delays a script for a specified amount of time.
// @Group core
// @Group queue
//
// @Description
// Pauses the script queue for the duration specified. If no duration is specified it defaults to 3 seconds.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package net.aufdemrand.denizencore.scripts.commands.core;
package net.aufdemrand.denizencore.scripts.commands.queue;

import net.aufdemrand.denizencore.DenizenCore;
import net.aufdemrand.denizencore.exceptions.InvalidArgumentsException;
Expand All @@ -18,7 +18,7 @@ public class WhileCommand extends BracedCommand {
// @Syntax while [stop/next/[<value>] (!)(<operator> <value>) (&&/|| ...)] [<commands>]
// @Required 1
// @Short Runs a series of braced commands until the tag returns false.
// @Group core
// @Group queue
// @Video /denizen/vids/Loops
//
// @Description
Expand Down

0 comments on commit e638abc

Please sign in to comment.