geforkt von SteamWar/BungeeCore
Improve TpCommand for current checking players
Dieser Commit ist enthalten in:
Ursprung
2203b99d3e
Commit
d5c6c7892e
@ -58,6 +58,10 @@ public class CheckCommand extends BasicCommand {
|
||||
return currentCheckers.containsKey(player.getUniqueId());
|
||||
}
|
||||
|
||||
public static SchematicNode getCheckingSchem(ProxiedPlayer player) {
|
||||
return currentCheckers.get(player.getUniqueId()).schematic;
|
||||
}
|
||||
|
||||
public CheckCommand() {
|
||||
super("check", ConnectionListener.CHECK_PERMISSION);
|
||||
|
||||
|
@ -20,11 +20,9 @@
|
||||
package de.steamwar.bungeecore.commands;
|
||||
|
||||
import de.steamwar.bungeecore.*;
|
||||
import de.steamwar.bungeecore.sql.BauweltMember;
|
||||
import de.steamwar.bungeecore.sql.Event;
|
||||
import de.steamwar.bungeecore.sql.Punishment;
|
||||
import de.steamwar.bungeecore.sql.Team;
|
||||
import de.steamwar.bungeecore.sql.*;
|
||||
import de.steamwar.messages.ChatSender;
|
||||
import net.md_5.bungee.BungeeCord;
|
||||
import net.md_5.bungee.api.CommandSender;
|
||||
import net.md_5.bungee.api.ProxyServer;
|
||||
import net.md_5.bungee.api.config.ServerInfo;
|
||||
@ -87,6 +85,16 @@ public class TpCommand extends BasicCommand {
|
||||
|
||||
} else if(subserver instanceof Bauserver) {
|
||||
Bauserver bauserver = (Bauserver) subserver;
|
||||
ProxiedPlayer checker = BungeeCord.getInstance().getPlayer(bauserver.getOwner());
|
||||
if (CheckCommand.isChecking(checker)) {
|
||||
SteamwarUser steamwarUser = SteamwarUser.get(player);
|
||||
if (steamwarUser.getUserGroup().isCheckSchematics() || CheckCommand.getCheckingSchem(checker).getOwner() == steamwarUser.getId()) {
|
||||
SubserverSystem.sendPlayer(subserver, player);
|
||||
return;
|
||||
}
|
||||
sender.system("JOIN_PLAYER_BLOCK");
|
||||
return;
|
||||
}
|
||||
if (bauserver.getOwner().equals(player.getUniqueId()) || BauweltMember.getBauMember(bauserver.getOwner(), player.getUniqueId()) != null) {
|
||||
SubserverSystem.sendPlayer(subserver, player);
|
||||
} else {
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren