Skip to content

Commit

Permalink
bedwars module now sends notification for fireballs (#66)
Browse files Browse the repository at this point in the history
  • Loading branch information
TejasLamba2006 authored Jul 10, 2024
1 parent d184718 commit 12f5af8
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand All @@ -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));
}
Expand Down Expand Up @@ -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;
}
Expand Down

0 comments on commit 12f5af8

Please sign in to comment.