I think this should stop my fireworks from damaging people

This commit is contained in:
t00thpick1 2017-02-22 00:00:27 -05:00
parent 37ce29a5e8
commit bb27d753b1
2 changed files with 7 additions and 0 deletions

View File

@ -149,6 +149,12 @@ public class EntityListener implements Listener {
return;
}
if (event.getDamager().hasMetadata(mcMMO.funfettiMetadataKey))
{
event.setCancelled(true);
return;
}
double damage = event.getFinalDamage();
Entity defender = event.getEntity();
Entity attacker = event.getDamager();

View File

@ -103,6 +103,7 @@ public class mcMMO extends JavaPlugin {
public final static String blockMetadataKey = "mcMMO: Piston Tracking";
public final static String furnaceMetadataKey = "mcMMO: Tracked Furnace";
public final static String tntMetadataKey = "mcMMO: Tracked TNT";
public final static String funfettiMetadataKey = "mcMMO: Funfetti";
public final static String tntsafeMetadataKey = "mcMMO: Safe TNT";
public final static String customNameKey = "mcMMO: Custom Name";
public final static String customVisibleKey = "mcMMO: Name Visibility";