mirror of
https://github.com/Zrips/Jobs.git
synced 2025-01-20 15:11:20 +01:00
Fixed issue when cows milking are giving messages, even when the player was not joined to a job
Closes, #728
This commit is contained in:
parent
05b1122d66
commit
d16fc7e50d
@ -228,6 +228,20 @@ public class JobsPaymentListener implements Listener {
|
|||||||
if (jPlayer == null)
|
if (jPlayer == null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
boolean found = false;
|
||||||
|
t: for (JobProgression prog : jPlayer.getJobProgression()) {
|
||||||
|
for (JobInfo info : jPlayer.getJobProgression(prog.getJob()).getJob().getJobInfo(ActionType.MILK)) {
|
||||||
|
if (info.getActionType() == ActionType.MILK) {
|
||||||
|
found = true;
|
||||||
|
break t;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!found) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (Jobs.getGCManager().CowMilkingTimer > 0) {
|
if (Jobs.getGCManager().CowMilkingTimer > 0) {
|
||||||
if (cow.hasMetadata(CowMetadata)) {
|
if (cow.hasMetadata(CowMetadata)) {
|
||||||
long time = cow.getMetadata(CowMetadata).get(0).asLong();
|
long time = cow.getMetadata(CowMetadata).get(0).asLong();
|
||||||
|
Loading…
Reference in New Issue
Block a user