Changes a lot of teleportation code to be able to teleport entities with passengers
Moves some teleportation code to the TeleportHelper class Changes some teleportation method names Tries to reduce some code duplication between teleporters Recursively teleports entities to make sure the teleported entity will arrive in the same shape it entered as Makes player checks for teleported vehicles account for any number of players riding any entity in the stack
This commit is contained in:
@ -387,7 +387,7 @@ public final class PermissionHelper {
|
||||
if (!entrancePortal.getOptions().isSilent()) {
|
||||
Stargate.getMessageSender().sendErrorMessage(player, Stargate.getString("denyMsg"));
|
||||
}
|
||||
new PlayerTeleporter(entrancePortal, player).teleport(entrancePortal, event);
|
||||
new PlayerTeleporter(entrancePortal, player).teleportPlayer(entrancePortal, event);
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -401,7 +401,7 @@ public final class PermissionHelper {
|
||||
if (!entrancePortal.getOptions().isSilent()) {
|
||||
Stargate.getMessageSender().sendErrorMessage(player, Stargate.getString("denyMsg"));
|
||||
}
|
||||
new PlayerTeleporter(entrancePortal, player).teleport(entrancePortal, event);
|
||||
new PlayerTeleporter(entrancePortal, player).teleportPlayer(entrancePortal, event);
|
||||
entrancePortal.getPortalOpener().closePortal(false);
|
||||
return true;
|
||||
}
|
||||
|
Reference in New Issue
Block a user