Fixed NPC death event
This commit is contained in:
parent
d22f2bee69
commit
60620fb154
4 changed files with 4 additions and 3 deletions
Binary file not shown.
|
@ -790,7 +790,7 @@ public class PlayerListener implements Listener { // 2015.07.16.
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean ActiveF = false;
|
private boolean ActiveF = false;
|
||||||
private int FCount = 0;
|
private int FCount = 0; // TODO: Change to rate
|
||||||
private MaybeOfflinePlayer FPlayer = null;
|
private MaybeOfflinePlayer FPlayer = null;
|
||||||
private Timer Ftimer;
|
private Timer Ftimer;
|
||||||
public static int AlphaDeaths;
|
public static int AlphaDeaths;
|
||||||
|
@ -799,8 +799,9 @@ public class PlayerListener implements Listener { // 2015.07.16.
|
||||||
public void onPlayerDeath(PlayerDeathEvent e) {
|
public void onPlayerDeath(PlayerDeathEvent e) {
|
||||||
if (e.getEntity().getName().equals("Alpha_Bacca44"))
|
if (e.getEntity().getName().equals("Alpha_Bacca44"))
|
||||||
AlphaDeaths++;
|
AlphaDeaths++;
|
||||||
if (!Minigames.plugin.pdata.getMinigamePlayer(e.getEntity())
|
MinigamePlayer mgp = Minigames.plugin.pdata.getMinigamePlayer(e
|
||||||
.isInMinigame() && new Random().nextBoolean()) {
|
.getEntity());
|
||||||
|
if ((mgp != null && !mgp.isInMinigame()) && new Random().nextBoolean()) { //Don't store Fs for NPCs
|
||||||
if (Ftimer != null)
|
if (Ftimer != null)
|
||||||
Ftimer.cancel();
|
Ftimer.cancel();
|
||||||
ActiveF = true;
|
ActiveF = true;
|
||||||
|
|
Binary file not shown.
Binary file not shown.
Loading…
Reference in a new issue