mirror of
https://github.com/BentoBoxWorld/BentoBox.git
synced 2024-11-23 03:05:16 +01:00
Added javadoc since tags for the newly added methods in PanelItem and builder
Also improved the #isPlayerHead() methods
This commit is contained in:
parent
87ea48443f
commit
ca6ab33898
@ -29,13 +29,11 @@ public class PanelItem {
|
||||
private String name;
|
||||
private boolean glow;
|
||||
private ItemMeta meta;
|
||||
private final boolean playerHead;
|
||||
private String playerHeadName;
|
||||
private boolean invisible;
|
||||
|
||||
public PanelItem(PanelItemBuilder builtItem) {
|
||||
this.icon = builtItem.getIcon();
|
||||
this.playerHead = builtItem.isPlayerHead();
|
||||
this.playerHeadName = builtItem.getPlayerHeadName();
|
||||
// Get the meta
|
||||
meta = icon.getItemMeta();
|
||||
@ -135,11 +133,12 @@ public class PanelItem {
|
||||
* @return the playerHead
|
||||
*/
|
||||
public boolean isPlayerHead() {
|
||||
return playerHead;
|
||||
return playerHeadName != null && !playerHeadName.isEmpty();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the playerHeadName
|
||||
* @since 1.9.0
|
||||
*/
|
||||
public String getPlayerHeadName() {
|
||||
return playerHeadName;
|
||||
|
@ -19,7 +19,6 @@ public class PanelItemBuilder {
|
||||
private List<String> description = new ArrayList<>();
|
||||
private boolean glow = false;
|
||||
private PanelItem.ClickHandler clickHandler;
|
||||
private boolean playerHead;
|
||||
private String playerHeadName;
|
||||
private boolean invisible;
|
||||
|
||||
@ -47,7 +46,6 @@ public class PanelItemBuilder {
|
||||
public PanelItemBuilder icon(String playerName) {
|
||||
this.icon = new ItemStack(Material.PLAYER_HEAD, 1);
|
||||
this.playerHeadName = playerName;
|
||||
this.playerHead = true;
|
||||
return this;
|
||||
}
|
||||
|
||||
@ -148,11 +146,12 @@ public class PanelItemBuilder {
|
||||
* @return the playerHead
|
||||
*/
|
||||
public boolean isPlayerHead() {
|
||||
return playerHead;
|
||||
return playerHeadName != null && !playerHeadName.isEmpty();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the playerHead
|
||||
* @since 1.9.0
|
||||
*/
|
||||
public String getPlayerHeadName() {
|
||||
return playerHeadName;
|
||||
@ -164,5 +163,4 @@ public class PanelItemBuilder {
|
||||
public boolean isInvisible() {
|
||||
return invisible;
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user