Skip to content

Commit

Permalink
Add ability to change island icon type in Visit GUI.
Browse files Browse the repository at this point in the history
  • Loading branch information
BONNe committed Jun 16, 2020
1 parent 6f56b0b commit b5214ee
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 0 deletions.
28 changes: 28 additions & 0 deletions src/main/java/world/bentobox/visit/configs/Settings.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package world.bentobox.visit.configs;


import org.bukkit.Material;
import java.util.HashSet;
import java.util.Set;

Expand Down Expand Up @@ -51,6 +52,12 @@ public class Settings implements ConfigObject
@ConfigEntry(path = "show-gamemode-header")
private boolean showGameModeHeader = true;

@ConfigComment("")
@ConfigComment("Allows to change icon in the GUI for island selection.")
@ConfigComment("PLAYER_HEAD will be transformed to island owner head.")
@ConfigEntry(path = "island-icon")
private Material islandIcon = Material.PLAYER_HEAD;

@ConfigComment("")
@ConfigComment("Allows to define default payment for visiting the island.")
@ConfigComment("Setting 0 or less will mean that default value is free.")
Expand Down Expand Up @@ -179,4 +186,25 @@ public void setShowGameModeHeader(boolean showGameModeHeader)
{
this.showGameModeHeader = showGameModeHeader;
}


/**
* This method returns the islandIcon value.
* @return the value of islandIcon.
*/
public Material getIslandIcon()
{
return this.islandIcon;
}


/**
* This method sets the islandIcon value.
* @param islandIcon the islandIcon new value.
*
*/
public void setIslandIcon(Material islandIcon)
{
this.islandIcon = islandIcon;
}
}
4 changes: 4 additions & 0 deletions src/main/resources/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ disabled-gamemodes: []
# Works only if there is more then 1 GameMode Addon.
show-gamemode-header: true

# Allows to change icon in the GUI for island selection.
# PLAYER_HEAD will be transformed to island owner head.
island-icon: PLAYER_HEAD

default-settings:
# Allows to define default payment for visiting the island.
# Setting 0 or less will mean that default value is free.
Expand Down

0 comments on commit b5214ee

Please sign in to comment.