Reorder methods

This commit is contained in:
filoghost 2021-09-26 14:44:13 +02:00
parent ce437d21d3
commit 33ec96172c
3 changed files with 21 additions and 21 deletions

View File

@ -14,14 +14,6 @@ import org.jetbrains.annotations.Nullable;
*/
public interface ClickableHologramLine extends HologramLine {
/**
* Sets the click listener.
*
* @param clickListener the new click listener, null to unset
* @since 1
*/
void setClickListener(@Nullable ClickListener clickListener);
/**
* Returns the current click listener.
*
@ -30,4 +22,12 @@ public interface ClickableHologramLine extends HologramLine {
*/
@Nullable ClickListener getClickListener();
/**
* Sets the click listener.
*
* @param clickListener the new click listener, null to unset
* @since 1
*/
void setClickListener(@Nullable ClickListener clickListener);
}

View File

@ -29,14 +29,6 @@ public interface ItemHologramLine extends ClickableHologramLine {
*/
void setItemStack(@Nullable ItemStack itemStack);
/**
* Sets the pickup listener.
*
* @param pickupListener the new pickup listener, null to unset
* @since 1
*/
void setPickupListener(@Nullable PickupListener pickupListener);
/**
* Returns the current pickup listener.
*
@ -45,4 +37,12 @@ public interface ItemHologramLine extends ClickableHologramLine {
*/
@Nullable PickupListener getPickupListener();
/**
* Sets the pickup listener.
*
* @param pickupListener the new pickup listener, null to unset
* @since 1
*/
void setPickupListener(@Nullable PickupListener pickupListener);
}

View File

@ -34,6 +34,11 @@ class APIItemHologramLine extends BaseItemHologramLine implements ItemHologramLi
this.pickupListener = pickupListener;
}
@Override
public @Nullable ClickListener getClickListener() {
return clickListener;
}
@Override
public void setClickListener(@Nullable ClickListener clickListener) {
checkNotDeleted();
@ -41,11 +46,6 @@ class APIItemHologramLine extends BaseItemHologramLine implements ItemHologramLi
this.clickListener = clickListener;
}
@Override
public @Nullable ClickListener getClickListener() {
return clickListener;
}
@Override
public boolean hasPickupCallback() {
return pickupListener != null;