Add Gamemode Autoleave
Signed-off-by: Chaoscaot <chaoscaot444@gmail.com>
Dieser Commit ist enthalten in:
Ursprung
a41b3578a9
Commit
296d30b727
@ -49,6 +49,9 @@ public class GamemodeCommand extends SWCommand {
|
||||
|
||||
@Register
|
||||
public void gamemodeCommand(final Player p, final GameMode gameMode) {
|
||||
if (NoClipCommand.getNOCLIPS().contains(p)) {
|
||||
p.performCommand("noclip");
|
||||
}
|
||||
p.setGameMode(gameMode);
|
||||
}
|
||||
}
|
@ -34,6 +34,7 @@ import de.steamwar.bausystem.linkage.LinkageType;
|
||||
import de.steamwar.bausystem.linkage.Linked;
|
||||
import de.steamwar.command.SWCommand;
|
||||
import de.steamwar.core.VersionedRunnable;
|
||||
import lombok.Getter;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.GameMode;
|
||||
import org.bukkit.craftbukkit.v1_15_R1.entity.CraftPlayer;
|
||||
@ -56,6 +57,7 @@ import java.util.logging.Level;
|
||||
@Linked(LinkageType.LISTENER)
|
||||
public class NoClipCommand extends SWCommand implements Listener {
|
||||
|
||||
@Getter
|
||||
private static final List<Player> NOCLIPS = new ArrayList<>();
|
||||
private static final Map<Player, Long> LAST_TICKS = new HashMap<>();
|
||||
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren