WorldSystem/src/main/java/de/butzlabben/world/gui/playeroption/BuildStatus.java

22 lines
609 B
Java

package de.butzlabben.world.gui.playeroption;
import de.butzlabben.inventory.DependListener;
import de.butzlabben.inventory.OrcItem;
import de.butzlabben.world.wrapper.WorldPlayer;
import org.bukkit.entity.Player;
import org.bukkit.inventory.ItemStack;
public class BuildStatus implements DependListener {
private final WorldPlayer wp;
public BuildStatus(WorldPlayer wp) {
this.wp = wp;
}
@Override
public ItemStack getItemStack(Player p, WorldPlayer player) {
return wp.canBuild() ? OrcItem.enabled.getItemStack(p, wp) : OrcItem.disabled.getItemStack(p, wp);
}
}