Byteflux / CombatTagPlus

Stop those dirty combat loggers!
17 stars 72 forks source link

When a NPC is killed a player should lose DTR #49

Open KennyDGP opened 9 years ago

KennyDGP commented 9 years ago

Hey, how's it going?

I use a Hardcore Factions plugin for my server: https://mcexchange.org/resources/hcfactions.2/

The CombatTag plugin doesn't hook in with it so when a user combat logs, and their NPC is killed they don't lose DTR. Anyway you could add that?

I'm using spigot 1.8.8 and the latest dev build of Combat Tag. We tried the current release on spigot and same issue happened.

Techcable commented 8 years ago

This is not a bug, this is a feature request.

nakitsuro commented 8 years ago

@EventHandler public void onDespawn(NpcDespawnEvent e) { if (e.getDespawnReason().equals(NpcDespawnReason.DEATH)) { FPlayer p = FPlayers.getInstance().getByOfflinePlayer(Bukkit.getOfflinePlayer(e.getNpc().getIdentity().getId())); p.getFaction().updateDTR(); p.getFaction().setDTR(p.getFaction().getDTR() - 1.0); } }

Easy to do yourself