You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-Removed the Ban Hammer's crafting recipe,
since it was too overpowered and weird.
Might return later!
-Fixed a bug where nukes could be lit by
means other than players lighting them,
including other nukes.
-HEAVY BUFFED the crafting recipe for Nukes,
so that it's more fair for everyone, since they're too easy to get
-Sterilized all "old" nukes crafted before this mod, rendering them useless. Sorry you had to waste all those materials, but this was getting out of hand. Sterilized nukes can be shown to an admin to get your materials back, if the admin is nice enough.
-Added super and hyper compressed gunpowder blocks. Nukes now require 91 stacks plus eight gunpowder total, plus netherite blocks, heavy cores, nether stars, and so on and so forth.
Enjoy! I gotta do hw now T_T
@@ -34,6 +33,10 @@ public class EventManager implements Listener {
34
33
35
34
@EventHandler
36
35
publicvoidonPlaceCustom(BlockPlaceEventev) {
36
+
if (ev.getItemInHand().hasItemMeta() && ev.getItemInHand().getItemMeta().hasLore() && ev.getItemInHand().getItemMeta().hasCustomName() && ev.getItemInHand().getItemMeta().customName().equals(Component.text(ChatColor.LIGHT_PURPLE + "Nuke")) && ev.getItemInHand().getItemMeta().lore().get(0).equals(Component.text("Part of the Nuke plugin by Ep1n"))) {
@@ -62,7 +65,8 @@ public void onDropCore(PlayerDropItemEvent ev) {
62
65
63
66
@EventHandler
64
67
publicvoidonLightNuke(TNTPrimeEventev) {
65
-
if (blockMap.containsKey(ev.getBlock().getLocation())) {
68
+
if (blockMap.get(ev.getBlock().getLocation()).equals(nukePlugin.instance.neoNuke)) {
69
+
if (!(ev.getCause().equals(TNTPrimeEvent.PrimeCause.PLAYER))) return;
66
70
if (ev.getPrimingEntity() instanceofPlayer) ev.getPrimingEntity().getServer().broadcastMessage(ChatColor.RED + ev.getPrimingEntity().getName().toUpperCase() + ChatColor.WHITE + " HAS LIT A " + ChatColor.RED + "NUKE!");
67
71
//cancel the event and set the block to air
68
72
ev.setCancelled(true);
@@ -73,12 +77,10 @@ public void onLightNuke(TNTPrimeEvent ev) {
73
77
tnt.setGlowing(true);
74
78
List<Entity> list = tnt.getNearbyEntities(25, 25, 25);
75
79
for (Entityk : list) {
76
-
if (kinstanceofPlayer) {
77
-
Playerp = (Player) k;
80
+
if (kinstanceofPlayerp) {
78
81
if (!(ev.getCause().equals(TNTPrimeEvent.PrimeCause.EXPLOSION))) p.sendMessage(ChatColor.RED + "YOU ARE WITHIN BLAST RADIUS. " + ChatColor.BOLD + "RUN.");
79
82
}
80
83
}
81
-
if (ev.getCause().equals(TNTPrimeEvent.PrimeCause.EXPLOSION)) tnt.setFuseTicks(0);
82
84
//check in another method when it explodes and make the explosion size bigger
0 commit comments