+ Added ability to change the scoreboard's title and shops's title.
Also able to disable the scoreboard.
This commit is contained in:
		@@ -50,6 +50,7 @@ public enum ConfigC {
 | 
			
		||||
			"%NUse the create command to define your arena.",
 | 
			
		||||
			"%A/" + BlockHunt.pdfFile.getName() + " <help|h>" }, W.config),
 | 
			
		||||
 | 
			
		||||
	shop_title ("%H&lBlockHunt %NShop", W.config),
 | 
			
		||||
	shop_price ("%NPrice: %A%amount% %Ntokens.", W.config),
 | 
			
		||||
	shop_blockChooserEnabled (true, W.config),
 | 
			
		||||
	shop_blockChooserID (340, W.config),
 | 
			
		||||
@@ -59,7 +60,6 @@ public enum ConfigC {
 | 
			
		||||
			"%NUse this item before the arena starts.",
 | 
			
		||||
			"%ARight-Click%N in the lobby and choose",
 | 
			
		||||
			"%Nthe block you want to be!", "&6Unlimited uses." }, W.config),
 | 
			
		||||
 | 
			
		||||
	shop_BlockHuntPassEnabled (true, W.config),
 | 
			
		||||
	shop_BlockHuntPassID (421, W.config),
 | 
			
		||||
	shop_BlockHuntPassPrice (150, W.config),
 | 
			
		||||
@@ -83,7 +83,7 @@ public enum ConfigC {
 | 
			
		||||
			"%EIngame: %A%timeleft%" }, W.config),
 | 
			
		||||
 | 
			
		||||
	scoreboard_enabled (true, W.config),
 | 
			
		||||
	scoreboard_title ("[" + BlockHunt.pdfFile.getName() + "]", W.config),
 | 
			
		||||
	scoreboard_title ("%H[" + BlockHunt.pdfFile.getName() + "]", W.config),
 | 
			
		||||
	scoreboard_timeleft ("%ATime left:", W.config),
 | 
			
		||||
	scoreboard_seekers ("%NSeekers:", W.config),
 | 
			
		||||
	scoreboard_hiders ("%NHiders:", W.config),
 | 
			
		||||
 
 | 
			
		||||
@@ -246,8 +246,11 @@ public class InventoryHandler {
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	public static void openShop(Player player) {
 | 
			
		||||
		Inventory shop = Bukkit.createInventory(null, 9,
 | 
			
		||||
				MessageM.replaceAll("\u00A7r%H&lBlockHunt %NShop"));
 | 
			
		||||
		Inventory shop = Bukkit.createInventory(
 | 
			
		||||
				null,
 | 
			
		||||
				9,
 | 
			
		||||
				MessageM.replaceAll("\u00A7r"
 | 
			
		||||
						+ W.config.get(ConfigC.shop_title)));
 | 
			
		||||
		if (W.shop.getFile().get(player.getName() + ".tokens") == null) {
 | 
			
		||||
			W.shop.getFile().set(player.getName() + ".tokens", 0);
 | 
			
		||||
			W.shop.save();
 | 
			
		||||
 
 | 
			
		||||
@@ -46,7 +46,9 @@ public class OnInventoryClickEvent implements Listener {
 | 
			
		||||
 | 
			
		||||
				return;
 | 
			
		||||
			} else if (inv.getName().startsWith("\u00A7r")) {
 | 
			
		||||
				if (inv.getName().contains("Shop")) {
 | 
			
		||||
				if (inv.getName().equals(
 | 
			
		||||
						MessageM.replaceAll((String) "\u00A7r"
 | 
			
		||||
								+ W.config.get(ConfigC.shop_title)))) {
 | 
			
		||||
					event.setCancelled(true);
 | 
			
		||||
					ItemStack item = event.getCurrentItem();
 | 
			
		||||
					if (W.shop.getFile().get(player.getName() + ".tokens") == null) {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user