mirror of
https://e.coding.net/circlecloud/SimpleProtect.git
synced 2024-11-22 01:49:03 +00:00
move language file...
This commit is contained in:
parent
647a5c402d
commit
9faf53a463
@ -23,18 +23,18 @@ public class SimpleProtectCommand implements CommandExecutor {
|
||||
/**
|
||||
* @param simpleProtect
|
||||
*/
|
||||
public SimpleProtectCommand(SimpleProtect simpleProtect) {
|
||||
public SimpleProtectCommand(final SimpleProtect simpleProtect) {
|
||||
plugin = simpleProtect;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
||||
public boolean onCommand(final CommandSender sender, final Command command, final String label, final String[] args) {
|
||||
switch (args.length) {
|
||||
case 1:
|
||||
switch (args[0]) {
|
||||
case "setspawn":
|
||||
if (sender instanceof Player) {
|
||||
Location l = ((Player) sender).getLocation();
|
||||
final Location l = ((Player) sender).getLocation();
|
||||
plugin.config.set("SafeNetherDoor.World", l.getWorld().getName());
|
||||
plugin.config.set("SafeNetherDoor.X", l.getBlockX());
|
||||
plugin.config.set("SafeNetherDoor.Y", l.getBlockY());
|
||||
@ -47,28 +47,31 @@ public class SimpleProtectCommand implements CommandExecutor {
|
||||
sender.sendMessage(plugin.pluginname + "§a配置文件已重载!");
|
||||
return true;
|
||||
case "list":
|
||||
sender.sendMessage("§c当前被禁言的玩家有: ");
|
||||
for (String player : plugin.spam.getCc())
|
||||
sender.sendMessage(plugin.getfullmsg("Spam.MutePlayer"));
|
||||
for (final String player : plugin.spam.getCc()) {
|
||||
sender.sendMessage("§6 - " + player);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
Player p = Bukkit.getPlayer(args[1]);
|
||||
final Player p = Bukkit.getPlayer(args[1]);
|
||||
switch (args[0]) {
|
||||
case "add":
|
||||
if (p != null) {
|
||||
plugin.spam.getCc().add(p.getName());
|
||||
sender.sendMessage(plugin.getfullmsg("Spam.MuteOn").replace("%player%", p.getDisplayName()));
|
||||
} else
|
||||
} else {
|
||||
sender.sendMessage(plugin.getfullmsg("Spam.OffLine"));
|
||||
}
|
||||
return true;
|
||||
case "del":
|
||||
if (p != null && plugin.spam.getCc().contains(p.getName())) {
|
||||
plugin.spam.getCc().remove(p);
|
||||
sender.sendMessage(plugin.getfullmsg("Spam.MuteOff").replace("%player%", p.getDisplayName()));
|
||||
} else
|
||||
} else {
|
||||
sender.sendMessage(plugin.getfullmsg("Spam.NotMute"));
|
||||
}
|
||||
return true;
|
||||
case "admin":
|
||||
if (args[1].equalsIgnoreCase("on")) {
|
||||
|
@ -64,6 +64,7 @@ Spam:
|
||||
TooMuchSameChat: '请不要短时间内发送相同的信息'
|
||||
TooMuchCommand: '请不要短时间内发送大量命令'
|
||||
TooMuchSameCommand: '请不要短时间内发送相同的命令'
|
||||
MutePlayer: '&c当前被禁言的玩家有: '
|
||||
MuteOn: '&a已允许玩家 %player% &a聊天!'
|
||||
MuteOff: '&c已禁止玩家 %player% &c聊天!'
|
||||
OffLine: '&c玩家不存在或不在线!'
|
||||
|
Loading…
Reference in New Issue
Block a user