Skip to content

Commit

Permalink
Don't allow banning in singleplayer
Browse files Browse the repository at this point in the history
  • Loading branch information
sfan5 committed May 29, 2022
1 parent 303329f commit 1b68fb7
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions builtin/game/chat.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 1b68fb7

Please sign in to comment.