mirror of
https://github.com/Brettflan/WorldBorder.git
synced 2025-01-08 00:47:38 +01:00
Add TeleportCause.PLUGIN indicator to the teleport methods used by border knockback, so other plugins can see that the teleport was triggered by a plugin and potentially not interfere if they otherwise would have
Specifically, this should hopefully take care of CombatTag preventing WorldBorder knockback if the player is considered to be in combat
This commit is contained in:
parent
66390223c6
commit
cfaf955e9a
@ -5,12 +5,12 @@ import java.util.LinkedHashSet;
|
||||
import java.util.Set;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.entity.Boat;
|
||||
import org.bukkit.entity.Entity;
|
||||
import org.bukkit.entity.EntityType;
|
||||
import org.bukkit.entity.LivingEntity;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.player.PlayerTeleportEvent.TeleportCause;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.util.Vector;
|
||||
import org.bukkit.World;
|
||||
@ -87,7 +87,7 @@ public class BorderCheckTask implements Runnable
|
||||
else
|
||||
{
|
||||
ride.setVelocity(new Vector(0, 0, 0));
|
||||
ride.teleport(rideLoc);
|
||||
ride.teleport(rideLoc, TeleportCause.PLUGIN);
|
||||
}
|
||||
|
||||
if (Config.RemountTicks() > 0)
|
||||
@ -102,7 +102,7 @@ public class BorderCheckTask implements Runnable
|
||||
Config.showWhooshEffect(loc);
|
||||
|
||||
if (!returnLocationOnly)
|
||||
player.teleport(newLoc);
|
||||
player.teleport(newLoc, TeleportCause.PLUGIN);
|
||||
|
||||
if (!handlingVehicle)
|
||||
handlingPlayers.remove(player.getName().toLowerCase());
|
||||
|
Loading…
Reference in New Issue
Block a user