SteamWar/BungeeCore
Archiviert
13
2

Merge pull request 'More MultiLang' (#169) from moreML into master

Reviewed-by: Lixfel <lixfel@steamwar.de>
Dieser Commit ist enthalten in:
Lixfel 2021-02-05 07:30:51 +01:00
Commit 4fb3411842
33 geänderte Dateien mit 650 neuen und 390 gelöschten Zeilen

Datei anzeigen

@ -53,8 +53,7 @@ import java.util.logging.Level;
public class BungeeCore extends Plugin { public class BungeeCore extends Plugin {
public static final String SERVER_TEAMCHAT_PREFIX = "§8STC §e"; public static final DateTimeFormatter DATE_FORMAT = DateTimeFormatter.ofPattern("dd.MM.yyyy");
public static final String TEAMCHAT_PREFIX = "§8TC §e";
public static String CHAT_PREFIX; public static String CHAT_PREFIX;
public static String WORLD_FOLDER; public static String WORLD_FOLDER;

Datei anzeigen

@ -73,9 +73,8 @@ public class EventStarter implements Runnable {
eventServer.put(blue.getTeamId(), subserver); eventServer.put(blue.getTeamId(), subserver);
eventServer.put(red.getTeamId(), subserver); eventServer.put(red.getTeamId(), subserver);
BungeeCore.broadcast(BungeeCore.CHAT_PREFIX + "§7Hier §eklicken §7für den Kampf §" + blue.getTeamColor() + blue.getTeamName() + " §8vs §" + red.getTeamColor() + red.getTeamName(), Message.broadcast("EVENT_FIGHT_BROADCAST", "EVENT_FIGHT_BROADCAST_HOVER",
"§eEvent beitreten", new ClickEvent(ClickEvent.Action.RUN_COMMAND, "/event " + blue.getTeamKuerzel()), blue.getTeamColor(), blue.getTeamName(), red.getTeamColor(), red.getTeamName());
new ClickEvent(ClickEvent.Action.RUN_COMMAND, "/event " + blue.getTeamKuerzel()));
} }
} }

Datei anzeigen

@ -109,7 +109,7 @@ public class Message {
public static void broadcast(String message, String onHover, ClickEvent onClick, Object... params){ public static void broadcast(String message, String onHover, ClickEvent onClick, Object... params){
for(ProxiedPlayer player : ProxyServer.getInstance().getPlayers()) for(ProxiedPlayer player : ProxyServer.getInstance().getPlayers())
send(message, player, parse(onHover, false, player), onClick, params); send(message, player, parse(onHover, true, player), onClick, params);
} }
public static void broadcast(String message, Object... params){ public static void broadcast(String message, Object... params){

Datei anzeigen

@ -19,7 +19,6 @@
package de.steamwar.bungeecore; package de.steamwar.bungeecore;
import de.steamwar.bungeecore.commands.EventCommand;
import de.steamwar.bungeecore.sql.EventFight; import de.steamwar.bungeecore.sql.EventFight;
import de.steamwar.bungeecore.sql.IgnoreSystem; import de.steamwar.bungeecore.sql.IgnoreSystem;
import de.steamwar.bungeecore.sql.SteamwarUser; import de.steamwar.bungeecore.sql.SteamwarUser;
@ -29,6 +28,7 @@ import net.md_5.bungee.api.connection.ProxiedPlayer;
import java.io.File; import java.io.File;
import java.io.IOException; import java.io.IOException;
import java.time.format.DateTimeFormatter;
import java.util.*; import java.util.*;
public class SubserverSystem { public class SubserverSystem {
@ -163,7 +163,7 @@ public class SubserverSystem {
eventFight.getFightID(), eventFight.getFightID(),
0, 0,
serverName, serverName,
serverName.replace(' ', '_') + eventFight.getStartTime().toLocalDateTime().format(EventCommand.TIME_FORMAT), serverName.replace(' ', '_') + eventFight.getStartTime().toLocalDateTime().format(DateTimeFormatter.ISO_TIME),
null, null,
null); null);
} }
@ -223,13 +223,12 @@ public class SubserverSystem {
if(o == null) if(o == null)
return; return;
if(IgnoreSystem.isIgnored(o, p)){ if(IgnoreSystem.isIgnored(o, p)){
BungeeCore.send(p, BungeeCore.CHAT_PREFIX + "§cDieser Spieler hat dich geblockt!"); Message.send("SERVER_IGNORED", p);
return; return;
} }
BungeeCore.send(o, BungeeCore.CHAT_PREFIX + "§e" + p.getName() + " §7möchte auf deine Bauwelt."); Message.send("SERVER_ADD_MEMBER", o, p.getName());
BungeeCore.send(o, "§7Klicke §ehier§7, wenn du das erlauben möchtest.", Message.sendPrefixless("SERVER_ADD_MESSAGE", o, Message.parse("SERVER_ADD_MESSAGE_HOVER", o, p.getName()),
"§e/bau addmember " + p.getName(),
new ClickEvent(ClickEvent.Action.RUN_COMMAND, "/bau addmember " + p.getName())); new ClickEvent(ClickEvent.Action.RUN_COMMAND, "/bau addmember " + p.getName()));
} }
@ -281,11 +280,11 @@ public class SubserverSystem {
pr = pb.start(); pr = pb.start();
pr.waitFor(); pr.waitFor();
} catch (IOException e) { } catch (IOException e) {
BungeeCore.send(p, BungeeCore.CHAT_PREFIX + "§cDas Erstellen der Welt ist fehlgeschlagen."); Message.send("SERVER_WORLD_ERROR", p);
throw new SecurityException("Could not create Bauwelt", e); throw new SecurityException("Could not create Bauwelt", e);
} catch (InterruptedException e){ } catch (InterruptedException e){
BungeeCore.log("Could not create Bauwelt", e); BungeeCore.log("Could not create Bauwelt", e);
BungeeCore.send(p, BungeeCore.CHAT_PREFIX + "§cDas Erstellen der Welt ist fehlgeschlagen."); Message.send("SERVER_WORLD_ERROR", p);
Thread.currentThread().interrupt(); Thread.currentThread().interrupt();
} }
} }

Datei anzeigen

