mirror of
https://github.com/kiranhart/Auction-House.git
synced 2024-11-22 05:25:11 +01:00
copy item require gmc setting option
This commit is contained in:
parent
162a7145f8
commit
780fc19cac
@ -1 +0,0 @@
|
||||
-s settings.xml
|
@ -8,6 +8,7 @@ import ca.tweetzy.auctionhouse.settings.Settings;
|
||||
import ca.tweetzy.core.gui.Gui;
|
||||
import ca.tweetzy.core.utils.PlayerUtils;
|
||||
import ca.tweetzy.core.utils.TextUtils;
|
||||
import org.bukkit.GameMode;
|
||||
|
||||
/**
|
||||
* The current file has been created by Kiran Hart
|
||||
@ -52,6 +53,11 @@ public class GUIAdminItem extends Gui {
|
||||
});
|
||||
|
||||
setButton(1, 7, ConfigurationItemHelper.createConfigurationItem(Settings.GUI_ITEM_ADMIN_ITEMS_COPY_ITEM.getString(), Settings.GUI_ITEM_ADMIN_ITEMS_COPY_NAME.getString(), Settings.GUI_ITEM_ADMIN_ITEMS_COPY_LORE.getStringList(), null), e -> {
|
||||
if (Settings.ITEM_COPY_REQUIRES_GMC.getBoolean() && e.player.getGameMode() != GameMode.CREATIVE) {
|
||||
AuctionHouse.getInstance().getLocale().getMessage("general.requires creative").sendPrefixedMessage(e.player);
|
||||
return;
|
||||
}
|
||||
|
||||
PlayerUtils.giveItem(e.player, this.auctionItem.getItem());
|
||||
e.gui.close();
|
||||
});
|
||||
|
@ -54,6 +54,7 @@ public class LocaleSettings {
|
||||
languageNodes.put("general.unmarked chest", "&cYou unmarked that chest as an Auction chest");
|
||||
languageNodes.put("general.visit auction chest", "&cVisit an Auction chest to use Auction House.");
|
||||
languageNodes.put("general.disabled in world", "&cAuction House is disabled in this world.");
|
||||
languageNodes.put("general.requires creative", "&cThat action requires you to be in creative mode");
|
||||
|
||||
|
||||
languageNodes.put("pricing.minbaseprice", "&cThe minimum base price must be &a$%price%");
|
||||
|
@ -54,6 +54,7 @@ public class Settings {
|
||||
public static final ConfigSetting BLOCKED_WORLDS = new ConfigSetting(config, "auction setting.blocked worlds", Collections.singletonList("creative"), "A list of worlds that Auction House will be disabled in");
|
||||
public static final ConfigSetting PREVENT_SALE_OF_REPAIRED_ITEMS = new ConfigSetting(config, "auction setting.prevent sale of repaired items", false, "Items repaired before this setting is turned on will still be able to be listed.");
|
||||
public static final ConfigSetting SYNCHRONIZE_ITEM_ADD = new ConfigSetting(config, "auction setting.synchronize item add", false, "If an item is being added to a player's inventory, the process will be ran synchronously");
|
||||
public static final ConfigSetting ITEM_COPY_REQUIRES_GMC = new ConfigSetting(config, "auction setting.admin copy requires creative", false, "If true when using the admin copy option the player must be in creative");
|
||||
|
||||
public static final ConfigSetting TICK_UPDATE_TIME = new ConfigSetting(config, "auction setting.tick auctions every", 1, "How many seconds should pass before the plugin updates all the times on items?");
|
||||
public static final ConfigSetting CLAIM_MS_DELAY = new ConfigSetting(config, "auction setting.item claim delay", 100, "How many ms should a player wait before being allowed to claim an item?, Ideally you don't wanna change this. It's meant to prevent auto clicker dupe claims");
|
||||
|
Loading…
Reference in New Issue
Block a user