mirror of
https://github.com/darksaid98/SiegeEngines.git
synced 2026-12-01 14:38:55 +00:00
Bump Version (0.8.6)
Fixes arrow damage applying in protected regions.
This commit is contained in:
1 parent
fedc87e7ce
commit
b8472be343
4 files changed
+9
-3
No files matched your search
@@ -6,7 +6,7 @@
|
||||
|
||||
<groupId>com.github.alathra</groupId>
|
||||
<artifactId>SiegeEngines</artifactId>
|
||||
<version>0.8.5</version>
|
||||
<version>0.8.6</version>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<properties>
|
||||
|
||||
@@ -59,7 +59,6 @@ public class SiegeEngines extends JavaPlugin {
|
||||
getServer().getPluginManager().registerEvents(new ClickHandler(), this);
|
||||
getServer().getPluginManager().registerEvents(new PlayerHandler(), this);
|
||||
ClickHandler.items.clear();
|
||||
ClickHandler.items.add(new ItemStack(Material.ARMOR_STAND));
|
||||
addDefaults();
|
||||
for (SiegeEngine i : definedSiegeEngines.values()) {
|
||||
System.out.println("§eEnabled Weapon : " + i.getEngineName());
|
||||
@@ -68,6 +67,7 @@ public class SiegeEngines extends JavaPlugin {
|
||||
System.out.println("§eWeapon Projectile ItemStacks : " + proj);
|
||||
}
|
||||
}
|
||||
ClickHandler.items.add(new ItemStack(Material.ARMOR_STAND));
|
||||
commandHandler.onEnable();
|
||||
}
|
||||
|
||||
|
||||
@@ -72,12 +72,13 @@ public class ClickHandler implements Listener {
|
||||
}
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
@EventHandler(priority = EventPriority.HIGH)
|
||||
public void onHit(ProjectileHitEvent event) {
|
||||
if ((event.getEntity() instanceof Projectile)) {
|
||||
for (Entity entity : event.getEntity().getNearbyEntities(2, 2, 2)) {
|
||||
if (entity instanceof ArmorStand) {
|
||||
ArmorStand stand = (ArmorStand) entity;
|
||||
if (event.isCancelled()) return;
|
||||
if (isSiegeEngine(stand,false)) {
|
||||
event.setCancelled(true);
|
||||
if (!Config.arrowDamageToggle) continue;
|
||||
|
||||
@@ -44,6 +44,11 @@ public class RotationHandler implements Listener {
|
||||
PlayerHandler.siegeEngineEntityDied(ent);
|
||||
continue;
|
||||
}
|
||||
if (ClickHandler.fluidMaterials.contains(living.getLocation().getBlock().getType())) {
|
||||
living.setHealth(0.0d);
|
||||
PlayerHandler.siegeEngineEntityDied(ent);
|
||||
continue;
|
||||
}
|
||||
if (!(ent.getLocation().getWorld().equals(player.getLocation().getWorld()))) {
|
||||
PlayerHandler.releasePlayerSiegeEngine(player, ent);
|
||||
continue;
|
||||
|
||||
Reference in new issue
Block a user