Fixed issues with Broadsword
Added max building height of 100
This commit is contained in:
parent
4612550ba5
commit
9c83c64d01
@ -750,6 +750,8 @@ public class ClansDataAccessLayer
|
||||
if (callback != null)
|
||||
{
|
||||
callback.run(ran);
|
||||
} else {
|
||||
if(!ran) System.out.println("Tnt Gen didn't save!");
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -174,7 +174,7 @@ public class TntGeneratorManager extends MiniPlugin
|
||||
ClanInfo owner = _clansManager.getClanUtility().getOwner(event.getClickedBlock().getLocation());
|
||||
if(owner == null) return; //Wilderness
|
||||
TntGenerator generator = owner.getGenerator();
|
||||
|
||||
System.out.println("Unable to find generator");
|
||||
//Create generator if not exist
|
||||
if(generator == null || !generator.getBlock().equals(event.getClickedBlock())) {
|
||||
generator = new TntGenerator(event.getClickedBlock());
|
||||
|
@ -253,7 +253,7 @@ public class Gameplay extends MiniPlugin
|
||||
event.setCancelled(true);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@EventHandler(priority = EventPriority.LOWEST)
|
||||
public void RedstoneCancel(BlockPlaceEvent event)
|
||||
{
|
||||
@ -263,7 +263,17 @@ public class Gameplay extends MiniPlugin
|
||||
event.setCancelled(true);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@EventHandler(priority = EventPriority.LOWEST)
|
||||
public void MaxHeight(BlockPlaceEvent event)
|
||||
{
|
||||
if (event.getBlock().getLocation().getBlockY() > 100)
|
||||
{
|
||||
UtilPlayer.message(event.getPlayer(), F.main("Game", "You cannot place blocks this high."));
|
||||
event.setCancelled(true);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Disable all Piston related events in Clans
|
||||
*
|
||||
|
@ -13,9 +13,9 @@ import mineplex.minecraft.game.core.damage.CustomDamageEvent;
|
||||
|
||||
public class GiantsBroadsword extends LegendaryItem
|
||||
{
|
||||
public static final int SLOW_AMPLIFIER = 4;
|
||||
public static final int REGEN_AMPLIFIER = 1;
|
||||
public static final int EFFECT_DURATION = 10; // Duration of potion effect
|
||||
public static final int SLOW_AMPLIFIER = 43;
|
||||
public static final int REGEN_AMPLIFIER = 4;
|
||||
public static final int EFFECT_DURATION = 20; // Duration of potion effect
|
||||
// (in ticks)
|
||||
|
||||
public GiantsBroadsword()
|
||||
@ -62,7 +62,7 @@ public class GiantsBroadsword extends LegendaryItem
|
||||
|
||||
private void buffPlayer(Player player)
|
||||
{
|
||||
grantPotionEffect(player, PotionEffectType.SLOW, 40, 5);
|
||||
grantPotionEffect(player, PotionEffectType.REGENERATION, 2, 5); //Regen 4
|
||||
grantPotionEffect(player, PotionEffectType.SLOW, EFFECT_DURATION, SLOW_AMPLIFIER);
|
||||
grantPotionEffect(player, PotionEffectType.REGENERATION, 2, REGEN_AMPLIFIER); //Regen
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user