geforkt von SteamWar/BungeeCore
Add /mute Multilingual support
Update properties
Dieser Commit ist enthalten in:
Ursprung
89d57e3f48
Commit
730b56e4ec
@ -37,11 +37,6 @@ public class AlertCommand extends BasicCommand {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
StringBuilder msgBuilder = new StringBuilder();
|
Message.broadcast("ALERT", ChatColor.translateAlternateColorCodes('&', BungeeCore.CHAT_PREFIX + String.join(" ", args)));
|
||||||
msgBuilder.append(BungeeCore.CHAT_PREFIX);
|
|
||||||
for (String arg : args){
|
|
||||||
msgBuilder.append(arg).append(" ");
|
|
||||||
}
|
|
||||||
Message.broadcast("ALERT", ChatColor.translateAlternateColorCodes('&', msgBuilder.toString()));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -55,7 +55,7 @@ public class BanCommand extends BasicCommand {
|
|||||||
banReason.append(args[i]).append(" ");
|
banReason.append(args[i]).append(" ");
|
||||||
}
|
}
|
||||||
String msg = banReason.toString();
|
String msg = banReason.toString();
|
||||||
Message.send("BAN_YOU_BANNED", sender, target.getUserGroup(), msg);
|
Message.send("BAN_MESSAGE_YOU", sender, target.getUserName(), msg);
|
||||||
target.ban(banTime, msg);
|
target.ban(banTime, msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -73,7 +73,7 @@ public class BanCommand extends BasicCommand {
|
|||||||
Date parsedDate = dateFormat.parse(arg.split("_")[0]);
|
Date parsedDate = dateFormat.parse(arg.split("_")[0]);
|
||||||
return new java.sql.Timestamp(parsedDate.getTime());
|
return new java.sql.Timestamp(parsedDate.getTime());
|
||||||
}catch(ParseException exception){
|
}catch(ParseException exception){
|
||||||
Message.send("BAN_INVALID_TIME", sender);
|
Message.send("INVALID_TIME", sender);
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -40,6 +40,6 @@ public class BugCommand extends BasicCommand {
|
|||||||
String message = String.join(" ", args);
|
String message = String.join(" ", args);
|
||||||
SteamwarUser user = SteamwarUser.get(player.getUniqueId());
|
SteamwarUser user = SteamwarUser.get(player.getUniqueId());
|
||||||
SWException.log(server, message, player.getName() + " " + user.getId());
|
SWException.log(server, message, player.getName() + " " + user.getId());
|
||||||
Message.send("BUG_SAVED", player);
|
Message.send("BUG_MESSAGE", player);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -47,15 +47,17 @@ public class IgnoreCommand extends BasicCommand {
|
|||||||
if(target == null){
|
if(target == null){
|
||||||
Message.send("UNKNWON_PLAYER", p);
|
Message.send("UNKNWON_PLAYER", p);
|
||||||
return;
|
return;
|
||||||
}else if(target.equals(user)){
|
}
|
||||||
|
if(target.equals(user)){
|
||||||
Message.send("IGNORE_YOURSELF", p);
|
Message.send("IGNORE_YOURSELF", p);
|
||||||
return;
|
return;
|
||||||
}else if(IgnoreSystem.isIgnored(user, target)){
|
}
|
||||||
|
if(IgnoreSystem.isIgnored(user, target)){
|
||||||
Message.send("IGNORE_ALREADY", p);
|
Message.send("IGNORE_ALREADY", p);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
IgnoreSystem.ignore(user, target);
|
IgnoreSystem.ignore(user, target);
|
||||||
Message.send("IGNORE_IGNORE", p, target.getUserName());
|
Message.send("IGNORE_MESSAGE", p, target.getUserName());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -20,6 +20,7 @@
|
|||||||
package de.steamwar.bungeecore.commands;
|
package de.steamwar.bungeecore.commands;
|
||||||
|
|
||||||
import de.steamwar.bungeecore.BungeeCore;
|
import de.steamwar.bungeecore.BungeeCore;
|
||||||
|
import de.steamwar.bungeecore.Message;
|
||||||
import de.steamwar.bungeecore.sql.SteamwarUser;
|
import de.steamwar.bungeecore.sql.SteamwarUser;
|
||||||
import net.md_5.bungee.api.CommandSender;
|
import net.md_5.bungee.api.CommandSender;
|
||||||
|
|
||||||
@ -34,7 +35,7 @@ public class MuteCommand extends BasicCommand {
|
|||||||
@Override
|
@Override
|
||||||
public void execute(CommandSender sender, String[] args) {
|
public void execute(CommandSender sender, String[] args) {
|
||||||
if(args.length < 3){
|
if(args.length < 3){
|
||||||
BungeeCore.send(sender, BungeeCore.CHAT_PREFIX + "/mute [Spieler] [dd.mm.yyyy oder dd.mm.yyyy_hh:mm oder perma] [Grund]");
|
Message.send("USAGE_MUTE", sender);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -51,7 +52,7 @@ public class MuteCommand extends BasicCommand {
|
|||||||
muteReason.append(args[i]).append(" ");
|
muteReason.append(args[i]).append(" ");
|
||||||
}
|
}
|
||||||
String msg = muteReason.toString();
|
String msg = muteReason.toString();
|
||||||
BungeeCore.send(sender, BungeeCore.CHAT_PREFIX + "Du hast " + target.getUserName() + " gemuted. Grund: §c" + msg);
|
Message.send("MUTE_MESSAGE_YOU", sender, target.getUserName(), msg);
|
||||||
target.mute(muteTime, msg);
|
target.mute(muteTime, msg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2,6 +2,7 @@ PREFIX=§eSteam§8War»
|
|||||||
|
|
||||||
UNKNOWN_COMMAND=§cUnbekannter Befehl.
|
UNKNOWN_COMMAND=§cUnbekannter Befehl.
|
||||||
UNKNWON_PLAYER=§cDiesen Spieler gibt es nicht.
|
UNKNWON_PLAYER=§cDiesen Spieler gibt es nicht.
|
||||||
|
INVALID_TIME=§cUngültige Zeitangabe.
|
||||||
|
|
||||||
#Help command
|
#Help command
|
||||||
HELP_LOBBY=§7Kehre von überall mit §8/§el §7zur Lobby zurück!
|
HELP_LOBBY=§7Kehre von überall mit §8/§el §7zur Lobby zurück!
|
||||||
@ -61,16 +62,18 @@ HELP_BAU_BAU_HOVER=§eNützliche Zusatzfunktionen
|
|||||||
#Usage description of various commands
|
#Usage description of various commands
|
||||||
USAGE_ALERT=§8/§7alert §8[§eNachricht§8]
|
USAGE_ALERT=§8/§7alert §8[§eNachricht§8]
|
||||||
USAGE_BAN=§8/§7ban §8[§eSpieler§8] [§edd§8.§emm§8.§eyyyy §7oder §edd§8.§emm§8.§eyyyy§8_§ehh§8:§emm §7oder §eperma§8] [§eGrund§8]
|
USAGE_BAN=§8/§7ban §8[§eSpieler§8] [§edd§8.§emm§8.§eyyyy §7oder §edd§8.§emm§8.§eyyyy§8_§ehh§8:§emm §7oder §eperma§8] [§eGrund§8]
|
||||||
|
USAGE_MUTE=§8/§7mute §8[§eSpieler§8] [§edd§8.§emm§8.§eyyyy §7oder §edd§8.§emm§8.§eyyyy§8_§ehh§8:§emm §7oder §eperma§8] [§eGrund§8]
|
||||||
USAGE_IGNORE=§8/§7ignore §8[§eSpieler§8]
|
USAGE_IGNORE=§8/§7ignore §8[§eSpieler§8]
|
||||||
|
|
||||||
#Various commands
|
#Various commands
|
||||||
ALERT=§f{0}
|
ALERT=§f{0}
|
||||||
|
|
||||||
BAN_YOU_BANNED=§7Du hast §e{0} §7gebannt§8. §7Grund§8: §c{1}
|
BAN_MESSAGE_YOU=§7Du hast §e{0} §7gebannt§8. §7Grund§8: §c{1}
|
||||||
BAN_INVALID_TIME=§cUngültige Zeitangabe.
|
|
||||||
|
|
||||||
BUG_SAVED=§7Dein Bugreport wurde gespeichert.
|
MUTE_MESSAGE_YOU=§7Du hast §e{0} §7gemutet§8. §7Grund§8: §c{1}
|
||||||
|
|
||||||
|
BUG_MESSAGE=§7Dein Bugreport wurde gespeichert.
|
||||||
|
|
||||||
IGNORE_YOURSELF=§cWie willst du dich selber ignorieren?
|
IGNORE_YOURSELF=§cWie willst du dich selber ignorieren?
|
||||||
IGNORE_ALREADY=§cDu ignorierst diesen Spieler bereits.
|
IGNORE_ALREADY=§cDu ignorierst diesen Spieler bereits.
|
||||||
IGNORE_IGNORE=§7Du ignorierst nun §e{0}§8.
|
IGNORE_MESSAGE=§7Du ignorierst nun §e{0}§8.
|
In neuem Issue referenzieren
Einen Benutzer sperren