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
|
* @param simpleProtect
|
||||||
*/
|
*/
|
||||||
public SimpleProtectCommand(SimpleProtect simpleProtect) {
|
public SimpleProtectCommand(final SimpleProtect simpleProtect) {
|
||||||
plugin = simpleProtect;
|
plugin = simpleProtect;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@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) {
|
switch (args.length) {
|
||||||
case 1:
|
case 1:
|
||||||
switch (args[0]) {
|
switch (args[0]) {
|
||||||
case "setspawn":
|
case "setspawn":
|
||||||
if (sender instanceof Player) {
|
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.World", l.getWorld().getName());
|
||||||
plugin.config.set("SafeNetherDoor.X", l.getBlockX());
|
plugin.config.set("SafeNetherDoor.X", l.getBlockX());
|
||||||
plugin.config.set("SafeNetherDoor.Y", l.getBlockY());
|
plugin.config.set("SafeNetherDoor.Y", l.getBlockY());
|
||||||
@ -47,28 +47,31 @@ public class SimpleProtectCommand implements CommandExecutor {
|
|||||||
sender.sendMessage(plugin.pluginname + "§a配置文件已重载!");
|
sender.sendMessage(plugin.pluginname + "§a配置文件已重载!");
|
||||||
return true;
|
return true;
|
||||||
case "list":
|
case "list":
|
||||||
sender.sendMessage("§c当前被禁言的玩家有: ");
|
sender.sendMessage(plugin.getfullmsg("Spam.MutePlayer"));
|
||||||
for (String player : plugin.spam.getCc())
|
for (final String player : plugin.spam.getCc()) {
|
||||||
sender.sendMessage("§6 - " + player);
|
sender.sendMessage("§6 - " + player);
|
||||||
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
Player p = Bukkit.getPlayer(args[1]);
|
final Player p = Bukkit.getPlayer(args[1]);
|
||||||
switch (args[0]) {
|
switch (args[0]) {
|
||||||
case "add":
|
case "add":
|
||||||
if (p != null) {
|
if (p != null) {
|
||||||
plugin.spam.getCc().add(p.getName());
|
plugin.spam.getCc().add(p.getName());
|
||||||
sender.sendMessage(plugin.getfullmsg("Spam.MuteOn").replace("%player%", p.getDisplayName()));
|
sender.sendMessage(plugin.getfullmsg("Spam.MuteOn").replace("%player%", p.getDisplayName()));
|
||||||
} else
|
} else {
|
||||||
sender.sendMessage(plugin.getfullmsg("Spam.OffLine"));
|
sender.sendMessage(plugin.getfullmsg("Spam.OffLine"));
|
||||||
|
}
|
||||||
return true;
|
return true;
|
||||||
case "del":
|
case "del":
|
||||||
if (p != null && plugin.spam.getCc().contains(p.getName())) {
|
if (p != null && plugin.spam.getCc().contains(p.getName())) {
|
||||||
plugin.spam.getCc().remove(p);
|
plugin.spam.getCc().remove(p);
|
||||||
sender.sendMessage(plugin.getfullmsg("Spam.MuteOff").replace("%player%", p.getDisplayName()));
|
sender.sendMessage(plugin.getfullmsg("Spam.MuteOff").replace("%player%", p.getDisplayName()));
|
||||||
} else
|
} else {
|
||||||
sender.sendMessage(plugin.getfullmsg("Spam.NotMute"));
|
sender.sendMessage(plugin.getfullmsg("Spam.NotMute"));
|
||||||
|
}
|
||||||
return true;
|
return true;
|
||||||
case "admin":
|
case "admin":
|
||||||
if (args[1].equalsIgnoreCase("on")) {
|
if (args[1].equalsIgnoreCase("on")) {
|
||||||
|
@ -64,6 +64,7 @@ Spam:
|
|||||||
TooMuchSameChat: '请不要短时间内发送相同的信息'
|
TooMuchSameChat: '请不要短时间内发送相同的信息'
|
||||||
TooMuchCommand: '请不要短时间内发送大量命令'
|
TooMuchCommand: '请不要短时间内发送大量命令'
|
||||||
TooMuchSameCommand: '请不要短时间内发送相同的命令'
|
TooMuchSameCommand: '请不要短时间内发送相同的命令'
|
||||||
|
MutePlayer: '&c当前被禁言的玩家有: '
|
||||||
MuteOn: '&a已允许玩家 %player% &a聊天!'
|
MuteOn: '&a已允许玩家 %player% &a聊天!'
|
||||||
MuteOff: '&c已禁止玩家 %player% &c聊天!'
|
MuteOff: '&c已禁止玩家 %player% &c聊天!'
|
||||||
OffLine: '&c玩家不存在或不在线!'
|
OffLine: '&c玩家不存在或不在线!'
|
||||||
|
Loading…
Reference in New Issue
Block a user