Skip to content
Permalink
Browse files

Prevent /spawnentity from spawning unknown entity (#6388)

  • Loading branch information...
Wuzzy2 authored and SmallJoker committed Sep 8, 2017
1 parent 151c95b commit e3093cbe857cca99b8f090922d6553bae90c3bf8
Showing with 3 additions and 0 deletions.
  1. +3 −0 builtin/game/chatcommands.lua
@@ -629,6 +629,9 @@ core.register_chatcommand("spawnentity", {
core.log("error", "Unable to spawn entity, player is nil")
return false, "Unable to spawn entity, player is nil"
end
if not minetest.registered_entities[entityname] then
return false, "Cannot spawn an unknown entity"
end
if p == "" then
p = player:getpos()
else

0 comments on commit e3093cb

Please sign in to comment.
You can’t perform that action at this time.