mirror of
https://github.com/TotalFreedomMC/TF-PlotSquared.git
synced 2025-08-10 06:23:14 +00:00
Some optimization, fixed copyright.
This commit is contained in:
parent
bcc34e7cd8
commit
f71fabbfbf
143 changed files with 5090 additions and 4580 deletions
|
@ -1,17 +1,29 @@
|
|||
/*
|
||||
* 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 = SubCommand.java >> Generated by: Citymonstret at 2014-08-09 01:42
|
||||
*/
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// PlotSquared - A plot manager and world generator for the Bukkit API /
|
||||
// Copyright (c) 2014 IntellectualSites/IntellectualCrafters /
|
||||
// /
|
||||
// This program is free software; you can redistribute it and/or modify /
|
||||
// it under the terms of the GNU General Public License as published by /
|
||||
// the Free Software Foundation; either version 3 of the License, or /
|
||||
// (at your option) any later version. /
|
||||
// /
|
||||
// This program is distributed in the hope that it will be useful, /
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of /
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the /
|
||||
// GNU General Public License for more details. /
|
||||
// /
|
||||
// You should have received a copy of the GNU General Public License /
|
||||
// along with this program; if not, write to the Free Software Foundation, /
|
||||
// Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA /
|
||||
// /
|
||||
// You can contact us via: support@intellectualsites.com /
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
package com.intellectualcrafters.plot.commands;
|
||||
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import com.intellectualcrafters.plot.C;
|
||||
import com.intellectualcrafters.plot.PlayerFunctions;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
/**
|
||||
* SubCommand class
|
||||
|
@ -19,11 +31,11 @@ import com.intellectualcrafters.plot.PlayerFunctions;
|
|||
* @author Citymonstret
|
||||
*/
|
||||
public abstract class SubCommand {
|
||||
public boolean isPlayer;
|
||||
public boolean isPlayer;
|
||||
/**
|
||||
* Command
|
||||
*/
|
||||
public String cmd;
|
||||
public String cmd;
|
||||
/**
|
||||
* Permission node
|
||||
*/
|
||||
|
@ -31,32 +43,26 @@ public abstract class SubCommand {
|
|||
/**
|
||||
* Simple description
|
||||
*/
|
||||
public String description;
|
||||
public String description;
|
||||
/**
|
||||
* Alias
|
||||
*/
|
||||
public String alias;
|
||||
public String alias;
|
||||
|
||||
/**
|
||||
* Command usage
|
||||
*/
|
||||
public String usage;
|
||||
public String usage;
|
||||
|
||||
public CommandCategory category;
|
||||
public CommandCategory category;
|
||||
|
||||
/**
|
||||
* @param cmd
|
||||
* Command /plot {cmd} <-- That!
|
||||
* @param permission
|
||||
* Permission Node
|
||||
* @param description
|
||||
* Simple description
|
||||
* @param usage
|
||||
* Usage description: /plot command {args...}
|
||||
* @param alias
|
||||
* Command alias
|
||||
* @param category
|
||||
* CommandCategory. Pick whichever closests to what you want.
|
||||
* @param cmd Command /plot {cmd} <-- That!
|
||||
* @param permission Permission Node
|
||||
* @param description Simple description
|
||||
* @param usage Usage description: /plot command {args...}
|
||||
* @param alias Command alias
|
||||
* @param category CommandCategory. Pick whichever closests to what you want.
|
||||
*/
|
||||
public SubCommand(final String cmd, final String permission, final String description, final String usage, final String alias, final CommandCategory category, final boolean isPlayer) {
|
||||
this.cmd = cmd;
|
||||
|
@ -69,14 +75,10 @@ public abstract class SubCommand {
|
|||
}
|
||||
|
||||
/**
|
||||
* @param command
|
||||
* Command /plot {cmd} <-- That!
|
||||
* @param description
|
||||
* Simple description
|
||||
* @param usage
|
||||
* Usage description: /plot command {args...}
|
||||
* @param category
|
||||
* CommandCategory. Pick whichever closests to what you want.
|
||||
* @param command Command /plot {cmd} <-- That!
|
||||
* @param description Simple description
|
||||
* @param usage Usage description: /plot command {args...}
|
||||
* @param category CommandCategory. Pick whichever closests to what you want.
|
||||
*/
|
||||
public SubCommand(final Command command, final String description, final String usage, final CommandCategory category, final boolean isPlayer) {
|
||||
this.cmd = command.getCommand();
|
||||
|
@ -91,10 +93,8 @@ public abstract class SubCommand {
|
|||
/**
|
||||
* Execute.
|
||||
*
|
||||
* @param plr
|
||||
* executor
|
||||
* @param args
|
||||
* arguments
|
||||
* @param plr executor
|
||||
* @param args arguments
|
||||
* @return true on success, false on failure
|
||||
*/
|
||||
public abstract boolean execute(final Player plr, final String... args);
|
||||
|
@ -110,8 +110,9 @@ public abstract class SubCommand {
|
|||
* @param c
|
||||
* @param args
|
||||
*/
|
||||
public void sendMessage(final Player plr, final C c, final String... args) {
|
||||
public boolean sendMessage(final Player plr, final C c, final String... args) {
|
||||
PlayerFunctions.sendMessage(plr, c, args);
|
||||
return true;
|
||||
}
|
||||
|
||||
public enum CommandCategory {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue