Don't allow banning in singleplayer

fixes #11819
This commit is contained in:
sfan5 2022-05-26 21:36:58 +02:00
parent 303329f2d6
commit 1b68fb7683

@ -1187,6 +1187,9 @@ core.register_chatcommand("ban", {
return true, S("Ban list: @1", ban_list) return true, S("Ban list: @1", ban_list)
end end
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 if not core.get_player_by_name(param) then
return false, S("Player is not online.") return false, S("Player is not online.")
end end