diff --git a/builtin/game/chatcommands.lua b/builtin/game/chatcommands.lua index e119d59be..3ba03394b 100644 --- a/builtin/game/chatcommands.lua +++ b/builtin/game/chatcommands.lua @@ -845,6 +845,9 @@ core.register_chatcommand("ban", { if not core.get_player_by_name(param) then return false, "No such player." end + if core.is_singleplayer() then + return false, "You cannot ban players in singleplayer!" + end if not core.ban_player(param) then return false, "Failed to ban player." end