mirror of
https://github.com/TotalFreedomMC/TF-ProjectKorra.git
synced 2025-02-12 03:59:06 +00:00
Fix AirScooter
- Fixed AirScooter users being launched up by water when going through a standing wall of water. - Also makes imports match importorder
This commit is contained in:
parent
10c8afcb4d
commit
8bbb331953
1 changed files with 10 additions and 6 deletions
|
@ -1,7 +1,9 @@
|
||||||
package com.projectkorra.projectkorra.airbending;
|
package com.projectkorra.projectkorra.airbending;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import com.projectkorra.projectkorra.GeneralMethods;
|
||||||
import java.util.concurrent.ConcurrentHashMap;
|
import com.projectkorra.projectkorra.configuration.ConfigLoadable;
|
||||||
|
import com.projectkorra.projectkorra.util.Flight;
|
||||||
|
import com.projectkorra.projectkorra.waterbending.WaterMethods;
|
||||||
|
|
||||||
import org.bukkit.Location;
|
import org.bukkit.Location;
|
||||||
import org.bukkit.block.Block;
|
import org.bukkit.block.Block;
|
||||||
|
@ -10,9 +12,8 @@ import org.bukkit.entity.Player;
|
||||||
import org.bukkit.potion.PotionEffectType;
|
import org.bukkit.potion.PotionEffectType;
|
||||||
import org.bukkit.util.Vector;
|
import org.bukkit.util.Vector;
|
||||||
|
|
||||||
import com.projectkorra.projectkorra.GeneralMethods;
|
import java.util.ArrayList;
|
||||||
import com.projectkorra.projectkorra.configuration.ConfigLoadable;
|
import java.util.concurrent.ConcurrentHashMap;
|
||||||
import com.projectkorra.projectkorra.util.Flight;
|
|
||||||
|
|
||||||
public class AirScooter implements ConfigLoadable {
|
public class AirScooter implements ConfigLoadable {
|
||||||
|
|
||||||
|
@ -155,7 +156,10 @@ public class AirScooter implements ConfigLoadable {
|
||||||
velocity.setY(0);
|
velocity.setY(0);
|
||||||
}
|
}
|
||||||
Location loc = player.getLocation();
|
Location loc = player.getLocation();
|
||||||
loc.setY((double) floorblock.getY() + 1.5);
|
if (!WaterMethods.isWater(player.getLocation().add(0, 2, 0).getBlock()))
|
||||||
|
loc.setY((double) floorblock.getY() + 1.5);
|
||||||
|
else
|
||||||
|
return false;
|
||||||
// player.setFlying(true);
|
// player.setFlying(true);
|
||||||
// player.teleport(loc.add(velocity));
|
// player.teleport(loc.add(velocity));
|
||||||
player.setSprinting(false);
|
player.setSprinting(false);
|
||||||
|
|
Loading…
Reference in a new issue