2014-09-22 13:02:14 +02:00
|
|
|
/*
|
|
|
|
* Copyright (c) IntellectualCrafters - 2014.
|
|
|
|
* You are not allowed to distribute and/or monetize any of our intellectual property.
|
|
|
|
* IntellectualCrafters is not affiliated with Mojang AB. Minecraft is a trademark of Mojang AB.
|
|
|
|
*
|
|
|
|
* >> File = Command.java
|
|
|
|
* >> Generated by: Citymonstret at 2014-08-09 01:41
|
|
|
|
*/
|
|
|
|
|
|
|
|
package com.intellectualcrafters.plot.commands;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Created by Citymonstret on 2014-08-03.
|
2014-09-24 14:21:43 +02:00
|
|
|
*
|
2014-09-22 13:02:14 +02:00
|
|
|
* @author Citymonstret
|
|
|
|
*/
|
|
|
|
public enum Command {
|
2014-09-27 02:52:12 +02:00
|
|
|
|
|
|
|
// TODO new commands
|
|
|
|
// (allow a plot to be transferred from one plot to another of the same size)
|
|
|
|
// - /plot copy
|
|
|
|
// - /plot paste
|
|
|
|
// (economy)
|
|
|
|
// - /plot buy
|
|
|
|
// - /plot sell <value>
|
|
|
|
// (Rating system) (ratings can be stored as the average, and number of ratings)
|
|
|
|
// - /plot rate <number out of 10>
|
|
|
|
// - /plot list <some parameter to list the most popular, and highest rated plots>
|
2014-09-30 13:17:55 +02:00
|
|
|
KICK("kick","k"),
|
2014-09-22 13:02:14 +02:00
|
|
|
/**
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
HELPERS("helpers", "hp"),
|
|
|
|
/**
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
DENIED("denied", "dn"),
|
|
|
|
/**
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
CLAIM("claim", "c"),
|
2014-09-26 02:22:25 +02:00
|
|
|
/**
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
MERGE("merge", "m"),
|
2014-09-22 13:02:14 +02:00
|
|
|
/**
|
2014-09-26 06:01:30 +02:00
|
|
|
*
|
|
|
|
*/
|
2014-09-26 06:17:52 +02:00
|
|
|
UNLINK("unlink", "u"),
|
|
|
|
/**
|
|
|
|
*
|
|
|
|
*/
|
2014-09-26 06:01:30 +02:00
|
|
|
CLEAR("clear", "clear", new CommandPermission("plots.clear")),
|
|
|
|
/**
|
|
|
|
*
|
2014-09-22 13:02:14 +02:00
|
|
|
*/
|
2014-09-26 06:01:30 +02:00
|
|
|
DELETE("delete", "d", new CommandPermission("plots.clear.delete")),
|
2014-09-22 13:02:14 +02:00
|
|
|
/**
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
DEBUG("debug", "database", new CommandPermission("plots.admin")),
|
|
|
|
/**
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
HOME("home", "h"),
|
|
|
|
/**
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
INFO("info", "i"),
|
|
|
|
/**
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
LIST("list", "l"),
|
|
|
|
/**
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
SET("set", "s"),
|
|
|
|
/**
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
TP("tp", "tp");
|
|
|
|
/**
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
private String command;
|
|
|
|
/**
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
private String alias;
|
|
|
|
/**
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
private CommandPermission permission;
|
|
|
|
|
|
|
|
/**
|
2014-09-24 14:21:43 +02:00
|
|
|
*
|
2014-09-22 13:02:14 +02:00
|
|
|
* @param command
|
|
|
|
*/
|
|
|
|
Command(String command) {
|
|
|
|
this.command = command;
|
|
|
|
this.alias = command;
|
|
|
|
this.permission = new CommandPermission("plots." + command);
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2014-09-24 14:21:43 +02:00
|
|
|
*
|
2014-09-22 13:02:14 +02:00
|
|
|
* @param command
|
|
|
|
* @param permission
|
|
|
|
*/
|
|
|
|
Command(String command, CommandPermission permission) {
|
|
|
|
this.command = command;
|
|
|
|
this.permission = permission;
|
|
|
|
this.alias = command;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2014-09-24 14:21:43 +02:00
|
|
|
*
|
2014-09-22 13:02:14 +02:00
|
|
|
* @param command
|
|
|
|
* @param alias
|
|
|
|
*/
|
|
|
|
Command(String command, String alias) {
|
|
|
|
this.command = command;
|
|
|
|
this.alias = alias;
|
|
|
|
this.permission = new CommandPermission("plots." + command);
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2014-09-24 14:21:43 +02:00
|
|
|
*
|
2014-09-22 13:02:14 +02:00
|
|
|
* @param Command
|
|
|
|
* @param alias
|
|
|
|
* @param permission
|
|
|
|
*/
|
|
|
|
Command(String command, String alias, CommandPermission permission) {
|
|
|
|
this.command = command;
|
|
|
|
this.alias = alias;
|
|
|
|
this.permission = permission;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2014-09-24 14:21:43 +02:00
|
|
|
*
|
2014-09-22 13:02:14 +02:00
|
|
|
* @return
|
|
|
|
*/
|
|
|
|
public String getCommand() {
|
|
|
|
return this.command;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2014-09-24 14:21:43 +02:00
|
|
|
*
|
2014-09-22 13:02:14 +02:00
|
|
|
* @return
|
|
|
|
*/
|
|
|
|
public String getAlias() {
|
|
|
|
return this.alias;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2014-09-24 14:21:43 +02:00
|
|
|
*
|
2014-09-22 13:02:14 +02:00
|
|
|
* @return
|
|
|
|
*/
|
2014-09-24 14:21:43 +02:00
|
|
|
public CommandPermission getPermission() {
|
2014-09-22 13:02:14 +02:00
|
|
|
return this.permission;
|
|
|
|
}
|
|
|
|
}
|