Moved 'editor-title' and 'for-hire-title' from config into messages.

master
blablubbabc 2020-11-24 18:32:00 +01:00
parent 937961d2e9
commit a335245328
10 changed files with 27 additions and 22 deletions

View File

@ -33,6 +33,7 @@ Messages:
* Added 'no-player-shops-via-command'.
* Removed 'no-admin-shop-type-selected'.
* Removed 'no-player-shop-type-selected'.
* Moved 'editor-title' and 'for-hire-title' from config into messages.
* Changed the default color of 'villager-editor-title' to be less bright.
You will have to manually update your custom language files to adapt for these changes.

View File

@ -48,6 +48,8 @@ public class Messages {
+ "&e Right-click a container to select it.\n"
+ "&e Then right-click a block to place the shopkeeper.");
public static String editorTitle = "Shopkeeper Editor";
public static String buttonPreviousPage = "&6<- Previous page ({prev_page} of {max_page})";
public static List<String> buttonPreviousPageLore = Arrays.asList();
public static String buttonNextPage = "&6Next page ({next_page} of {max_page}) ->";
@ -61,8 +63,6 @@ public class Messages {
public static List<String> buttonContainerLore = Arrays.asList("Lets you view the inventory", " your shopkeeper is using");
public static String buttonDelete = "&4Delete";
public static List<String> buttonDeleteLore = Arrays.asList("Closes and removes", "this shopkeeper");
public static String buttonHire = "&aHire";
public static List<String> buttonHireLore = Arrays.asList("Buy this shop");
public static String buttonSignVariant = "&aChoose sign variant";
public static List<String> buttonSignVariantLore = Arrays.asList("Changes the sign's", "wood type");
@ -123,6 +123,10 @@ public class Messages {
public static String buttonMagmaCubeSize = "&aChoose magma cube size";
public static List<String> buttonMagmaCubeSizeLore = Arrays.asList("Cycles the magma cube's size.", "Current size: &e{size}");
public static String forHireTitle = "For Hire";
public static String buttonHire = "&aHire";
public static List<String> buttonHireLore = Arrays.asList("Buy this shop");
public static String tradingTitlePrefix = "&2";
public static String tradingTitleDefault = "Shopkeeper";

View File

@ -246,8 +246,6 @@ public class Settings {
/*
* Editor Menu
*/
public static String editorTitle = "Shopkeeper Editor";
public static int maxTradesPages = 5;
public static ItemData previousPageItem = new ItemData(Material.WRITABLE_BOOK);
@ -282,7 +280,6 @@ public class Settings {
*/
public static ItemData hireItem = new ItemData(Material.EMERALD);
public static int hireOtherVillagersCosts = 1;
public static String forHireTitle = "For Hire";
public static boolean hireRequireCreationPermission = true;
/*

View File

@ -14,6 +14,7 @@ import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.PlayerInventory;
import org.bukkit.inventory.meta.ItemMeta;
import com.nisovin.shopkeepers.Messages;
import com.nisovin.shopkeepers.SKShopkeepersPlugin;
import com.nisovin.shopkeepers.Settings;
import com.nisovin.shopkeepers.api.ShopkeepersAPI;
@ -288,7 +289,7 @@ public abstract class AbstractPlayerShopkeeper extends AbstractShopkeeper implem
} else {
// Set for hire:
this.hireCost = hireCost.clone();
this.setName(Settings.forHireTitle);
this.setName(Messages.forHireTitle);
}
}

View File

@ -34,7 +34,7 @@ public class PlayerShopHiringHandler extends HiringHandler {
@Override
protected boolean openWindow(Player player) {
PlayerShopkeeper shopkeeper = this.getShopkeeper();
Inventory inventory = Bukkit.createInventory(player, 9, Settings.forHireTitle);
Inventory inventory = Bukkit.createInventory(player, 9, Messages.forHireTitle);
ItemStack hireItem = Settings.createHireButtonItem();
inventory.setItem(BUTTON_HIRE_1, hireItem);

View File

@ -43,7 +43,7 @@ public abstract class EditorHandler extends AbstractEditorHandler implements Sho
@Override
protected String getEditorTitle() {
return Settings.editorTitle;
return Messages.editorTitle;
}
// EDITOR BUTTONS

View File

@ -7,7 +7,6 @@ import org.bukkit.event.inventory.InventoryDragEvent;
import org.bukkit.inventory.InventoryView;
import com.nisovin.shopkeepers.Messages;
import com.nisovin.shopkeepers.Settings;
import com.nisovin.shopkeepers.api.ShopkeepersPlugin;
import com.nisovin.shopkeepers.shopkeeper.AbstractShopkeeper;
import com.nisovin.shopkeepers.ui.AbstractShopkeeperUIHandler;
@ -38,7 +37,7 @@ public abstract class HiringHandler extends AbstractShopkeeperUIHandler {
@Override
protected boolean isWindow(InventoryView view) {
return view != null && view.getTitle().equals(Settings.forHireTitle);
return view != null && view.getTitle().equals(Messages.forHireTitle);
}
@Override

View File

@ -302,10 +302,7 @@ allow-renaming-of-player-npc-shops: false
# Editor Menu
# *~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*
# The window title of the shopkeeper editor menu.
editor-title: "Shopkeeper Editor"
# The number of pages that can be filled with trades. Max 10.
# The number of pages that can be filled with trades. The maximum is 10.
max-trades-pages: 5
# The items used for the buttons and icons in the trades page row.
@ -367,8 +364,6 @@ edit-regular-wandering-traders: true
hire-item: EMERALD
# The amount of hire-cost items it costs to hire a non-shopkeeper villager.
hire-other-villagers-costs: 1
# The title of the hiring inventory window when hiring a player shopkeeper.
for-hire-title: "For Hire"
# Whether hiring a player shopkeeper also requires the permission to create
# player shopkeepers of that type.
hire-require-creation-permission: true

View File

@ -26,6 +26,8 @@ creation-item-selected: |-
&e Rechtsklick auf einen Behälter, um diesen auszuwählen.
&e Dann Rechtsklick auf einen Block, um dort den Händler zu erstellen.
editor-title: "Shop Editor"
button-previous-page: "&6<- Vorherige Seite ({prev_page} von {max_page})"
button-previous-page-lore: []
button-next-page: "&6Nächste Seite ({next_page} von {max_page}) ->"
@ -45,9 +47,6 @@ button-delete: "&4Entfernen"
button-delete-lore:
- Schließt diesen Shop und
- entfernt den Verkäufer
button-hire: "&aAnheuern"
button-hire-lore:
- Kaufe diesen Shop
button-sign-variant: "&aSchild-Variante ändern"
button-sign-variant-lore:
@ -164,6 +163,11 @@ button-magma-cube-size-lore:
- "Ändert die Größe des Magmawürfels."
- "Aktuelle Größe: &e{size}"
for-hire-title: "Zum Anheuern"
button-hire: "&aAnheuern"
button-hire-lore:
- Kaufe diesen Shop
trading-title-prefix: "&2"
trading-title-default: "Händler"

View File

@ -32,6 +32,8 @@ creation-item-selected: |-
&e Right-click a container to select it.
&e Then right-click a block to place the shopkeeper.
editor-title: "Shopkeeper Editor"
button-previous-page: "&6<- Previous page ({prev_page} of {max_page})"
button-previous-page-lore: []
button-next-page: "&6Next page ({next_page} of {max_page}) ->"
@ -51,9 +53,6 @@ button-delete: "&4Delete"
button-delete-lore:
- Closes and removes
- this shopkeeper
button-hire: "&aHire"
button-hire-lore:
- Buy this shopkeeper
button-sign-variant: "&aChoose sign variant"
button-sign-variant-lore:
@ -165,6 +164,11 @@ button-magma-cube-size-lore:
- "Cycles the magma cube's size."
- "Current size: &e{size}"
for-hire-title: "For Hire"
button-hire: "&aHire"
button-hire-lore:
- Buy this shopkeeper
trading-title-prefix: "&2"
trading-title-default: "Shopkeeper"