mirror of
https://github.com/Brettflan/WorldBorder.git
synced 2025-01-08 17:08:09 +01:00
Fix for error on border crossing if player is riding on something which is not classifiable as a Vehicle (as only provided by another plugin, presumably, like one that makes wolves ride-able)
This commit is contained in:
parent
6a55b0be45
commit
59cba09a35
@ -2,8 +2,8 @@ package com.wimbli.WorldBorder;
|
||||
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.Effect;
|
||||
import org.bukkit.entity.Entity;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.entity.Vehicle;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.Server;
|
||||
import org.bukkit.util.Vector;
|
||||
@ -65,7 +65,7 @@ public class BorderCheckTask implements Runnable
|
||||
player.teleport(newLoc);
|
||||
else
|
||||
{
|
||||
Vehicle ride = (Vehicle)player.getVehicle();
|
||||
Entity ride = player.getVehicle();
|
||||
if (ride != null)
|
||||
{ // vehicles need to be offset vertically and have velocity stopped
|
||||
double vertOffset = ride.getLocation().getY() - loc.getY();
|
||||
|
Loading…
Reference in New Issue
Block a user