mirror of
https://github.com/Crazy-Crew/CrazyAuctions.git
synced 2024-12-02 13:33:23 +01:00
Fixed /ah test not checking for item in hand.
This commit is contained in:
parent
43abfb72fe
commit
0492cb9557
@ -96,6 +96,7 @@ public class Main extends JavaPlugin implements Listener {
|
|||||||
int price = 10;
|
int price = 10;
|
||||||
int amount = 1;
|
int amount = 1;
|
||||||
ItemStack item = Methods.getItemInHand((Player) sender);
|
ItemStack item = Methods.getItemInHand((Player) sender);
|
||||||
|
if (item != null && item.getType() != Material.AIR) {
|
||||||
// For testing as another player
|
// For testing as another player
|
||||||
String seller = "Test-Account";
|
String seller = "Test-Account";
|
||||||
for (int it = 1; it <= times; it++) {
|
for (int it = 1; it <= times; it++) {
|
||||||
@ -131,6 +132,10 @@ public class Main extends JavaPlugin implements Listener {
|
|||||||
} else {
|
} else {
|
||||||
item.setAmount(item.getAmount() - amount);
|
item.setAmount(item.getAmount() - amount);
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
sender.sendMessage(Messages.DOSENT_HAVE_ITEM_IN_HAND.getMessage());
|
||||||
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (args[0].equalsIgnoreCase("Reload")) {// CA Reload
|
if (args[0].equalsIgnoreCase("Reload")) {// CA Reload
|
||||||
if (!Methods.hasPermission(sender, "Admin")) return true;
|
if (!Methods.hasPermission(sender, "Admin")) return true;
|
||||||
|
Loading…
Reference in New Issue
Block a user