geforkt von SteamWar/BungeeCore
Merge branch 'moreMultiLingual' into ban-rework
# Conflicts: # src/de/steamwar/bungeecore/commands/BanCommand.java
Dieser Commit ist enthalten in:
Commit
814c2f851d
@ -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 net.md_5.bungee.api.ChatColor;
|
import net.md_5.bungee.api.ChatColor;
|
||||||
import net.md_5.bungee.api.CommandSender;
|
import net.md_5.bungee.api.CommandSender;
|
||||||
|
|
||||||
@ -32,7 +33,7 @@ public class AlertCommand extends BasicCommand {
|
|||||||
@Override
|
@Override
|
||||||
public void execute(CommandSender sender, String[] args) {
|
public void execute(CommandSender sender, String[] args) {
|
||||||
if(args.length == 0){
|
if(args.length == 0){
|
||||||
BungeeCore.send(sender, BungeeCore.CHAT_PREFIX + "/alert [Nachricht]");
|
Message.send("USAGE_ALERT", sender);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -41,8 +42,6 @@ public class AlertCommand extends BasicCommand {
|
|||||||
for (String arg : args){
|
for (String arg : args){
|
||||||
msgBuilder.append(arg).append(" ");
|
msgBuilder.append(arg).append(" ");
|
||||||
}
|
}
|
||||||
String msg = msgBuilder.toString();
|
Message.broadcast("ALERT", ChatColor.translateAlternateColorCodes('&', msgBuilder.toString()));
|
||||||
msg = ChatColor.translateAlternateColorCodes('&', msg);
|
|
||||||
BungeeCore.broadcast(msg);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
|
|
||||||
package de.steamwar.bungeecore.commands;
|
package de.steamwar.bungeecore.commands;
|
||||||
|
|
||||||
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;
|
||||||
|
|
||||||
@ -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){
|
||||||
BungeeCore.send(sender, BungeeCore.CHAT_PREFIX + "§cUngültige Zeitangabe.");
|
Message.send("BAN_INVALID_TIME", sender);
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -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;
|
||||||
import net.md_5.bungee.api.ProxyServer;
|
import net.md_5.bungee.api.ProxyServer;
|
||||||
@ -55,7 +56,7 @@ abstract class BasicCommand extends Command implements TabExecutor {
|
|||||||
protected SteamwarUser user(CommandSender sender, String arg){
|
protected SteamwarUser user(CommandSender sender, String arg){
|
||||||
SteamwarUser target = SteamwarUser.get(arg);
|
SteamwarUser target = SteamwarUser.get(arg);
|
||||||
if(target == null)
|
if(target == null)
|
||||||
BungeeCore.send(sender, BungeeCore.CHAT_PREFIX + "§cDer Spieler existiert nicht.");
|
Message.send("UNKNWON_PLAYER", sender);
|
||||||
return target;
|
return target;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
|
|
||||||
package de.steamwar.bungeecore.commands;
|
package de.steamwar.bungeecore.commands;
|
||||||
|
|
||||||
import de.steamwar.bungeecore.BungeeCore;
|
import de.steamwar.bungeecore.Message;
|
||||||
import de.steamwar.bungeecore.sql.SWException;
|
import de.steamwar.bungeecore.sql.SWException;
|
||||||
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;
|
||||||
@ -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());
|
||||||
BungeeCore.send(player, BungeeCore.CHAT_PREFIX + "§7Dein Bugreport wurde gemeldet.");
|
Message.send("BUG_SAVED", player);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -19,9 +19,8 @@
|
|||||||
|
|
||||||
package de.steamwar.bungeecore.commands;
|
package de.steamwar.bungeecore.commands;
|
||||||
|
|
||||||
import de.steamwar.bungeecore.BungeeCore;
|
import de.steamwar.bungeecore.Message;
|
||||||
import net.md_5.bungee.api.CommandSender;
|
import net.md_5.bungee.api.CommandSender;
|
||||||
import net.md_5.bungee.api.chat.TextComponent;
|
|
||||||
import net.md_5.bungee.api.connection.ProxiedPlayer;
|
import net.md_5.bungee.api.connection.ProxiedPlayer;
|
||||||
|
|
||||||
public class DenyCommand extends BasicCommand {
|
public class DenyCommand extends BasicCommand {
|
||||||
@ -34,7 +33,7 @@ public class DenyCommand extends BasicCommand {
|
|||||||
public void execute(CommandSender sender, String[] args) {
|
public void execute(CommandSender sender, String[] args) {
|
||||||
if(sender instanceof ProxiedPlayer){
|
if(sender instanceof ProxiedPlayer){
|
||||||
ProxiedPlayer player = (ProxiedPlayer) sender;
|
ProxiedPlayer player = (ProxiedPlayer) sender;
|
||||||
player.sendMessage(new TextComponent(BungeeCore.CHAT_PREFIX + "§cUnbekannter Befehl."));
|
Message.send("UNKNOWN_COMMAND", player);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
|
|
||||||
package de.steamwar.bungeecore.commands;
|
package de.steamwar.bungeecore.commands;
|
||||||
|
|
||||||
import de.steamwar.bungeecore.BungeeCore;
|
import de.steamwar.bungeecore.Message;
|
||||||
import de.steamwar.bungeecore.sql.IgnoreSystem;
|
import de.steamwar.bungeecore.sql.IgnoreSystem;
|
||||||
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 +34,7 @@ public class IgnoreCommand extends BasicCommand {
|
|||||||
@Override
|
@Override
|
||||||
public void execute(CommandSender sender, String[] args) {
|
public void execute(CommandSender sender, String[] args) {
|
||||||
if(args.length < 1) {
|
if(args.length < 1) {
|
||||||
BungeeCore.send(sender, BungeeCore.CHAT_PREFIX + "§8/§eignore §8[§7Spieler§8]");
|
Message.send("USAGE_IGNORE", sender);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -45,17 +45,17 @@ public class IgnoreCommand extends BasicCommand {
|
|||||||
|
|
||||||
SteamwarUser target = SteamwarUser.get(args[0]);
|
SteamwarUser target = SteamwarUser.get(args[0]);
|
||||||
if(target == null){
|
if(target == null){
|
||||||
BungeeCore.send(p, BungeeCore.CHAT_PREFIX + "§cDiesen Spieler gibt es nicht.");
|
Message.send("UNKNWON_PLAYER", p);
|
||||||
return;
|
return;
|
||||||
}else if(target.equals(user)){
|
}else if(target.equals(user)){
|
||||||
BungeeCore.send(p, BungeeCore.CHAT_PREFIX + "§cWie willst du dich selber ignorieren?");
|
Message.send("IGNORE_YOURSELF", p);
|
||||||
return;
|
return;
|
||||||
}else if(IgnoreSystem.isIgnored(user, target)){
|
}else if(IgnoreSystem.isIgnored(user, target)){
|
||||||
BungeeCore.send(p, BungeeCore.CHAT_PREFIX + "§cDu ignorierst diesen Spieler bereits.");
|
Message.send("IGNORE_ALREADY", p);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
IgnoreSystem.ignore(user, target);
|
IgnoreSystem.ignore(user, target);
|
||||||
BungeeCore.send(p, BungeeCore.CHAT_PREFIX + "§7Du ignorierst nun §e" + target.getUserName() + "§8.");
|
Message.send("IGNORE_IGNORE", p, target.getUserName());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,9 @@
|
|||||||
PREFIX=§eSteam§8War»
|
PREFIX=§eSteam§8War»
|
||||||
|
|
||||||
|
UNKNOWN_COMMAND=§cUnbekannter Befehl.
|
||||||
|
UNKNWON_PLAYER=§cDiesen Spieler gibt es nicht.
|
||||||
|
|
||||||
|
#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!
|
||||||
HELP_LOBBY_HOVER=§eZurück zur Lobby
|
HELP_LOBBY_HOVER=§eZurück zur Lobby
|
||||||
HELP_BAU=§7Komme mit §8/§ebau §7auf den Bauserver!
|
HELP_BAU=§7Komme mit §8/§ebau §7auf den Bauserver!
|
||||||
@ -53,3 +57,20 @@ HELP_BAU_TESTARENA=§8/§ebau testarena §8- §7Starte eine Testarena
|
|||||||
HELP_BAU_TESTARENA_HOVER=§eTestarena starten
|
HELP_BAU_TESTARENA_HOVER=§eTestarena starten
|
||||||
HELP_BAU_BAU=§8/§ehelp bau §8- §7Hilfe zu nützlichen Werkzeugen
|
HELP_BAU_BAU=§8/§ehelp bau §8- §7Hilfe zu nützlichen Werkzeugen
|
||||||
HELP_BAU_BAU_HOVER=§eNützliche Zusatzfunktionen
|
HELP_BAU_BAU_HOVER=§eNützliche Zusatzfunktionen
|
||||||
|
|
||||||
|
#Usage description of various commands
|
||||||
|
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_IGNORE=§8/§7ignore §8[§eSpieler§8]
|
||||||
|
|
||||||
|
#Various commands
|
||||||
|
ALERT=§f{0}
|
||||||
|
|
||||||
|
BAN_YOU_BANNED=§7Du hast §e{0} §7gebannt§8. §7Grund§8: §c{1}
|
||||||
|
BAN_INVALID_TIME=§cUngültige Zeitangabe.
|
||||||
|
|
||||||
|
BUG_SAVED=§7Dein Bugreport wurde gespeichert.
|
||||||
|
|
||||||
|
IGNORE_YOURSELF=§cWie willst du dich selber ignorieren?
|
||||||
|
IGNORE_ALREADY=§cDu ignorierst diesen Spieler bereits.
|
||||||
|
IGNORE_IGNORE=§7Du ignorierst nun §e{0}§8.
|
In neuem Issue referenzieren
Einen Benutzer sperren