1
0
mirror of https://github.com/Zrips/Jobs.git synced 2024-11-29 14:05:25 +01:00

Lets not show messages of ownership while max is in negatives

This commit is contained in:
Zrips 2021-09-01 18:46:50 +03:00
parent 2127bd1be6
commit 7a07869131

View File

@ -1655,7 +1655,7 @@ public final class JobsPaymentListener implements Listener {
if (report) if (report)
CMIActionBar.send(p, Jobs.getLanguage().getMessage("general.error.noRegistration", "[block]", name)); CMIActionBar.send(p, Jobs.getLanguage().getMessage("general.error.noRegistration", "[block]", name));
} else if (done == ownershipFeedback.newReg && jPlayer != null) { } else if (done == ownershipFeedback.newReg && jPlayer != null && jPlayer.getMaxOwnerShipAllowed(blockOwner.getType()) > 0) {
CMIActionBar.send(p, Jobs.getLanguage().getMessage("general.error.newRegistration", "[block]", name, CMIActionBar.send(p, Jobs.getLanguage().getMessage("general.error.newRegistration", "[block]", name,
"[current]", blockOwner.getTotal(jPlayer.getUniqueId()), "[current]", blockOwner.getTotal(jPlayer.getUniqueId()),
"[max]", jPlayer.getMaxOwnerShipAllowed(blockOwner.getType()) == 0 ? "-" : jPlayer.getMaxOwnerShipAllowed(blockOwner.getType()))); "[max]", jPlayer.getMaxOwnerShipAllowed(blockOwner.getType()) == 0 ? "-" : jPlayer.getMaxOwnerShipAllowed(blockOwner.getType())));