summaryrefslogtreecommitdiff
path: root/builtin
diff options
context:
space:
mode:
authorsfan5 <sfan5@live.de>2022-05-26 21:36:58 +0200
committersfan5 <sfan5@live.de>2022-05-29 14:00:19 +0200
commit1b68fb768306ad591057b0941bc31460034a4976 (patch)
tree2246b79833fcb4f78434137b0c24a3f2aad35bb1 /builtin
parent303329f2d6bc96f7756c72845de1bd87f62174a1 (diff)
downloadminetest-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.lua3
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