Merge remote-tracking branch 'origin/develop' into 1.14
Conflicts: src/main/java/world/bentobox/warps/WarpPanelManager.java
This commit is contained in:
commit
14a992a057
4
pom.xml
4
pom.xml
|
@ -6,7 +6,7 @@
|
|||
|
||||
<groupId>world.bentobox</groupId>
|
||||
<artifactId>warps</artifactId>
|
||||
<version>1.4.0</version>
|
||||
<version>1.4.9-SNAPSHOT</version>
|
||||
|
||||
<name>WelcomeWarpSigns</name>
|
||||
<description>WelcomeWarpSigns is an add-on for BentoBox, an expandable Minecraft Bukkit plugin for island-type games like ASkyBlock or AcidIsland.</description>
|
||||
|
@ -95,7 +95,7 @@
|
|||
<dependency>
|
||||
<groupId>world.bentobox</groupId>
|
||||
<artifactId>bentobox</artifactId>
|
||||
<version>1.4.0</version>
|
||||
<version>1.5.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>world.bentobox</groupId>
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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)}.
|
||||
|
|
Loading…
Reference in New Issue