wahat
This commit is contained in:
parent
6c1ad6f3c4
commit
9d7e9be5a9
1 changed files with 4 additions and 5 deletions
|
|
@ -108,6 +108,7 @@ public class FoliaFlow extends JavaPlugin implements Listener {
|
|||
Location loc = entity.getLocation();
|
||||
Vector vel = entity.getVelocity();
|
||||
Block movingTo = getBlockMovingTo(loc, vel);
|
||||
try {
|
||||
|
||||
if(movingTo != null && movingTo.getType() == Material.END_PORTAL){
|
||||
Location spawnLoc = movingTo.getLocation();
|
||||
|
|
@ -127,14 +128,12 @@ public class FoliaFlow extends JavaPlugin implements Listener {
|
|||
|
||||
dummy.setVelocity(dummyVel);
|
||||
}
|
||||
} catch (NullPointerException e) {
|
||||
getServer().getLogger().info("onFallingBlockToBlock erorr (likly chunky it not load)");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Block getBlockMovingTo(Location loc, Vector vel) {
|
||||
double absMax = 0, max = 0;
|
||||
char dir = ' ';
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue