diff options
author | sfan5 <sfan5@live.de> | 2022-05-26 21:36:58 +0200 |
---|---|---|
committer | sfan5 <sfan5@live.de> | 2022-05-29 14:00:19 +0200 |
commit | 1b68fb768306ad591057b0941bc31460034a4976 (patch) | |
tree | 2246b79833fcb4f78434137b0c24a3f2aad35bb1 /builtin | |
parent | 303329f2d6bc96f7756c72845de1bd87f62174a1 (diff) | |
download | minetest-1b68fb768306ad591057b0941bc31460034a4976.tar.gz minetest-1b68fb768306ad591057b0941bc31460034a4976.tar.bz2 minetest-1b68fb768306ad591057b0941bc31460034a4976.zip |
Don't allow banning in singleplayer
fixes #11819
Diffstat (limited to 'builtin')
-rw-r--r-- | builtin/game/chat.lua | 3 |
1 files changed, 3 insertions, 0 deletions
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 |