forked from 2009Scape/Server
Added initial version
This commit is contained in:
commit
b452bd670c
13290 changed files with 1178433 additions and 0 deletions
52
Management-Server/src/main/java/ms/system/util/Command.java
Normal file
52
Management-Server/src/main/java/ms/system/util/Command.java
Normal file
|
|
@ -0,0 +1,52 @@
|
|||
package ms.system.util;
|
||||
|
||||
/**
|
||||
* Represents a command.
|
||||
* @author Emperor
|
||||
*
|
||||
*/
|
||||
public abstract class Command {
|
||||
|
||||
/**
|
||||
* The command name.
|
||||
*/
|
||||
private final String name;
|
||||
|
||||
/**
|
||||
* The command info.
|
||||
*/
|
||||
private final String info;
|
||||
|
||||
/**
|
||||
* Constructs a new {@code Command} {@code Object}.
|
||||
* @param name The command name.
|
||||
* @param info The command info.
|
||||
*/
|
||||
public Command(String name, String info) {
|
||||
this.name = name;
|
||||
this.info = info;
|
||||
}
|
||||
|
||||
/**
|
||||
* Runs the command.
|
||||
* @param args The arguments.
|
||||
*/
|
||||
public abstract void run(String...args);
|
||||
|
||||
/**
|
||||
* Gets the name value.
|
||||
* @return The name.
|
||||
*/
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the info value.
|
||||
* @return The info.
|
||||
*/
|
||||
public String getInfo() {
|
||||
return info;
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue