Want to make groundItems unlootable, Only by the person that killed the npc can loot the item.
I am doing this for IronMan mode, This is the last step i'm stuck on could anyone help me with this ?
My sendDrop Method
Code:
public void sendDrop(Player player, Drop drop) {
int size = getSize();
String dropName = ItemDefinitions.getItemDefinitions(drop.getItemId())
.getName().toLowerCase();
sendCharms(player);
sendClues(player);
sendSpin(player);
Item item = ItemDefinitions.getItemDefinitions(drop.getItemId())
.isStackable() ? new Item(drop.getItemId(),
(drop.getMinAmount() * Settings.DROP_RATE)
+ Utils.getRandom(drop.getExtraAmount()
* Settings.DROP_RATE)) : new Item(
drop.getItemId(), drop.getMinAmount()
+ Utils.getRandom(drop.getExtraAmount()));
World.addGroundItem(item, new WorldTile(getCoordFaceX(size),
getCoordFaceY(size), getPlane()), player, false, 180, true);
if (player.getRights() == 9) {
World.addGroundItem();
for (String strings : Settings.RARE_DROPS) {
if (dropName.contains(strings)) {
World.sendWorldMessage(
("<img=7><col=ff8c38>News: " +player.getUsername())
+ " <col=ff8c38>Has Received A " + dropName
+ "", false);
return;
}
}
}