mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2025-01-05 23:08:23 +00:00
Fix passenger check not working on versions below 1.11.2 (#3132)
This commit is contained in:
parent
b08d380643
commit
85a5e517c9
1 changed files with 3 additions and 6 deletions
|
@ -6,11 +6,10 @@ import io.papermc.lib.PaperLib;
|
|||
import net.ess3.api.IEssentials;
|
||||
import net.ess3.api.ITeleport;
|
||||
import net.ess3.api.IUser;
|
||||
import net.ess3.api.events.UserWarpEvent;
|
||||
import net.ess3.api.events.UserTeleportEvent;
|
||||
import net.ess3.api.events.UserWarpEvent;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.entity.Entity;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.player.PlayerRespawnEvent;
|
||||
import org.bukkit.event.player.PlayerTeleportEvent.TeleportCause;
|
||||
|
@ -132,13 +131,11 @@ public class Teleport implements ITeleport {
|
|||
|
||||
teleportee.setLastLocation();
|
||||
|
||||
if (!teleportee.getBase().getPassengers().isEmpty()) {
|
||||
if (!teleportee.getBase().isEmpty()) {
|
||||
if (!ess.getSettings().isTeleportPassengerDismount()) {
|
||||
throw new Exception(tl("passengerTeleportFail"));
|
||||
}
|
||||
for (Entity entity : teleportee.getBase().getPassengers()) {
|
||||
entity.leaveVehicle();
|
||||
}
|
||||
teleportee.getBase().eject();
|
||||
}
|
||||
|
||||
if (LocationUtil.isBlockUnsafeForUser(teleportee, loc.getWorld(), loc.getBlockX(), loc.getBlockY(), loc.getBlockZ())) {
|
||||
|
|
Loading…
Reference in a new issue