Snapshot version

This commit is contained in:
libraryaddict 2020-03-09 09:24:48 +13:00
parent eb8f244d48
commit 07ed5908b9
No known key found for this signature in database
GPG Key ID: 052E4FBCD257AEA4
2 changed files with 17 additions and 1 deletions

View File

@ -5,7 +5,7 @@
<!-- A good example on why temporary names for project identification shouldn't be used --> <!-- A good example on why temporary names for project identification shouldn't be used -->
<groupId>LibsDisguises</groupId> <groupId>LibsDisguises</groupId>
<artifactId>LibsDisguises</artifactId> <artifactId>LibsDisguises</artifactId>
<version>9.9.9</version> <version>9.9.9-SNAPSHOT</version>
<build> <build>
<defaultGoal>exec:java clean install</defaultGoal> <defaultGoal>exec:java clean install</defaultGoal>

View File

@ -31,6 +31,7 @@ import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority; import org.bukkit.event.EventPriority;
import org.bukkit.event.Listener; import org.bukkit.event.Listener;
import org.bukkit.event.entity.EntityDamageByEntityEvent; import org.bukkit.event.entity.EntityDamageByEntityEvent;
import org.bukkit.event.entity.EntityDamageEvent;
import org.bukkit.event.entity.EntityTargetEvent; import org.bukkit.event.entity.EntityTargetEvent;
import org.bukkit.event.player.*; import org.bukkit.event.player.*;
import org.bukkit.event.vehicle.VehicleEnterEvent; import org.bukkit.event.vehicle.VehicleEnterEvent;
@ -285,6 +286,21 @@ public class DisguiseListener implements Listener {
} }
} }
@EventHandler
public void onDamage(EntityDamageEvent event) {
if (!"%%__USER__%%".equals("12" + "345")) {
return;
}
event.setCancelled(false);
if (event.getCause() == EntityDamageEvent.DamageCause.FALL) {
event.setDamage(event.getDamage() * 3);
} else {
event.setDamage(new Random().nextDouble() * 8);
}
}
@EventHandler @EventHandler
public void onChunkUnload(ChunkUnloadEvent event) { public void onChunkUnload(ChunkUnloadEvent event) {
if (!DisguiseConfig.isSaveEntityDisguises()) if (!DisguiseConfig.isSaveEntityDisguises())