mirror of
https://github.com/songoda/EpicVouchers.git
synced 2024-12-22 16:48:26 +01:00
Who in the hell puts return in a for loop
This commit is contained in:
parent
0228b45514
commit
4dd5520a1d
@ -28,16 +28,16 @@ public class ClickListener implements Listener {
|
||||
for (Voucher voucher : instance.getVoucherManager().getVouchers()) {
|
||||
Player player = event.getPlayer();
|
||||
if (!player.hasPermission(voucher.getPermission())) {
|
||||
return;
|
||||
continue;
|
||||
}
|
||||
ItemStack item = event.getPlayer().getItemInHand();
|
||||
if (item.getType() != voucher.getMaterial() || item.getDurability() != voucher.getData()) {
|
||||
return;
|
||||
continue;
|
||||
}
|
||||
|
||||
ItemMeta meta = item.getItemMeta();
|
||||
if (!meta.hasDisplayName() || !meta.getDisplayName().equals(voucher.getName()) || !meta.getLore().equals(voucher.getLore())) {
|
||||
return;
|
||||
continue;
|
||||
}
|
||||
UUID uuid = player.getUniqueId();
|
||||
if (!instance.getCooldowns().getEntries().containsKey(uuid)) {
|
||||
|
Loading…
Reference in New Issue
Block a user