Skip to content

Instantly share code, notes, and snippets.

@AL1L
Created April 30, 2017 01:19
Show Gist options
  • Save AL1L/8fe91fe55143e16c87a7e1f02f92e5da to your computer and use it in GitHub Desktop.
Save AL1L/8fe91fe55143e16c87a7e1f02f92e5da to your computer and use it in GitHub Desktop.
package me.diamonddev.craftoblo.classes;
import lombok.Getter;
import me.diamonddev.craftoblo.abilitys.AbilityObject;
import com.coalesce.gui.ItemBuilder;
import org.bukkit.ChatColor;
import org.bukkit.Material;
import org.bukkit.inventory.ItemFlag;
import org.bukkit.inventory.ItemStack;
public enum ClassType {
BARBARIAN("Barbarian", ChatColor.DARK_RED, null, ChatColor.RED + "Fury",
new ItemBuilder(Material.IRON_AXE).displayName(ChatColor.DARK_RED + "Barbarian").itemFlags(ItemFlag.HIDE_ATTRIBUTES, ItemFlag.HIDE_ENCHANTS).build()),
CRUSADER("Crusader", ChatColor.BLUE, null, ChatColor.GRAY + "Wrath",
new ItemBuilder(Material.SHIELD).displayName(ChatColor.BLUE + "Crusader").itemFlags(ItemFlag.HIDE_ATTRIBUTES, ItemFlag.HIDE_ENCHANTS).build()),
DEMON_HUNTER("Demon Hunter", ChatColor.GRAY, null, ChatColor.DARK_RED + "Hatred",
new ItemBuilder(Material.BOW).displayName(ChatColor.GRAY + "Demon Hunter").itemFlags(ItemFlag.HIDE_ATTRIBUTES, ItemFlag.HIDE_ENCHANTS).build()),
MONK("Monk", ChatColor.GOLD, null, ChatColor.GOLD + "Spirit",
new ItemBuilder(Material.STICK).displayName(ChatColor.GOLD + "Monk").itemFlags(ItemFlag.HIDE_ATTRIBUTES, ItemFlag.HIDE_ENCHANTS).build()),
WITCH_DOCTOR("Witch Doctor", ChatColor.DARK_GREEN, null, ChatColor.BLUE + "Mana",
new ItemBuilder(Material.SKULL_ITEM).displayName(ChatColor.DARK_GREEN + "Witch Doctor").itemFlags(ItemFlag.HIDE_ATTRIBUTES, ItemFlag.HIDE_ENCHANTS).build()),
WIZARD("Wizard", ChatColor.DARK_PURPLE, null, ChatColor.DARK_PURPLE + "Arcane Power",
new ItemBuilder(Material.BLAZE_ROD).displayName(ChatColor.DARK_PURPLE + "Wizard").itemFlags(ItemFlag.HIDE_ATTRIBUTES, ItemFlag.HIDE_ENCHANTS).build()),
NECROMANCER("Necromancer", ChatColor.YELLOW, null, ChatColor.DARK_GRAY + "Darkness",
new ItemBuilder(Material.EYE_OF_ENDER).displayName(ChatColor.YELLOW + "Necromancer").itemFlags(ItemFlag.HIDE_ATTRIBUTES, ItemFlag.HIDE_ENCHANTS).build()),
NONE("None", ChatColor.WHITE, null, "None",
new ItemBuilder(Material.BARRIER).displayName(ChatColor.WHITE + "None").itemFlags(ItemFlag.HIDE_ATTRIBUTES, ItemFlag.HIDE_ENCHANTS).build()),
ALL("None", ChatColor.WHITE, null, "None",
new ItemBuilder(Material.BARRIER).displayName(ChatColor.WHITE + "None").itemFlags(ItemFlag.HIDE_ATTRIBUTES, ItemFlag.HIDE_ENCHANTS).build());
@Getter
private final String name;
@Getter
private final ChatColor color;
@Getter
private final AbilityObject[] abilitys;
@Getter
private final String orbName;
@Getter
private final ItemStack icon;
ClassType(String name, ChatColor color, AbilityObject[] abilitys, String orbName, ItemStack icon) {
this.name = name;
this.color = color;
this.abilitys = abilitys;
this.orbName = orbName;
this.icon = icon;
}
public String getFullName(ChatColor... effects) {
StringBuilder sb = new StringBuilder();
sb.append(color);
for (ChatColor effect : effects)
sb.append(effect);
sb.append(name);
return sb.toString();
}
public static ClassType[] getRealClasses() {
return new ClassType[]{BARBARIAN, CRUSADER, DEMON_HUNTER, MONK, WITCH_DOCTOR, WIZARD, NECROMANCER};
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment