diff --git a/pom.xml b/pom.xml
index 1da291fb..bedd75f9 100644
--- a/pom.xml
+++ b/pom.xml
@@ -59,7 +59,7 @@
2.0.9
1.20.4-R0.1-SNAPSHOT
- 2.0.0-SNAPSHOT
+ 2.3.0-SNAPSHOT
2.6.2
1.3.0
@@ -67,7 +67,7 @@
-LOCAL
- 1.16.0
+ 1.17.0
BentoBoxWorld_AOneBlock
bentobox-world
diff --git a/src/main/java/world/bentobox/aoneblock/AOneBlockPlaceholders.java b/src/main/java/world/bentobox/aoneblock/AOneBlockPlaceholders.java
index 784c847e..9c24f69d 100644
--- a/src/main/java/world/bentobox/aoneblock/AOneBlockPlaceholders.java
+++ b/src/main/java/world/bentobox/aoneblock/AOneBlockPlaceholders.java
@@ -1,11 +1,19 @@
package world.bentobox.aoneblock;
import java.util.Objects;
+import java.util.Set;
import java.util.TreeMap;
+import java.util.stream.Collectors;
+
+import org.bukkit.Material;
import world.bentobox.aoneblock.dataobjects.OneBlockIslands;
+import world.bentobox.aoneblock.panels.PhasesPanel;
+import world.bentobox.bentobox.api.localization.TextVariables;
import world.bentobox.bentobox.api.user.User;
import world.bentobox.bentobox.database.objects.Island;
+import world.bentobox.bentobox.hooks.LangUtilsHook;
+import world.bentobox.bentobox.util.Util;
public class AOneBlockPlaceholders {
@@ -46,6 +54,54 @@ public AOneBlockPlaceholders(AOneBlock addon,
// Since 1.10
placeholdersManager.registerPlaceholder(addon, "visited_island_lifetime_count", this::getLifetimeByLocation);
placeholdersManager.registerPlaceholder(addon, "my_island_lifetime_count", this::getLifetime);
+
+ placeholdersManager.registerPlaceholder(addon, "visited_island_phase_block_list",
+ this::getPhaseBlocksNamesByLocation);
+ placeholdersManager.registerPlaceholder(addon, "my_island_phase_block_list", this::getPhaseBlocksNames);
+
+ }
+
+ public String getPhaseBlocksNames(User user) {
+ if (user == null || user.getUniqueId() == null)
+ return "";
+ Island i = addon.getIslands().getIsland(addon.getOverWorld(), user);
+ if (i == null) {
+ return "";
+ }
+ return getPhaseBlocksForIsland(user, i);
+ }
+
+ private String getPhaseBlocksForIsland(User user, Island i) {
+ String phaseName = addon.getOneBlocksIsland(i).getPhaseName();
+ Set set = addon.getOneBlockManager().getPhase(phaseName).map(phase -> phase.getBlocks().keySet())
+ .orElse(null);
+ if (set == null) {
+ return "";
+ }
+
+ String result = set.stream().map(m -> getMaterialName(user, m))
+ .map(string -> user.getTranslation(PhasesPanel.REFERENCE + "blocks", TextVariables.NAME,
+ string))
+ .collect(Collectors.joining());
+ // Removing the last newline character or comma if it exists
+ result = result.trim();
+ if (result.endsWith("\n") || result.endsWith(",")) {
+ result = result.substring(0, result.length() - 1);
+ }
+
+ return result;
+
+ }
+
+ private String getMaterialName(User user, Material m) {
+ return addon.getPlugin().getHooks().getHook("LangUtils").map(hook -> LangUtilsHook.getMaterialName(m, user))
+ .orElse(Util.prettifyText(m.name()));
+ }
+
+ public String getPhaseBlocksNamesByLocation(User user) {
+ if (user == null || user.getUniqueId() == null || !addon.inWorld(user.getWorld()))
+ return "";
+ return addon.getIslands().getIslandAt(user.getLocation()).map(i -> getPhaseBlocksForIsland(user, i)).orElse("");
}
/**
@@ -68,7 +124,7 @@ public String getPhaseByLocation(User user) {
* @return String of count
*/
public String getCountByLocation(User user) {
- if (user == null || user.getUniqueId() == null)
+ if (user == null || user.getUniqueId() == null || !addon.inWorld(user.getWorld()))
return "";
return addon.getIslands().getProtectedIslandAt(Objects.requireNonNull(user.getLocation()))
.map(addon::getOneBlocksIsland).map(OneBlockIslands::getBlockNumber).map(String::valueOf).orElse("");
@@ -107,7 +163,7 @@ public String getCount(User user) {
* @return next phase
*/
public String getNextPhaseByLocation(User user) {
- if (user == null || user.getUniqueId() == null)
+ if (user == null || user.getUniqueId() == null || !addon.inWorld(user.getWorld()))
return "";
return addon.getIslands().getProtectedIslandAt(Objects.requireNonNull(user.getLocation()))
.map(addon::getOneBlocksIsland).map(addon.getOneBlockManager()::getNextPhase).orElse("");
@@ -133,7 +189,7 @@ public String getNextPhase(User user) {
* @return string number of blocks
*/
public String getNextPhaseBlocksByLocation(User user) {
- if (user == null || user.getUniqueId() == null)
+ if (user == null || user.getUniqueId() == null || !addon.inWorld(user.getWorld()))
return "";
return addon.getIslands().getProtectedIslandAt(Objects.requireNonNull(user.getLocation()))
.map(addon::getOneBlocksIsland).map(addon.getOneBlockManager()::getNextPhaseBlocks)
@@ -181,7 +237,7 @@ public String getPhaseBlocks(User user) {
* @return string percentage
*/
public String getPercentDoneByLocation(User user) {
- if (user == null || user.getUniqueId() == null)
+ if (user == null || user.getUniqueId() == null || !addon.inWorld(user.getWorld()))
return "";
return addon.getIslands().getProtectedIslandAt(Objects.requireNonNull(user.getLocation()))
.map(addon::getOneBlocksIsland).map(addon.getOneBlockManager()::getPercentageDone)
@@ -212,7 +268,7 @@ public String getPercentDone(User user) {
* @return colored scale
*/
public String getDoneScaleByLocation(User user) {
- if (user == null || user.getUniqueId() == null)
+ if (user == null || user.getUniqueId() == null || !addon.inWorld(user.getWorld()))
return "";
return addon.getIslands().getProtectedIslandAt(Objects.requireNonNull(user.getLocation()))
.map(addon::getOneBlocksIsland).map(addon.getOneBlockManager()::getPercentageDone)
@@ -259,7 +315,7 @@ public String getLifetime(User user) {
* @return String of Lifetime
*/
public String getLifetimeByLocation(User user) {
- if (user == null || user.getUniqueId() == null)
+ if (user == null || user.getUniqueId() == null || !addon.inWorld(user.getWorld()))
return "";
return this.addon.getIslands().getProtectedIslandAt(Objects.requireNonNull(user.getLocation()))
diff --git a/src/main/java/world/bentobox/aoneblock/AOneBlockPladdon.java b/src/main/java/world/bentobox/aoneblock/AOneBlockPladdon.java
index b1d9cf13..743d34a1 100644
--- a/src/main/java/world/bentobox/aoneblock/AOneBlockPladdon.java
+++ b/src/main/java/world/bentobox/aoneblock/AOneBlockPladdon.java
@@ -5,8 +5,14 @@
public class AOneBlockPladdon extends Pladdon {
+ private Addon addon;
+
@Override
public Addon getAddon() {
- return new AOneBlock();
+ if (addon == null) {
+ addon = new AOneBlock();
+ }
+
+ return addon;
}
}
diff --git a/src/main/java/world/bentobox/aoneblock/Settings.java b/src/main/java/world/bentobox/aoneblock/Settings.java
index 709f26b8..4ec144e3 100644
--- a/src/main/java/world/bentobox/aoneblock/Settings.java
+++ b/src/main/java/world/bentobox/aoneblock/Settings.java
@@ -107,6 +107,10 @@ public class Settings implements WorldSettings {
@ConfigEntry(path = "world.holograms")
private boolean useHolograms = true;
+ @ConfigComment("Hologram position - the offset to the magic block where holograms will appear")
+ @ConfigEntry(path = "world.hologram-offset")
+ private String offset = "0.5, 1.1, 0.5";
+
@ConfigComment("Duration in seconds that phase holograms will exist after being displayed, if used.")
@ConfigComment("If set to 0, then holograms will persist until cleared some other way.")
@ConfigEntry(path = "world.hologram-duration")
@@ -192,6 +196,10 @@ public class Settings implements WorldSettings {
@ConfigEntry(path = "world.island-height")
private int islandHeight = 120;
+ @ConfigComment("Disallow team members from having their own islands.")
+ @ConfigEntry(path = "world.disallow-team-member-islands")
+ private boolean disallowTeamMemberIslands = false;
+
@ConfigComment("Use your own world generator for this world.")
@ConfigComment("In this case, the plugin will not generate anything.")
@ConfigComment("If used, you must specify the world name and generator in the bukkit.yml file.")
@@ -2176,4 +2184,33 @@ public String getClickType() {
public void setClickType(String clickType) {
this.clickType = clickType;
}
+
+ /**
+ * @return the disallowTeamMemberIslands
+ */
+ @Override
+ public boolean isDisallowTeamMemberIslands() {
+ return disallowTeamMemberIslands;
+ }
+
+ /**
+ * @param disallowTeamMemberIslands the disallowTeamMemberIslands to set
+ */
+ public void setDisallowTeamMemberIslands(boolean disallowTeamMemberIslands) {
+ this.disallowTeamMemberIslands = disallowTeamMemberIslands;
+ }
+
+ /**
+ * @return the offset
+ */
+ public String getOffset() {
+ return offset;
+ }
+
+ /**
+ * @param offset the offset to set
+ */
+ public void setOffset(String offset) {
+ this.offset = offset;
+ }
}
\ No newline at end of file
diff --git a/src/main/java/world/bentobox/aoneblock/listeners/CheckPhase.java b/src/main/java/world/bentobox/aoneblock/listeners/CheckPhase.java
index 6423a345..491ed4d7 100644
--- a/src/main/java/world/bentobox/aoneblock/listeners/CheckPhase.java
+++ b/src/main/java/world/bentobox/aoneblock/listeners/CheckPhase.java
@@ -108,6 +108,10 @@ protected boolean phaseRequirementsFail(@Nullable Player player, @NonNull Island
return false;
}
+ if (player == null) {
+ // Minions cannot fulfill requirements
+ return true;
+ }
return phase.getRequirements().stream()
.anyMatch(r -> checkRequirement(r, User.getInstance(player), i, is, world));
}
@@ -206,7 +210,8 @@ List replacePlaceholders(@Nullable Player player, @NonNull String phaseN
.map(l -> ((Level) l).getIslandLevel(addon.getOverWorld(), i.getOwner())).orElse(0L);
double balance = addon.getAddonByName("Bank").map(b -> ((Bank) b).getBankManager().getBalance(i).getValue())
.orElse(0D);
- double ecoBalance = addon.getPlugin().getVault()
+ double ecoBalance = player == null ? 0D
+ : addon.getPlugin().getVault()
.map(v -> v.getBalance(User.getInstance(player), addon.getOverWorld())).orElse(0D);
return c.replace("[island]", i.getName() == null ? "" : i.getName())
diff --git a/src/main/java/world/bentobox/aoneblock/listeners/HoloListener.java b/src/main/java/world/bentobox/aoneblock/listeners/HoloListener.java
index 21f3dc78..a343dce7 100644
--- a/src/main/java/world/bentobox/aoneblock/listeners/HoloListener.java
+++ b/src/main/java/world/bentobox/aoneblock/listeners/HoloListener.java
@@ -13,6 +13,7 @@
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
import org.bukkit.event.Listener;
+import org.bukkit.util.Vector;
import org.eclipse.jdt.annotation.NonNull;
import world.bentobox.aoneblock.AOneBlock;
@@ -50,7 +51,7 @@ private Optional getHologram(Island island) {
}
private TextDisplay createHologram(Island island) {
- Location pos = island.getCenter().clone().add(0.5, 1.1, 0.5);
+ Location pos = island.getCenter().clone().add(parseVector(addon.getSettings().getOffset()));
World world = pos.getWorld();
assert world != null;
@@ -63,6 +64,25 @@ private TextDisplay createHologram(Island island) {
return newDisplay;
}
+ private static Vector parseVector(String str) {
+ if (str == null) {
+ return new Vector(0.5, 1.1, 0.5);
+ }
+ String[] parts = str.split(",");
+ if (parts.length != 3) {
+ return new Vector(0.5, 1.1, 0.5);
+ }
+
+ try {
+ double x = Double.parseDouble(parts[0].trim());
+ double y = Double.parseDouble(parts[1].trim());
+ double z = Double.parseDouble(parts[2].trim());
+ return new Vector(x, y, z);
+ } catch (NumberFormatException e) {
+ return new Vector(0.5, 1.1, 0.5);
+ }
+ }
+
private void clearIfInitialized(TextDisplay hologram) {
if (hologram.isValid()) {
hologram.remove();
diff --git a/src/main/java/world/bentobox/aoneblock/panels/PhasesPanel.java b/src/main/java/world/bentobox/aoneblock/panels/PhasesPanel.java
index c2643f95..d2acc5d5 100644
--- a/src/main/java/world/bentobox/aoneblock/panels/PhasesPanel.java
+++ b/src/main/java/world/bentobox/aoneblock/panels/PhasesPanel.java
@@ -14,6 +14,7 @@
import java.util.Map;
import java.util.stream.Collectors;
+import org.bukkit.ChatColor;
import org.bukkit.Material;
import org.bukkit.World;
import org.bukkit.event.inventory.ClickType;
@@ -26,6 +27,7 @@
import world.bentobox.aoneblock.oneblocks.OneBlockPhase;
import world.bentobox.aoneblock.oneblocks.Requirement;
import world.bentobox.bank.Bank;
+import world.bentobox.bentobox.BentoBox;
import world.bentobox.bentobox.api.addons.Addon;
import world.bentobox.bentobox.api.localization.TextVariables;
import world.bentobox.bentobox.api.panels.PanelItem;
@@ -36,6 +38,7 @@
import world.bentobox.bentobox.api.user.User;
import world.bentobox.bentobox.database.objects.Island;
import world.bentobox.bentobox.hooks.LangUtilsHook;
+import world.bentobox.bentobox.util.Util;
import world.bentobox.level.Level;
@@ -55,6 +58,8 @@ public class PhasesPanel
private static final String LEVEL = "[level]";
private static final String PHASE2 = "[phase]";
private static final String INDEXING = "indexing";
+ private static final String BLOCKS = "[blocks]";
+ public static final String REFERENCE = "aoneblock.gui.buttons.phase.";
// ---------------------------------------------------------------------
// Section: Constructor
@@ -349,7 +354,7 @@ private PanelItem createPhaseButton(ItemTemplateRecord template, Map.Entry {
switch (requirement.getType())
{
- case ECO -> economyText.append(this.user.getTranslationOrNothing(reference + "economy",
+ case ECO -> economyText.append(this.user.getTranslationOrNothing(REFERENCE + "economy",
TextVariables.NUMBER, String.valueOf(requirement.getEco())));
- case BANK -> bankText.append(this.user.getTranslationOrNothing(reference + "bank",
+ case BANK -> bankText.append(this.user.getTranslationOrNothing(REFERENCE + "bank",
TextVariables.NUMBER, String.valueOf(requirement.getBank())));
- case LEVEL -> levelText.append(this.user.getTranslationOrNothing(reference + "level",
+ case LEVEL -> levelText.append(this.user.getTranslationOrNothing(REFERENCE + "level",
TextVariables.NUMBER, String.valueOf(requirement.getLevel())));
- case PERMISSION -> permissionText.append(this.user.getTranslationOrNothing(reference + "permission",
+ case PERMISSION -> permissionText.append(this.user.getTranslationOrNothing(REFERENCE + "permission",
PERMISSION, requirement.getPermission()));
case COOLDOWN -> {
// do nothing
@@ -410,6 +415,29 @@ private PanelItem createPhaseButton(ItemTemplateRecord template, Map.Entry getMaterialName(user, m))
+ .map(string -> user.getTranslation(REFERENCE + "blocks", TextVariables.NAME, string))
+ .collect(Collectors.joining());
+ // Removing the last newline character or comma if it exists
+ blocksText = blocksText.trim();
+ if (blocksText.endsWith("\n") || blocksText.endsWith(",")) {
+ blocksText = blocksText.substring(0, blocksText.length() - 1);
+ }
+ // Insert newlines every x characters
+ int wrapAt = 50; // Set default value
+ try {
+ // Attempt to parse the value from getTranslation
+ wrapAt = Integer.valueOf(user.getTranslation(REFERENCE + "wrap-at"));
+
+ } catch (NumberFormatException e) {
+ // If parsing fails, keep default value of 40
+ addon.logError("Warning: Unable to parse 'wrap-at' value, using default of 50.");
+ }
+
+ String formattedText = insertNewlines(blocksText, wrapAt);
+
if (template.description() != null)
{
String biomeText = phase.getPhaseBiome() == null ? "" : LangUtilsHook.getBiomeName(phase.getPhaseBiome(), this.user);
@@ -420,23 +448,24 @@ private PanelItem createPhaseButton(ItemTemplateRecord template, Map.Entry LangUtilsHook.getMaterialName(m, user))
+ .orElse(Util.prettifyText(m.name()));
+ }
+
+ private static String insertNewlines(String input, int interval) {
+ StringBuilder result = new StringBuilder(input.length());
+ int index = 0;
+ char activeColor = 'a';
+ int lastAmpIndex = -2;
+
+ while (index < input.length()) {
+ if (input.charAt(index) == ChatColor.COLOR_CHAR && index < (input.length() - 1)) {
+ lastAmpIndex = index;
+ activeColor = input.charAt(index + 1);
+ }
+ if (input.length() < index + interval) {
+ result.append(input.substring(index));
+ break;
+ }
+
+ // Find the space near the interval to break the line without cutting a word
+ int breakPoint = input.lastIndexOf(' ', index + interval);
+ if (breakPoint <= index) {
+ breakPoint = index + interval; // In case there are no spaces, break at exact interval
+ }
+
+ result.append(input.substring(index, breakPoint)).append('\n');
+ if (lastAmpIndex >= 0) {
+ // Append color code
+ result.append(ChatColor.COLOR_CHAR);
+ result.append(activeColor);
+ result.append(" ");
+ }
+ index = breakPoint + 1; // Move past the last space
+ }
+
+ return result.toString();
+ }
+
/**
* This method checks if phase requirements fails.
diff --git a/src/main/resources/addon.yml b/src/main/resources/addon.yml
index 4e3c0f09..76ff4bd6 100755
--- a/src/main/resources/addon.yml
+++ b/src/main/resources/addon.yml
@@ -1,7 +1,7 @@
name: AOneBlock
main: world.bentobox.aoneblock.AOneBlock
version: ${version}${build.number}
-api-version: 1.24
+api-version: 2.3.0
metrics: true
icon: "STONE"
repository: "BentoBoxWorld/AOneBlock"
diff --git a/src/main/resources/config.yml b/src/main/resources/config.yml
index 2db2ff43..32372052 100644
--- a/src/main/resources/config.yml
+++ b/src/main/resources/config.yml
@@ -55,6 +55,8 @@ world:
difficulty: NORMAL
# Display holograms
holograms: true
+ # Hologram position - the offset to the magic block where holograms will appear
+ hologram-offset: 0.5, 1.1, 0.5
# Duration in seconds that phase holograms will exist after being displayed, if used.
# If set to 0, then holograms will persist until cleared some other way.
hologram-duration: 10
@@ -65,10 +67,10 @@ world:
# Block identification appearance.
# Click type that will make particles appear. Options are:
# LEFT (default), RIGHT, or NONE
- click-type: RIGHT
- # Size of particles. Default is 0.7. Must be greater than 0.
+ click-type: LEFT
+ # Size of particles. Default is 0.5. Must be greater than 0.
particle-size: 0.5
- # Density of particles - Value from 0.1 to 1. Default is 0.5. Smaller values are more dense, higher are less.
+ # Density of particles - Value from 0.1 to 1. Default is 0.65. Smaller values are more dense, higher are less.
particle-density: 0.65
# Color of particles
particle-color:
@@ -123,6 +125,8 @@ world:
# Island height - Lowest is 5.
# It is the y coordinate of the bedrock block in the schem.
island-height: 80
+ # Disallow team members from having their own islands.
+ disallow-team-member-islands: false
# Use your own world generator for this world.
# In this case, the plugin will not generate anything.
# If used, you must specify the world name and generator in the bukkit.yml file.
diff --git a/src/main/resources/locales/en-US.yml b/src/main/resources/locales/en-US.yml
index 285b4f06..4627dd76 100755
--- a/src/main/resources/locales/en-US.yml
+++ b/src/main/resources/locales/en-US.yml
@@ -89,6 +89,7 @@ aoneblock:
[economy]
[level]
[permission]
+ [blocks]
# Replaces text with [starting-block]
starting-block: "&7 Starts after breaking &e [number] blocks."
# Replaces text with [biome]
@@ -101,6 +102,10 @@ aoneblock:
level: "&7 Requires &e [number] &7 island level."
# Replaces text with [permission]
permission: "&7 Requires `&e[permission]&7` permission."
+ # Replaces text with [blocks]
+ blocks-prefix: '&7 Blocks in phase - '
+ blocks: '&e [name], '
+ wrap-at: '50'
tips:
click-to-previous: "&e Click &7 to view previous page."
click-to-next: "&e Click &7 to view next page."
diff --git a/src/main/resources/locales/tr.yml b/src/main/resources/locales/tr.yml
index 10ef4b4c..7f0fad38 100644
--- a/src/main/resources/locales/tr.yml
+++ b/src/main/resources/locales/tr.yml
@@ -1,34 +1,46 @@
---
+protection:
+ flags:
+ START_SAFETY:
+ name: Güvenli mod başlatılıyor
+ description: |
+ &b Yeni oyuncuları 1 dakika boyunca kıpırdamasını engeller
+ &b böylece aşağı düşmezler.
+ hint: "&c Haraketler [number] saniye daha güvenlik için engellenmiştir!"
+ free-to-move: "&a Artık kıpırdayabilirsin dikkatli ol!"
aoneblock:
commands:
admin:
setcount:
- parameters: " "
+ parameters: " [lifetime]"
description: oyuncunun blok sayısını ayarla
set: "&a [name] 'ın sayısı [number] olarak ayarlandı"
- set-lifetime: "&a [name]'nin yaşam boyu sayısı [number] olarak ayarlandı"
+ set-lifetime: "&a [name]'nin toplam kırılan blok sayısı [number] olarak ayarlandı"
setchest:
- parameters: " "
- description: bakılan sandığı nadir görülen bir evreye koymak
+ parameters: " "
+ description: bakılan sandığı nadir görülen bir evreye koyar
chest-is-empty: "&c Bu sandık boş, bu yüzden eklenemez"
unknown-phase: "&c Bilinmeyen aşama. Bunları görmek için sekme-tamamlama özelliğini
kullanın"
- unknown-rarity: "& c Bilinmeyen nadirlik. ORTAK, UNCOMMON, NADİR veya EPIC
+ unknown-rarity: "& c Bilinmeyen nadirlik. COMMON, UNCOMMON, RARE veya EPIC
kullanın"
look-at-chest: "&c Ayarlamak için dolu bir sandığa bakın"
- only-single-chest: "& c Yalnızca tek sandık ayarlanabilir"
+ only-single-chest: "&c Yalnızca tek sandık ayarlanabilir"
success: "&a Sandık aşamaya başarıyla eklendi"
- failure: "&c Göğüs faza eklenemedi! Hatalar için konsola bakın"
+ failure: "&c Sandık aşamaya eklenemedi! Hatalar için konsola bakın"
sanity:
- parameters: ""
+ parameters: ""
description: konsoldaki faz olasılıklarının akıl sağlığını kontrol etmek
see-console: "&a Rapor için konsola bakın"
count:
- description: blok sayısını ve fazını göster
+ description: blok sayısını ve aşamayı göster
info: "&a [name] aşamasında blok &b [number] üzerindesiniz"
+ info:
+ count: "&a Ada blok sayısı &b [number] &b [name] &a aşamasında. Toplam kırılan
+ blok &b [lifetime] &a."
phases:
description: tüm aşamaların bir listesini göster
- title: "&2 OneBlock Aşaması"
+ title: "&2 TekBlok Aşaması"
name-syntax: "&a [name]"
description-syntax: "&b [number] blokları"
island:
@@ -37,6 +49,10 @@ aoneblock:
description: blok sayısını önceden tamamlanmış değere ayarla
set: "&a Sayım [number] olarak ayarlandı."
too-high: "&c Ayarlayabileceğiniz maksimum sayı [number]!"
+ respawn-block:
+ description: Kaynak bloğunu kaybolma durumlarında yeniden doğurur
+ block-exist: "&a Kaynak bloğu yerinde senin için işaretledim."
+ block-respawned: "&a Kaynak bloğu yeniden doğdu."
phase:
insufficient-level: "&c Ada seviyeniz devam etmek için çok düşük! [number] olmalıdır."
insufficient-funds: "&c Paranız devam etmek için çok düşük! [number] olmalıdırlar."
@@ -46,7 +62,40 @@ aoneblock:
cooldown: "&c Bir sonraki aşama [number] saniye içinde hazır olacak!"
placeholders:
infinite: Sonsuz
+ gui:
+ titles:
+ phases: "&0&l TekBlok Aşamaları"
+ buttons:
+ previous:
+ name: "&f&l Önceki Sayfa"
+ description: "&7 [number] Sayılı sayfaya geçer"
+ next:
+ name: "&f&l Sıradaki Sayfa "
+ description: "&7 [number] Sayılı sayfaya geçer"
+ phase:
+ name: "&f&l [phase]"
+ description: |-
+ [starting-block]
+ [biome]
+ [bank]
+ [economy]
+ [level]
+ [permission]
+ [blocks]
+ starting-block: "&7 &e [sayı] kadar blok kırdıktan sonra başlar."
+ biome: "&7 Biome: &e [biome]"
+ bank: "&7 Banka hesabında &e $[number] &7 olması gerekli."
+ economy: "&7 Bakiyenizin &e $[number] &7 olması gerekli."
+ level: "&7 &e [sayı] &7 kadar ada seviyeniz olmalı."
+ permission: "&7 `&e[izin]&7` izni gerektirir."
+ blocks-prefix: "&7 Aşamadaki bloklar - "
+ blocks: "&e [name], "
+ wrap-at: '50'
+ tips:
+ click-to-previous: "&e Önceki sayfayı görüntülemek için &7 tıklayın."
+ click-to-next: "&e Sonraki sayfayı görüntülemek için &7 tıklayın."
+ click-to-change: "&e Değiştirmek için &7 tıklayın."
island:
starting-hologram: |-
- &aOneBlock'a Hoş Geldiniz
+ &aTekBlok'a Hoş Geldiniz
&eBaşlamak için Bu Bloğu Kırın
diff --git a/src/test/java/world/bentobox/aoneblock/PlaceholdersManagerTest.java b/src/test/java/world/bentobox/aoneblock/PlaceholdersManagerTest.java
index d6116b24..b3712896 100644
--- a/src/test/java/world/bentobox/aoneblock/PlaceholdersManagerTest.java
+++ b/src/test/java/world/bentobox/aoneblock/PlaceholdersManagerTest.java
@@ -61,10 +61,12 @@ public void setUp() throws Exception {
// User
when(user.getLocation()).thenReturn(location);
when(user.getTranslation("aoneblock.placeholders.infinite")).thenReturn("Infinite");
+ when(user.getWorld()).thenReturn(world);
// Addon
when(addon.getIslands()).thenReturn(im);
when(addon.getOverWorld()).thenReturn(world);
when(addon.getOneBlockManager()).thenReturn(obm);
+ when(addon.inWorld(world)).thenReturn(true);
when(im.getProtectedIslandAt(any())).thenReturn(Optional.of(island));
when(im.getIsland(world, user)).thenReturn(island);
obi = new OneBlockIslands("uniqueId");