Settings + Displayed Plugin Name is now configurable in config.yml
This commit is contained in:
parent
c8978e2625
commit
82a4920899
12 changed files with 240 additions and 28 deletions
|
|
@ -0,0 +1,45 @@
|
|||
package de.lunarakai.minecleaner.commands;
|
||||
|
||||
import de.iani.cubesideutils.bukkit.commands.SubCommand;
|
||||
import de.iani.cubesideutils.bukkit.commands.exceptions.DisallowsCommandBlockException;
|
||||
import de.iani.cubesideutils.bukkit.commands.exceptions.IllegalSyntaxException;
|
||||
import de.iani.cubesideutils.bukkit.commands.exceptions.InternalCommandException;
|
||||
import de.iani.cubesideutils.bukkit.commands.exceptions.NoPermissionException;
|
||||
import de.iani.cubesideutils.bukkit.commands.exceptions.RequiresPlayerException;
|
||||
import de.iani.cubesideutils.commands.ArgsParser;
|
||||
import de.lunarakai.minecleaner.MinecleanerPlugin;
|
||||
import org.bukkit.command.Command;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
public class SettingsCommand extends SubCommand {
|
||||
MinecleanerPlugin plugin;
|
||||
|
||||
public SettingsCommand(MinecleanerPlugin plugin) {
|
||||
this.plugin = plugin;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getUsage() {
|
||||
return "";
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean requiresPlayer() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRequiredPermission() {
|
||||
return MinecleanerPlugin.PERMISSION_PLAY;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean onCommand(CommandSender sender, Command command, String s, String s1, ArgsParser args) throws DisallowsCommandBlockException, RequiresPlayerException, NoPermissionException, IllegalSyntaxException, InternalCommandException {
|
||||
Player player = (Player) sender;
|
||||
|
||||
player.openInventory(plugin.getManager().showSettingsInventory(player));
|
||||
return true;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue