mirror of
https://github.com/PlayPro/CoreProtect.git
synced 2024-11-24 12:16:36 +01:00
Changed entities killed via /kill command to log under #command
This commit is contained in:
parent
a6869176be
commit
1be82111ed
@ -54,6 +54,7 @@ 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.EntityDamageEvent;
|
||||||
|
import org.bukkit.event.entity.EntityDamageEvent.DamageCause;
|
||||||
import org.bukkit.event.entity.EntityDeathEvent;
|
import org.bukkit.event.entity.EntityDeathEvent;
|
||||||
import org.bukkit.inventory.ItemStack;
|
import org.bukkit.inventory.ItemStack;
|
||||||
import org.bukkit.inventory.MerchantRecipe;
|
import org.bukkit.inventory.MerchantRecipe;
|
||||||
@ -113,8 +114,9 @@ public final class EntityDeathListener extends Queue implements Listener {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
boolean isCommand = (damage.getCause() == DamageCause.VOID && entity.getLocation().getBlockY() >= BukkitAdapter.ADAPTER.getMinHeight(entity.getWorld()));
|
||||||
if (e == null) {
|
if (e == null) {
|
||||||
e = "";
|
e = isCommand ? "#command" : "";
|
||||||
}
|
}
|
||||||
|
|
||||||
boolean skip = true;
|
boolean skip = true;
|
||||||
@ -194,6 +196,14 @@ public final class EntityDeathListener extends Queue implements Listener {
|
|||||||
Block block = entityLocation.getBlock();
|
Block block = entityLocation.getBlock();
|
||||||
Queue.queueBlockBreak(e, block.getState(), Material.ARMOR_STAND, null, (int) entityLocation.getYaw());
|
Queue.queueBlockBreak(e, block.getState(), Material.ARMOR_STAND, null, (int) entityLocation.getYaw());
|
||||||
}
|
}
|
||||||
|
/*
|
||||||
|
else if (isCommand) {
|
||||||
|
entityLocation.setY(entityLocation.getY() + 0.99);
|
||||||
|
Block block = entityLocation.getBlock();
|
||||||
|
Database.containerBreakCheck(e, Material.ARMOR_STAND, entity, null, block.getLocation());
|
||||||
|
Queue.queueBlockBreak(e, block.getState(), Material.ARMOR_STAND, null, (int) entityLocation.getYaw());
|
||||||
|
}
|
||||||
|
*/
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user