mirror of
https://github.com/EngineHub/WorldGuard.git
synced 2025-01-03 15:08:02 +01:00
Check movement on AbstractHorse instead of Horse.
Not tested cuz I don't know how to enable camels, but in theory this should work for that.
This commit is contained in:
parent
961461c23c
commit
feb548aa84
@ -28,8 +28,8 @@
|
||||
import io.papermc.lib.PaperLib;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.entity.AbstractHorse;
|
||||
import org.bukkit.entity.Entity;
|
||||
import org.bukkit.entity.Horse;
|
||||
import org.bukkit.entity.LivingEntity;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.EventHandler;
|
||||
@ -99,7 +99,7 @@ public void onPlayerMove(PlayerMoveEvent event) {
|
||||
moveType = MoveType.GLIDE;
|
||||
} else if (event.getPlayer().isSwimming()) {
|
||||
moveType = MoveType.SWIM;
|
||||
} else if (event.getPlayer().getVehicle() != null && event.getPlayer().getVehicle() instanceof Horse) {
|
||||
} else if (event.getPlayer().getVehicle() != null && event.getPlayer().getVehicle() instanceof AbstractHorse) {
|
||||
moveType = MoveType.RIDE;
|
||||
}
|
||||
com.sk89q.worldedit.util.Location weLocation = session.testMoveTo(localPlayer, BukkitAdapter.adapt(to), moveType);
|
||||
|
Loading…
Reference in New Issue
Block a user