You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
990 B
33 lines
990 B
5 years ago
|
package cx.sfy.TheBridge.menus.particle;
|
||
5 years ago
|
|
||
|
import org.bukkit.Bukkit;
|
||
|
import org.bukkit.entity.Player;
|
||
|
import org.bukkit.inventory.Inventory;
|
||
|
|
||
|
import cx.sfy.TheBridge.Main;
|
||
5 years ago
|
import cx.sfy.TheBridge.cosmetics.Particle;
|
||
5 years ago
|
|
||
5 years ago
|
public class ArrowTrailMenu {
|
||
5 years ago
|
Main plugin;
|
||
|
|
||
5 years ago
|
public ArrowTrailMenu(Main plugin) {
|
||
5 years ago
|
this.plugin = plugin;
|
||
|
}
|
||
|
|
||
|
public void createArrowMenu(Player p) {
|
||
5 years ago
|
Inventory inv = Bukkit.getServer().createInventory(null, plugin.getParticles().getInt("trails.arrow.size"),
|
||
|
plugin.getParticles().get("trails.arrow.title"));
|
||
|
for (Particle arrow : plugin.getPam().getArrow_trails().values()) {
|
||
5 years ago
|
if (!arrow.isBuy() && !p.hasPermission(arrow.getPermission())) {
|
||
|
inv.setItem(arrow.getSlot(), arrow.getPermIcon());
|
||
|
} else if (arrow.isBuy() && !p.hasPermission(arrow.getPermission())) {
|
||
|
inv.setItem(arrow.getSlot(), arrow.getBuyIcon());
|
||
|
} else {
|
||
|
inv.setItem(arrow.getSlot(), arrow.getHasIcon());
|
||
|
}
|
||
|
}
|
||
|
p.openInventory(inv);
|
||
|
}
|
||
|
|
||
|
}
|