Archiviert
1
0

Fixing UserNameUpdate bug + Event Message clickable

Dieser Commit ist enthalten in:
Lixfel 2019-09-06 22:02:19 +02:00
Ursprung e302a37982
Commit 279e5154b4
2 geänderte Dateien mit 5 neuen und 2 gelöschten Zeilen

Datei anzeigen

@ -4,6 +4,7 @@ import de.steamwar.bungeecore.sql.EventFight;
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 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.connection.ProxiedPlayer; import net.md_5.bungee.api.connection.ProxiedPlayer;
import net.md_5.bungee.api.scheduler.ScheduledTask; import net.md_5.bungee.api.scheduler.ScheduledTask;
@ -49,7 +50,9 @@ public class EventStarter implements Runnable {
eventServer.put(blue, subserver); eventServer.put(blue, subserver);
eventServer.put(red, subserver); eventServer.put(red, subserver);
BungeeCore.broadcast(BungeeCore.CHAT_PREFIX + "§7Hier §eklicken §7für den Kampf §e" + blue.getTeamName() + " §8vs §e" + red.getTeamName()); BungeeCore.broadcast(BungeeCore.CHAT_PREFIX + "§7Hier §eklicken §7für den Kampf §e" + blue.getTeamName() + " §8vs §e" + red.getTeamName(),
"§eEvent beitreten",
new ClickEvent(ClickEvent.Action.RUN_COMMAND, "/event " + blue.getTeamKuerzel()));
} }
} }

Datei anzeigen

@ -53,7 +53,7 @@ public class SteamwarUser {
if(user != null){ if(user != null){
String userName = SQL.disarmString(connection.getName()); String userName = SQL.disarmString(connection.getName());
if(!user.userName.equals(userName)){ if(!user.userName.equals(userName)){
SQL.update("UPDATE UserData SET UserName = '" + userName + "'"); SQL.update("UPDATE UserData SET UserName = '" + userName + "' WHERE id = " + user.id);
user.userName = userName; user.userName = userName;
} }
}else{ }else{