Merge pull request 'Add Hover to Check Reminder and Reminder on Connection' (#197) from schem_aleart into master
Reviewed-on: #197 Reviewed-by: Chaoscaot <chaoscaot444@gmail.com>
Dieser Commit ist enthalten in:
Commit
a3e8b1e95c
@ -144,6 +144,13 @@ public class Message {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private final String message;
|
private final String message;
|
||||||
private final Object[] params;
|
private final Object[] params;
|
||||||
|
|
||||||
|
@ -68,9 +68,14 @@ 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())
|
||||||
Message.team("CHECK_REMINDER", schematics.size() - currentCheckers.size());
|
Message.team("CHECK_REMINDER", "CHECK_REMINDER_HOVER", new ClickEvent(ClickEvent.Action.RUN_COMMAND, "/check list"), schematics.size() - currentCheckers.size());
|
||||||
}, 10, 10, TimeUnit.MINUTES);
|
}, 10, 10, TimeUnit.MINUTES);
|
||||||
}
|
}
|
||||||
|
public static void sendReminder(ProxiedPlayer player) {
|
||||||
|
List<Schematic> schematics = getSchemsToCheck();
|
||||||
|
if(schematics.size() != currentCheckers.size())
|
||||||
|
Message.send("CHECK_REMINDER", player, "CHECK_REMINDER_HOVER", new ClickEvent(ClickEvent.Action.RUN_COMMAND, "/check list"), schematics.size() - currentCheckers.size());
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void execute(CommandSender sender, String[] args) {
|
public void execute(CommandSender sender, String[] args) {
|
||||||
|
@ -24,6 +24,7 @@ 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;
|
||||||
|
import de.steamwar.bungeecore.commands.CheckCommand;
|
||||||
import de.steamwar.bungeecore.commands.MsgCommand;
|
import de.steamwar.bungeecore.commands.MsgCommand;
|
||||||
import de.steamwar.bungeecore.sql.SteamwarUser;
|
import de.steamwar.bungeecore.sql.SteamwarUser;
|
||||||
import de.steamwar.bungeecore.sql.UserGroup;
|
import de.steamwar.bungeecore.sql.UserGroup;
|
||||||
@ -63,8 +64,10 @@ public class ConnectionListener extends BasicListener {
|
|||||||
if(user.getUserGroup().isAdminGroup())
|
if(user.getUserGroup().isAdminGroup())
|
||||||
player.addGroups(ADMIN_GROUP);
|
player.addGroups(ADMIN_GROUP);
|
||||||
|
|
||||||
if(user.getUserGroup().isTeamGroup())
|
if(user.getUserGroup().isTeamGroup()) {
|
||||||
player.addGroups(TEAM_GROUP);
|
player.addGroups(TEAM_GROUP);
|
||||||
|
CheckCommand.sendReminder(player);
|
||||||
|
}
|
||||||
|
|
||||||
if(user.getUserGroup().isCheckSchematics())
|
if(user.getUserGroup().isCheckSchematics())
|
||||||
player.setPermission(CHECK_PERMISSION, true);
|
player.setPermission(CHECK_PERMISSION, true);
|
||||||
|
@ -201,6 +201,7 @@ 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_REMINDER_HOVER=§eZu prüfende Schematics
|
||||||
CHECK_NOT_CHECKING=§cDu prüfst derzeit nicht.
|
CHECK_NOT_CHECKING=§cDu prüfst derzeit nicht.
|
||||||
CHECK_HELP_LIST=§8/§7check 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/§7check next §8- §7Nächste Prüffrage§8/§7freigeben
|
CHECK_HELP_NEXT=§8/§7check next §8- §7Nächste Prüffrage§8/§7freigeben
|
||||||
@ -224,7 +225,7 @@ 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!
|
||||||
|
|
||||||
#HistoricCommand
|
#HistoricCommand
|
||||||
HISTORIC_BROADCAST=§7Historischer §e{0}§8-§7Kampf von §e{1}§8!
|
HISTORIC_BROADCAST=§7Historischer §e{0}§8-§7Kampf von §e{1}§8!
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren