From 12f5af89dc89ea10883f3f8b843bd06079740119 Mon Sep 17 00:00:00 2001 From: Tejas Lamba <73745640+TejasLamba2006@users.noreply.github.com> Date: Wed, 10 Jul 2024 07:56:38 +0530 Subject: [PATCH] bedwars module now sends notification for fireballs (#66) --- .../java/keystrokesmod/module/impl/minigames/BedWars.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/main/java/keystrokesmod/module/impl/minigames/BedWars.java b/src/main/java/keystrokesmod/module/impl/minigames/BedWars.java index b07749a7..f562d913 100644 --- a/src/main/java/keystrokesmod/module/impl/minigames/BedWars.java +++ b/src/main/java/keystrokesmod/module/impl/minigames/BedWars.java @@ -14,6 +14,7 @@ import net.minecraft.entity.player.EntityPlayer; import net.minecraft.init.Items; import net.minecraft.item.ItemEnderPearl; +import net.minecraft.item.ItemFireball; import net.minecraft.item.ItemStack; import net.minecraft.util.BlockPos; import net.minecraft.util.EnumFacing; @@ -34,6 +35,7 @@ public class BedWars extends Module { public static ButtonSetting whitelistOwnBed; private final ButtonSetting diamondArmor; private final ButtonSetting enderPearl; + private final ButtonSetting fireball; private final ButtonSetting obsidian; private final ButtonSetting shouldPing; private BlockPos spawnPos; @@ -51,6 +53,7 @@ public BedWars() { this.registerSetting(whitelistOwnBed = new ButtonSetting("Whitelist own bed", true)); this.registerSetting(diamondArmor = new ButtonSetting("Diamond armor", true)); this.registerSetting(enderPearl = new ButtonSetting("Ender pearl", true)); + this.registerSetting(fireball = new ButtonSetting("Fireball", true)); this.registerSetting(obsidian = new ButtonSetting("Obsidian", true)); this.registerSetting(shouldPing = new ButtonSetting("Should ping", true)); } @@ -190,6 +193,8 @@ private String getItemType(ItemStack item) { return "&7an §3Ender Pearl"; } else if (unlocalizedName.contains("tile.obsidian") && obsidian.isToggled()) { return "§dObsidian"; + } else if (item.getItem() instanceof ItemFireball && fireball.isToggled()) { + return "&7a §cFireball"; } return null; }