From b2bce93041223fddd8b32a11f97967163c1655d8 Mon Sep 17 00:00:00 2001 From: Brianna Date: Thu, 21 May 2020 16:38:10 -0400 Subject: [PATCH 1/2] Fix firework greifing. --- .../songoda/skyblock/listeners/Entity.java | 36 +++++++++++-------- 1 file changed, 21 insertions(+), 15 deletions(-) diff --git a/src/main/java/com/songoda/skyblock/listeners/Entity.java b/src/main/java/com/songoda/skyblock/listeners/Entity.java index dc75f684..7e2dff23 100644 --- a/src/main/java/com/songoda/skyblock/listeners/Entity.java +++ b/src/main/java/com/songoda/skyblock/listeners/Entity.java @@ -52,6 +52,13 @@ public class Entity implements Listener { this.skyblock = skyblock; } + @EventHandler + public void onFireWorkBoom(EntityDamageByEntityEvent event) { + if (event.getDamager().getType() == EntityType.FIREWORK + && skyblock.getWorldManager().isIslandWorld(event.getEntity().getWorld())) + event.setCancelled(true); + } + @EventHandler public void onEntityDamage(EntityDamageEvent event) { if (!(event.getEntity() instanceof Player)) { @@ -63,23 +70,22 @@ public class Entity implements Listener { FileManager fileManager = skyblock.getFileManager(); if (skyblock.getWorldManager().isIslandWorld(player.getWorld())) { - if (event.getCause() != null) { - if (event.getCause() == DamageCause.VOID) { + event.getCause(); + if (event.getCause() == DamageCause.VOID) { + return; + } else if (event.getCause() == DamageCause.ENTITY_ATTACK) { + EntityDamageByEntityEvent entityDamageByEntityEvent = (EntityDamageByEntityEvent) event; + + if (entityDamageByEntityEvent.getDamager() != null && entityDamageByEntityEvent.getDamager() instanceof Player) { return; - } else if (event.getCause() == DamageCause.ENTITY_ATTACK) { - EntityDamageByEntityEvent entityDamageByEntityEvent = (EntityDamageByEntityEvent) event; + } + } else { + if (NMSUtil.getVersionNumber() > 11) { + if (event.getCause() == DamageCause.valueOf("ENTITY_SWEEP_ATTACK")) { + EntityDamageByEntityEvent entityDamageByEntityEvent = (EntityDamageByEntityEvent) event; - if (entityDamageByEntityEvent.getDamager() != null && entityDamageByEntityEvent.getDamager() instanceof Player) { - return; - } - } else { - if (NMSUtil.getVersionNumber() > 11) { - if (event.getCause() == DamageCause.valueOf("ENTITY_SWEEP_ATTACK")) { - EntityDamageByEntityEvent entityDamageByEntityEvent = (EntityDamageByEntityEvent) event; - - if (entityDamageByEntityEvent.getDamager() != null && entityDamageByEntityEvent.getDamager() instanceof Player) { - return; - } + if (entityDamageByEntityEvent.getDamager() != null && entityDamageByEntityEvent.getDamager() instanceof Player) { + return; } } } From 501e7a0e75f4c0e1d2356db43c549f68d3f877ae Mon Sep 17 00:00:00 2001 From: Brianna Date: Sat, 16 May 2020 15:11:45 -0400 Subject: [PATCH 2/2] version 2.2.12 Updated SongodaCore which fixes end portals and end stone. --- .DS_Store | Bin 0 -> 6148 bytes pom.xml | 2 +- skyblock.iml | 33 +++++++++++++++++++++++++++++++++ src/.DS_Store | Bin 0 -> 6148 bytes 4 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 .DS_Store create mode 100644 skyblock.iml create mode 100644 src/.DS_Store diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..16534e1fae551326bce028043b7162a02a7a3a06 GIT binary patch literal 6148 zcmeHK&2G~`5T0#9Ya0+bAf-oNkT`@YRp}2xNLJb$A|Zri1P4H^okXpLYe%s|C?Uuf z-T`<6-UOb22jKzWo86_#kIS(_up`ZU82>>cEr;=UJCz zMMrF)kYhX|pW2-`?S}DEwFwvo3I3R@W@cv7GD9OaCMt`+1O$vQ{vB&R36v{3O)=lQfOb{UCfA^~Z;` zoBL^!2T{@=%I2uoN6Cw4QPNAtt#p+1GC7W~5|(9K_F-*(GTGj0Hr%^=_ofYZvb)Rv z*3NWlTlHI;4?0JuXKyF(rtd#tDiDE%Q_2mEzu_|+O~Pw`n8ayvj0jh+QceNLIi^14 z3k3Z@e)eI_)y~lLwS*?;vS_kFQynxlw;S%Aojb)e2OtLLV`N zYDe7Fb)LpTp=u|g4KNZprS5oy#Kc^KL5`*nJdG9 zVc?%)KvWO>gBGTw_tvG!@m}jfkDx4ES16P%FnT+d4sXTlP$|f{>;OHDg+fFi=0iZz LV2oklQW^LKA%M|^ literal 0 HcmV?d00001 diff --git a/pom.xml b/pom.xml index df201865..073cf48a 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ 4.0.0 com.songoda skyblock - 2.2.11 + 2.2.12 jar clean install diff --git a/skyblock.iml b/skyblock.iml new file mode 100644 index 00000000..97e93273 --- /dev/null +++ b/skyblock.iml @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/.DS_Store b/src/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..d21c1c6ea87b60b7635197c5f39a3ad4663a92e5 GIT binary patch literal 6148 zcmeHKQA+|r5Z+a*)rfou^6_4R9(+)&EFw6}9()Tf>Y+mKQu5%u74J;SjQbn)kNO4u zoSNBPg|glvLS|t0o12~4W4=9hZx~~|Hf)y}%QMCVC}JuL!#9HSsB@Aso-`oGH5!4u z@dD|=GcHK-{~5r&%dj4Ena{#6`*#R)+wV$LA+tDd6!pzMzk2<^kK$74ji=I?rR5bN zaw4~uyLP&Ao|Hsh^)vq^M&zvw^AxvJNpNdqBX8o(XQ-GCRwq$RX%F8diM|G$H~*P z-U|*Ns*-hsQ+NSmR^Xj82m=}3f^Ql>jUyxmhyh|?0T?hxn^;|dTBrnKfEf5)2Jn2a zKoM<&iAHsFz@S36mA+1ZmDp_ZH+V%1H`~*2C(-7$>aTh@^k;Mf@mNHh=IjqfM@DXy#}?J zyLGNgylXAc7AOkFB^qZbV5qAYV(}_2fGPpMg$AH)FwqDe5c&~NG|)f{{3!z;yz*N1 literal 0 HcmV?d00001