From 80c6752535938483fd41122e6b65211e0fef3240 Mon Sep 17 00:00:00 2001 From: B1G-FUNGUS Date: Sun, 3 Oct 2021 14:21:49 -0700 Subject: [PATCH] Forgot to add to register + changed name from FakePlayer to FakePlayerRitual --- .../top/penowl/quidproquo/QuidProQuo.java | 1 + .../penowl/quidproquo/rituals/FakePlayer.java | 44 ------------------- 2 files changed, 1 insertion(+), 44 deletions(-) delete mode 100644 src/main/java/top/penowl/quidproquo/rituals/FakePlayer.java diff --git a/src/main/java/top/penowl/quidproquo/QuidProQuo.java b/src/main/java/top/penowl/quidproquo/QuidProQuo.java index 6f36d45..c8c57ca 100644 --- a/src/main/java/top/penowl/quidproquo/QuidProQuo.java +++ b/src/main/java/top/penowl/quidproquo/QuidProQuo.java @@ -39,6 +39,7 @@ public class QuidProQuo extends JavaPlugin { rituals.add(new CreeperHissRitual()); rituals.add(new CrystalizationRtiual()); rituals.add(new DragonRitual()); + rituals.add(new FakePlayerRitual()); rituals.add(new FeedingRitual()); rituals.add(new FillerRitual()); rituals.add(new GetLuckyRitual()); diff --git a/src/main/java/top/penowl/quidproquo/rituals/FakePlayer.java b/src/main/java/top/penowl/quidproquo/rituals/FakePlayer.java deleted file mode 100644 index 80bf150..0000000 --- a/src/main/java/top/penowl/quidproquo/rituals/FakePlayer.java +++ /dev/null @@ -1,44 +0,0 @@ -package top.penowl.quidproquo.rituals; - -import org.bukkit.Location; -import org.bukkit.Material; -import org.bukkit.entity.Entity; -import org.bukkit.entity.EntityType; -import org.bukkit.entity.LivingEntity; -import org.bukkit.entity.Player; -import org.bukkit.entity.Slime; -import org.bukkit.potion.PotionEffect; -import org.bukkit.potion.PotionEffectType; - -import java.util.Random; - -import top.penowl.quidproquo.Ritual; - -public class FakePlayer extends Ritual { - - @Override - public void setup() { - addIngredient(Material.WHEAT, 32); - addIngredient(Material.LEAVES, 32); - name = "player illusion"; - } - - @Override - public void execute(Player caster, Player target, Location location) { - Location loc = target.getLocation(); - Random random = new Random(); - int x = random.nextInt(51) - 25; - int y = random.nextInt(51) - 25; - int z = random.nextInt(51) - 25; - Entity fakePlayer = target.getWorld().spawnEntity(loc.clone().add(x, y, z), EntityType.SLIME); - fakePlayer.setCustomName(caster.getName()); - LivingEntity fp_livingEntity = (LivingEntity)fakePlayer; - fp_livingEntity.setMaxHealth(100.0); - fp_livingEntity.setHealth(100.0); - fp_livingEntity.addPotionEffect(new PotionEffect(PotionEffectType.DAMAGE_RESISTANCE, 200, 100)); - fp_livingEntity.addPotionEffect(new PotionEffect(PotionEffectType.WITHER, 200, 1)); - Slime fpSlime = (Slime)fp_livingEntity; - fpSlime.setSize(1); - } - -}