]> git.lizzy.rs Git - dragonfireclient.git/commitdiff
Don't allow banning in singleplayer
authorsfan5 <sfan5@live.de>
Thu, 26 May 2022 19:36:58 +0000 (21:36 +0200)
committersfan5 <sfan5@live.de>
Sun, 29 May 2022 12:00:19 +0000 (14:00 +0200)
fixes #11819

builtin/game/chat.lua

index cfb497cb0eb7c89626d95872240018ffd5d62631..bbcdcf2d060a7a07d680e6b59607cb0aa67743bd 100644 (file)
@@ -1187,6 +1187,9 @@ core.register_chatcommand("ban", {
                                return true, S("Ban list: @1", ban_list)
                        end
                end
+               if core.is_singleplayer() then
+                       return false, S("You cannot ban players in singleplayer!")
+               end
                if not core.get_player_by_name(param) then
                        return false, S("Player is not online.")
                end