From d8ce7d14564d7b19a905735a6c13dd1c363535e7 Mon Sep 17 00:00:00 2001 From: RainOrigami Date: Fri, 18 Aug 2023 12:35:33 +0200 Subject: [PATCH] Adds Player.Ban/GameServer.Ban --- BattleBitAPI/Server/GameServer.cs | 8 ++++++++ BattleBitAPI/Server/Player.cs | 4 ++++ 2 files changed, 12 insertions(+) diff --git a/BattleBitAPI/Server/GameServer.cs b/BattleBitAPI/Server/GameServer.cs index 904d689..0612454 100644 --- a/BattleBitAPI/Server/GameServer.cs +++ b/BattleBitAPI/Server/GameServer.cs @@ -441,6 +441,14 @@ namespace BattleBitAPI.Server { Kick(player.SteamID, reason); } + public void Ban(ulong steamID) + { + ExecuteCommand("ban " + steamID); + } + public void Ban(Player player) + { + Ban(player.SteamID); + } public void Kill(ulong steamID) { ExecuteCommand("kill " + steamID); diff --git a/BattleBitAPI/Server/Player.cs b/BattleBitAPI/Server/Player.cs index dabe927..660dce1 100644 --- a/BattleBitAPI/Server/Player.cs +++ b/BattleBitAPI/Server/Player.cs @@ -145,6 +145,10 @@ namespace BattleBitAPI { GameServer.Kick(this, reason); } + public void Ban() + { + GameServer.Ban(this); + } public void Kill() { GameServer.Kill(this);