Skip to content

crash because recursive/spam teleports loops #3585

@hack3dahck

Description

@hack3dahck

Priority

High

Area

  • Datapack
  • Source
  • Map
  • Other

What happened?

crash log.txt
A bug happened!

Some bad configured scripts can do this.
recursive or spam teleports.

for example:

local function recursiveTeleport(player, origin)
	if not player or not player:isPlayer() then
		return
	end

	player:teleportTo(Position(origin.x + math.random(-1, 1), origin.y + math.random(-1, 1), origin.z))
	addEvent(function()
		recursiveTeleport(player, origin)
	end, 50)
end

local movement = MoveEvent()

function movement.onStepIn(creature, item, position, fromPosition)
	if creature:isPlayer() then
		recursiveTeleport(creature, position)
	end
	return true
end

movement:id(870)
movement:register()

What OS are you seeing the problem on?

Linux

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    Priority: HighRepresent a high impact in key areas of the base/user experienceStaleNo activityStatus: Pending TestThis PR or Issue requires more testingType: BugInconsistencies or issues which will cause an issue or problem for users or implementors.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions