mirror of
https://gitlab.com/SamB440/rpgregions-2.git
synced 2026-01-04 15:31:38 +00:00
Add editor icons
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
package net.islandearth.rpgregions.gui;
|
||||
|
||||
import org.bukkit.Material;
|
||||
|
||||
import java.lang.annotation.ElementType;
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
@@ -18,6 +20,8 @@ public @interface GuiEditable {
|
||||
|
||||
GuiEditableType type() default GuiEditableType.DEFAULT;
|
||||
|
||||
Material icon() default Material.WRITTEN_BOOK;
|
||||
|
||||
enum GuiEditableType {
|
||||
CHAT,
|
||||
ANVIL,
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package net.islandearth.rpgregions.rewards;
|
||||
|
||||
import net.islandearth.rpgregions.api.IRPGRegionsAPI;
|
||||
import net.islandearth.rpgregions.gui.GuiEditable;
|
||||
import net.islandearth.rpgregions.gui.IGuiEditable;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
@@ -8,6 +9,12 @@ public abstract class DiscoveryReward implements IGuiEditable {
|
||||
|
||||
private final transient IRPGRegionsAPI api;
|
||||
|
||||
@GuiEditable("Always Reward")
|
||||
private boolean alwaysAward;
|
||||
|
||||
@GuiEditable("Time Between Reward (s)")
|
||||
private int timeBetweenReward;
|
||||
|
||||
public DiscoveryReward(IRPGRegionsAPI api) {
|
||||
this.api = api;
|
||||
}
|
||||
@@ -22,6 +29,22 @@ public abstract class DiscoveryReward implements IGuiEditable {
|
||||
*/
|
||||
public abstract void award(Player player);
|
||||
|
||||
public boolean isAlwaysAward() {
|
||||
return alwaysAward;
|
||||
}
|
||||
|
||||
public void setAlwaysAward(boolean alwaysAward) {
|
||||
this.alwaysAward = alwaysAward;
|
||||
}
|
||||
|
||||
public int getTimeBetweenReward() {
|
||||
return timeBetweenReward;
|
||||
}
|
||||
|
||||
public void setTimeBetweenReward(int timeBetweenReward) {
|
||||
this.timeBetweenReward = timeBetweenReward;
|
||||
}
|
||||
|
||||
public String getPluginRequirement() {
|
||||
return null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user