Renamed permission
This commit is contained in:
parent
eca680000b
commit
f6bfb40a81
2 changed files with 5 additions and 4 deletions
|
@ -52,8 +52,9 @@ public class ShowAPI {
|
|||
throw new InvalidTriggerException("Provided trigger " + triggerType + " does not exists!");
|
||||
|
||||
Constructor<T> ctor = (Constructor<T>) triggers.get(triggerType).getConstructor(String[].class);
|
||||
if (dataSplitter.length < triggers.get(triggerType).getAnnotation(TriggerIdentifier.class).minArgs() + 1)
|
||||
throw new TooFewArgumentsException("Provided triggerdata " + data + " has too few arguments!");
|
||||
TriggerIdentifier identifier = triggers.get(triggerType).getAnnotation(TriggerIdentifier.class);
|
||||
if (dataSplitter.length < identifier.minArgs() + 1)
|
||||
throw new TooFewArgumentsException(identifier.argDesc());
|
||||
return ctor.newInstance(new Object[]{dataSplitterNew});
|
||||
}
|
||||
}
|
||||
|
|
|
@ -14,7 +14,7 @@ import org.bukkit.command.CommandSender;
|
|||
import org.bukkit.entity.Player;
|
||||
|
||||
@CommandAlias("showcontrol|sc")
|
||||
@CommandPermission("mctp.show")
|
||||
@CommandPermission("sc.admin")
|
||||
public class ShowCMD extends BaseCommand {
|
||||
@Subcommand("create")
|
||||
@Description("")
|
||||
|
@ -71,7 +71,7 @@ public class ShowCMD extends BaseCommand {
|
|||
sender.sendMessage(ChatColor.RED + "The provided trigger does not exists.");
|
||||
return;
|
||||
} catch (TooFewArgumentsException e) {
|
||||
sender.sendMessage(ChatColor.RED + "You did not provide enough information for the chosen trigger.");
|
||||
sender.sendMessage(ChatColor.RED + "You did not provide enough information for the chosen trigger! Required arguments: " + e.getMessage());
|
||||
return;
|
||||
} catch (IllegalArgumentException e) {
|
||||
sender.sendMessage(ChatColor.RED + "Couldn't create the trigger: " + e.getMessage());
|
||||
|
|
Loading…
Add table
Reference in a new issue