@ -34,8 +34,6 @@ public class BauCommand {
private BauCommand(){} private BauCommand(){}
private static final String UNKNOWN_PLAYER = BungeeCore.CHAT_PREFIX + "§cUnbekannter Spieler";
public static void onBau(ChatEvent e, String[] command){ public static void onBau(ChatEvent e, String[] command){
if(BungeeCore.EVENT_MODE) if(BungeeCore.EVENT_MODE)
return; return;
@ -115,43 +113,43 @@ public class BauCommand {
private static void addmember(ProxiedPlayer p, String[] command){ private static void addmember(ProxiedPlayer p, String[] command){
if (command.length == 2) { if (command.length == 2) {
BungeeCore.send(p, BungeeCore.CHAT_PREFIX + "/bau addmember <Spieler>"); Message.send("BAU_ADDMEMBER_USAGE", p);
return; return;
} }
SteamwarUser target = SteamwarUser.get(command[2]); SteamwarUser target = SteamwarUser.get(command[2]);
if (target == null) { if (target == null) {
BungeeCore.send(p, UNKNOWN_PLAYER); Message.send("UNKNOWN_PLAYER", p);
return; return;
}else if(target.getUuid().equals(p.getUniqueId())) { }else if(target.getUuid().equals(p.getUniqueId())) {
BungeeCore.send(p, BungeeCore.CHAT_PREFIX + "§cDu brauchst dich nicht selbst hinzufügen!"); Message.send("BAU_ADDMEMBER_SELFADD", p);
return; return;
}else if (BauweltMember.getBauMember(p.getUniqueId(), target.getUuid()) != null) { }else if (BauweltMember.getBauMember(p.getUniqueId(), target.getUuid()) != null) {
BungeeCore.send(p, BungeeCore.CHAT_PREFIX + "§cDieser Spieler ist bereits Mitglied auf deiner Welt"); Message.send("BAU_ADDMEMBER_ISADDED", p);
return; return;
} }
new BauweltMember(p.getUniqueId(), target.getUuid(), true, false, false); new BauweltMember(p.getUniqueId(), target.getUuid(), true, false, false);
BungeeCore.send(p, BungeeCore.CHAT_PREFIX + "§aDer Spieler wurde zu deiner Welt hinzugefügt"); Message.send("BAU_ADDMEMBER_ADDED", p);
ProxiedPlayer z = ProxyServer.getInstance().getPlayer(target.getUuid()); ProxiedPlayer z = ProxyServer.getInstance().getPlayer(target.getUuid());
if(z != null) if(z != null)
BungeeCore.send(z, BungeeCore.CHAT_PREFIX + "§aDu wurdest zu der Welt von §6" + p.getName() + " §ahinzugefügt"); Message.send("BAU_ADDMEMBER_ADDED_TARGET", p, p.getName());
} }
private static void teleport(ProxiedPlayer p, String[] command){ private static void teleport(ProxiedPlayer p, String[] command){
if (command.length == 2) { if (command.length == 2) {
BungeeCore.send(p, BungeeCore.CHAT_PREFIX + "/bau tp <Spieler>"); Message.send("BAU_TP_USAGE", p);
return; return;
} }
SteamwarUser worldOwner = SteamwarUser.get(command[2]); SteamwarUser worldOwner = SteamwarUser.get(command[2]);
if (worldOwner == null) { if (worldOwner == null) {
BungeeCore.send(p, UNKNOWN_PLAYER); Message.send("UNKNOWN_PLAYER", p);
return; return;
}else if (!p.getUniqueId().equals(worldOwner.getUuid()) && BauweltMember.getBauMember(worldOwner.getUuid(), p.getUniqueId()) == null){ }else if (!p.getUniqueId().equals(worldOwner.getUuid()) && BauweltMember.getBauMember(worldOwner.getUuid(), p.getUniqueId()) == null){
SubserverSystem.sendDeniedMessage(p, worldOwner.getUuid()); SubserverSystem.sendDeniedMessage(p, worldOwner.getUuid());
BungeeCore.send(p, BungeeCore.CHAT_PREFIX + "§cDu darfst dich nicht auf diese Welt teleportieren"); Message.send("BAU_TP_NOALLOWED", p);
return; return;
} }
@ -214,7 +212,7 @@ public class BauCommand {
private static void delmember(ProxiedPlayer p, String[] command){ private static void delmember(ProxiedPlayer p, String[] command){
if (command.length == 2) { if (command.length == 2) {
BungeeCore.send(p, BungeeCore.CHAT_PREFIX + "/bau delmember <Spieler>"); Message.send("BAU_DELMEMBER_USAGE", p);
return; return;
} }
@ -223,19 +221,19 @@ public class BauCommand {
return; return;
if(SteamwarUser.get(target.getMemberID()).getUuid().equals(p.getUniqueId())) { if(SteamwarUser.get(target.getMemberID()).getUuid().equals(p.getUniqueId())) {
BungeeCore.send(p, BungeeCore.CHAT_PREFIX + "§cDu kannst dich nicht selbst entfernen!"); Message.send("BAU_DELMEMBER_SELFDEL", p);
return; return;
} }
target.remove(); target.remove();
ProxiedPlayer z = ProxyServer.getInstance().getPlayer(SteamwarUser.get(target.getMemberID()).getUuid()); ProxiedPlayer z = ProxyServer.getInstance().getPlayer(SteamwarUser.get(target.getMemberID()).getUuid());
if(z != null){ if(z != null){
BungeeCore.send(z, BungeeCore.CHAT_PREFIX + "§cDu wurdest von der Welt von §6" + p.getName() + " §centfernt."); Message.send("BAU_DELMEMBER_DELETED_TARGET", z, p.getName());
Subserver server = Subserver.getSubserver(z); Subserver server = Subserver.getSubserver(z);
if(server != null && server.getType() == Servertype.BAUSERVER && ((Bauserver)server).getOwner().equals(p.getUniqueId())) if(server != null && server.getType() == Servertype.BAUSERVER && ((Bauserver)server).getOwner().equals(p.getUniqueId()))
z.connect(ProxyServer.getInstance().getServerInfo(BungeeCore.LOBBY_SERVER)); z.connect(ProxyServer.getInstance().getServerInfo(BungeeCore.LOBBY_SERVER));
} }
BungeeCore.send(p, BungeeCore.CHAT_PREFIX + "§cDer Spieler wurde entfernt."); Message.send("BAU_DELMEMBER_DELETED", p);
} }
private static void delete(ProxiedPlayer p, String[] command){ private static void delete(ProxiedPlayer p, String[] command){
@ -255,7 +253,7 @@ public class BauCommand {
} }
private static void deleteWorld(ProxiedPlayer player, String world) { private static void deleteWorld(ProxiedPlayer player, String world) {
BungeeCore.send(player, BungeeCore.CHAT_PREFIX + "§aDeine Welt wird zurückgesetzt."); Message.send("BAU_DELETE_DELETED", player);
ProxyServer.getInstance().getScheduler().runAsync(BungeeCore.get(), () -> { ProxyServer.getInstance().getScheduler().runAsync(BungeeCore.get(), () -> {
for (Subserver subserver : Subserver.getServerList()) { for (Subserver subserver : Subserver.getServerList()) {
if (subserver.getType() == Servertype.BAUSERVER && ((Bauserver) subserver).getOwner().equals(player.getUniqueId())) { if (subserver.getType() == Servertype.BAUSERVER && ((Bauserver) subserver).getOwner().equals(player.getUniqueId())) {
@ -273,7 +271,7 @@ public class BauCommand {
for (Subserver subserver : Subserver.getServerList()) { for (Subserver subserver : Subserver.getServerList()) {
if (subserver.getType() == Servertype.BAUSERVER && ((Bauserver) subserver).getOwner().equals(p.getUniqueId())) { if (subserver.getType() == Servertype.BAUSERVER && ((Bauserver) subserver).getOwner().equals(p.getUniqueId())) {
if(subserver.getServer().getPlayers().isEmpty()){ if(subserver.getServer().getPlayers().isEmpty()){
BungeeCore.send(p, BungeeCore.CHAT_PREFIX + "§cDer Server startet bereits."); Message.send("BAU_START_ALREADY", p);
return; return;
} }
subserver.stop(); subserver.stop();
@ -291,13 +289,13 @@ public class BauCommand {
private static BauweltMember member(ProxiedPlayer p, SteamwarUser member){ private static BauweltMember member(ProxiedPlayer p, SteamwarUser member){
if (member == null) { if (member == null) {
BungeeCore.send(p, UNKNOWN_PLAYER); Message.send("UNKNOWN_PLAYER", p);
return null; return null;
} }
BauweltMember target = BauweltMember.getBauMember(p.getUniqueId(), member.getUuid()); BauweltMember target = BauweltMember.getBauMember(p.getUniqueId(), member.getUuid());
if (target == null) { if (target == null) {
BungeeCore.send(p, BungeeCore.CHAT_PREFIX + "§cDer Spieler ist kein Mitglied deiner Welt!"); Message.send("BAU_MEMBER_NOMEMBER", p);
return null; return null;
} }
return target; return target;
@ -305,7 +303,7 @@ public class BauCommand {
private static BauweltMember toggle(ProxiedPlayer p, String[] command, String subcommand){ private static BauweltMember toggle(ProxiedPlayer p, String[] command, String subcommand){
if (command.length == 2) { if (command.length == 2) {
BungeeCore.send(p, BungeeCore.CHAT_PREFIX + "/bau " + subcommand + " <Spieler>"); Message.send("BAU_MEMBER_TOGGLE_USAGE", p, subcommand);
return null; return null;
} }
@ -318,12 +316,12 @@ public class BauCommand {
if(permission){ if(permission){
if(player != null) if(player != null)
BungeeCore.send(player, BungeeCore.CHAT_PREFIX + "§aDu kannst nun auf der Welt von §e" + p.getName() + "§a " + what); Message.send("BAU_MEMBER_TOGGLE_TARGET", p, p.getName(), what);
BungeeCore.send(p, BungeeCore.CHAT_PREFIX + "§aDer Spieler darf nun " + what); Message.send("BAU_MEMBER_TOGGLE", p, what);
}else{ }else{
if(player != null) if(player != null)
BungeeCore.send(player, BungeeCore.CHAT_PREFIX + "§cDu kannst nun nicht mehr auf der Welt von §e" + p.getName() + "§c " + what); Message.send("BAU_MEMBER_TOGGLE_TARGET_OFF", p, p.getName(), what);
BungeeCore.send(p, BungeeCore.CHAT_PREFIX + "§cDer Spieler darf nun nicht mehr " + what); Message.send("BAU_MEMBER_TOGGLE_OFF", p, what);
} }
} }

Datei anzeigen

@ -40,7 +40,7 @@ public class ChallengeCommand 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/§echallenge §8[§7Spieler§8]"); Message.send("CHALLENGE_USAGE", sender);
return; return;
} }
@ -48,25 +48,25 @@ public class ChallengeCommand extends BasicCommand {
return; return;
if(ModLoaderBlocker.isFabric((ProxiedPlayer) sender)) { if(ModLoaderBlocker.isFabric((ProxiedPlayer) sender)) {
BungeeCore.send((ProxiedPlayer) sender, BungeeCore.CHAT_PREFIX + "§cHabe ich dir nicht gesagt, dass man mit Fabric/LiteLoader nicht auf die Arenen darf?"); Message.send("MODLOADER_DENIED", sender);
return; return;
} }
ProxiedPlayer target = ProxyServer.getInstance().getPlayer(args[0]); ProxiedPlayer target = ProxyServer.getInstance().getPlayer(args[0]);
if(target == null){ if(target == null){
BungeeCore.send(sender, BungeeCore.CHAT_PREFIX + "§cDer Herausgeforderte ist nicht online."); Message.send("CHALLENGE_OFFLINE", sender);
return; return;
}else if(target == sender){ }else if(target == sender){
BungeeCore.send(sender, BungeeCore.CHAT_PREFIX + "§cSchizophren?"); Message.send("CHALLENGE_SELF", sender);
return; return;
}else if (IgnoreSystem.isIgnored(target, (ProxiedPlayer) sender)) { }else if (IgnoreSystem.isIgnored(target, (ProxiedPlayer) sender)) {
BungeeCore.send(sender, BungeeCore.CHAT_PREFIX + "§cDer Herausgeforderte hat dich geblockt."); Message.send("CHALLENGE_IGNORED", sender);
return; return;
} }
Subserver subserver = Subserver.getSubserver(target); Subserver subserver = Subserver.getSubserver(target);
if(subserver != null && subserver.getType() == Servertype.ARENA){ if(subserver != null && subserver.getType() == Servertype.ARENA){
BungeeCore.send(sender, BungeeCore.CHAT_PREFIX + "§cDer Herausgeforderte ist bereits in einer Arena."); Message.send("CHALLENGE_INARENA", sender);
return; return;
} }
@ -80,9 +80,8 @@ public class ChallengeCommand extends BasicCommand {
arena.sendPlayer(player); arena.sendPlayer(player);
arena.sendPlayer(target); arena.sendPlayer(target);
BungeeCore.broadcast(BungeeCore.CHAT_PREFIX + "§e" + mode.getDisplayName() + "§7-§eDuell§7: " + player.getName() + " vs " + target.getName(), Message.broadcast("CHALLENGE_BROADCAST", sender, true, "CHALLENGE_BROADCAST_HOVER",
"§aZuschauen", new ClickEvent(ClickEvent.Action.RUN_COMMAND, "/join " + player.getName()), mode.getDisplayName(), player.getDisplayName(), target.getDisplayName());
new ClickEvent(ClickEvent.Action.RUN_COMMAND, "/join " + player.getName()));
}else{ }else{
if(!challenges.containsKey(player)){ if(!challenges.containsKey(player)){
challenges.put(player, new LinkedList<>()); challenges.put(player, new LinkedList<>());
@ -90,13 +89,10 @@ public class ChallengeCommand extends BasicCommand {
challenges.get(player).add(target); challenges.get(player).add(target);
BungeeCore.send(player, BungeeCore.CHAT_PREFIX + "§7Du hast §e" + target.getName() + " §7zu einem §e" + mode.getDisplayName() + "-Kampf §7herausgefordert!"); Message.send("CHALLENGE_CHALLENGED", player, target.getName(), mode.getDisplayName());
BungeeCore.send(target, BungeeCore.CHAT_PREFIX + "§e" + player.getName() + " §7 hat dich zu einem §e" + mode.getDisplayName() + Message.send("CHALLENGE_CHALLENGED_TARGET", target, player.getName(), mode.getDisplayName(), mode.getMaps().size()!=1?Message.parse("CHALLENGE_CHALLENGED_MAP", target, map):"");
"-Kampf §7" + (mode.getMaps().size()!=1?"auf §e" + map + " §7 ":"") + "herausgefordert!");
BungeeCore.send(target, BungeeCore.CHAT_PREFIX + "§7Klicke §ehier§7, um die Herausforderung anzunehmen", Message.send("CHALLENGE_ACCEPT", target, Message.parse("CHALLENGE_ACCEPT_HOVER", target), new ClickEvent(ClickEvent.Action.RUN_COMMAND, "/challenge " + player.getName() + " " + mode.getChatName() + " " + map));
"§aHerausforderung annehmen",
new ClickEvent(ClickEvent.Action.RUN_COMMAND, "/challenge " + player.getName() + " " + mode.getChatName() + " " + map));
} }
}); });
} }

Datei anzeigen

@ -21,6 +21,7 @@ package de.steamwar.bungeecore.commands;
import de.steamwar.bungeecore.BungeeCore; import de.steamwar.bungeecore.BungeeCore;
import de.steamwar.bungeecore.EventStarter; import de.steamwar.bungeecore.EventStarter;
import de.steamwar.bungeecore.Message;
import de.steamwar.bungeecore.Subserver; import de.steamwar.bungeecore.Subserver;
import de.steamwar.bungeecore.sql.Event; import de.steamwar.bungeecore.sql.Event;
import de.steamwar.bungeecore.sql.EventFight; import de.steamwar.bungeecore.sql.EventFight;
@ -37,9 +38,6 @@ import java.util.Set;
public class EventCommand extends BasicCommand { public class EventCommand extends BasicCommand {
public static final DateTimeFormatter TIME_FORMAT = DateTimeFormatter.ofPattern("HH:mm");
static final DateTimeFormatter DATE_FORMAT = DateTimeFormatter.ofPattern("dd.MM.");
public EventCommand() { public EventCommand() {
super("event", ""); super("event", "");
} }
@ -64,13 +62,13 @@ public class EventCommand extends BasicCommand {
Team team = Team.get(args[0]); Team team = Team.get(args[0]);
if(team == null){ if(team == null){
BungeeCore.send(player, BungeeCore.CHAT_PREFIX + "§cDieses Team gibt es nicht"); Message.send("EVENT_NO_TEAM", player);
return; return;
} }
Subserver eventArena = EventStarter.getEventServer().get(team.getTeamId()); Subserver eventArena = EventStarter.getEventServer().get(team.getTeamId());
if(eventArena == null || !Subserver.getServerList().contains(eventArena)){ if(eventArena == null || !Subserver.getServerList().contains(eventArena)){
BungeeCore.send(player, BungeeCore.CHAT_PREFIX + "§cDas Team kämpft derzeit nicht"); Message.send("EVENT_NO_FIGHT_TEAM", player);
return; return;
} }
@ -78,23 +76,20 @@ public class EventCommand extends BasicCommand {
} }
private void noCurrentEvent(ProxiedPlayer player){ private void noCurrentEvent(ProxiedPlayer player){
BungeeCore.send(player, BungeeCore.CHAT_PREFIX + "§cDerzeit findet kein Event statt"); Message.send("EVENT_NO_CURRENT", player);
List<Event> coming = Event.getComing(); List<Event> coming = Event.getComing();
if(!coming.isEmpty()){ if(!coming.isEmpty()){
BungeeCore.send(player, BungeeCore.CHAT_PREFIX + "§eKommende Events§8:"); DateTimeFormatter dateFormat = DateTimeFormatter.ofPattern(Message.parse("EVENT_DATE_FORMAT", player));
Message.send("EVENT_COMING", player);
for(Event e : coming){ for(Event e : coming){
BungeeCore.send(player, "§7" + Message.send("EVENT_COMING_EVENT", player, e.getStart().toLocalDateTime().format(dateFormat), e.getEnd().toLocalDateTime().format(dateFormat), e.getEventName());
e.getStart().toLocalDateTime().format(DATE_FORMAT) +
"§8-§7" +
e.getEnd().toLocalDateTime().format(DATE_FORMAT) +
"§8: §e" +
e.getEventName());
Set<Team> teams = TeamTeilnahme.getTeams(e.getEventID()); Set<Team> teams = TeamTeilnahme.getTeams(e.getEventID());
if(!teams.isEmpty()){ if(!teams.isEmpty()){
StringBuilder tline = new StringBuilder("§7 Mit§8: "); StringBuilder tline = new StringBuilder();
for(Team t : teams){ for(Team t : teams){
tline.append("§").append(t.getTeamColor()).append(t.getTeamKuerzel()).append(" "); tline.append(Message.parse("EVENT_COMING_TEAM", player, t.getTeamColor(), t.getTeamKuerzel()));
} }
Message.send("EVENT_COMING_TEAMS", player, tline.toString());
BungeeCore.send(player, tline.toString()); BungeeCore.send(player, tline.toString());
} }
} }
@ -102,33 +97,30 @@ public class EventCommand extends BasicCommand {
} }
private void eventOverview(ProxiedPlayer player, Event currentEvent){ private void eventOverview(ProxiedPlayer player, Event currentEvent){
BungeeCore.send(player, BungeeCore.CHAT_PREFIX + "§8/§eevent §8[§eTeam§8] - §7Um dich zum Kampf zu teleportieren"); Message.send("EVENT_USAGE", player);
List<EventFight> fights = EventFight.getEvent(currentEvent.getEventID()); List<EventFight> fights = EventFight.getEvent(currentEvent.getEventID());
Instant now = Instant.now(); Instant now = Instant.now();
BungeeCore.send(player, "§e§l" + currentEvent.getEventName()); Message.send("EVENT_CURRENT_EVENT", player, currentEvent.getEventName());
DateTimeFormatter timeFormat = DateTimeFormatter.ofPattern(Message.parse("EVENT_TIME_FORMAT", player));
for(EventFight fight : fights){ for(EventFight fight : fights){
Team blue = Team.get(fight.getTeamBlue()); Team blue = Team.get(fight.getTeamBlue());
Team red = Team.get(fight.getTeamRed()); Team red = Team.get(fight.getTeamRed());
StringBuilder fline = new StringBuilder("§7") StringBuilder fline = new StringBuilder(Message.parse("EVENT_CURRENT_FIGHT", player, fight.getStartTime().toLocalDateTime().format(timeFormat), blue.getTeamColor(), blue.getTeamKuerzel(),
.append(fight.getStartTime().toLocalDateTime().format(TIME_FORMAT)) red.getTeamColor(), red.getTeamKuerzel()));
.append(" §e")
.append(blue.getTeamKuerzel())
.append("§8 vs §e")
.append(red.getTeamKuerzel());
if(now.isAfter(fight.getStartTime().toInstant().plus(35, ChronoUnit.MINUTES))){ if(now.isAfter(fight.getStartTime().toInstant().plus(35, ChronoUnit.MINUTES))){
switch(fight.getErgebnis()){ switch(fight.getErgebnis()){
case 1: case 1:
fline.append("§8: §7Sieg §e").append(blue.getTeamKuerzel()); fline.append(Message.parse("EVENT_CURRENT_FIGHT_WIN", player, blue.getTeamColor(), blue.getTeamKuerzel()));
break; break;
case 2: case 2:
fline.append("§8: §7Sieg §e").append(red.getTeamKuerzel()); fline.append(Message.parse("EVENT_CURRENT_FIGHT_WIN", player, red.getTeamColor(), red.getTeamKuerzel()));
break; break;
default: default:
fline.append("§8: §7Unentschieden"); fline.append(Message.parse("EVENT_CURRENT_FIGHT_DRAW", player));
} }
} }

Datei anzeigen

@ -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.Event; import de.steamwar.bungeecore.sql.Event;
import de.steamwar.bungeecore.sql.EventFight; import de.steamwar.bungeecore.sql.EventFight;
import de.steamwar.bungeecore.sql.Team; import de.steamwar.bungeecore.sql.Team;
@ -44,7 +44,7 @@ public class EventRescheduleCommand extends BasicCommand {
ProxiedPlayer player = (ProxiedPlayer) sender; ProxiedPlayer player = (ProxiedPlayer) sender;
if(args.length != 2){ if(args.length != 2){
BungeeCore.send(player, BungeeCore.CHAT_PREFIX + "§c/eventreschedule [Team1 (Blue)] [Team2 (Red)]"); Message.send("EVENTRESCHEDULE_USAGE", player);
return; return;
} }
@ -52,7 +52,7 @@ public class EventRescheduleCommand extends BasicCommand {
Team teamRed = Team.get(args[1]); Team teamRed = Team.get(args[1]);
Event event = Event.get(); Event event = Event.get();
if(teamBlue == null || teamRed == null || event == null){ if(teamBlue == null || teamRed == null || event == null){
BungeeCore.send(player, BungeeCore.CHAT_PREFIX + "§cEin Team ist unbekannt / Derzeit kein Event"); Message.send("EVENTRESCHEDULE_UNKNOWN_TEAM", player);
return; return;
} }
@ -65,13 +65,13 @@ public class EventRescheduleCommand extends BasicCommand {
continue; continue;
if(fight.getTeamBlue() == teamBlue.getTeamId() && fight.getTeamRed() == teamRed.getTeamId()){ if(fight.getTeamBlue() == teamBlue.getTeamId() && fight.getTeamRed() == teamRed.getTeamId()){
BungeeCore.send(player, BungeeCore.CHAT_PREFIX + "§aKampf startet in 30s"); Message.send("EVENTRESCHEDULE_STARTING", player);
fight.reschedule(); fight.reschedule();
EventFight.loadAllComingFights(); EventFight.loadAllComingFights();
return; return;
} }
} }
BungeeCore.send(player, BungeeCore.CHAT_PREFIX + "§cKein Kampf zwischen den Teams gefunden"); Message.send("EVENTRESCHEDULE_NO_FIGHT", player);
} }
} }

Datei anzeigen

@ -23,7 +23,6 @@ import de.steamwar.bungeecore.*;
import de.steamwar.bungeecore.listeners.mods.ModLoaderBlocker; import de.steamwar.bungeecore.listeners.mods.ModLoaderBlocker;
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;
import net.md_5.bungee.api.ProxyServer;
import net.md_5.bungee.api.chat.ClickEvent; import net.md_5.bungee.api.chat.ClickEvent;
import net.md_5.bungee.api.chat.ComponentBuilder; import net.md_5.bungee.api.chat.ComponentBuilder;
import net.md_5.bungee.api.chat.HoverEvent; import net.md_5.bungee.api.chat.HoverEvent;
@ -51,7 +50,7 @@ public class FightCommand extends BasicCommand {
if(mode != null) if(mode != null)
return mode; return mode;
BungeeCore.send(sender, BungeeCore.CHAT_PREFIX + "§cUnbekannter Spielmodus: " + arg); Message.send("FIGHT_UNKNOWN_GAMEMODE", sender, arg);
return null; return null;
} }
@ -62,7 +61,7 @@ public class FightCommand extends BasicCommand {
if(arg.equalsIgnoreCase("Random")) if(arg.equalsIgnoreCase("Random"))
return mode.getRandomMap(); return mode.getRandomMap();
BungeeCore.send(sender, BungeeCore.CHAT_PREFIX + "§cDie gewünschte Arena gibt es nicht."); Message.send("FIGHT_UNKNOWN_ARENA", sender);
return null; return null;
} }
@ -93,7 +92,7 @@ public class FightCommand extends BasicCommand {
String command = precommand + mode.getChatName() + " Random"; String command = precommand + mode.getChatName() + " Random";
start.setBold(true); start.setBold(true);
start.setColor(ChatColor.GRAY); start.setColor(ChatColor.GRAY);
start.setText("Random "); start.setText(Message.parse("FIGHT_ARENA_RANDOM", sender) + " ");
start.setHoverEvent(new HoverEvent(HoverEvent.Action.SHOW_TEXT, new ComponentBuilder("§e" + command).create())); start.setHoverEvent(new HoverEvent(HoverEvent.Action.SHOW_TEXT, new ComponentBuilder("§e" + command).create()));
start.setClickEvent(new ClickEvent(ClickEvent.Action.RUN_COMMAND, command)); start.setClickEvent(new ClickEvent(ClickEvent.Action.RUN_COMMAND, command));
current = new TextComponent(); current = new TextComponent();
@ -117,7 +116,7 @@ public class FightCommand extends BasicCommand {
private static boolean alreadyInArena(ProxiedPlayer player){ private static boolean alreadyInArena(ProxiedPlayer player){
Subserver subserver = Subserver.getSubserver(player); Subserver subserver = Subserver.getSubserver(player);
if(subserver != null && subserver.getType() == Servertype.ARENA){ if(subserver != null && subserver.getType() == Servertype.ARENA){
BungeeCore.send(player, BungeeCore.CHAT_PREFIX + "§cDu befindest dich bereits in einer Arena."); Message.send("FIGHT_IN_ARENA", player);
return true; return true;
} }
@ -133,7 +132,7 @@ public class FightCommand extends BasicCommand {
return; return;
if(ModLoaderBlocker.isFabric(player) && !precommand.equals("/bau testarena ")) { if(ModLoaderBlocker.isFabric(player) && !precommand.equals("/bau testarena ")) {
BungeeCore.send((ProxiedPlayer) sender, BungeeCore.CHAT_PREFIX + "§cHabe ich dir nicht gesagt, dass man mit Fabric/LiteLoader nicht auf die Arenen darf?"); Message.send("MODLOADER_DENIED", sender);
return; return;
} }
@ -167,10 +166,8 @@ public class FightCommand extends BasicCommand {
createArena(sender, "/fight ", args, 0, false, (player, mode, map) -> { createArena(sender, "/fight ", args, 0, false, (player, mode, map) -> {
Subserver arena = SubserverSystem.startArena(mode, map, 0, 0, null, null, player.getUniqueId(), null); Subserver arena = SubserverSystem.startArena(mode, map, 0, 0, null, null, player.getUniqueId(), null);
arena.sendPlayer(player); arena.sendPlayer(player);
TextComponent tc = new TextComponent(BungeeCore.CHAT_PREFIX + "§7Klicke §ehier§7, um §e" + mode.getDisplayName() + " §7gegen §e" + player.getName() + " §7zu §7kämpfen!"); Message.broadcast("FIGHT_BROADCAST", "FIGHT_BROADCAST_HOVER"
tc.setHoverEvent(new HoverEvent(HoverEvent.Action.SHOW_TEXT, new ComponentBuilder("§aGegen §7" + player.getName() + " §ekämpfen").create())); , new ClickEvent(ClickEvent.Action.RUN_COMMAND, "/join " + player.getName()), mode.getDisplayName(), player.getName());
tc.setClickEvent(new ClickEvent(ClickEvent.Action.RUN_COMMAND, "/join " + player.getName()));
ProxyServer.getInstance().broadcast(tc);
}); });
} }

Datei anzeigen

@ -19,16 +19,9 @@
package de.steamwar.bungeecore.commands; package de.steamwar.bungeecore.commands;
import de.steamwar.bungeecore.ArenaMode; import de.steamwar.bungeecore.*;
import de.steamwar.bungeecore.BungeeCore;
import de.steamwar.bungeecore.Subserver;
import de.steamwar.bungeecore.SubserverSystem;
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.chat.ClickEvent; import net.md_5.bungee.api.chat.ClickEvent;
import net.md_5.bungee.api.chat.ComponentBuilder;
import net.md_5.bungee.api.chat.HoverEvent;
import net.md_5.bungee.api.chat.TextComponent;
import java.util.LinkedList; import java.util.LinkedList;
@ -42,10 +35,8 @@ public class HistoricCommand extends BasicCommand {
FightCommand.createArena(sender, "/historic ", args, 0, true, (player, mode, map) -> { FightCommand.createArena(sender, "/historic ", args, 0, true, (player, mode, map) -> {
Subserver arena = SubserverSystem.startArena(mode, map, 0, 0, null, null, player.getUniqueId(), null); Subserver arena = SubserverSystem.startArena(mode, map, 0, 0, null, null, player.getUniqueId(), null);
arena.sendPlayer(player); arena.sendPlayer(player);
TextComponent tc = new TextComponent(BungeeCore.CHAT_PREFIX + "§7Historischer §e" + mode.getDisplayName() + "§8-§7Kampf von §e" + player.getName() + "§8!"); Message.broadcast("HISTORIC_BROADCAST", "HISTORIC_BROADCAST_HOVER"
tc.setHoverEvent(new HoverEvent(HoverEvent.Action.SHOW_TEXT, new ComponentBuilder("§aGegen §7" + player.getName() + " §ekämpfen").create())); , new ClickEvent(ClickEvent.Action.RUN_COMMAND, "/join " + player.getName()), mode.getDisplayName(), player.getName());
tc.setClickEvent(new ClickEvent(ClickEvent.Action.RUN_COMMAND, "/join " + player.getName()));
ProxyServer.getInstance().broadcast(tc);
}); });
} }

Datei anzeigen

@ -24,9 +24,6 @@ import de.steamwar.bungeecore.sql.BauweltMember;
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;
import net.md_5.bungee.api.chat.ClickEvent; import net.md_5.bungee.api.chat.ClickEvent;
import net.md_5.bungee.api.chat.ComponentBuilder;
import net.md_5.bungee.api.chat.HoverEvent;
import net.md_5.bungee.api.chat.TextComponent;
import net.md_5.bungee.api.config.ServerInfo; import net.md_5.bungee.api.config.ServerInfo;
import net.md_5.bungee.api.connection.ProxiedPlayer; import net.md_5.bungee.api.connection.ProxiedPlayer;
@ -34,8 +31,6 @@ import java.util.ArrayList;
public class JoinmeCommand extends BasicCommand { public class JoinmeCommand extends BasicCommand {
private static final String DENY_MESSAGE = "§cDu kannst diesem Spieler derzeit nicht folgen.";
public JoinmeCommand() { public JoinmeCommand() {
super("joinme", ""); super("joinme", "");
} }
@ -46,17 +41,15 @@ public class JoinmeCommand extends BasicCommand {
ProxiedPlayer player = (ProxiedPlayer) sender; ProxiedPlayer player = (ProxiedPlayer) sender;
if (args.length == 0 && player.hasPermission("bungeecore.joinme")) { if (args.length == 0 && player.hasPermission("bungeecore.joinme")) {
TextComponent tc = new TextComponent(BungeeCore.CHAT_PREFIX + "§7Klicke §ehier§8, §7um zu §e" + player.getName() + " §7auf §e" + player.getServer().getInfo().getName() + " §7zu kommen§8!"); Message.broadcast("JOINME_BROADCAST", "JOINME_BROADCAST_HOVER"
tc.setHoverEvent(new HoverEvent(HoverEvent.Action.SHOW_TEXT, new ComponentBuilder("§aSpieler folgen").create())); , new ClickEvent(ClickEvent.Action.RUN_COMMAND, "/join " + player.getName()));
tc.setClickEvent(new ClickEvent(ClickEvent.Action.RUN_COMMAND, "/join " + player.getName()));
ProxyServer.getInstance().broadcast(tc);
} else if (args.length == 1) { } else if (args.length == 1) {
ProxiedPlayer target = ProxyServer.getInstance().getPlayer(args[0]); ProxiedPlayer target = ProxyServer.getInstance().getPlayer(args[0]);
if(target == null || !target.isConnected()){ if(target == null || !target.isConnected()){
BungeeCore.send(player, BungeeCore.CHAT_PREFIX + "§cDieser Spieler ist offline."); Message.send("JOINME_PLAYER_OFFLINE", player);
return; return;
}else if(target.equals(player)){ }else if(target.equals(player)){
BungeeCore.send(player, BungeeCore.CHAT_PREFIX + "§cSei eins mit dir selbst!"); Message.send("JOINME_PLAYER_SELF", player);
return; return;
} }
ServerInfo server = target.getServer().getInfo(); ServerInfo server = target.getServer().getInfo();
@ -74,18 +67,18 @@ public class JoinmeCommand extends BasicCommand {
subserver.sendPlayer(player); subserver.sendPlayer(player);
} else { } else {
SubserverSystem.sendDeniedMessage(player, bauserver.getOwner()); SubserverSystem.sendDeniedMessage(player, bauserver.getOwner());
BungeeCore.send(player, BungeeCore.CHAT_PREFIX + DENY_MESSAGE); Message.send("JOIN_PLAYER_BLOCK", player);
} }
} }
}else if(serverPerm != null && !player.hasPermission(serverPerm)){ }else if(serverPerm != null && !player.hasPermission(serverPerm)){
BungeeCore.send(player, BungeeCore.CHAT_PREFIX + DENY_MESSAGE); Message.send("JOIN_PLAYER_BLOCK", player);
}else if(serverPerm == null && !player.getGroups().contains("team")) { }else if(serverPerm == null && !player.getGroups().contains("team")) {
BungeeCore.send(player, BungeeCore.CHAT_PREFIX + DENY_MESSAGE); Message.send("JOIN_PLAYER_BLOCK", player);
}else{ }else{
player.connect(server); player.connect(server);
} }
} else { } else {
BungeeCore.send(player, BungeeCore.CHAT_PREFIX + "§7Mit §8/§ejoin §8[§eSpieler§8] §7kannst du einem Spieler folgen §8(z.B. in eine Arena)§7."); Message.send("JOINME_USAGE", player);
} }
} }
} }

Datei anzeigen

@ -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.CommandSender; import net.md_5.bungee.api.CommandSender;
import net.md_5.bungee.api.ProxyServer; import net.md_5.bungee.api.ProxyServer;
import net.md_5.bungee.api.connection.ProxiedPlayer; import net.md_5.bungee.api.connection.ProxiedPlayer;
@ -35,18 +36,18 @@ public class KickCommand 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 + "/kick [Spieler] [Nachricht]"); Message.send("KICK_USAGE", sender);
return; return;
} }
ProxiedPlayer target = ProxyServer.getInstance().getPlayer(args[0]); ProxiedPlayer target = ProxyServer.getInstance().getPlayer(args[0]);
if(target == null){ if(target == null){
BungeeCore.send(sender, BungeeCore.CHAT_PREFIX + "§cDieser Spieler ist derzeit nicht online!"); Message.send("KICK_OFFLINE", sender);
return; return;
} }
if(args.length == 1){ if(args.length == 1){
target.disconnect(BungeeCore.stringToText(BungeeCore.CHAT_PREFIX + "§cDu wurdest gekickt.")); Message.send("KICK_NORMAL", target);
}else{ }else{
StringBuilder msgBuilder = new StringBuilder(); StringBuilder msgBuilder = new StringBuilder();
msgBuilder.append(BungeeCore.CHAT_PREFIX).append("§c"); msgBuilder.append(BungeeCore.CHAT_PREFIX).append("§c");
@ -55,7 +56,7 @@ public class KickCommand extends BasicCommand {
} }
target.disconnect(BungeeCore.stringToText(msgBuilder.toString())); target.disconnect(BungeeCore.stringToText(msgBuilder.toString()));
} }
BungeeCore.send(sender, BungeeCore.CHAT_PREFIX + "Der Spieler " + target.getName() + " wurde gekickt."); Message.send("KICK_CONFIRM", sender, target.getName());
} }
@Override @Override

Datei anzeigen

@ -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.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;
@ -42,7 +43,7 @@ public class MsgCommand extends BasicCommand {
ProxiedPlayer player = (ProxiedPlayer) sender; ProxiedPlayer player = (ProxiedPlayer) sender;
if (args.length < 2) { if (args.length < 2) {
BungeeCore.send(player, BungeeCore.CHAT_PREFIX + "/msg [Benutzer] [Nachricht]"); Message.send("MSG_USAGE", player);
return; return;
} }
@ -54,28 +55,26 @@ public class MsgCommand extends BasicCommand {
ProxiedPlayer target = ProxyServer.getInstance().getPlayer(args[0]); ProxiedPlayer target = ProxyServer.getInstance().getPlayer(args[0]);
if(target == null){ if(target == null){
BungeeCore.send(player, BungeeCore.CHAT_PREFIX + "§cDieser Spieler ist derzeit nicht online!"); Message.send("MSG_OFFLINE", player);
return; return;
}else if (IgnoreSystem.isIgnored(target, player)) { }else if (IgnoreSystem.isIgnored(target, player)) {
BungeeCore.send(player, BungeeCore.CHAT_PREFIX + "§cDieser Spieler hat dich geblockt!"); Message.send("MSG_IGNORED", player);
return; return;
}else if(target.getChatMode() != ProxiedPlayer.ChatMode.SHOWN){ }else if(target.getChatMode() != ProxiedPlayer.ChatMode.SHOWN){
BungeeCore.send(player, BungeeCore.CHAT_PREFIX + "§cDieser Spieler empfängt derzeit keine Chatnachrichten!"); Message.send("MSG_NOMESSAGE", player);
return; return;
}else if(target.equals(player)){ }else if(target.equals(player)){
BungeeCore.send(player, BungeeCore.CHAT_PREFIX + "§cNachrichten an dich selbst hast du wirklich nicht nötig!"); Message.send("MSG_SELF", player);
return; return;
} }
StringBuilder msgBuilder = new StringBuilder(); StringBuilder msgBuilder = new StringBuilder();
msgBuilder.append("§e").append(player.getName()).append("§8»§e").append(target.getName()).append(" §r§7");
for (int i = 1; i < args.length; i++){ for (int i = 1; i < args.length; i++){
msgBuilder.append(args[i]).append(" "); msgBuilder.append(args[i]).append(" ");
} }
String msg = msgBuilder.toString(); Message.send("MSG_FORMAT", player, player.getName(), target.getName(), msgBuilder.toString());
BungeeCore.send(player, msg); Message.send("MSG_FORMAT", target, player.getName(), target.getName(), msgBuilder.toString());
BungeeCore.send(target, msg); BungeeCore.log(Message.parse("MSG_FORMAT", player, player.getName(), target.getName(), msgBuilder.toString()));
BungeeCore.log(msg);
lastChats.put(player, target); lastChats.put(player, target);
lastChats.put(target, player); lastChats.put(target, player);

Datei anzeigen

@ -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 net.md_5.bungee.api.CommandSender; import net.md_5.bungee.api.CommandSender;
import net.md_5.bungee.api.connection.ProxiedPlayer; import net.md_5.bungee.api.connection.ProxiedPlayer;
@ -33,7 +33,7 @@ public class PingCommand 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(BungeeCore.CHAT_PREFIX + "§7Dein Ping beträgt §c" + player.getPing() + "§r§7 ms!"); Message.send("PING_RESPONSE", player, player.getPing());
} }
} }
} }

Datei anzeigen

@ -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.listeners.PollSystem; import de.steamwar.bungeecore.listeners.PollSystem;
import de.steamwar.bungeecore.sql.PollAnswer; import de.steamwar.bungeecore.sql.PollAnswer;
import de.steamwar.bungeecore.sql.SteamwarUser; import de.steamwar.bungeecore.sql.SteamwarUser;
@ -40,7 +40,7 @@ public class PollCommand extends BasicCommand {
ProxiedPlayer player = (ProxiedPlayer) sender; ProxiedPlayer player = (ProxiedPlayer) sender;
if(PollSystem.noCurrentPoll()){ if(PollSystem.noCurrentPoll()){
BungeeCore.send(player, "§cDerzeit läuft keine Umfrage."); Message.send("POLL_NO_POLL", player);
return; return;
} }
@ -55,15 +55,15 @@ public class PollCommand extends BasicCommand {
if(answer < 1 || answer > PollSystem.answers()) if(answer < 1 || answer > PollSystem.answers())
throw new NumberFormatException(); throw new NumberFormatException();
}catch(NumberFormatException e){ }catch(NumberFormatException e){
BungeeCore.send(player, BungeeCore.CHAT_PREFIX + "§cDas ist keine Antwortmöglichkeit!"); Message.send("POLL_NO_ANSWER", player);
return; return;
} }
PollAnswer pollAnswer = PollAnswer.get(SteamwarUser.get(player.getUniqueId()).getId()); PollAnswer pollAnswer = PollAnswer.get(SteamwarUser.get(player.getUniqueId()).getId());
if(pollAnswer.hasAnswered()) if(pollAnswer.hasAnswered())
BungeeCore.send(player, BungeeCore.CHAT_PREFIX + "§aDeine Antwort wurde aktualisiert"); Message.send("POLL_ANSWER_REFRESH", player);
else else
BungeeCore.send(player, BungeeCore.CHAT_PREFIX + "§aDeine Antwort wurde registriert"); Message.send("POLL_ANSWER_NEW", player);
pollAnswer.setAnswer(answer); pollAnswer.setAnswer(answer);
} }

Datei anzeigen

@ -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.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;
@ -38,7 +39,7 @@ public class RCommand extends BasicCommand {
if(sender instanceof ProxiedPlayer){ if(sender instanceof ProxiedPlayer){
ProxiedPlayer player = (ProxiedPlayer) sender; ProxiedPlayer player = (ProxiedPlayer) sender;
if(args.length == 0){ if(args.length == 0){
BungeeCore.send(player, BungeeCore.CHAT_PREFIX + "/r [Antwort]"); Message.send("R_USAGE", player);
return; return;
} }
@ -50,29 +51,27 @@ public class RCommand extends BasicCommand {
ProxiedPlayer target = lastChats.get(player); ProxiedPlayer target = lastChats.get(player);
if(target == null){ if(target == null){
BungeeCore.send(player, BungeeCore.CHAT_PREFIX + "§cDu hast bisher mit niemandem geschrieben!"); Message.send("R_NOTHING", player);
return; return;
}else if(!target.isConnected()){ }else if(!target.isConnected()){
BungeeCore.send(player, BungeeCore.CHAT_PREFIX + "§cDieser Spieler ist derzeit nicht online!"); Message.send("R_OFFLINE", player);
lastChats.remove(player); lastChats.remove(player);
return; return;
}else if (IgnoreSystem.isIgnored(target, player)) { }else if (IgnoreSystem.isIgnored(target, player)) {
BungeeCore.send(player, BungeeCore.CHAT_PREFIX + "§cDieser Spieler hat dich geblockt!"); Message.send("R_BLOCKED", player);
return; return;
}else if(target.getChatMode() != ProxiedPlayer.ChatMode.SHOWN){ }else if(target.getChatMode() != ProxiedPlayer.ChatMode.SHOWN){
BungeeCore.send(player, BungeeCore.CHAT_PREFIX + "§cDieser Spieler empfängt derzeit keine Chatnachrichten!"); Message.send("R_NO_CHAT", player);
return; return;
} }
StringBuilder msgBuilder = new StringBuilder(); StringBuilder msgBuilder = new StringBuilder();
msgBuilder.append("§e").append(player.getName()).append("§8»§e").append(target.getName()).append(" §r§7");
for (String arg : args){ for (String arg : args){
msgBuilder.append(arg).append(" "); msgBuilder.append(arg).append(" ");
} }
String msg = msgBuilder.toString(); Message.send("MSG_FORMAT", player, player.getName(), target.getName(), msgBuilder.toString());
BungeeCore.send(player, msg); Message.send("MSG_FORMAT", target, player.getName(), target.getName(), msgBuilder.toString());
BungeeCore.send(target, msg); BungeeCore.log(Message.parse("MSG_FORMAT", player, player.getName(), target.getName(), msgBuilder.toString()));
BungeeCore.log(msg);
lastChats.put(target, player); lastChats.put(target, player);
} }

Datei anzeigen

@ -20,7 +20,7 @@
package de.steamwar.bungeecore.commands; package de.steamwar.bungeecore.commands;
import de.steamwar.bungeecore.ArenaMode; import de.steamwar.bungeecore.ArenaMode;
import de.steamwar.bungeecore.BungeeCore; import de.steamwar.bungeecore.Message;
import de.steamwar.bungeecore.sql.Elo; import de.steamwar.bungeecore.sql.Elo;
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,7 +40,7 @@ public class RankCommand extends BasicCommand {
return; return;
ProxiedPlayer player = (ProxiedPlayer) sender; ProxiedPlayer player = (ProxiedPlayer) sender;
BungeeCore.send(player, BungeeCore.CHAT_PREFIX + "§7§lPlatzierungen"); Message.send("RANK_HEADER", player);
SteamwarUser user = SteamwarUser.get(player.getUniqueId()); SteamwarUser user = SteamwarUser.get(player.getUniqueId());
for(ArenaMode mode : ArenaMode.getAllModes()){ for(ArenaMode mode : ArenaMode.getAllModes()){
if(!mode.isRanked()) if(!mode.isRanked())
@ -49,9 +49,9 @@ public class RankCommand extends BasicCommand {
int placement = Elo.getPlacement(elo, mode.getSchemType()); int placement = Elo.getPlacement(elo, mode.getSchemType());
if(placement == -1) if(placement == -1)
BungeeCore.send(player, "§7" + mode.getChatName() + "§8: §eunplatziert"); Message.send("RANK_UNPLACED", player, mode.getChatName());
else else
BungeeCore.send(player, "§7" + mode.getChatName() + "§8: §e" + ++placement + "§8. §7mit §e" + elo + " §7Elo§8."); Message.send("RANK_PLACED", player, mode.getChatName(), placement, elo);
} }
} }

Datei anzeigen

@ -59,7 +59,7 @@ public class RankedCommand extends BasicCommand {
if(mode == null) if(mode == null)
return; return;
else if(!mode.isRanked()){ else if(!mode.isRanked()){
BungeeCore.send(sender, BungeeCore.CHAT_PREFIX + "§cDieser Spielmodus ist nicht für Ranglistenspiele freigeschalten"); Message.send("RANKED_NO_RANKED_MODE", sender);
return; return;
} }
@ -114,14 +114,14 @@ public class RankedCommand extends BasicCommand {
private void togglePlayer(ProxiedPlayer player){ private void togglePlayer(ProxiedPlayer player){
for(WaitingPlayer wp : players){ for(WaitingPlayer wp : players){
if(wp.player == player){ if(wp.player == player){
BungeeCore.send(player, BungeeCore.CHAT_PREFIX + "§cRanglistenspiel-Warteschlange verlassen"); Message.send("RANKED_QUEUE_LEFT", player);
players.remove(wp); players.remove(wp);
return; return;
} }
} }
BungeeCore.send(player, BungeeCore.CHAT_PREFIX + "§aRanglistenspiel-Warteschlange betreten"); Message.send("RANKED_QUEUE_JOINED", player);
BungeeCore.send(player, BungeeCore.CHAT_PREFIX + "§7Wiederhole den Befehl zum Verlassen der Warteschlange"); Message.send("RANKED_QUEUE_HOW_TO_LEAVE", player);
players.add(new WaitingPlayer(player, mode.getSchemType())); players.add(new WaitingPlayer(player, mode.getSchemType()));
} }
@ -160,8 +160,8 @@ public class RankedCommand extends BasicCommand {
for(Map.Entry<WaitingPlayer, WaitingPlayer> entry : inRange.entrySet()){ for(Map.Entry<WaitingPlayer, WaitingPlayer> entry : inRange.entrySet()){
WaitingPlayer wp1 = entry.getKey(); WaitingPlayer wp1 = entry.getKey();
WaitingPlayer wp2 = entry.getValue(); WaitingPlayer wp2 = entry.getValue();
BungeeCore.send(wp1.player, BungeeCore.CHAT_PREFIX + "§eGegner gefunden! Ranglistenspiel startet."); Message.send("RANKED_ENEMY_SPOTTED", wp1.player);
BungeeCore.send(wp2.player, BungeeCore.CHAT_PREFIX + "§eGegner gefunden! Ranglistenspiel startet."); Message.send("RANKED_ENEMY_SPOTTED", wp2.player);
removeFromAll(wp1.player); removeFromAll(wp1.player);
removeFromAll(wp2.player); removeFromAll(wp2.player);
@ -169,9 +169,8 @@ public class RankedCommand extends BasicCommand {
arena.sendPlayer(wp1.player); arena.sendPlayer(wp1.player);
arena.sendPlayer(wp2.player); arena.sendPlayer(wp2.player);
BungeeCore.broadcast(BungeeCore.CHAT_PREFIX + "§7" + mode.getDisplayName() + "§8-§7Ranglistenspiel§8: §e" + wp1.player.getName() + " vs " + wp2.player.getName(), Message.broadcast("RANKED_BROADCAST", "RANKED_BROADCAST_HOVER",
"§aZuschauen", new ClickEvent(ClickEvent.Action.RUN_COMMAND, "/join " + wp1.player.getName()), mode.getDisplayName(), wp1.player.getName(), wp2.player.getName());
new ClickEvent(ClickEvent.Action.RUN_COMMAND, "/join " + wp1.player.getName()));
} }
} }
} }
@ -204,7 +203,7 @@ public class RankedCommand extends BasicCommand {
if(subserver == null) if(subserver == null)
return true; return true;
if(subserver.getType() == Servertype.ARENA){ if(subserver.getType() == Servertype.ARENA){
BungeeCore.send(player, BungeeCore.CHAT_PREFIX + "§cRanglistenspiel-Warteschlange verlassen"); Message.send("RANKED_QUEUE_LEFT", player);
return false; return false;
} }

Datei anzeigen

@ -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 net.md_5.bungee.api.CommandSender; import net.md_5.bungee.api.CommandSender;
import net.md_5.bungee.api.chat.ClickEvent; import net.md_5.bungee.api.chat.ClickEvent;
import net.md_5.bungee.api.connection.ProxiedPlayer; import net.md_5.bungee.api.connection.ProxiedPlayer;
@ -35,10 +35,10 @@ public class RegelnCommand extends BasicCommand {
return; return;
ProxiedPlayer player = (ProxiedPlayer) sender; ProxiedPlayer player = (ProxiedPlayer) sender;
BungeeCore.send(player, BungeeCore.CHAT_PREFIX + "§7§lRegelwerke"); Message.send("REGELN_RULES", player);
BungeeCore.send(player, "§eAirShip§8-§7Regelwerk", "§7https://steamwar.de/spielmodi/airship-regelwerk/", new ClickEvent(ClickEvent.Action.OPEN_URL, "https://steamwar.de/spielmodi/airship-regelwerk/")); Message.sendPrefixless("REGELN_AS", player, Message.parse("REGELN_AS_HOVER", player), new ClickEvent(ClickEvent.Action.OPEN_URL, Message.parse("REGELN_AS_URL", player)));
BungeeCore.send(player, "§eMiniWarGear§8-§7Regelwerk", "§7https://steamwar.de/spielmodi/miniwargear-regelwerk/", new ClickEvent(ClickEvent.Action.OPEN_URL, "https://steamwar.de/spielmodi/miniwargear-regelwerk/")); Message.sendPrefixless("REGELN_MWG", player, Message.parse("REGELN_MWG_HOVER", player), new ClickEvent(ClickEvent.Action.OPEN_URL, Message.parse("REGELN_MWG_URL", player)));
BungeeCore.send(player, "§eWarGear§8-§7Regelwerk", "§7https://steamwar.de/spielmodi/wargear-regelwerk/", new ClickEvent(ClickEvent.Action.OPEN_URL, "https://steamwar.de/spielmodi/wargear-regelwerk/")); Message.sendPrefixless("REGELN_WG", player, Message.parse("REGELN_WG_HOVER", player), new ClickEvent(ClickEvent.Action.OPEN_URL, Message.parse("REGELN_WG_URL", player)));
BungeeCore.send(player, "§eWarShip§8-§7Regelwerk", "§7https://steamwar.de/spielmodi/warship-regelwerk/", new ClickEvent(ClickEvent.Action.OPEN_URL, "https://steamwar.de/spielmodi/warship-regelwerk/")); Message.sendPrefixless("REGELN_WS", player, Message.parse("REGELN_WS_HOVER", player), new ClickEvent(ClickEvent.Action.OPEN_URL, Message.parse("REGELN_WS_URL", player)));
} }
} }

Datei anzeigen

@ -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 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;
import net.md_5.bungee.api.ProxyServer; import net.md_5.bungee.api.ProxyServer;
@ -37,27 +37,26 @@ public class ServerTeamchatCommand extends BasicCommand {
ProxiedPlayer player = (ProxiedPlayer) sender; ProxiedPlayer player = (ProxiedPlayer) sender;
if(args.length == 0){ if(args.length == 0){
player.sendMessage(BungeeCore.CHAT_PREFIX + "/stc [Nachricht an das Team]"); Message.sendPrefixless("STC_USAGE", player);
return; return;
} }
StringBuilder msgBuilder = new StringBuilder(); StringBuilder msgBuilder = new StringBuilder();
msgBuilder.append(BungeeCore.SERVER_TEAMCHAT_PREFIX).append(sender.getName()).append("» §r");
for (String arg : args){ for (String arg : args){
msgBuilder.append(arg).append(" "); msgBuilder.append(arg).append(" ");
} }
String msg = msgBuilder.toString(); String msg = msgBuilder.toString();
msg = ChatColor.translateAlternateColorCodes('&', msg); msg = ChatColor.translateAlternateColorCodes('&', msg);
sendToTeam(msg); sendToTeam(msg, player);
} }
} }
public static void sendToTeam(String message){ public static void sendToTeam(String message, ProxiedPlayer sender){
for (ProxiedPlayer target : ProxyServer.getInstance().getPlayers()){ for (ProxiedPlayer target : ProxyServer.getInstance().getPlayers()){
if ((target.hasPermission("bungeecore.teamchat")) if ((target.hasPermission("bungeecore.teamchat"))
&& target.getChatMode() == ProxiedPlayer.ChatMode.SHOWN){ && target.getChatMode() == ProxiedPlayer.ChatMode.SHOWN){
BungeeCore.send(target, message); Message.send("STC_FORMAT", target, sender.getName(), message);
} }
} }
} }

Datei anzeigen

@ -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.inventory.SWItem; import de.steamwar.bungeecore.inventory.SWItem;
import de.steamwar.bungeecore.inventory.SWListInv; import de.steamwar.bungeecore.inventory.SWListInv;
import de.steamwar.bungeecore.sql.Event; import de.steamwar.bungeecore.sql.Event;
@ -36,6 +36,7 @@ import net.md_5.bungee.api.chat.TextComponent;
import net.md_5.bungee.api.connection.ProxiedPlayer; import net.md_5.bungee.api.connection.ProxiedPlayer;
import java.time.Instant; import java.time.Instant;
import java.time.format.DateTimeFormatter;
import java.util.*; import java.util.*;
import static de.steamwar.bungeecore.Storage.teamInvitations; import static de.steamwar.bungeecore.Storage.teamInvitations;
@ -72,30 +73,30 @@ public class TeamCommand extends BasicCommand {
} }
private void help(CommandSender sender){ private void help(CommandSender sender){
BungeeCore.send(sender, BungeeCore.CHAT_PREFIX + "§7Mit §e/team §7verwaltest du dein Team"); Message.send("TEAM_HELP_HEADER", sender);
BungeeCore.send(sender, BungeeCore.CHAT_PREFIX + "§8/§eteam list §8- §7Liste alle Teams auf"); Message.send("TEAM_HELP_LIST", sender);
BungeeCore.send(sender, BungeeCore.CHAT_PREFIX + "§8/§eteam info §8- §7Informiere dich über ein Team"); Message.send("TEAM_HELP_INFO", sender);
if(!(sender instanceof ProxiedPlayer)) if(!(sender instanceof ProxiedPlayer))
return; return;
ProxiedPlayer player = (ProxiedPlayer) sender; ProxiedPlayer player = (ProxiedPlayer) sender;
SteamwarUser user = SteamwarUser.get(player.getUniqueId()); SteamwarUser user = SteamwarUser.get(player.getUniqueId());
if(user.getTeam() == 0) { if(user.getTeam() == 0) {
BungeeCore.send(sender, BungeeCore.CHAT_PREFIX + "§8/§eteam create §8- §7Erstelle dein eigenes Team"); Message.send("TEAM_HELP_CREATE", sender);
BungeeCore.send(sender, BungeeCore.CHAT_PREFIX + "§8/§eteam join §8- §7Trete einem Team bei"); Message.send("TEAM_HELP_JOIN", sender);
}else{ }else{
BungeeCore.send(sender, BungeeCore.CHAT_PREFIX + "§8/§eteamchat §8- §7Sende Nachrichten an dein Team"); Message.send("TEAM_HELP_CHAT", sender);
BungeeCore.send(sender, BungeeCore.CHAT_PREFIX + "§8/§eteam event §8- §7Nehme an Events teil"); Message.send("TEAM_HELP_EVENT", sender);
BungeeCore.send(sender, BungeeCore.CHAT_PREFIX + "§8/§eteam leave §8- §7Verlasse dein Team"); Message.send("TEAM_HELP_LEAVE", sender);
Team team = Team.get(user.getTeam()); Team team = Team.get(user.getTeam());
if(team.getTeamLeader() == user.getId()){ if(team.getTeamLeader() == user.getId()){
BungeeCore.send(sender, BungeeCore.CHAT_PREFIX + "§8/§eteam invite §8- §7Lade jemanden in dein Team ein"); Message.send("TEAM_HELP_INVITE", sender);
BungeeCore.send(sender, BungeeCore.CHAT_PREFIX + "§8/§eteam remove §8- §7Entferne jemanden aus deinem Team"); Message.send("TEAM_HELP_REMOVE", sender);
BungeeCore.send(sender, BungeeCore.CHAT_PREFIX + "§8/§eteam changekuerzel §8- §7Ändere dein Teamkürzel"); Message.send("TEAM_HELP_KUERZEL", sender);
BungeeCore.send(sender, BungeeCore.CHAT_PREFIX + "§8/§eteam changename §8- §7Ändere deinen Teamnamen"); Message.send("TEAM_HELP_NAME", sender);
BungeeCore.send(sender, BungeeCore.CHAT_PREFIX + "§8/§eteam changecolor §8- §7Ändere deine Teamfarbe"); Message.send("TEAM_HELP_COLOR", sender);
BungeeCore.send(sender, BungeeCore.CHAT_PREFIX + "§8/§eteam changeleader §8- §7Ernenne jemanden zum Teamleader"); Message.send("TEAM_HELP_LEADER", sender);
} }
} }
} }
@ -161,7 +162,7 @@ public class TeamCommand extends BasicCommand {
return; return;
if(args.length < 3){ if(args.length < 3){
BungeeCore.send(player, BungeeCore.CHAT_PREFIX + "§8/§eteam create §8[§eTeamkürzel§8] §8[§eTeamname§8]"); Message.send("TEAM_CREATE_USAGE", player);
return; return;
} }
@ -173,7 +174,7 @@ public class TeamCommand extends BasicCommand {
Team.create(args[1], args[2], user.getId()); Team.create(args[1], args[2], user.getId());
user.setTeam(Team.get(args[1]).getTeamId()); user.setTeam(Team.get(args[1]).getTeamId());
BungeeCore.send(player, BungeeCore.CHAT_PREFIX + "§7Du hast das Team §e" + args[2] + " §7gegründet!"); Message.send("TEAM_CREATE_CREATED", player, args[2]);
} }
private void join(ProxiedPlayer player, SteamwarUser user, String[] args){ private void join(ProxiedPlayer player, SteamwarUser user, String[] args){
@ -184,7 +185,7 @@ public class TeamCommand extends BasicCommand {
return; return;
if(!teamInvitations.containsKey(user.getId())){ if(!teamInvitations.containsKey(user.getId())){
BungeeCore.send(player, BungeeCore.CHAT_PREFIX + "§7Du hast keine Einladungen erhalten."); Message.send("TEAM_JOIN_NO_INVITE", player);
return; return;
} }
@ -195,13 +196,13 @@ public class TeamCommand extends BasicCommand {
t = invs.get(0); t = invs.get(0);
}else{ }else{
if(args.length != 2){ if(args.length != 2){
BungeeCore.send(player, BungeeCore.CHAT_PREFIX + "§8/§eteam join §8[§eTeam§8]"); Message.send("TEAM_JOIN_USAGE", player);
StringBuilder sb = new StringBuilder().append("§7Du wurdest von diesen Teams eingeladen§8: §e"); StringBuilder sb = new StringBuilder();
for(int inv : invs){ for(int inv : invs){
Team team = Team.get(inv); Team team = Team.get(inv);
sb.append(team.getTeamName()).append(" "); sb.append(team.getTeamName()).append(" ");
} }
BungeeCore.send(player, sb.toString()); Message.send("TEAM_JOIN_INVITED", player, sb.toString());
return; return;
} }
@ -214,14 +215,14 @@ public class TeamCommand extends BasicCommand {
} }
if(t == null){ if(t == null){
BungeeCore.send(player, BungeeCore.CHAT_PREFIX + "§cVon diesem Team wurdest du nicht eingeladen"); Message.send("TEAM_JOIN_NOT_BY_TEAM", player);
return; return;
} }
} }
user.setTeam(t); user.setTeam(t);
teamInvitations.remove(user.getId()); teamInvitations.remove(user.getId());
BungeeCore.send(player, BungeeCore.CHAT_PREFIX + "§7Du bist dem Team §e" + Team.get(t).getTeamName() + " §7beigetreten!"); Message.send("TEAM_JOIN_JOINED", player, Team.get(t).getTeamName());
} }
private void leave(ProxiedPlayer player, SteamwarUser user, Team team){ private void leave(ProxiedPlayer player, SteamwarUser user, Team team){
@ -229,7 +230,7 @@ public class TeamCommand extends BasicCommand {
return; return;
if(team.getTeamLeader() == user.getId() && team.size() > 1){ if(team.getTeamLeader() == user.getId() && team.size() > 1){
BungeeCore.send(player, BungeeCore.CHAT_PREFIX + "§cBitte ernenne zunächst ein anderes Teammitglied zum Leader"); Message.send("TEAM_LEAVE_OTHER_LEADER", player);
return; return;
} }
@ -239,7 +240,7 @@ public class TeamCommand extends BasicCommand {
team.disband(); team.disband();
} }
BungeeCore.send(player, BungeeCore.CHAT_PREFIX + "§7Du hast dein Team verlassen!"); Message.send("TEAM_LEAVE_LEFT", player);
} }
@ -251,16 +252,16 @@ public class TeamCommand extends BasicCommand {
return; return;
if(args.length != 2){ if(args.length != 2){
BungeeCore.send(player, BungeeCore.CHAT_PREFIX + "§8/§eteam invite §8[§eSpieler§8]"); Message.send("TEAM_INVITE_USAGE", player);
return; return;
} }
SteamwarUser target = SteamwarUser.get(args[1]); SteamwarUser target = SteamwarUser.get(args[1]);
if(target == null){ if(target == null){
BungeeCore.send(player, BungeeCore.CHAT_PREFIX + "§cDiesen Spieler gibt es nicht"); Message.send("TEAM_INVITE_NO_PLAYER", player);
return; return;
}else if(target.getTeam() != 0){ }else if(target.getTeam() != 0){
BungeeCore.send(player, BungeeCore.CHAT_PREFIX + "§cDieser Spieler ist bereits in einem Team"); Message.send("TEAM_INVITE_IN_TEAM", player);
return; return;
} }
@ -268,16 +269,16 @@ public class TeamCommand extends BasicCommand {
teamInvitations.put(target.getId(), new LinkedList<>()); teamInvitations.put(target.getId(), new LinkedList<>());
if(teamInvitations.get(target.getId()).contains(team.getTeamId())){ if(teamInvitations.get(target.getId()).contains(team.getTeamId())){
BungeeCore.send(player, BungeeCore.CHAT_PREFIX + "§cDu hast diesen Spieler bereits eingeladen"); Message.send("TEAM_INVITE_ALREADY_INVITED", player);
return; return;
} }
teamInvitations.get(target.getId()).add(team.getTeamId()); teamInvitations.get(target.getId()).add(team.getTeamId());
BungeeCore.send(player, BungeeCore.CHAT_PREFIX + "§7Du hast §e" + args[1] + " §7in das Team eingeladen!"); Message.send("TEAM_INVITE_INVITED", player, args[1]);
ProxiedPlayer p = ProxyServer.getInstance().getPlayer(target.getUuid()); ProxiedPlayer p = ProxyServer.getInstance().getPlayer(target.getUuid());
if(p != null) if(p != null)
BungeeCore.send(p, BungeeCore.CHAT_PREFIX + "§7Du wurdest in das Team §e" + team.getTeamName() + " §7eingeladen!"); Message.send("TEAM_INVITE_INVITED_TARGET", player, team.getTeamColor(), team.getTeamName());
} }
private void remove(ProxiedPlayer player, SteamwarUser user, Team team, String[] args){ private void remove(ProxiedPlayer player, SteamwarUser user, Team team, String[] args){
@ -285,43 +286,43 @@ public class TeamCommand extends BasicCommand {
return; return;
if(args.length != 2){ if(args.length != 2){
BungeeCore.send(player, BungeeCore.CHAT_PREFIX + "§8/§eteam remove §8[§eSpieler§8]"); Message.send("TEAM_REMOVE_USAGE", player);
return; return;
} }
SteamwarUser target = SteamwarUser.get(args[1]); SteamwarUser target = SteamwarUser.get(args[1]);
if(target == null){ if(target == null){
BungeeCore.send(player, BungeeCore.CHAT_PREFIX + "§cDiesen Spieler gibt es nicht"); Message.send("TEAM_REMOVE_NOT_PLAYER", player);
return; return;
} }
if (team.getTeamLeader() == target.getId()) { if (team.getTeamLeader() == target.getId()) {
BungeeCore.send(player, BungeeCore.CHAT_PREFIX + "§cLeader entfernen sich nicht selbst"); Message.send("TEAM_REMOVE_NOT_LEADER", player);
return; return;
} }
if(teamInvitations.containsKey(target.getId())){ if(teamInvitations.containsKey(target.getId())){
if(teamInvitations.get(target.getId()).remove((Integer) team.getTeamId())){ if(teamInvitations.get(target.getId()).remove((Integer) team.getTeamId())){
BungeeCore.send(player, BungeeCore.CHAT_PREFIX + "§7Die Einladung wurde zurückgezogen"); Message.send("TEAM_REMOVE_INVITE", player);
if(teamInvitations.get(target.getId()).isEmpty()) if(teamInvitations.get(target.getId()).isEmpty())
teamInvitations.remove(target.getId()); teamInvitations.remove(target.getId());
}else{ }else{
BungeeCore.send(player, BungeeCore.CHAT_PREFIX + "§cDieser Spieler hat keine Einladung erhalten"); Message.send("TEAM_REMOVE_NO_INVITE", player);
} }
return; return;
} }
if(target.getTeam() != user.getTeam()){ if(target.getTeam() != user.getTeam()){
BungeeCore.send(player, BungeeCore.CHAT_PREFIX + "§cDieser Spieler ist nicht in deinem Team"); Message.send("TEAM_REMOVE_NOT_IN_TEAM", player);
return; return;
} }
target.setTeam(0); target.setTeam(0);
BungeeCore.send(player, BungeeCore.CHAT_PREFIX + "§7Der Spieler wurde aus dem Team entfernt"); Message.send("TEAM_REMOVE_REMOVED", player);
ProxiedPlayer p = ProxyServer.getInstance().getPlayer(target.getUuid()); ProxiedPlayer p = ProxyServer.getInstance().getPlayer(target.getUuid());
if(p != null) if(p != null)
BungeeCore.send(p, BungeeCore.CHAT_PREFIX + "§cDu wurdest aus dem Team entfernt"); Message.send("TEAM_REMOVE_REMOVED_TARGET", player);
} }
private void changekuerzel(ProxiedPlayer player, SteamwarUser user, Team team, String[] args){ private void changekuerzel(ProxiedPlayer player, SteamwarUser user, Team team, String[] args){
@ -332,7 +333,7 @@ public class TeamCommand extends BasicCommand {
return; return;
if(args.length < 2){ if(args.length < 2){
BungeeCore.send(player, BungeeCore.CHAT_PREFIX + "§8/§eteam changekuerzel §8[§eTeamkürzel§8]"); Message.send("TEAM_KUERZEL_USAGE", player);
return; return;
} }
@ -340,7 +341,7 @@ public class TeamCommand extends BasicCommand {
return; return;
team.setTeamKuerzel(args[1]); team.setTeamKuerzel(args[1]);
BungeeCore.send(player, BungeeCore.CHAT_PREFIX + "§7Du hast das Kürzel des Teams geändert!"); Message.send("TEAM_KUERZEL_CHANGED", player);
} }
private void changename(ProxiedPlayer player, SteamwarUser user, Team team, String[] args){ private void changename(ProxiedPlayer player, SteamwarUser user, Team team, String[] args){
@ -351,7 +352,7 @@ public class TeamCommand extends BasicCommand {
return; return;
if(args.length < 2){ if(args.length < 2){
BungeeCore.send(player, BungeeCore.CHAT_PREFIX + "§8/§eteam changename §8[§eTeamname§8]"); Message.send("TEAM_NAME_USAGE", player);
return; return;
} }
@ -359,7 +360,7 @@ public class TeamCommand extends BasicCommand {
return; return;
team.setTeamName(args[1]); team.setTeamName(args[1]);
BungeeCore.send(player, BungeeCore.CHAT_PREFIX + "§7Du hast das Team umbenannt!"); Message.send("TEAM_NAME_CHANGED", player);
} }
private void changeleader(ProxiedPlayer player, SteamwarUser user, Team team, String[] args){ private void changeleader(ProxiedPlayer player, SteamwarUser user, Team team, String[] args){
@ -370,23 +371,23 @@ public class TeamCommand extends BasicCommand {
return; return;
if(args.length < 2){ if(args.length < 2){
BungeeCore.send(player, BungeeCore.CHAT_PREFIX + "§cBitte gib ein Teammitglied an"); Message.send("TEAM_LEADER_USAGE", player);
return; return;
} }
SteamwarUser target = SteamwarUser.get(args[1]); SteamwarUser target = SteamwarUser.get(args[1]);
if(target == null){ if(target == null){
BungeeCore.send(player, BungeeCore.CHAT_PREFIX + "§cDen Spieler " + args[1] + " gibt es nicht"); Message.send("TEAM_LEADER_NOT_USER", player, args[1]);
return; return;
} }
if(target.getTeam() != user.getTeam()){ if(target.getTeam() != user.getTeam()){
BungeeCore.send(player, BungeeCore.CHAT_PREFIX + "§cDer Spieler ist nicht in deinem Team"); Message.send("TEAM_LEADER_NOT_MEMBER", player);
return; return;
} }
team.setTeamLeader(target.getId()); team.setTeamLeader(target.getId());
BungeeCore.send(player, BungeeCore.CHAT_PREFIX + "§7Du hast den Spieler §e" + args[1] + " §7zum Leader gemacht!"); Message.send("TEAM_LEADER_CHANGED", player, args[0]);
} }
private String playerName(SteamwarUser user){ private String playerName(SteamwarUser user){
@ -395,38 +396,37 @@ public class TeamCommand extends BasicCommand {
private void info(ProxiedPlayer player, SteamwarUser user, Team team, String[] args){ private void info(ProxiedPlayer player, SteamwarUser user, Team team, String[] args){
if(args.length == 1 && user.getTeam() == 0){ if(args.length == 1 && user.getTeam() == 0){
BungeeCore.send(player, BungeeCore.CHAT_PREFIX + "§8/§eteam info §8[§eTeamname§8]"); Message.send("TEAM_INFO_USAGE", player);
return; return;
}else if(user.getTeam() == 0 || args.length == 2){ }else if(user.getTeam() == 0 || args.length == 2){
team = Team.get(args[1]); team = Team.get(args[1]);
} }
if(team == null){ if(team == null){
BungeeCore.send(player, BungeeCore.CHAT_PREFIX + "§cDieses Team gibt es nicht"); Message.send("UNKNOWN_TEAM", player);
return; return;
} }
BungeeCore.send(player, "§7Team §e" + team.getTeamName() + " §8[§" + team.getTeamColor() + team.getTeamKuerzel() + "§8]"); Message.sendPrefixless("TEAM_INFO_TEAM", player, team.getTeamName(), team.getTeamColor(), team.getTeamKuerzel());
BungeeCore.send(player, "§7Leader§8: " + playerName(SteamwarUser.get(team.getTeamLeader()))); Message.sendPrefixless("TEAM_INFO_LEADER", player, playerName(SteamwarUser.get(team.getTeamLeader())));
if(team.getMembers().size() > 1) { if(team.getMembers().size() > 1) {
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
sb.append("§7Member§8: ");
List<Integer> members = team.getMembers(); List<Integer> members = team.getMembers();
for (int i : members) { for (int i : members) {
if (i == team.getTeamLeader()) if (i == team.getTeamLeader())
continue; continue;
sb.append(playerName(SteamwarUser.get(i))).append(" "); sb.append(playerName(SteamwarUser.get(i))).append(" ");
} }
BungeeCore.send(player, sb.toString()); Message.sendPrefixless("TEAM_INFO_MEMBER", player, sb.toString());
} }
Set<Event> events = TeamTeilnahme.getEvents(team.getTeamId()); Set<Event> events = TeamTeilnahme.getEvents(team.getTeamId());
if(!events.isEmpty()){ if(!events.isEmpty()){
StringBuilder sb = new StringBuilder("§7Events§8: §e"); StringBuilder sb = new StringBuilder();
for(Event e : events) for(Event e : events)
sb.append(e.getEventName()).append(" "); sb.append(e.getEventName()).append(" ");
BungeeCore.send(player, sb.toString()); Message.sendPrefixless("TEAM_INFO_EVENTS", player, sb.toString());
} }
} }
@ -439,7 +439,7 @@ public class TeamCommand extends BasicCommand {
try{ try{
page = Integer.parseInt(args[1]); page = Integer.parseInt(args[1]);
}catch(NumberFormatException e){ }catch(NumberFormatException e){
BungeeCore.send(player, "§cKeine Seitenzahl angegeben"); Message.send("TEAM_LIST_NOT_PAGE", player);
return; return;
} }
}else }else
@ -448,32 +448,31 @@ public class TeamCommand extends BasicCommand {
List<Team> all = Team.getAll(); List<Team> all = Team.getAll();
final int lastPage = ((all.size() - 1) / 10) + 1; final int lastPage = ((all.size() - 1) / 10) + 1;
if(page < 1 || page > lastPage){ if(page < 1 || page > lastPage){
BungeeCore.send(player, "§cUngültige Seitenzahl angegeben"); Message.send("TEAM_LIST_UNKNOWN_PAGE", player);
return; return;
} }
BungeeCore.send(player, "§7§lTeamliste §7" + page + "§8/§7" + lastPage); Message.sendPrefixless("TEAM_LIST_HEADER", player, page, lastPage);
for(int i = (page-1) * TEAMS_PER_PAGE; i < (page-1) * TEAMS_PER_PAGE + TEAMS_PER_PAGE && i < all.size(); i++){ for(int i = (page-1) * TEAMS_PER_PAGE; i < (page-1) * TEAMS_PER_PAGE + TEAMS_PER_PAGE && i < all.size(); i++){
Team tm = all.get(i); Team tm = all.get(i);
BungeeCore.send(player,
"§" + tm.getTeamColor() + tm.getTeamKuerzel() + " §e" + tm.getTeamName() + " §8[§7" + SteamwarUser.get(tm.getTeamLeader()).getUserName() + "§8]", Message.sendPrefixless("TEAM_LIST_TEAM", player, Message.parse("TEAM_LIST_TEAM_HOVER", player),
"§7Teaminfo", new ClickEvent(ClickEvent.Action.RUN_COMMAND, "/team info " + tm.getTeamKuerzel()), tm.getTeamColor(), tm.getTeamKuerzel(), tm.getTeamName(), SteamwarUser.get(tm.getTeamLeader()).getUserName());
new ClickEvent(ClickEvent.Action.RUN_COMMAND, "/team info " + tm.getTeamKuerzel()));
} }
TextComponent beforePage = new TextComponent("««"); TextComponent beforePage = new TextComponent("««");
if(page > 1){ if(page > 1){
beforePage.setColor(ChatColor.YELLOW); beforePage.setColor(ChatColor.YELLOW);
beforePage.setHoverEvent(new HoverEvent(HoverEvent.Action.SHOW_TEXT, new ComponentBuilder("§eVorherige Seite").create())); beforePage.setHoverEvent(new HoverEvent(HoverEvent.Action.SHOW_TEXT, new ComponentBuilder(Message.parse("TEAM_LIST_PREV", player)).create()));
beforePage.setClickEvent(new ClickEvent(ClickEvent.Action.RUN_COMMAND, "/team list " + (page - 1))); beforePage.setClickEvent(new ClickEvent(ClickEvent.Action.RUN_COMMAND, "/team list " + (page - 1)));
}else }else
beforePage.setColor(ChatColor.DARK_GRAY); beforePage.setColor(ChatColor.DARK_GRAY);
TextComponent nextPage = new TextComponent(" Seite »»"); TextComponent nextPage = new TextComponent(" " + Message.parse("TEAM_LIST_PAGE", player) +" »»");
if(page < lastPage){ if(page < lastPage){
nextPage.setColor(ChatColor.YELLOW); nextPage.setColor(ChatColor.YELLOW);
nextPage.setHoverEvent(new HoverEvent(HoverEvent.Action.SHOW_TEXT, new ComponentBuilder("§eNächste Seite").create())); nextPage.setHoverEvent(new HoverEvent(HoverEvent.Action.SHOW_TEXT, new ComponentBuilder(Message.parse("TEAM_LIST_NEXT", player)).create()));
nextPage.setClickEvent(new ClickEvent(ClickEvent.Action.RUN_COMMAND, "/team list " + (page + 1))); nextPage.setClickEvent(new ClickEvent(ClickEvent.Action.RUN_COMMAND, "/team list " + (page + 1)));
}else }else
nextPage.setColor(ChatColor.DARK_GRAY); nextPage.setColor(ChatColor.DARK_GRAY);
@ -487,12 +486,13 @@ public class TeamCommand extends BasicCommand {
return; return;
if(args.length < 2){ if(args.length < 2){
BungeeCore.send(player, BungeeCore.CHAT_PREFIX + "§8/§eteam event §8[§eEvent§8] - §7um daran teilzunehmen"); Message.send("TEAM_EVENT_USAGE", player);
Set<Event> events = TeamTeilnahme.getEvents(team.getTeamId()); Set<Event> events = TeamTeilnahme.getEvents(team.getTeamId());
if(!events.isEmpty()){ if(!events.isEmpty()){
BungeeCore.send(player, BungeeCore.CHAT_PREFIX + "§7Dein Team nimmt an folgenden Events teil§8:"); Message.send("TEAM_EVENT_HEADER", player);
DateTimeFormatter dateFormat = DateTimeFormatter.ofPattern(Message.parse("EVENT_DATE_FORMAT", player));
for(Event e : events) for(Event e : events)
BungeeCore.send(player, "§7" + e.getStart().toLocalDateTime().format(EventCommand.DATE_FORMAT) + "§8: §e" + e.getEventName()); Message.sendPrefixless("TEAM_EVENT_EVENT", player, e.getStart().toLocalDateTime().format(dateFormat), e.getEventName());
} }
return; return;
} }
@ -505,22 +505,22 @@ public class TeamCommand extends BasicCommand {
Event event = Event.get(args[1]); Event event = Event.get(args[1]);
if(event == null){ if(event == null){
BungeeCore.send(player, BungeeCore.CHAT_PREFIX + "§cDieses Event gibt es nicht"); Message.send("TEAM_EVENT_NO_EVENT", player);
return; return;
} }
if(Instant.now().isAfter(event.getEnd().toInstant())){ if(Instant.now().isAfter(event.getEnd().toInstant())){
BungeeCore.send(player, BungeeCore.CHAT_PREFIX + "§cDieses Event ist bereits vorbei"); Message.send("TEAM_EVENT_OVER", player);
return; return;
} }
if(TeamTeilnahme.nimmtTeil(team.getTeamId(), event.getEventID())){ if(TeamTeilnahme.nimmtTeil(team.getTeamId(), event.getEventID())){
TeamTeilnahme.notTeilnehmen(team.getTeamId(), event.getEventID()); TeamTeilnahme.notTeilnehmen(team.getTeamId(), event.getEventID());
BungeeCore.send(player, BungeeCore.CHAT_PREFIX + "§7Dein Team nimmt nicht mehr am Event teil"); Message.send("TEAM_EVENT_LEFT", player);
}else{ }else{
TeamTeilnahme.teilnehmen(team.getTeamId(), event.getEventID()); TeamTeilnahme.teilnehmen(team.getTeamId(), event.getEventID());
BungeeCore.send(player, BungeeCore.CHAT_PREFIX + "§7Dein Team nimmt nun am Event §e" + event.getEventName() + " §7 teil!"); Message.send("TEAM_EVENT_JOINED", player, event.getEventName());
BungeeCore.send(player, "§7Um die Teilnahme abzusagen, wiederhole den Befehl"); Message.sendPrefixless("TEAM_EVENT_HOW_TO_LEAVE", player);
} }
} }
@ -538,7 +538,7 @@ public class TeamCommand extends BasicCommand {
colors.add(new SWListInv.SWListEntry<>(item, stringSWListEntry.getObject())); colors.add(new SWListInv.SWListEntry<>(item, stringSWListEntry.getObject()));
}); });
SWListInv<String> inv = new SWListInv<>(player, "§6Farbe wählen", colors, (click, element) -> {}); SWListInv<String> inv = new SWListInv<>(player, Message.parse("TEAM_COLOR_TITLE", player), colors, (click, element) -> {});
inv.setCallback((click, element) -> { inv.setCallback((click, element) -> {
inv.close(); inv.close();
team.setTeamColor(element); team.setTeamColor(element);
@ -548,13 +548,13 @@ public class TeamCommand extends BasicCommand {
private boolean checkTeamName(ProxiedPlayer player, Team team, String arg){ private boolean checkTeamName(ProxiedPlayer player, Team team, String arg){
if(arg.length() < 4 || arg.length() > 15){ if(arg.length() < 4 || arg.length() > 15){
BungeeCore.send(player, BungeeCore.CHAT_PREFIX + "§cEin Teamname muss aus 4 bis 15 Buchstaben bestehen"); Message.send("TEAM_NAME_LENGHT", player);
return true; return true;
} }
Team t = Team.get(arg); Team t = Team.get(arg);
if(t != null && t.getTeamId() != team.getTeamId()){ if(t != null && t.getTeamId() != team.getTeamId()){
BungeeCore.send(player, BungeeCore.CHAT_PREFIX + "§cEs gibt bereits ein Team mit diesem Namen"); Message.send("TEAM_NAME_TAKEN", player);
return true; return true;
} }
return false; return false;
@ -562,13 +562,13 @@ public class TeamCommand extends BasicCommand {
private boolean checkTeamKuerzel(ProxiedPlayer player, Team team, String arg){ private boolean checkTeamKuerzel(ProxiedPlayer player, Team team, String arg){
if(arg.length() < 2 || arg.length() > 4){ if(arg.length() < 2 || arg.length() > 4){
BungeeCore.send(player, BungeeCore.CHAT_PREFIX + "§cEin Teamkürzel muss aus 2 bis 4 Buchstaben bestehen"); Message.send("TEAM_KUERZEL_LENGHT", player);
return true; return true;
} }
Team t = Team.get(arg); Team t = Team.get(arg);
if(t != null && (team == null || t.getTeamId() != team.getTeamId())){ if(t != null && (team == null || t.getTeamId() != team.getTeamId())){
BungeeCore.send(player, BungeeCore.CHAT_PREFIX + "§cEs gibt bereits ein Team mit diesem Namen"); Message.send("TEAM_KUERZEL_TAKEN", player);
return true; return true;
} }
return false; return false;
@ -576,7 +576,7 @@ public class TeamCommand extends BasicCommand {
private boolean unwantedInTeam(ProxiedPlayer player, SteamwarUser user){ private boolean unwantedInTeam(ProxiedPlayer player, SteamwarUser user){
if(user.getTeam() != 0){ if(user.getTeam() != 0){
BungeeCore.send(player, BungeeCore.CHAT_PREFIX + "§cDu bist bereits in einem Team"); Message.send("TEAM_IN_TEAM", player);
return true; return true;
} }
return false; return false;
@ -584,7 +584,7 @@ public class TeamCommand extends BasicCommand {
private boolean notInTeam(ProxiedPlayer player, SteamwarUser user){ private boolean notInTeam(ProxiedPlayer player, SteamwarUser user){
if(user.getTeam() == 0){ if(user.getTeam() == 0){
BungeeCore.send(player, BungeeCore.CHAT_PREFIX + "§cDu bist in keinem Team"); Message.send("TEAM_NOT_IN_TEAM", player);
return true; return true;
} }
return false; return false;
@ -594,7 +594,7 @@ public class TeamCommand extends BasicCommand {
if(notInTeam(player, user)) if(notInTeam(player, user))
return true; return true;
if(team.getTeamLeader() != user.getId()){ if(team.getTeamLeader() != user.getId()){
BungeeCore.send(player, BungeeCore.CHAT_PREFIX + "§cDu bist nicht der Teamleader"); Message.send("TEAM_NOT_LEADER", player);
return true; return true;
} }
return false; return false;
@ -602,7 +602,7 @@ public class TeamCommand extends BasicCommand {
private boolean notDuringEvent(ProxiedPlayer player){ private boolean notDuringEvent(ProxiedPlayer player){
if(Event.get() != null){ if(Event.get() != null){
BungeeCore.send(player, BungeeCore.CHAT_PREFIX + "§cDies ist während eines Events nicht möglich"); Message.send("TEAM_NOT_IN_EVENT", player);
return true; return true;
} }
return false; return false;

Datei anzeigen

@ -19,10 +19,9 @@
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.ChatColor; import net.md_5.bungee.api.ChatColor;
import net.md_5.bungee.api.ChatMessageType;
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;
import net.md_5.bungee.api.connection.ProxiedPlayer; import net.md_5.bungee.api.connection.ProxiedPlayer;
@ -40,17 +39,16 @@ public class TeamchatCommand extends BasicCommand {
SteamwarUser user = SteamwarUser.get(player.getUniqueId()); SteamwarUser user = SteamwarUser.get(player.getUniqueId());
if(user.getTeam() == 0){ if(user.getTeam() == 0){
BungeeCore.send(player, BungeeCore.CHAT_PREFIX + "§cDu bist in keinem Team"); Message.send("TC_NO_TEAM", player);
return; return;
} }
if(args.length == 0){ if(args.length == 0){
BungeeCore.send(player, BungeeCore.TEAMCHAT_PREFIX + "/teamchat [Nachricht an das Team]"); Message.send("TC_USAGE", player);
return; return;
} }
StringBuilder msgBuilder = new StringBuilder(); StringBuilder msgBuilder = new StringBuilder();
msgBuilder.append(BungeeCore.TEAMCHAT_PREFIX).append(sender.getName()).append("§8» §r");
for (String arg : args){ for (String arg : args){
msgBuilder.append(arg).append(" "); msgBuilder.append(arg).append(" ");
} }
@ -61,7 +59,7 @@ public class TeamchatCommand extends BasicCommand {
SteamwarUser targetuser = SteamwarUser.get(target.getUniqueId()); SteamwarUser targetuser = SteamwarUser.get(target.getUniqueId());
if (targetuser.getTeam() == user.getTeam() if (targetuser.getTeam() == user.getTeam()
&& target.getChatMode() == ProxiedPlayer.ChatMode.SHOWN){ && target.getChatMode() == ProxiedPlayer.ChatMode.SHOWN){
BungeeCore.send(target, ChatMessageType.CHAT, msg); Message.send("TC_FORMAT", target, player.getName(), msg);
} }
} }
} }

Datei anzeigen

@ -35,8 +35,6 @@ import java.util.Arrays;
public class TpCommand extends BasicCommand { public class TpCommand extends BasicCommand {
private static final String DENY_MESSAGE = "§cDu kannst diesem Spieler derzeit nicht folgen.";
public static void onTp(ChatEvent e, String[] command){ public static void onTp(ChatEvent e, String[] command){
if(!(e.getSender() instanceof ProxiedPlayer)) if(!(e.getSender() instanceof ProxiedPlayer))
return; return;
@ -53,7 +51,7 @@ public class TpCommand extends BasicCommand {
if(!(sender instanceof ProxiedPlayer)) if(!(sender instanceof ProxiedPlayer))
return; return;
if(!onTp((ProxiedPlayer) sender, args)) if(!onTp((ProxiedPlayer) sender, args))
BungeeCore.send(sender, BungeeCore.CHAT_PREFIX + "§cKonnte das angegebene Ziel nicht finden."); Message.send("TP_NOT_FOUND", sender);
} }
@Override @Override
@ -67,12 +65,12 @@ public class TpCommand extends BasicCommand {
private static boolean onTp(ProxiedPlayer player, String[] args){ private static boolean onTp(ProxiedPlayer player, String[] args){
if(args.length == 0){ if(args.length == 0){
if(Event.get() == null) if(Event.get() == null)
BungeeCore.send(player, BungeeCore.CHAT_PREFIX + "§8/§etp §8[§7Spieler§8]"); Message.send("TP_USAGE", player);
else else
BungeeCore.send(player, BungeeCore.CHAT_PREFIX + "§8/§etp §8[§7Spieler §8oder §7Team§8]"); Message.send("TP_USAGE_EVENT", player);
return true; return true;
}else if(CheckCommand.isChecking(player)){ }else if(CheckCommand.isChecking(player)){
BungeeCore.send(player, BungeeCore.CHAT_PREFIX + "§cDu prüfst gerade eine Schematic!"); Message.send("CHECK_CHECKING", player);
return true; return true;
} }
@ -128,13 +126,13 @@ public class TpCommand extends BasicCommand {
subserver.sendPlayer(player); subserver.sendPlayer(player);
} else { } else {
SubserverSystem.sendDeniedMessage(player, bauserver.getOwner()); SubserverSystem.sendDeniedMessage(player, bauserver.getOwner());
BungeeCore.send(player, BungeeCore.CHAT_PREFIX + DENY_MESSAGE); Message.send("JOIN_PLAYER_BLOCK", player);
} }
} }
}else if(serverPerm != null && !player.hasPermission(serverPerm)){ }else if(serverPerm != null && !player.hasPermission(serverPerm)){
BungeeCore.send(player, BungeeCore.CHAT_PREFIX + DENY_MESSAGE); Message.send("JOIN_PLAYER_BLOCK", player);
}else if(serverPerm == null && !player.getGroups().contains("team")) { }else if(serverPerm == null && !player.getGroups().contains("team")) {
BungeeCore.send(player, BungeeCore.CHAT_PREFIX + DENY_MESSAGE); Message.send("JOIN_PLAYER_BLOCK", player);
}else{ }else{
player.connect(server); player.connect(server);
} }

Datei anzeigen

@ -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 UnIgnoreCommand 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/§eunignore §8[§7Spieler§8]"); Message.send("UNIGNORE_USAGE", sender);
return; return;
} }
@ -45,15 +45,15 @@ public class UnIgnoreCommand 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("UNIGNORE_NOT_PLAYER", 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 nicht."); Message.send("UNIGNORE_NOT_IGNORED", p);
return; return;
} }
IgnoreSystem.unIgnore(user, target); IgnoreSystem.unIgnore(user, target);
BungeeCore.send(p, BungeeCore.CHAT_PREFIX + "§7Du empfängst nun wieder Nachrichten von §e" + target.getUserName() + "§8."); Message.send("UNIGNORE_UNIGNORED", p, target.getUserName());
} }
} }

Datei anzeigen

@ -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;
@ -35,7 +35,7 @@ public class UnbanCommand 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 + "/unban [Spieler]"); Message.send("UNBAN_USAGE", sender);
return; return;
} }
@ -44,11 +44,11 @@ public class UnbanCommand extends BasicCommand {
return; return;
if(!target.isBanned()) { if(!target.isBanned()) {
BungeeCore.send(sender, BungeeCore.CHAT_PREFIX + "Der Spieler ist nicht gebannt."); Message.send("UNBAN_NOT_BANNED", sender);
return; return;
} }
BungeeCore.send(sender, BungeeCore.CHAT_PREFIX + "Du hast " + target.getUserName() + " entbannt."); Message.send("UNBAN_UNBANNED", sender, target.getUserName());
target.ban(Timestamp.from(new Date().toInstant()), "Unban", SteamwarUser.get(sender.getName()).getId(), false); target.ban(Timestamp.from(new Date().toInstant()), "Unban", SteamwarUser.get(sender.getName()).getId(), false);
} }
} }

Datei anzeigen

@ -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 net.md_5.bungee.api.CommandSender; import net.md_5.bungee.api.CommandSender;
import net.md_5.bungee.api.connection.ProxiedPlayer; import net.md_5.bungee.api.connection.ProxiedPlayer;
@ -41,7 +41,7 @@ public class WebregisterCommand extends BasicCommand {
ProxiedPlayer player = (ProxiedPlayer) sender; ProxiedPlayer player = (ProxiedPlayer) sender;
if(args.length != 1){ if(args.length != 1){
BungeeCore.send(player, BungeeCore.CHAT_PREFIX + "/webregister [E-Mail]"); Message.send("WEB_USAGE", player);
return; return;
} }
@ -55,20 +55,20 @@ public class WebregisterCommand extends BasicCommand {
while((errorLine = reader.readLine()) != null){ while((errorLine = reader.readLine()) != null){
switch(errorLine){ switch(errorLine){
case "username_exists": case "username_exists":
BungeeCore.send(player, BungeeCore.CHAT_PREFIX + "§cDu hast bereits einen Webaccount."); Message.send("WEB_ALREADY", player);
break; break;
case "email_exists": case "email_exists":
BungeeCore.send(player, BungeeCore.CHAT_PREFIX + "§cDie E-Mail hast du bereits für einen anderen Account verwendet..."); Message.send("WEB_ALREADY_EMAIL", player);
// SWException.log("Bungee", "Duplicate E-Mail", player.getName() + " " + args[0]); // SWException.log("Bungee", "Duplicate E-Mail", player.getName() + " " + args[0]);
break; break;
case "invalid_email": case "invalid_email":
BungeeCore.send(player, BungeeCore.CHAT_PREFIX + "§c[E-Mail], nicht [Freitext]!"); Message.send("WEB_NOT_EMAIL", player);
break; break;
case "email_updated": case "email_updated":
BungeeCore.send(player, BungeeCore.CHAT_PREFIX + "§aDeine E-Mail-Adresse wurde aktualisiert."); Message.send("WEB_EMAIL_REFRESH", player);
break; break;
default: default:
BungeeCore.send(player, BungeeCore.CHAT_PREFIX + "§cEin interner Fehler ist aufgetreten, bitte wende dich an einen Developer."); Message.send("WEB_INTERNAL_ERROR", player);
SWException.log("Bungee", "Unknown Wordpress User Creation Error", errorLine); SWException.log("Bungee", "Unknown Wordpress User Creation Error", errorLine);
} }
error = true; error = true;
@ -77,9 +77,9 @@ public class WebregisterCommand extends BasicCommand {
if(error) if(error)
return; return;
BungeeCore.send(player, BungeeCore.CHAT_PREFIX + "§aEine E-Mail zum Setzen des Passworts wurde gesendet."); Message.send("WEB_EMAIL_SEND", player);
} catch (IOException e) { } catch (IOException e) {
BungeeCore.send(player, BungeeCore.CHAT_PREFIX + "§cEin interner Fehler ist aufgetreten, bitte wende dich an einen Developer."); Message.send("WEB_INTERNAL_ERROR", player);
throw new SecurityException("Could not create webaccount", e); throw new SecurityException("Could not create webaccount", e);
} }
} }

Datei anzeigen

@ -20,6 +20,7 @@
package de.steamwar.bungeecore.listeners; package de.steamwar.bungeecore.listeners;
import de.steamwar.bungeecore.BungeeCore; import de.steamwar.bungeecore.BungeeCore;
import de.steamwar.bungeecore.Message;
import de.steamwar.bungeecore.Servertype; import de.steamwar.bungeecore.Servertype;
import de.steamwar.bungeecore.Subserver; import de.steamwar.bungeecore.Subserver;
import de.steamwar.bungeecore.commands.BauCommand; import de.steamwar.bungeecore.commands.BauCommand;
@ -28,10 +29,7 @@ import de.steamwar.bungeecore.comms.packets.PingPacket;
import de.steamwar.bungeecore.sql.SteamwarUser; import de.steamwar.bungeecore.sql.SteamwarUser;
import de.steamwar.bungeecore.sql.Team; import de.steamwar.bungeecore.sql.Team;
import de.steamwar.bungeecore.sql.UserGroup; import de.steamwar.bungeecore.sql.UserGroup;
import net.md_5.bungee.api.ChatColor; import net.md_5.bungee.api.*;
import net.md_5.bungee.api.ChatMessageType;
import net.md_5.bungee.api.ProxyServer;
import net.md_5.bungee.api.Title;
import net.md_5.bungee.api.chat.TextComponent; import net.md_5.bungee.api.chat.TextComponent;
import net.md_5.bungee.api.connection.ProxiedPlayer; import net.md_5.bungee.api.connection.ProxiedPlayer;
import net.md_5.bungee.api.event.ChatEvent; import net.md_5.bungee.api.event.ChatEvent;
@ -73,7 +71,7 @@ public class ChatListener extends BasicListener {
String [] command = e.getMessage().split(" "); String [] command = e.getMessage().split(" ");
if(command[0].contains(":")){ if(command[0].contains(":")){
if(e.getSender() instanceof ProxiedPlayer) if(e.getSender() instanceof ProxiedPlayer)
BungeeCore.send((ProxiedPlayer) e.getSender(), BungeeCore.CHAT_PREFIX + "§cUnbekannter Befehl."); Message.send("UNKNOWN_COMMAND", (CommandSender) e.getSender());
e.setCancelled(true); e.setCancelled(true);
return; return;
} }
@ -99,25 +97,23 @@ public class ChatListener extends BasicListener {
private void lixfelAlert(ProxiedPlayer sender) { private void lixfelAlert(ProxiedPlayer sender) {
LIXFEL.send(sender); LIXFEL.send(sender);
final String l = "§eLixfel§8»§e" + sender.getName() + " §c"; Message.send("CHAT_LIXFEL_ACTION_BAR", sender, ChatMessageType.ACTION_BAR);
BungeeCore.send(sender, ChatMessageType.ACTION_BAR, "§4§lTechnische Probleme?");
TaskScheduler scheduler = ProxyServer.getInstance().getScheduler(); TaskScheduler scheduler = ProxyServer.getInstance().getScheduler();
scheduler.schedule(BungeeCore.get(), () -> BungeeCore.send(sender, l + "Du hast mich gerufen!"), 3, TimeUnit.SECONDS); scheduler.schedule(BungeeCore.get(), () -> Message.sendPrefixless("MSG_FORMAT", sender, "Lixfel", sender.getDisplayName(), Message.parse("CHAT_LIXFEL_1", sender)), 3, TimeUnit.SECONDS);
scheduler.schedule(BungeeCore.get(), () -> BungeeCore.send(sender, l + "Leider bin ich nur ein Mensch und höre nicht alles."), 6, TimeUnit.SECONDS); scheduler.schedule(BungeeCore.get(), () -> Message.sendPrefixless("MSG_FORMAT", sender, "Lixfel", sender.getDisplayName(), Message.parse("CHAT_LIXFEL_2", sender)), 6, TimeUnit.SECONDS);
scheduler.schedule(BungeeCore.get(), () -> BungeeCore.send(sender, l + "Daher bitte ich dich, das Problem bzw. den Fehler im Forum in der Kategorie §eFehler melden §cmit einer ausreichenden Beschreibung zu hinterlegen."), 11, TimeUnit.SECONDS); scheduler.schedule(BungeeCore.get(), () -> Message.sendPrefixless("MSG_FORMAT", sender, "Lixfel", sender.getDisplayName(), Message.parse("CHAT_LIXFEL_3", sender)), 11, TimeUnit.SECONDS);
scheduler.schedule(BungeeCore.get(), () -> BungeeCore.send(sender, l + "Vielen Dank."), 12, TimeUnit.SECONDS); scheduler.schedule(BungeeCore.get(), () -> Message.sendPrefixless("MSG_FORMAT", sender, "Lixfel", sender.getDisplayName(), Message.parse("CHAT_LIXFEL_4", sender)), 12, TimeUnit.SECONDS);
scheduler.schedule(BungeeCore.get(), () -> BungeeCore.send(sender, l + "Ich wünsche dir noch weiterhin ein reibungsloses Spielerlebnis."), 15, TimeUnit.SECONDS); scheduler.schedule(BungeeCore.get(), () -> Message.sendPrefixless("MSG_FORMAT", sender, "Lixfel", sender.getDisplayName(), Message.parse("CHAT_LIXFEL_5", sender)), 15, TimeUnit.SECONDS);
} }
private void yoyonowAlert(ProxiedPlayer sender) { private void yoyonowAlert(ProxiedPlayer sender) {
YOYONOW.send(sender); YOYONOW.send(sender);
final String l = "§eYoyoNow§8»§e" + sender.getName() + " §c"; Message.send("CHAT_LIXFEL_ACTION_BAR", sender, ChatMessageType.ACTION_BAR);
BungeeCore.send(sender, ChatMessageType.ACTION_BAR, "§4§lTechnische Probleme?");
TaskScheduler scheduler = ProxyServer.getInstance().getScheduler(); TaskScheduler scheduler = ProxyServer.getInstance().getScheduler();
scheduler.schedule(BungeeCore.get(), () -> BungeeCore.send(sender, l + "Du hast mich gerufen!"), 3, TimeUnit.SECONDS); scheduler.schedule(BungeeCore.get(), () -> Message.sendPrefixless("MSG_FORMAT", sender, "YoyoNow", sender.getDisplayName(), Message.parse("CHAT_YOYONOW_1", sender)), 3, TimeUnit.SECONDS);
scheduler.schedule(BungeeCore.get(), () -> BungeeCore.send(sender, l + "Ich würde dir gerne den Befehl \"/bug <MESSAGE>\" ans Herz legen."), 10, TimeUnit.SECONDS); scheduler.schedule(BungeeCore.get(), () -> Message.sendPrefixless("MSG_FORMAT", sender, "YoyoNow", sender.getDisplayName(), Message.parse("CHAT_YOYONOW_2", sender)), 6, TimeUnit.SECONDS);
scheduler.schedule(BungeeCore.get(), () -> BungeeCore.send(sender, l + "Vielen Dank."), 12, TimeUnit.SECONDS); scheduler.schedule(BungeeCore.get(), () -> Message.sendPrefixless("MSG_FORMAT", sender, "YoyoNow", sender.getDisplayName(), Message.parse("CHAT_YOYONOW_3", sender)), 11, TimeUnit.SECONDS);
scheduler.schedule(BungeeCore.get(), () -> BungeeCore.send(sender, l + "Ich wünsche dir noch weiterhin ein reibungsloses Spielerlebnis."), 15, TimeUnit.SECONDS); scheduler.schedule(BungeeCore.get(), () -> Message.sendPrefixless("MSG_FORMAT", sender, "YoyoNow", sender.getDisplayName(), Message.parse("CHAT_YOYONOW_4", sender)), 12, TimeUnit.SECONDS);
} }
private void onChat(ChatEvent e){ private void onChat(ChatEvent e){
@ -130,7 +126,7 @@ public class ChatListener extends BasicListener {
yoyonowAlert(sender); yoyonowAlert(sender);
if(sender.getChatMode() != ProxiedPlayer.ChatMode.SHOWN){ if(sender.getChatMode() != ProxiedPlayer.ChatMode.SHOWN){
BungeeCore.send(sender, BungeeCore.CHAT_PREFIX + "§cUm Chatnachrichten versenden zu können, musst du auch welche empfangen!"); Message.send("CHAT_RECEIVE", sender);
e.setCancelled(true); e.setCancelled(true);
return; return;
} }
@ -143,7 +139,7 @@ public class ChatListener extends BasicListener {
} }
if(!sender.hasPermission(ConnectionListener.TEAM_GROUP) && (e.getMessage().contains("http") || e.getMessage().contains("www"))){ if(!sender.hasPermission(ConnectionListener.TEAM_GROUP) && (e.getMessage().contains("http") || e.getMessage().contains("www"))){
BungeeCore.send(sender, BungeeCore.CHAT_PREFIX + "§cDu darfst keine Links versenden."); Message.send("CHAT_NO_LINKS", sender);
e.setCancelled(true); e.setCancelled(true);
return; return;
} }
@ -194,7 +190,7 @@ public class ChatListener extends BasicListener {
ProxiedPlayer sender = (ProxiedPlayer) e.getSender(); ProxiedPlayer sender = (ProxiedPlayer) e.getSender();
BungeeCore.log(sender, e.getMessage()); BungeeCore.log(sender, e.getMessage());
if(command.length == 1){ if(command.length == 1){
BungeeCore.send(sender, BungeeCore.CHAT_PREFIX + "§8/§e" + command[0].substring(1) + " §8[§7Nachricht§8]"); Message.send("CHAT_BC_USAGE", sender, command[0].substring(1));
e.setCancelled(true); e.setCancelled(true);
return; return;
} }
@ -207,7 +203,7 @@ public class ChatListener extends BasicListener {
} }
if(command[1].startsWith("/")){ if(command[1].startsWith("/")){
BungeeCore.send(sender, "§cKeine Befehle mit /local möglich."); Message.send("CHAT_BC_NO_COMMANDS", sender);
e.setCancelled(true); e.setCancelled(true);
return; return;
} }

Datei anzeigen

@ -19,10 +19,7 @@
package de.steamwar.bungeecore.listeners; package de.steamwar.bungeecore.listeners;
import de.steamwar.bungeecore.Bauserver; import de.steamwar.bungeecore.*;
import de.steamwar.bungeecore.BungeeCore;
import de.steamwar.bungeecore.Servertype;
import de.steamwar.bungeecore.Subserver;
import de.steamwar.bungeecore.commands.CheckCommand; import de.steamwar.bungeecore.commands.CheckCommand;
import de.steamwar.bungeecore.sql.Schematic; import de.steamwar.bungeecore.sql.Schematic;
import de.steamwar.bungeecore.sql.SchematicType; import de.steamwar.bungeecore.sql.SchematicType;
@ -50,7 +47,7 @@ public class CheckListener extends BasicListener {
} }
if(!uncheckedSchematics.isEmpty()) if(!uncheckedSchematics.isEmpty())
BungeeCore.send(player, BungeeCore.CHAT_PREFIX + "§7Du hast noch §e" + uncheckedSchematics.size() + " §7ungeprüfte Schematic§8(§7s§8)!"); Message.send("CHECK_UNCHECKED", player, uncheckedSchematics.size());
} }
@EventHandler @EventHandler

Datei anzeigen

@ -20,6 +20,7 @@
package de.steamwar.bungeecore.listeners; package de.steamwar.bungeecore.listeners;
import de.steamwar.bungeecore.BungeeCore; import de.steamwar.bungeecore.BungeeCore;
import de.steamwar.bungeecore.Message;
import de.steamwar.bungeecore.Servertype; import de.steamwar.bungeecore.Servertype;
import de.steamwar.bungeecore.Subserver; import de.steamwar.bungeecore.Subserver;
import de.steamwar.bungeecore.commands.ChallengeCommand; import de.steamwar.bungeecore.commands.ChallengeCommand;
@ -83,16 +84,14 @@ public class ConnectionListener extends BasicListener {
if(subserver.getType() == Servertype.ARENA){ if(subserver.getType() == Servertype.ARENA){
Iterator<ProxiedPlayer> it = subserver.getServer().getPlayers().iterator(); Iterator<ProxiedPlayer> it = subserver.getServer().getPlayers().iterator();
if(it.hasNext()){ if(it.hasNext()){
TextComponent tc = new TextComponent(BungeeCore.CHAT_PREFIX + "§7Klicke §ehier§7, um §e" + subserver.getServer().getName() + " §7beizutreten"); Message.send("JOIN_ARENA", player, Message.parse("JOIN_ARENA_HOVER", player),
tc.setHoverEvent(new HoverEvent(HoverEvent.Action.SHOW_TEXT, new ComponentBuilder("§eArena beitreten").create())); new ClickEvent(ClickEvent.Action.RUN_COMMAND, "/join " + it.next().getName()), subserver.getServer().getName());
tc.setClickEvent(new ClickEvent(ClickEvent.Action.RUN_COMMAND, "/join " + it.next().getName()));
player.sendMessage(tc);
} }
} }
} }
if(newPlayers.contains(player.getUniqueId())){ if(newPlayers.contains(player.getUniqueId())){
BungeeCore.broadcast(BungeeCore.CHAT_PREFIX + "§7Begrüßt alle mal §e" + player.getName() + " §7auf dem Server§8!"); Message.broadcast("JOIN_FIRST", player.getName());
newPlayers.remove(player.getUniqueId()); newPlayers.remove(player.getUniqueId());
} }
} }

Datei anzeigen

@ -1,25 +1,23 @@
package de.steamwar.bungeecore.listeners; package de.steamwar.bungeecore.listeners;
import de.steamwar.bungeecore.Message;
import de.steamwar.bungeecore.sql.Event; import de.steamwar.bungeecore.sql.Event;
import de.steamwar.bungeecore.sql.EventFight; import de.steamwar.bungeecore.sql.EventFight;
import de.steamwar.bungeecore.sql.SteamwarUser; import de.steamwar.bungeecore.sql.SteamwarUser;
import de.steamwar.bungeecore.sql.TeamTeilnahme; import de.steamwar.bungeecore.sql.TeamTeilnahme;
import net.md_5.bungee.api.chat.BaseComponent;
import net.md_5.bungee.api.chat.TextComponent; import net.md_5.bungee.api.chat.TextComponent;
import net.md_5.bungee.api.event.PostLoginEvent; import net.md_5.bungee.api.event.PostLoginEvent;
import net.md_5.bungee.event.EventHandler; import net.md_5.bungee.event.EventHandler;
public class EventModeListener extends BasicListener { public class EventModeListener extends BasicListener {
private static final BaseComponent[] nonParticipant = TextComponent.fromLegacyText("§cDu bist kein Eventteilnehmer.");
@EventHandler @EventHandler
public void onPostLogin(PostLoginEvent e) { public void onPostLogin(PostLoginEvent e) {
SteamwarUser user = SteamwarUser.get(e.getPlayer().getUniqueId()); SteamwarUser user = SteamwarUser.get(e.getPlayer().getUniqueId());
Event event = Event.get(); Event event = Event.get();
if(event == null){ if(event == null){
e.getPlayer().disconnect(nonParticipant); e.getPlayer().disconnect(TextComponent.fromLegacyText(Message.parse("EVENTMODE_KICK", e.getPlayer())));
return; return;
} }
@ -31,6 +29,6 @@ public class EventModeListener extends BasicListener {
return; return;
} }
e.getPlayer().disconnect(nonParticipant); e.getPlayer().disconnect(TextComponent.fromLegacyText(Message.parse("EVENTMODE_KICK", e.getPlayer())));
} }
} }

Datei anzeigen

@ -19,7 +19,7 @@
package de.steamwar.bungeecore.listeners; package de.steamwar.bungeecore.listeners;
import de.steamwar.bungeecore.BungeeCore; import de.steamwar.bungeecore.Message;
import de.steamwar.bungeecore.sql.PollAnswer; import de.steamwar.bungeecore.sql.PollAnswer;
import de.steamwar.bungeecore.sql.SteamwarUser; import de.steamwar.bungeecore.sql.SteamwarUser;
import net.md_5.bungee.api.chat.ClickEvent; import net.md_5.bungee.api.chat.ClickEvent;
@ -56,14 +56,13 @@ public class PollSystem extends BasicListener {
} }
public static void sendPoll(ProxiedPlayer player){ public static void sendPoll(ProxiedPlayer player){
BungeeCore.send(player, BungeeCore.CHAT_PREFIX + "§e§lUmfrage"); Message.send("POLL_HEADER", player);
BungeeCore.send(player, "§7Klicke die Antwort an, die dir gefällt!"); Message.sendPrefixless("POLL_HEADER2", player);
BungeeCore.send(player, "§e" + question); Message.sendPrefixless("POLL_QUESTION", player, question);
for(int i = 1; i <= answers.size(); i++){ for(int i = 1; i <= answers.size(); i++){
BungeeCore.send(player, "§7" + answers.get(i-1), Message.send("POLL_ANWSER", player, Message.parse("POLL_ANWSER_HOVER", player, answers.get(i-1)),
"§e" + answers.get(i-1) + " §ewählen", new ClickEvent(ClickEvent.Action.RUN_COMMAND, "/poll " + i), answers.get(i-1));
new ClickEvent(ClickEvent.Action.RUN_COMMAND, "/poll " + i));
} }
} }

Datei anzeigen

@ -23,6 +23,7 @@ import codecrafter47.bungeetablistplus.api.bungee.BungeeTabListPlusAPI;
import codecrafter47.bungeetablistplus.api.bungee.Icon; import codecrafter47.bungeetablistplus.api.bungee.Icon;
import codecrafter47.bungeetablistplus.tablist.DefaultCustomTablist; import codecrafter47.bungeetablistplus.tablist.DefaultCustomTablist;
import de.steamwar.bungeecore.BungeeCore; import de.steamwar.bungeecore.BungeeCore;
import de.steamwar.bungeecore.Message;
import de.steamwar.bungeecore.Servertype; import de.steamwar.bungeecore.Servertype;
import de.steamwar.bungeecore.Subserver; import de.steamwar.bungeecore.Subserver;
import de.steamwar.bungeecore.sql.SteamwarUser; import de.steamwar.bungeecore.sql.SteamwarUser;
@ -49,7 +50,6 @@ public class TablistManager extends BasicListener {
private Icon darkGray; private Icon darkGray;
private Icon gray; private Icon gray;
private String header;
private int size; private int size;
private TreeMap<String, List<ProxiedPlayer>> playerMap = new TreeMap<>(); private TreeMap<String, List<ProxiedPlayer>> playerMap = new TreeMap<>();
@ -67,24 +67,18 @@ public class TablistManager extends BasicListener {
} }
} }
private void calcHeader(){ private String calcHeader(ProxiedPlayer player){
if(seconds % 4 == 0){
int phase = (seconds % 16) / 4; int phase = (seconds % 16) / 4;
switch(phase){ switch(phase){
case 0: case 0:
header = "§8Spieler online: §e" + ProxyServer.getInstance().getPlayers().size(); return Message.parse("TABLIST_PHASE_0", player, ProxyServer.getInstance().getPlayers().size());
break;
case 1: case 1:
header = "§8Teamspeak: §eSteam§8War.de"; return Message.parse("TABLIST_PHASE_1", player);
break;
case 2: case 2:
header = "§8Discord: §8https://discord.gg/J4NtQmM"; return Message.parse("TABLIST_PHASE_2", player);
break;
case 3: case 3:
default: default:
header = "§8Website: https://§eSteam§8War.de"; return Message.parse("TABLIST_PHASE_DEFAULT", player);
break;
}
} }
} }
@ -100,8 +94,6 @@ public class TablistManager extends BasicListener {
} }
private synchronized void updateCustomTablist(){ private synchronized void updateCustomTablist(){
calcHeader();
//Calculate server-player-map //Calculate server-player-map
playerMap.clear(); playerMap.clear();
for(ProxiedPlayer player : ProxyServer.getInstance().getPlayers()){ for(ProxiedPlayer player : ProxyServer.getInstance().getPlayers()){
@ -115,9 +107,9 @@ public class TablistManager extends BasicListener {
Subserver subserver = Subserver.getSubserver(server); Subserver subserver = Subserver.getSubserver(server);
List<ProxiedPlayer> players; List<ProxiedPlayer> players;
if(subserver != null && subserver.getType() == Servertype.BAUSERVER){ if(subserver != null && subserver.getType() == Servertype.BAUSERVER){
players = playerMap.getOrDefault("Bau", new ArrayList<>()); players = playerMap.getOrDefault("%bauserverplaceholder%", new ArrayList<>());
players.add(player); players.add(player);
playerMap.putIfAbsent("Bau", players); playerMap.putIfAbsent("%bauserverplaceholder%", players);
}else{ }else{
players = playerMap.getOrDefault(serverName, new ArrayList<>()); players = playerMap.getOrDefault(serverName, new ArrayList<>());
players.add(player); players.add(player);
@ -168,7 +160,7 @@ public class TablistManager extends BasicListener {
try { try {
ServerInfo currentServer = player.getServer().getInfo(); ServerInfo currentServer = player.getServer().getInfo();
setHeader(header); setHeader(calcHeader(player));
setFooter("§e" + currentServer.getName() + " " + getPing() + "§8ms"); setFooter("§e" + currentServer.getName() + " " + getPing() + "§8ms");
setSize(size, 20); setSize(size, 20);
@ -178,6 +170,8 @@ public class TablistManager extends BasicListener {
setSlot(i%20, i/20, darkGray, "", 1000); setSlot(i%20, i/20, darkGray, "", 1000);
i++; i++;
} }
if(server.equals("%bauserverplaceholder%"))
server = Message.parse("TABLIST_BAU", player);
setSlot(i%20, i/20, gray, "§7§l" + server, 1000); setSlot(i%20, i/20, gray, "§7§l" + server, 1000);
i++; i++;
for (ProxiedPlayer p : playerMap.get(server)){ for (ProxiedPlayer p : playerMap.get(server)){

Datei anzeigen

@ -1,6 +1,5 @@
PREFIX=§eSteam§8War» PREFIX=§eSteam§8War»
SPACER= SPACER=
TIMEFORMAT=dd.MM.yyyy HH:mm
UNKNOWN_COMMAND=§cUnbekannter Befehl. UNKNOWN_COMMAND=§cUnbekannter Befehl.
UNKNOWN_PLAYER=§cDiesen Spieler gibt es nicht. UNKNOWN_PLAYER=§cDiesen Spieler gibt es nicht.
@ -30,31 +29,31 @@ HELP_JOIN_HOVER=§eSpieler beitreten
HELP_LOCAL=§7Schreibe mit §8/§elocal §7nur auf dem lokalen Server! HELP_LOCAL=§7Schreibe mit §8/§elocal §7nur auf dem lokalen Server!
HELP_LOCAL_HOVER=§eLokaler Chat HELP_LOCAL_HOVER=§eLokaler Chat
HELP_TNT=§8/§etnt §8- §7(de)aktiviert Explosionsschaden HELP_TNT=§8/§7tnt §8- §7(de)aktiviert Explosionsschaden
HELP_FIRE=§8/§efire §8- §7(de)aktiviert Feuerschaden HELP_FIRE=§8/§7fire §8- §7(de)aktiviert Feuerschaden
HELP_TESTBLOCK=§8/§etestblock §8- §7Erneuert den nächsten Testblock HELP_TESTBLOCK=§8/§7testblock §8- §7Erneuert den nächsten Testblock
HELP_RESET=§8/§ereset §8- §7Setzt die derzeitige Region zurück HELP_RESET=§8/§7reset §8- §7Setzt die derzeitige Region zurück
HELP_SPEED=§8/§espeed §8- §7Ändert deine Fluggeschwindigkeit HELP_SPEED=§8/§7speed §8- §7Ändert deine Fluggeschwindigkeit
HELP_NV=§8/§env §8- §7(de)aktiviert Nachtsicht HELP_NV=§8/§7nv §8- §7(de)aktiviert Nachtsicht
HELP_WV=§8/§ewv §8- §7(de)aktiviert Unterwassersicht HELP_WV=§8/§7wv §8- §7(de)aktiviert Unterwassersicht
HELP_TRACE=§8/§etrace §8- §7Gibt einen Überblick über den TNT-Tracer HELP_TRACE=§8/§7trace §8- §7Gibt einen Überblick über den TNT-Tracer
HELP_TPSLIMIT=§8/§etpslimit §8- §7Gibt einen Überblick über den TPS-Limiter HELP_TPSLIMIT=§8/§7tpslimit §8- §7Gibt einen Überblick über den TPS-Limiter
HELP_LOADER=§8/§eloader §8- §7Nutze den automatischen Kanonenlader HELP_LOADER=§8/§7loader §8- §7Nutze den automatischen Kanonenlader
HELP_PROTECT=§8/§eprotect §8- §7Schützt den Boden der (M)WG-Region HELP_PROTECT=§8/§7protect §8- §7Schützt den Boden der (M)WG-Region
HELP_FREEZE=§8/§efreeze §8- §7Unterbindet Blockupdates HELP_FREEZE=§8/§7freeze §8- §7Unterbindet Blockupdates
HELP_SKULL=§8/§eskull §8- §7Gibt dir den Kopf eines Spielers HELP_SKULL=§8/§7skull §8- §7Gibt dir den Kopf eines Spielers
HELP_DEBUGSTICK=§8/§edebugstick §8- §7Gibt dir einen Debugstick (nur 1.15) HELP_DEBUGSTICK=§8/§7debugstick §8- §7Gibt dir einen Debugstick (nur 1.15)
HELP_BAUINFO=§8/§ebauinfo §8- §7Gibt dir Informationen über den Bauserver HELP_BAUINFO=§8/§7bauinfo §8- §7Gibt dir Informationen über den Bauserver
HELP_WE_POS1=§8//§e1 §7» §8//§epos1 HELP_WE_POS1=§8//§71 §7» §8//§7pos1
HELP_WE_POS2=§8//§e2 §7» §8//§epos2 HELP_WE_POS2=§8//§72 §7» §8//§7pos2
HELP_WE_COPY=§8//§ec §7» §8//§ecopy HELP_WE_COPY=§8//§7c §7» §8//§7copy
HELP_WE_PASTE=§8//§ep §7» §8//§epaste HELP_WE_PASTE=§8//§7p §7» §8//§7paste
HELP_WE_FLOPY=§8//§eflopy §7» §8//§ecopy §7& §8//§eflip HELP_WE_FLOPY=§8//§7flopy §7» §8//§7copy §7& §8//§7flip
HELP_WE_FLOPYP=§8//§eflopyp §7» §8//§ecopy §7& §8//§eflip §7& §8//§epaste HELP_WE_FLOPYP=§8//§7flopyp §7» §8//§7copy §7& §8//§7flip §7& §8//§7paste
HELP_WE_ROTATE_90=§8//§e90 §7» §8//§erotate 90 HELP_WE_ROTATE_90=§8//§790 §7» §8//§7rotate §e90
HELP_WE_ROTATE_180=§8//§e180 §7» §8//§erotate 180 HELP_WE_ROTATE_180=§8//§7180 §7» §8//§7rotate §e180
HELP_WE_ROTATE_N90=§8//§e-90 §7» §8//§erotate -90 HELP_WE_ROTATE_N90=§8//§7-90 §7» §8//§7rotate §e-90
HELP_BAU_GROUP_ADMIN=§7Bauserver-Verwaltungsbefehle HELP_BAU_GROUP_ADMIN=§7Bauserver-Verwaltungsbefehle
HELP_BAU_GROUP_ADMIN_HOVER=§eAlle Verwaltungsbefehle HELP_BAU_GROUP_ADMIN_HOVER=§eAlle Verwaltungsbefehle
@ -130,17 +129,80 @@ POLLRESULT_HEADER=§eEs haben {0} abgestimmt auf die Frage: §7{1}
POLLRESULT_LIST=§e{0}§8: §7{1} POLLRESULT_LIST=§e{0}§8: §7{1}
#BauCommand #BauCommand
BAU_ADDMEMBER_USAGE=§8/§7bau addmember §8[§eSpieler§8]
BAU_ADDMEMBER_SELFADD=§cDu brauchst dich nicht selbst hinzufügen!
BAU_ADDMEMBER_ISADDED=§cDieser Spieler ist bereits Mitglied auf deiner Welt.
BAU_ADDMEMBER_ADDED=§aDer Spieler wurde zu deiner Welt hinzugefügt.
BAU_ADDMEMBER_ADDED_TARGET=§aDu wurdest zu der Welt von §e{0} §ahinzugefügt.
BAU_TP_USAGE=§8/§7bau tp §8[§eSpieler§8]
BAU_TP_NOALLOWED=§cDu darfst dich nicht auf diese Welt teleportieren.
BAU_DELMEMBER_USAGE=§8/§7bau delmember §8[§eSpieler§8]
BAU_DELMEMBER_SELFDEL=§cDu kannst dich nicht selbst entfernen!
BAU_DELMEMBER_DELETED=§cDer Spieler wurde entfernt.
BAU_DELMEMBER_DELETED_TARGET=§cDu wurdest von der Welt von §e{0} §centfernt.
BAU_DELETE_DELETED=§aDeine Welt wird zurückgesetzt.
BAU_DELETE_GUI_NAME=§eWirklich Welt löschen? BAU_DELETE_GUI_NAME=§eWirklich Welt löschen?
BAU_DELETE_GUI_CANCEL=§cAbbrechen BAU_DELETE_GUI_CANCEL=§cAbbrechen
BAU_DELETE_GUI_DELETE=§aLöschen BAU_DELETE_GUI_DELETE=§aLöschen
BAU_START_ALREADY=§cDer Server startet bereits.
BAU_MEMBER_NOMEMBER=§cDer Spieler ist kein Mitglied deiner Welt!
BAU_MEMBER_TOGGLE_USAGE=§8/§7bau {0} §8[§eSpieler§8]
BAU_MEMBER_TOGGLE_TARGET=§aDu kannst nun auf der Welt von §e{0}§a {1}.
BAU_MEMBER_TOGGLE=§aDer Spieler darf nun {0}.
BAU_MEMBER_TOGGLE_TARGET_OFF=§cDu kannst nun nicht mehr auf der Welt von §e{0}§c {1}.
BAU_MEMBER_TOGGLE_OFF=§cDer Spieler darf nun nicht mehr {0}.
#ChallengeCommand
CHALLENGE_USAGE=§8/§7challenge §8[§eSpieler§8]
CHALLENGE_OFFLINE=§cDer Herausgeforderte ist nicht online.
CHALLENGE_SELF=§cSchizophren?
CHALLENGE_IGNORED=§cDer Herausgeforderte hat dich geblockt.
CHALLENGE_INARENA=§cDer Herausgeforderte ist bereits in einer Arena.
CHALLENGE_BROADCAST=§e{0}§7-§eDuell§7: §e{1} §7vs §e{2}
CHALLENGE_BROADCAST_HOVER=§aZuschauen
CHALLENGE_CHALLENGED=§7Du hast §e{0} §7zu einem §e{1}-Kampf §7herausgefordert!
CHALLENGE_CHALLENGED_TARGET=§e{0} §7 hat dich zu einem §e{1}-Kampf §7{2}herausgefordert!
CHALLENGE_CHALLENGED_MAP=auf §e{0} §7
CHALLENGE_ACCEPT=§7Klicke §ehier§7, um die Herausforderung anzunehmen
CHALLENGE_ACCEPT_HOVER=§aHerausforderung annehmen
#EventCommand
EVENT_TIME_FORMAT=HH:mm
EVENT_DATE_FORMAT=dd.MM.
EVENT_USAGE=§8/§7event §8[§eTeam§8] - §7Um dich zum Kampf zu teleportieren
EVENT_NO_TEAM=§cDieses Team gibt es nicht
EVENT_NO_FIGHT_TEAM=§cDas Team kämpft derzeit nicht
EVENT_NO_CURRENT=§cDerzeit findet kein Event statt
EVENT_COMING=§eKommende Events§8:
EVENT_COMING_EVENT=§7{0}§8-§7{1}§8: §e{2}
EVENT_COMING_TEAMS=§7 Mit§8:{0}
EVENT_COMING_TEAM= §{0}{1}
EVENT_CURRENT_EVENT=§e§l{0}
EVENT_CURRENT_FIGHT=§7{0} §{1}{2}§8 vs §{3}{4}
EVENT_CURRENT_FIGHT_WIN=§8: §7Sieg §{0}{1}
EVENT_CURRENT_FIGHT_DRAW=§8: §7Unentschieden
#EventRescheduleCommand
EVENTRESCHEDULE_USAGE=§8/§7eventreschedule §8[§eTeam1§8] [§eTeam2§8]
EVENTRESCHEDULE_UNKNOWN_TEAM=§cEin Team ist unbekannt / Derzeit kein Event
EVENTRESCHEDULE_NO_FIGHT="§cKein Kampf zwischen den Teams gefunden"
EVENTRESCHEDULE_STARTING=§aKampf startet in 30s
#FightCommand
FIGHT_UNKNOWN_GAMEMODE=§cUnbekannter Spielmodus: {0}
FIGHT_UNKNOWN_ARENA=§cDie gewünschte Arena gibt es nicht.
FIGHT_ARENA_RANDOM=Random
FIGHT_IN_ARENA=§cDu befindest dich bereits in einer Arena.
FIGHT_BROADCAST=§7Klicke §ehier§7, um §e{0} §7gegen §e{1} §7zu §7kämpfen!
FIGHT_BROADCAST_HOVER=§aGegen §7{1} §ekämpfen
#CheckCommand #CheckCommand
CHECK_REMINDER=§7Es sind §e{0} §7Schematics zu prüfen§8! CHECK_REMINDER=§7Es sind §e{0} §7Schematics zu prüfen§8!
CHECK_NOT_CHECKING=§cDu prüfst derzeit nicht. CHECK_NOT_CHECKING=§cDu prüfst derzeit nicht.
CHECK_HELP_LIST=§8/§echeck list §8- §7Zeigt die Liste der ungeprüften Schematics CHECK_HELP_LIST=§8/§7check list §8- §7Zeigt die Liste der ungeprüften Schematics
CHECK_HELP_NEXT=§8/§echeck next §8- §7Nächste Prüffrage§8/§7freigeben CHECK_HELP_NEXT=§8/§7check next §8- §7Nächste Prüffrage§8/§7freigeben
CHECK_HELP_DECLINE=§8/§echeck decline §8[§eGrund§8] - §7Schematic ablehnen CHECK_HELP_DECLINE=§8/§7check decline §8[§eGrund§8] - §7Schematic ablehnen
CHECK_HELP_CANCEL=§8/§echeck cancel §8- §7Bricht den Prüfvorgang ab CHECK_HELP_CANCEL=§8/§7check cancel §8- §7Bricht den Prüfvorgang ab
CHECK_LIST_HEADER=§e§lZu prüfen sind {0} Schematics CHECK_LIST_HEADER=§e§lZu prüfen sind {0} Schematics
CHECK_LIST_TO_CHECK=§8{0} §7{1} §e{2} CHECK_LIST_TO_CHECK=§8{0} §7{1} §e{2}
CHECK_LIST_TO_CHECK_HOVER=§eSchematic prüfen CHECK_LIST_TO_CHECK_HOVER=§eSchematic prüfen
@ -161,6 +223,264 @@ CHECK_ACCEPTED_TEAM=§7Die Schematic §e{0} §7von §e{1} §7ist nun freigegeben
CHECK_DECLINED=§cDein §e{0} {1} §cwurde abgelehnt§8: §c{2} CHECK_DECLINED=§cDein §e{0} {1} §cwurde abgelehnt§8: §c{2}
CHECK_DECLINED_TEAM=§7Die Schematic §e{0} §7von §e{1} §awurde aufgrund von §e{2} §7abgelehnt! CHECK_DECLINED_TEAM=§7Die Schematic §e{0} §7von §e{1} §awurde aufgrund von §e{2} §7abgelehnt!
#HistoricCommand
HISTORIC_BROADCAST=§7Historischer §e{0}§8-§7Kampf von §e{1}§8!
HISTORIC_BROADCAST_HOVER=§aGegen §7{1} §ekämpfen
#JoinmeCommand
JOINME_USAGE=§8/§7join §8[§eSpieler§8].
JOINME_BROADCAST=§7Klicke §ehier§8, §7um zu §e" + player.getName() + " §7auf §e" + player.getServer().getInfo().getName() + " §7zu kommen§8!
JOINME_BROADCAST_HOVER=§aSpieler folgen
JOINME_PLAYER_OFFLINE=§cDieser Spieler ist offline.
JOINME_PLAYER_SELF=§cSei eins mit dir selbst!
#KickCommand
KICK_USAGE=§8/§7kick §8[§eSpieler§8] [§eNachricht§8]
KICK_OFFLINE=§cDieser Spieler ist derzeit nicht online!
KICK_CONFIRM=Der Spieler {0} wurde gekickt.
KICK_NORMAL=§cDu wurdest gekickt.
#MsgCommand
MSG_USAGE=§8/§7msg §8[§eBenutzer§8] [§eNachricht§8]
MSG_OFFLINE=§cDieser Spieler ist derzeit nicht online!
MSG_IGNORED=§cDieser Spieler hat dich geblockt!
MSG_NOMESSAGE=§cDieser Spieler empfängt derzeit keine Chatnachrichten!
MSG_SELF=§cNachrichten an dich selbst hast du wirklich nicht nötig!
MSG_FORMAT=§e{0}§8»§e{1} §r§7{2}
#PingCommand
PING_RESPONSE=§7Dein Ping beträgt §c{0}§7 ms!
#PollCommand
POLL_NO_POLL=§cDerzeit läuft keine Umfrage.
POLL_NO_ANSWER=§cDas ist keine Antwortmöglichkeit!
POLL_ANSWER_REFRESH=§aDeine Antwort wurde aktualisiert.
POLL_ANSWER_NEW=§aDeine Antwort wurde registriert.
#RankCommand
RANK_HEADER=§7§lPlatzierungen
RANK_UNPLACED=§7{0}§8: §eunplatziert
RANK_PLACED=§7{0}§8: §e{1}§8. §7mit §e{2} §7Elo§8.
#RankedCommand
RANKED_NO_RANKED_MODE=§cDieser Spielmodus ist nicht für Ranglistenspiele freigeschalten.
RANKED_QUEUE_JOINED=§aRanglistenspiel-Warteschlange betreten.
RANKED_QUEUE_HOW_TO_LEAVE=§7Wiederhole den Befehl zum Verlassen der Warteschlange.
RANKED_QUEUE_LEFT=§cRanglistenspiel-Warteschlange verlassen.
RANKED_ENEMY_SPOTTED=§eGegner gefunden! Ranglistenspiel startet.
RANKED_BROADCAST=§7{0}§8-§7Ranglistenspiel§8: §e{1} vs {2}
RANKED_BROADCAST_HOVER=§aZuschauen
#RCommand
R_USAGE=§8/§7r §8[§eAntwort§8]
R_NOTHING=§cDu hast bisher mit niemandem geschrieben!
R_OFFLINE=§cDieser Spieler ist derzeit nicht online!
R_BLOCKED=§cDieser Spieler hat dich geblockt!
R_NO_CHAT=§cDieser Spieler empfängt derzeit keine Chatnachrichten!
#RegelnCommand
REGELN_RULES=§7§lRegelwerke
REGELN_AS=§eAirShip§8-§7Regelwerk
REGELN_AS_HOVER=§7https://steamwar.de/spielmodi/airship-regelwerk/
REGELN_AS_URL=https://steamwar.de/spielmodi/airship-regelwerk/
REGELN_MWG=§eMiniWarGear§8-§7Regelwerk
REGELN_MWG_HOVER=§7https://steamwar.de/spielmodi/miniwargear-regelwerk/
REGELN_MWG_URL=https://steamwar.de/spielmodi/miniwargear-regelwerk/
REGELN_WG=§eWarGear§8-§7Regelwerk
REGELN_WG_HOVER=§7https://steamwar.de/spielmodi/wargear-regelwerk/
REGELN_WG_URL=https://steamwar.de/spielmodi/wargear-regelwerk/
REGELN_WS=§eWarShip§8-§7Regelwerk
REGELN_WS_HOVER=§7https://steamwar.de/spielmodi/warship-regelwerk/
REGELN_WS_URL=https://steamwar.de/spielmodi/warship-regelwerk/
#ServerTeamchatCommand
STC_USAGE=§8/§7stc §8[§eNachricht an das Team§8]
STC_FORMAT=§8STC §e{0}» §r{1}
#TeamchatCommand
TC_USAGE=§8/§7tc §8[§eNachricht an das Team§8]
TC_NO_TEAM=§cDu bist in keinem Team.
TC_FORMAT=§8TC §e{0}§8» §r{1}
#TeamCommand
TEAM_IN_TEAM=§cDu bist bereits in einem Team.
TEAM_NOT_IN_TEAM=§cDu bist in keinem Team.
TEAM_NOT_LEADER=§cDu bist nicht der Teamleader.
TEAM_NOT_IN_EVENT=§cDies ist während eines Events nicht möglich.
TEAM_HELP_HEADER=§7Mit §e/team §7verwaltest du dein Team.
TEAM_HELP_LIST=§8/§7team list §8- §7Liste alle Teams auf.
TEAM_HELP_INFO=§8/§7team info §8- §7Informiere dich über ein Team.
TEAM_HELP_CREATE=§8/§7team create §8- §7Erstelle dein eigenes Team.
TEAM_HELP_JOIN=§8/§7team join §8- §7Trete einem Team bei.
TEAM_HELP_CHAT=§8/§7teamchat §8- §7Sende Nachrichten an dein Team.
TEAM_HELP_EVENT=§8/§7team event §8- §7Nehme an Events teil.
TEAM_HELP_LEAVE=§8/§7team leave §8- §7Verlasse dein Team.
TEAM_HELP_INVITE=§8/§7team invite §8- §7Lade jemanden in dein Team ein.
TEAM_HELP_REMOVE=§8/§7team remove §8- §7Entferne jemanden aus deinem Team.
TEAM_HELP_KUERZEL=§8/§7team changekuerzel §8- §7Ändere dein Teamkürzel.
TEAM_HELP_NAME=§8/§7team changename §8- §7Ändere deinen Teamnamen.
TEAM_HELP_COLOR=§8/§7eteam changecolor §8- §7Ändere deine Teamfarbe.
TEAM_HELP_LEADER=§8/§7eteam changeleader §8- §7Ernenne jemanden zum Teamleader.
#Team Create
TEAM_CREATE_USAGE=§8/§7team create §8[§eTeamkürzel§8] §8[§eTeamname§8]
TEAM_CREATE_CREATED=§7Du hast das Team §e{0} §7gegründet!
#Team Join
TEAM_JOIN_NO_INVITE=§7Du hast keine Einladungen erhalten.
TEAM_JOIN_USAGE=§8/§7team join §8[§eTeam§8]
TEAM_JOIN_INVITED=§7Du wurdest von diesen Teams eingeladen§8: §e{0}
TEAM_JOIN_NOT_BY_TEAM=§cVon diesem Team wurdest du nicht eingeladen.
TEAM_JOIN_JOINED=§7Du bist dem Team §e{0} §7beigetreten!
#Team Leave
TEAM_LEAVE_OTHER_LEADER=§cBitte ernenne zunächst ein anderes Teammitglied zum Leader!
TEAM_LEAVE_LEFT=§7Du hast dein Team verlassen!
#Team Invite
TEAM_INVITE_USAGE=§8/§7team invite §8[§eSpieler§8]
TEAM_INVITE_NO_PLAYER=§cDiesen Spieler gibt es nicht.
TEAM_INVITE_IN_TEAM=§cDieser Spieler ist bereits in einem Team.
TEAM_INVITE_ALREADY_INVITED=§cDu hast diesen Spieler bereits eingeladen.
TEAM_INVITE_INVITED=§7Du hast §e{0} §7in das Team eingeladen!
TEAM_INVITE_INVITED_TARGET=§7Du wurdest in das Team §{0}{1} §7eingeladen!
#Team Remove
TEAM_REMOVE_USAGE=§8/§7team remove §8[§eSpieler§8]
TEAM_REMOVE_NOT_PLAYER=§cDiesen Spieler gibt es nicht.
TEAM_REMOVE_NOT_LEADER=§cLeader entfernen sich nicht selbst.
TEAM_REMOVE_INVITE=§7Die Einladung wurde zurückgezogen.
TEAM_REMOVE_NO_INVITE=§cDieser Spieler hat keine Einladung erhalten.
TEAM_REMOVE_NOT_IN_TEAM=§cDieser Spieler ist nicht in deinem Team.
TEAM_REMOVE_REMOVED=§7Der Spieler wurde aus dem Team entfernt.
TEAM_REMOVE_REMOVED_TARGET=§cDu wurdest aus dem Team entfernt.
#Team Kuerzel
TEAM_KUERZEL_USAGE=§8/§7team changekuerzel §8[§eTeamkürzel§8]
TEAM_KUERZEL_CHANGED=§7Du hast das Kürzel des Teams geändert!
TEAM_KUERZEL_LENGHT=§cEin Teamkürzel muss aus 2 bis 4 Buchstaben bestehen.
TEAM_KUERZEL_TAKEN=§cEs gibt bereits ein Team mit diesem Namen.
#Team Name
TEAM_NAME_USAGE=§8/§7team changename §8[§eTeamname§8]
TEAM_NAME_CHANGED=§7Du hast das Team umbenannt!
TEAM_NAME_LENGHT=§cEin Teamname muss aus 4 bis 15 Buchstaben bestehen.
TEAM_NAME_TAKEN=§cEs gibt bereits ein Team mit diesem Namen.
#Team Leader
TEAM_LEADER_USAGE=§8/§7team changeleader §8[§eMember§8]
TEAM_LEADER_NOT_USER=§cDen Spieler {0} gibt es nicht.
TEAM_LEADER_NOT_MEMBER=§cDer Spieler ist nicht in deinem Team.
TEAM_LEADER_CHANGED=§7Du hast den Spieler §e{0} §7zum Leader gemacht!
#Team Info
TEAM_INFO_USAGE=§8/§7team info §8[§eTeamname§8]
TEAM_INFO_TEAM=§7Team §e{0} §8[§{1}{2}§8]
TEAM_INFO_LEADER=§7Leader§8: {0}
TEAM_INFO_MEMBER=§7Member§8: {0}
TEAM_INFO_EVENTS=§7Events§8: §e{0}
#Team List
TEAM_LIST_NOT_PAGE=§cKeine Seitenzahl angegeben
TEAM_LIST_UNKNOWN_PAGE=§cUngültige Seitenzahl angegeben
TEAM_LIST_HEADER=§7§lTeamliste §7{0}§8/§7{1}
TEAM_LIST_TEAM=§{0}{1} §e{2} §8[§7{3}}§8]
TEAM_LIST_TEAM_HOVER=§7Teaminfo
TEAM_LIST_PAGE=Seite
TEAM_LIST_NEXT=§eNächste Seite
TEAM_LIST_PREV=§eVorherige Seite
#Team Event
TEAM_EVENT_USAGE=§8/§7team event §8[§eEvent§8] - §7um daran teilzunehmen
TEAM_EVENT_HEADER=§7Dein Team nimmt an folgenden Events teil§8:
TEAM_EVENT_EVENT=§7{0}§8: §e{1}
TEAM_EVENT_NO_EVENT=§cDieses Event gibt es nicht
TEAM_EVENT_OVER=§cDieses Event ist bereits vorbei
TEAM_EVENT_LEFT=§7Dein Team nimmt nicht mehr am Event teil
TEAM_EVENT_JOINED=§7Dein Team nimmt nun am Event §e{0} §7 teil!
TEAM_EVENT_HOW_TO_LEAVE=§7Um die Teilnahme abzusagen, wiederhole den Befehl
#Team Color
TEAM_COLOR_TITLE=Farbe wählen
#TpCommand
TP_USAGE=§8/§7tp §8[§eSpieler§8]
TP_USAGE_EVENT=§8/§7tp §8[§eSpieler §7oder §eTeam§8]
TP_NOT_FOUND=§cKonnte das angegebene Ziel nicht finden.
#UnbanCommand
UNBAN_USAGE=§8/§7unban §8[§eSpieler§8]
UNBAN_NOT_BANNED=§cDer Spieler ist nicht gebannt.
UNBAN_UNBANNED=Du hast {0} entbannt.
#UnignoreCommand
UNIGNORE_USAGE=§8/§7unignore §8[§eSpieler§8]
UNIGNORE_NOT_PLAYER=§cDiesen Spieler gibt es nicht!
UNIGNORE_NOT_IGNORED=§cDu ignorierst diesen Spieler nicht.
UNIGNORE_UNIGNORED=§7Du empfängst nun wieder Nachrichten von §e{0}§8.
#WebregisterCommand
WEB_USAGE=§8/§7webregister §8[§eE-Mail§8]
WEB_ALREADY=§cDu hast bereits einen Webaccount.
WEB_ALREADY_EMAIL=§cDie E-Mail hast du bereits für einen anderen Account verwendet...
WEB_NOT_EMAIL=§c[E-Mail], nicht [Freitext]!
WEB_EMAIL_REFRESH=§aDeine E-Mail-Adresse wurde aktualisiert.
WEB_INTERNAL_ERROR=§cEin interner Fehler ist aufgetreten, bitte wende dich an einen Developer.
WEB_EMAIL_SEND=§aEine E-Mail zum Setzen des Passworts wurde gesendet.
#ChatListener
CHAT_LIXFEL_ACTION_BAR=§4§lTechnische Probleme?
CHAT_LIXFEL_1=Du hast mich gerufen!
CHAT_LIXFEL_2=Leider bin ich nur ein Mensch und höre nicht alles.
CHAT_LIXFEL_3=Daher bitte ich dich, das Problem bzw. den Fehler im Forum in der Kategorie §eFehler melden §cmit einer ausreichenden Beschreibung zu hinterlegen.
CHAT_LIXFEL_4=Vielen Dank.
CHAT_LIXFEL_5=Ich wünsche dir noch weiterhin ein reibungsloses Spielerlebnis.
CHAT_YOYONOW_1=Du hast mich gerufen!
CHAT_YOYONOW_2=Ich würde dir gerne den Befehl "/bug <MESSAGE>" ans Herz legen.
CHAT_YOYONOW_3=Vielen Dank.
CHAT_YOYONOW_4=Ich wünsche dir noch weiterhin ein reibungsloses Spielerlebnis.
CHAT_RECEIVE=§cUm Chatnachrichten versenden zu können, musst du auch welche empfangen!
CHAT_NO_LINKS=§cDu darfst keine Links versenden.
CHAT_BC_USAGE=§8/§e{0} §8[§7Nachricht§8]
CHAT_BC_NO_COMMANDS=§cKeine Befehle mit /local möglich.
#CheckListner
CHECK_UNCHECKED=§7Du hast noch §e{0} §7ungeprüfte Schematic§8(§7s§8)!
#ConnectionListener
JOIN_ARENA=§7Klicke §ehier§7, um §e{0} §7beizutreten
JOIN_ARENA_HOVER=§eArena beitreten
JOIN_FIRST=§7Begrüßt alle mal §e{0} §7auf dem Server§8!
#EventModeListener
EVENTMODE_KICK=§cDu bist kein Eventteilnehmer.
#PollSystem
POLL_HEADER=§e§lUmfrage
POLL_HEADER2=§7Klicke die Antwort an, die dir gefällt!
POLL_QUESTION=§e{0}
POLL_ANWSER=§7{0}
POLL_ANWSER_HOVER=§e{0} §ewählen
#TablistManager
TABLIST_PHASE_0=§8Spieler online: §e{0}
TABLIST_PHASE_1=§8Teamspeak: §eSteam§8War.de
TABLIST_PHASE_2=§8Discord: §8https://§eSteam§8War.de/discord
TABLIST_PHASE_DEFAULT=§8Website: https://§eSteam§8War.de
TABLIST_BAU=Bau
#EventStarter
EVENT_FIGHT_BROADCAST=§7Hier §eklicken §7für den Kampf §{0}{1} §8vs §{2}{3}
EVENT_FIGHT_BROADCAST_HOVER=§eEvent beitreten
#SubserverSystem
SERVER_IGNORED=§cDieser Spieler hat dich geblockt!
SERVER_ADD_MEMBER=§e{0} §7möchte auf deine Bauwelt.
SERVER_ADD_MESSAGE=§7Klicke §ehier§7, wenn du das erlauben möchtest.
SERVER_ADD_MESSAGE_HOVER=§8/§7bau addmember §e{0}
SERVER_WORLD_ERROR=§cDas Erstellen der Welt ist fehlgeschlagen.
#WhoisCommand #WhoisCommand
WHOIS_USAGE=§c/whois [Spieler/ID] WHOIS_USAGE=§c/whois [Spieler/ID]
WHOIS_USERNAME=§7Username§8: §e{0} WHOIS_USERNAME=§7Username§8: §e{0}