mirror of
https://github.com/kiranhart/Auction-House.git
synced 2025-01-24 15:31:19 +01:00
section check for the convert command, added the convert command perms to the plugin.yml
This commit is contained in:
parent
9ef418f457
commit
fd48219c03
@ -34,6 +34,11 @@ public class CommandConvert extends AbstractCommand {
|
||||
ConfigurationSection activeSection = AuctionHouse.getInstance().getData().getConfigurationSection("active");
|
||||
ConfigurationSection expiredSection = AuctionHouse.getInstance().getData().getConfigurationSection("expired");
|
||||
|
||||
if (activeSection == null || expiredSection == null) {
|
||||
AuctionHouse.getInstance().getLocale().newMessage(TextUtils.formatText("&4Active/Expired section(s) could not be found, have you ran the conversion command already?")).sendPrefixedMessage(sender);
|
||||
return;
|
||||
}
|
||||
|
||||
if (activeSection != null && activeSection.getKeys(false).size() != 0) {
|
||||
activeSection.getKeys(false).forEach(key -> AuctionHouse.getInstance().getAuctionItemManager().addItem(new AuctionItem(
|
||||
UUID.fromString(Objects.requireNonNull(AuctionHouse.getInstance().getData().getString("active." + key + ".owner"))),
|
||||
|
@ -25,6 +25,7 @@ permissions:
|
||||
auctionhouse.cmd.settings: true
|
||||
auctionhouse.cmd.transactions: true
|
||||
auctionhouse.cmd.search: true
|
||||
auctionhouse.cmd.convert: true
|
||||
auctionhouse.cmd:
|
||||
description: Allows the user to use /ah
|
||||
default: op
|
||||
@ -45,4 +46,7 @@ permissions:
|
||||
default: op
|
||||
auctionhouse.cmd.search:
|
||||
description: Allows the user to search for auction items.
|
||||
default: op
|
||||
auctionhouse.cmd.convert:
|
||||
description: Allows the user to run conversion command
|
||||
default: op
|
Loading…
Reference in New Issue
Block a user