diff --git a/pom.xml b/pom.xml
index 1da291f..bedd75f 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/Settings.java b/src/main/java/world/bentobox/aoneblock/Settings.java
index 709f26b..4ec144e 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/HoloListener.java b/src/main/java/world/bentobox/aoneblock/listeners/HoloListener.java
index 21f3dc7..a343dce 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/resources/addon.yml b/src/main/resources/addon.yml
index 4e3c0f0..76ff4bd 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 2db2ff4..3237205 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.