diff --git a/pom.xml b/pom.xml
index 3201630..ebc4678 100644
--- a/pom.xml
+++ b/pom.xml
@@ -6,7 +6,7 @@
world.bentobox
warps
- 1.4.0
+ 1.4.9-SNAPSHOT
WelcomeWarpSigns
WelcomeWarpSigns is an add-on for BentoBox, an expandable Minecraft Bukkit plugin for island-type games like ASkyBlock or AcidIsland.
@@ -95,7 +95,7 @@
world.bentobox
bentobox
- 1.4.0
+ 1.5.0-SNAPSHOT
world.bentobox
diff --git a/src/main/java/world/bentobox/warps/WarpPanelManager.java b/src/main/java/world/bentobox/warps/WarpPanelManager.java
index 855019e..279f9e7 100644
--- a/src/main/java/world/bentobox/warps/WarpPanelManager.java
+++ b/src/main/java/world/bentobox/warps/WarpPanelManager.java
@@ -15,6 +15,7 @@ import world.bentobox.bentobox.api.panels.builders.PanelBuilder;
import world.bentobox.bentobox.api.panels.builders.PanelItemBuilder;
import world.bentobox.bentobox.api.user.User;
+
public class WarpPanelManager {
private static final int PANEL_MAX_SIZE = 52;
diff --git a/src/main/java/world/bentobox/warps/config/Settings.java b/src/main/java/world/bentobox/warps/config/Settings.java
index 89d2f67..4e7c119 100644
--- a/src/main/java/world/bentobox/warps/config/Settings.java
+++ b/src/main/java/world/bentobox/warps/config/Settings.java
@@ -29,6 +29,13 @@ public class Settings implements DataObject
@ConfigEntry(path = "welcomeLine")
private String welcomeLine;
+ @ConfigComment("")
+ @ConfigComment("Icon that will be displayed in Warps list.")
+ @ConfigComment("It uses native Minecraft material strings, but using string 'PLAYER', it is possible to")
+ @ConfigComment("use player heads instead.")
+ @ConfigEntry(path = "icon")
+ private String icon = "SIGN";
+
@ConfigComment("")
@ConfigComment("This list stores GameModes in which Level addon should not work.")
@ConfigComment("To disable addon it is necessary to write its name in new line that starts with -. Example:")
@@ -40,9 +47,9 @@ public class Settings implements DataObject
@ConfigComment("")
private String uniqueId = "config";
-// ---------------------------------------------------------------------
-// Section: Constructor
-// ---------------------------------------------------------------------
+ // ---------------------------------------------------------------------
+ // Section: Constructor
+ // ---------------------------------------------------------------------
/**
@@ -54,9 +61,9 @@ public class Settings implements DataObject
}
-// ---------------------------------------------------------------------
-// Section: Methods
-// ---------------------------------------------------------------------
+ // ---------------------------------------------------------------------
+ // Section: Methods
+ // ---------------------------------------------------------------------
/**
@@ -139,4 +146,24 @@ public class Settings implements DataObject
{
this.disabledGameModes = disabledGameModes;
}
+
+
+ /**
+ * This method returns the icon object.
+ * @return the icon object.
+ */
+ public String getIcon()
+ {
+ return icon;
+ }
+
+
+ /**
+ * This method sets the icon object value.
+ * @param icon the icon object new value.
+ */
+ public void setIcon(String icon)
+ {
+ this.icon = icon;
+ }
}
diff --git a/src/main/resources/config.yml b/src/main/resources/config.yml
index 95291ee..fa03767 100644
--- a/src/main/resources/config.yml
+++ b/src/main/resources/config.yml
@@ -11,7 +11,12 @@ warplevelrestriction: 10
# Text that player must put on sign to make it a warp sign
# Not case sensitive!
welcomeLine: '[Welcome]'
-#
+#
+# Icon that will be displayed in Warps list.
+# It uses native Minecraft material strings, but using string 'PLAYER', it is possible to
+# use player heads instead.
+icon: 'SIGN'
+#
# This list stores GameModes in which Level addon should not work.
# To disable addon it is necessary to write its name in new line that starts with -. Example:
# disabled-gamemodes:
diff --git a/src/test/java/world/bentobox/warps/WarpPanelManagerTest.java b/src/test/java/world/bentobox/warps/WarpPanelManagerTest.java
index 829920f..55ce215 100644
--- a/src/test/java/world/bentobox/warps/WarpPanelManagerTest.java
+++ b/src/test/java/world/bentobox/warps/WarpPanelManagerTest.java
@@ -33,6 +33,7 @@ import world.bentobox.bentobox.managers.PlayersManager;
import world.bentobox.warps.Warp;
import world.bentobox.warps.WarpPanelManager;
import world.bentobox.warps.WarpSignsManager;
+import world.bentobox.warps.config.Settings;
/**
* @author ben
@@ -99,7 +100,12 @@ public class WarpPanelManagerTest {
top = mock(Inventory.class);
when(top.getSize()).thenReturn(9);
- when(Bukkit.createInventory(Mockito.any(), Mockito.anyInt(), Mockito.any())).thenReturn(top); }
+ when(Bukkit.createInventory(Mockito.any(), Mockito.anyInt(), Mockito.any())).thenReturn(top);
+
+ Settings settings = mock(Settings.class);
+ when(settings.getIcon()).thenReturn("SIGN");
+ when(addon.getSettings()).thenReturn(settings);
+ }
/**
* Test method for {@link WarpPanelManager#showWarpPanel(org.bukkit.World, world.bentobox.bbox.api.user.User, int)}.