39 public static void handle(
Player killer,
Player victim) {
44 if (killer.lastHost.equalsIgnoreCase(victim.lastHost)) {
45 killer.message(
"<col=FF0019>You were not rewarded since you killed someone with your same IP.");
49 if (killer.clanChannel !=
null && victim.clanChannel !=
null && killer.clanChannel.getName().equalsIgnoreCase(victim.clanChannel.getName())) {
50 if (!killer.clanChannel.getName().equals(
"tarnish")) {
51 killer.message(
"<col=FF0019>You were not rewarded since you killed someone from your clan.");
58 killer.inventory.
addOrDrop(
new Item(13307, reward));
59 killer.message(
"<col=295EFF>You were rewarded with " + reward +
" blood money for that kill.");
60 killer.killstreak.add();
62 for (Item item : killer.inventory) {
68 if (emblem.getNext() == -1)
70 killer.inventory.
replace(item.getId(), emblem.getNext(),
true);
74 killer.forClan(channel -> {
75 channel.activateTask(PLAYER_KILLING, killer.
getName());
83 add(killer, victim.lastHost);
86 public static void add(
Player player, String host) {
87 if (host ==
null || host.isEmpty()) {
90 if (player.lastKilled.contains(host)) {
93 if (player.lastKilled.size() >= 2) {
94 player.lastKilled.removeFirst();
96 player.lastKilled.add(host);
99 public static boolean remove(
Player player, String host) {
100 return player.lastKilled.remove(host);
103 public static boolean contains(
Player player, String host) {
104 return player.lastKilled !=
null && player.lastKilled.contains(host);
static void onReward(Player player, int item, int chance)