From 36b50d8525362692cc0ab1db025ce455f16667ed Mon Sep 17 00:00:00 2001 From: jojo Date: Sat, 5 Sep 2020 18:52:24 +0200 Subject: [PATCH 1/2] Fix LandingPad --- src/de/steamwar/misslewars/items/LandingPad.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/de/steamwar/misslewars/items/LandingPad.java b/src/de/steamwar/misslewars/items/LandingPad.java index 15455c0..1430299 100644 --- a/src/de/steamwar/misslewars/items/LandingPad.java +++ b/src/de/steamwar/misslewars/items/LandingPad.java @@ -47,7 +47,7 @@ public class LandingPad extends SpecialItem { @Override public boolean handleUse(Player p) { Location l = p.getLocation(); - BlockVector3 paste = BlockVector3.at(l.getX(), l.getY() - 5, l.getZ()).subtract(offset); + BlockVector3 paste = BlockVector3.at(l.getX() - 1, l.getY() - 5, l.getZ()).subtract(offset); EditSession editSession = WorldEdit.getInstance().getEditSessionFactory().getEditSession(world, -1); Operations.completeBlindly(new ClipboardHolder(clipboard).createPaste(editSession).ignoreAirBlocks(true).to(paste).build()); From f71fe35ff0c862f0dec38cb622efd0be784a936e Mon Sep 17 00:00:00 2001 From: jojo Date: Sat, 5 Sep 2020 18:57:48 +0200 Subject: [PATCH 2/2] Add SlowFalling --- src/de/steamwar/misslewars/items/LandingPad.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/de/steamwar/misslewars/items/LandingPad.java b/src/de/steamwar/misslewars/items/LandingPad.java index 1430299..27833e0 100644 --- a/src/de/steamwar/misslewars/items/LandingPad.java +++ b/src/de/steamwar/misslewars/items/LandingPad.java @@ -15,6 +15,8 @@ import org.bukkit.Location; import org.bukkit.Material; import org.bukkit.entity.Player; import org.bukkit.inventory.ItemStack; +import org.bukkit.potion.PotionEffect; +import org.bukkit.potion.PotionEffectType; import java.io.File; import java.io.FileInputStream; @@ -46,6 +48,7 @@ public class LandingPad extends SpecialItem { @Override public boolean handleUse(Player p) { + p.addPotionEffect(new PotionEffect(PotionEffectType.SLOW_FALLING, 2, 1, false, false, false)); Location l = p.getLocation(); BlockVector3 paste = BlockVector3.at(l.getX() - 1, l.getY() - 5, l.getZ()).subtract(offset);