Add Hover to Check Reminder and Reminder on Connection
Dieser Commit ist enthalten in:
Ursprung
8d9953d9db
Commit
0234e0d2e0
@ -68,9 +68,17 @@ 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());
|
for(ProxiedPlayer player : ProxyServer.getInstance().getPlayers()){
|
||||||
|
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) {
|
||||||
|
List<Schematic> schematics = getSchemsToCheck();
|
||||||
|
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"));
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void execute(CommandSender sender, String[] args) {
|
public void execute(CommandSender sender, String[] args) {
|
||||||
|
@ -23,6 +23,7 @@ import de.steamwar.bungeecore.BungeeCore;
|
|||||||
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;
|
||||||
@ -65,8 +66,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);
|
||||||
|
@ -122,6 +122,7 @@ BAU_DELETE_GUI_DELETE=§aLöschen
|
|||||||
|
|
||||||
#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=§eZuprüfende Schematics
|
||||||
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/§echeck 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/§echeck next §8- §7Nächste Prüffrage§8/§7freigeben
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren