RocketMod / Rocket.Unturned

Unturned 3 implementation of the RocketMod — .NET Game Server Plugin Framework
MIT License
83 stars 109 forks source link

Fixed UnturnedPlayerManager.Ban() #72

Closed Pustalorc closed 6 years ago

Pustalorc commented 6 years ago

It used Provider.ban(), which doesn't actually ban the player, only disconnects them from the server as if they were banned (Changed to SteamBlacklist.ban() which was correctly used for when the player was offline, but not when online). Also changed var player = ((UnturnedUser)target).Player; for if (!(target is UnturnedUser user)) return false;. Removed as well the second time it casted Target to UnturnedUser when the cast already had happened.