From 1b68fb768306ad591057b0941bc31460034a4976 Mon Sep 17 00:00:00 2001 From: sfan5 Date: Thu, 26 May 2022 21:36:58 +0200 Subject: Don't allow banning in singleplayer fixes #11819 --- builtin/game/chat.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/builtin/game/chat.lua b/builtin/game/chat.lua index cfb497cb0..bbcdcf2d0 100644 --- a/builtin/game/chat.lua +++ b/builtin/game/chat.lua @@ -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 -- cgit v1.2.3