Java Code Examples for co.aikar.timings.Timings#getCommandTiming()

The following examples show how to use co.aikar.timings.Timings#getCommandTiming() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: Command.java    From Jupiter with GNU General Public License v3.0 5 votes vote down vote up
public Command(String name, String description, String usageMessage, String[] aliases) {
    this.commandData = new CommandData();
    this.name = name;
    this.nextLabel = name;
    this.label = name;
    this.description = description;
    this.usageMessage = usageMessage == null ? "/" + name : usageMessage;
    this.aliases = aliases;
    this.activeAliases = aliases;
    this.timing = Timings.getCommandTiming(this);
    this.commandParameters.put("default", new CommandParameter[]{new CommandParameter("args", "rawtext", true)});
}
 
Example 2
Source File: Command.java    From Jupiter with GNU General Public License v3.0 5 votes vote down vote up
public boolean setLabel(String name) {
    this.nextLabel = name;
    if (!this.isRegistered()) {
        this.label = name;
        this.timing = Timings.getCommandTiming(this);
        return true;
    }
    return false;
}
 
Example 3
Source File: Command.java    From Nukkit with GNU General Public License v3.0 5 votes vote down vote up
public Command(String name, String description, String usageMessage, String[] aliases) {
    this.commandData = new CommandData();
    this.name = name.toLowerCase(); // Uppercase letters crash the client?!?
    this.nextLabel = name;
    this.label = name;
    this.description = description;
    this.usageMessage = usageMessage == null ? "/" + name : usageMessage;
    this.aliases = aliases;
    this.activeAliases = aliases;
    this.timing = Timings.getCommandTiming(this);
    this.commandParameters.put("default", new CommandParameter[]{new CommandParameter("args", CommandParamType.RAWTEXT, true)});
}
 
Example 4
Source File: Command.java    From Nukkit with GNU General Public License v3.0 5 votes vote down vote up
public boolean setLabel(String name) {
    this.nextLabel = name;
    if (!this.isRegistered()) {
        this.label = name;
        this.timing = Timings.getCommandTiming(this);
        return true;
    }
    return false;
}
 
Example 5
Source File: Command.java    From Nukkit with GNU General Public License v3.0 5 votes vote down vote up
public Command(String name, String description, String usageMessage, String[] aliases) {
    this.commandData = new CommandData();
    this.name = name;
    this.nextLabel = name;
    this.label = name;
    this.description = description;
    this.usageMessage = usageMessage == null ? "/" + name : usageMessage;
    this.aliases = aliases;
    this.activeAliases = aliases;
    this.timing = Timings.getCommandTiming(this);
    this.commandParameters.put("default", new CommandParameter[]{new CommandParameter("args", "rawtext", true)});
}
 
Example 6
Source File: Command.java    From Nukkit with GNU General Public License v3.0 5 votes vote down vote up
public boolean setLabel(String name) {
    this.nextLabel = name;
    if (!this.isRegistered()) {
        this.label = name;
        this.timing = Timings.getCommandTiming(this);
        return true;
    }
    return false;
}