SteamWar/BungeeCore
Archiviert
13
2

Fixed Schem Alert

Dieser Commit ist enthalten in:
Chaoscaot 2021-04-13 14:53:41 +02:00
Ursprung 0234e0d2e0
Commit 3ec2e103b5
3 geänderte Dateien mit 11 neuen und 7 gelöschten Zeilen

Datei anzeigen

@ -129,4 +129,11 @@ public class Message {
sendPrefixless(message, player, type, params); sendPrefixless(message, player, type, params);
} }
} }
public static void team(String message, String onHover, ClickEvent onClick, Object... params){
for(ProxiedPlayer player : ProxyServer.getInstance().getPlayers()){
if(player.getGroups().contains(ConnectionListener.TEAM_GROUP))
sendPrefixless(message, player, Message.parse(onHover, player, params), onClick, params);
}
}
} }

Datei anzeigen

@ -68,16 +68,13 @@ public class CheckCommand extends BasicCommand {
ProxyServer.getInstance().getScheduler().schedule(BungeeCore.get(), () -> { ProxyServer.getInstance().getScheduler().schedule(BungeeCore.get(), () -> {
List<Schematic> schematics = getSchemsToCheck(); List<Schematic> schematics = getSchemsToCheck();
if(schematics.size() != currentCheckers.size()) if(schematics.size() != currentCheckers.size())
for(ProxiedPlayer player : ProxyServer.getInstance().getPlayers()){ Message.team("CHECK_REMINDER", "CHECK_REMINDER_HOVER", new ClickEvent(ClickEvent.Action.RUN_COMMAND, "/check list"), schematics.size() - currentCheckers.size());
if(player.getGroups().contains(ConnectionListener.TEAM_GROUP))
BungeeCore.send(player, Message.parse("CHECK_REMINDER", player, schematics.size() - currentCheckers.size()), Message.parse("CHECK_REMINDER_HOVER", player), new ClickEvent(ClickEvent.Action.RUN_COMMAND, "/check list"));
}
}, 10, 10, TimeUnit.MINUTES); }, 10, 10, TimeUnit.MINUTES);
} }
public static void sendReminder(ProxiedPlayer player) { public static void sendReminder(ProxiedPlayer player) {
List<Schematic> schematics = getSchemsToCheck(); List<Schematic> schematics = getSchemsToCheck();
if(schematics.size() != currentCheckers.size()) if(schematics.size() != currentCheckers.size())
BungeeCore.send(player, Message.parse("CHECK_REMINDER", player, schematics.size() - currentCheckers.size()), Message.parse("CHECK_REMINDER_HOVER", player), new ClickEvent(ClickEvent.Action.RUN_COMMAND, "/check list")); Message.send("CHECK_REMINDER", player, "CHECK_REMINDER_HOVER", new ClickEvent(ClickEvent.Action.RUN_COMMAND, "/check list"), schematics.size() - currentCheckers.size());
} }
@Override @Override

Datei anzeigen

@ -146,4 +146,4 @@ CHECK_RANK_HOVER=§aMit diesem Rang freigeben
CHECK_ACCEPTED=§aDein §e{0} {1} §ewurde freigegeben§8! CHECK_ACCEPTED=§aDein §e{0} {1} §ewurde freigegeben§8!
CHECK_ACCEPTED_TEAM=§7Die Schematic §e{0} §7von §e{1} §7ist nun freigegeben! 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} §7wurde aufgrund von §e{2} §7abgelehnt!