diff --git a/src/italian/config.yml b/src/italian/config.yml new file mode 100644 index 0000000..ba40d9f --- /dev/null +++ b/src/italian/config.yml @@ -0,0 +1,45 @@ +hide-no-perm-categories: true +free-in-creative: false +check-for-updates: true +economy: + enabled: false + default-head-cost: 0 + vault-eco: + enabled: true + item-eco: + enabled: false + item: + type: skull_item + damage: 3 + name: '&6Player Head Token' + lore: + - '&8Utilizza in /heads!' + player-points-eco: + enabled: false +breaking-head-names: + enabled: true + attempt-hook-blockstore: true + similar-heads-in-cache: true + default-name: 'Decoration Head' +commands: + heads: + label: 'heads' + aliases: + - 'head' + description: 'Ottieni Teste fantastiche' + sub-commands: + # open menu is when no arguments are supplied + get: 'get' + search: 'search' + random: 'random' + help: 'help' + add: 'add' + hand: 'hand' + remove: 'remove' + rename: 'rename' + give: 'give' + cost: 'cost' + category-cost: 'categorycost' + item-eco: 'itemeco' + id: 'id' + reload: 'reload' \ No newline at end of file diff --git a/src/italian/heads.cache b/src/italian/heads.cache new file mode 100644 index 0000000..ffd70a1 Binary files /dev/null and b/src/italian/heads.cache differ diff --git a/src/italian/lang.yml b/src/italian/lang.yml new file mode 100644 index 0000000..c0430db --- /dev/null +++ b/src/italian/lang.yml @@ -0,0 +1,174 @@ +updater: + old-version: '&cStai utilizzando una Versione obsoleta di Heads (%version%).' + new-version: '&cStai utilizzando la Versione recente di Heads (%version%).' +currency: + zero: "Gratuito" + non-zero: "%amount%" + exempt: "Gratuito / %cost%" +menu: + get: + open: '&7Apertura Menu...' + added: [] + purchased: '&7Acquistata la Testa &6%name% &7per &6%cost%' + not-enough-money: '&cNon hai abbastanza Soldi per acquistare questa Testa!' + transaction-error: '&cErrore durante il Prelievo dei tuoi Soldi' + category-permission: '&cNon hai il permesso per aprire la Categoria &4%category%' + search: + added: [] + not-enough-money: '&cNon hai abbastanza Soldi per acquistare questa Testa' + transaction-error: '&cErrore durante il Prelievo dei tuoi Soldi' + category-permission: '&cNon hai il permesso di Ottenere le Teste della Categoria &4%category%' + remove: + open: '&cSeleziona una Testa da rimuovere' + removed: '&cRimossa la Testa &4%name%' + rename: + open: '&7Seleziona una Testa da rinominare in &6%newname%' + renamed: '&7Rinominata la Testa &6%name% &7in &6%newname%' + cost: + open: '&7Seleziona una Testa da impostare con il Costo di &6%newcost%' + set-cost: '&7Il costo della Testa &6%name% &7è stato impostato a &6%newcost%' + category-cost: + open: '&7Seleziona la Categoria di Teste da impostare con il Costo di &6%newcost%' + set-cost: '&7Il costo della Categoria &6%category% &7è stato impostato a &6%newcost%' + open-remove: '&7Seleziona la Categoria di Teste da impostare al Costo iniziale di &6%newcost%' + remove-cost: '&7Il costo della Categoria &6%category% &7è stato portato al Costo iniziale di &6%newcost%' + id: + open: '&7Clicca su una Testa per ottenere il suo ID' + clicked: '&7La Testa &6%name% &7possiede l''ID &6%id%' +command: + unknown-command: '&cComando sconosciuto &4/heads %command%' + errors: + must-be-player: '&cDevi essere un Player per utilizzare questo Comando.' + no-permission: '&cNon hai il Permesso per eseguire questo Comando.' + invalid-arguments: '&4Parametri errati > &c%valid%' + integer: '&cDevi inserire un Numero intero > Hai inserito &4%number%' + number: '&cDevi inserire un Numero > Hai inserito &4%number%' + negative: '&cDevi inserire un Numero positivo > Hai inserito &4%number%' + help: + header: '&8&m&l---&e&l Heads Aiuto &7(&e%page% di %pages%&7) &8&m&l---' + line: + - '&6%command%' + - '&7 - &5%description%' + footer: + - '&8&m&l---&e Vedi /heads help %next-page% &8&m&l---' + unknown-page: '&cPagina sconosciuta &4%page%&c, le pagine devono essere tra &41 &ce &4%pages%' + help: + command: '/heads help [pagina]' + description: 'Apri il Menu di Aiuto' + reload: + reloaded: '&7Config Ricaricata' + help: + command: '/heads reload' + description: 'Ricarica i File di Configurazione di Heads' + get: + head-name: '&7Testa di %name%' + old-method: '&cOttenere le Textures delle Teste non è possibile nelle versioni Spigot inferiori alla 1.8, verrà utilizzato il metodo vecchio.' + adding: '&7Aggiunto la Testa di &6%name% nel tuo Inventario.' + fetching: '&7Ottengo le Texture, attendi...' + cant-find: + - '&cImpossibile trovare le Texture di &4%name%' + - '&4I Server di Autenticazione potrebbero essere offline, oppure il giocatore richiesto non esiste.' + help: + command: '/heads get ' + description: 'Ottieni la Testa di un Player' + search: + found: '&7Trovate &6%heads% Teste &7con il Nome &6%query%' + none-found: '&cNon ho trovato Teste che coincidono con &4%query%' + help: + command: '/heads search ' + description: 'Trova Teste interessanti' + random: + no-heads: '&cNon ci sono Teste nella Cache del Plugin' + cant-find-player: '&cNon riesco a Trovare il Player &4%name%' + retrieve-own: '&7Trovata casualmente la Testa di &6%name%' + retrieve: '&7Hai ricevuto casualmente la Testa di &6%name%' + give: '&7Ho dato la Testa di &6%name% &7a &6%player%' + help: + command: '/heads random [player]' + description: 'Ottieni o Dai una Testa casuale' + add: + not-supported: '&cOttenere le Textures delle Teste non è possibile nelle versioni Spigot inferiori alla 1.8.' + category-length: + - '&cLa Categoria può contenere un Massimo di 32 Caratteri' + - '&cHai inserito &4%category% &c(%length% Caratteri)' + fetching: '&7Ottengo le Texture, attendi...' + cant-find: + - '&cImpossibile trovare le Texture &4%name%' + - '&4I Server di Autenticazione potrebbero essere offline, oppure il giocatore richiesto non esiste.' + added: '&7Aggiunta la Testa di &6%name%&7 alla Categoria &6%category%' + help: + command: '/heads add [head name]' + description: 'Aggiungi una Nuova Testa nel Menu' + hand: + not-supported: '&cOttenere le Textures delle Teste non è possibile nelle versioni Spigot inferiori alla 1.8.' + no-texture-property: '&cNessuna Texture adatta trovata, cerco per il nome del giocatore' + no-name-property: '&cNessun nome trovato, la testa non è stata aggiunta.' + not-skull: '&cDevi avere in Mano una Testa per ottenere la sua Texture!' + category-length: + - '&cLa Categoria può contenere un Massimo di 32 Caratteri' + - '&cHai inserito &4%category% &c(%length% Caratteri)' + fetching: '&7Fetching textures, please wait...' + cant-find: + - '&cImpossibile trovare le Texture &4%name%' + - '&4The authentication servers may be down, or the player does not exist.' + adding: '&7Aggiunta la Testa di &6%name%&7 alla Categoria &6%category%' + help: + command: '/heads hand ' + description: 'Aggiungi una nuova Testa in una Categoria' + give: + cant-find-player: '&cIl player &4%name% &cnon è stato trovato.' + cant-find-head: '&cNon ho trovato una Testa con l''ID &4%id%' + give: '&7Hai dato &6%amount% &7delle Teste di &6%head% &7a &6%name%' + invalid-amount: 'Il numero deve essere più grande di 0 > Hai inserito &4%number%' + help: + command: '/heads give ' + description: 'Dai una Testa ad un Player' + remove: + help: + command: '/heads remove' + description: 'Rimuovi una Testa dal Menu' + rename: + help: + command: '/heads rename ' + description: 'Rinomina una Testa nel Menu' + cost: + help: + command: '/heads cost ' + description: 'Imposta il Costo di una Testa nel Menu' + category-cost: + help: + command: '/heads categorycost ' + description: 'Imposta il Costo delle Teste con una Categoria' + open-menu: + help: + command: '/heads' + description: 'Apri il Menu delle Teste' + id: + help: + command: '/heads id' + description: 'Ottieni l''ID di una Testa' + hold-skull: '&cPer favore tieni in mano la Testa di un Player' + unknown-head: '&7Impossibile trovare la Testa &7%head%' + found-id: "&7La Testa che stai tenendo in mano con il Nome &6%name% &7possiede l''ID &6%id%" + item-eco: + help: + command: '/heads itemeco ' + description: 'Edita l''economia delle Teste' + set: + set: '&7L''economia delle Teste è stata impostata sull''item che stai tenendo in Mano' + no-item: '&cDevi tenere in mano un''item per utilizzare questa Funzione!' + help: + command: '/heads itemeco set' + description: 'Imposta l''item dell''economia' + get: + got: '&7Hai ricevuto &6%amount% &7Heads Tokens' + help: + command: '/heads itemeco get [amount]' + description: 'Ottien l''economy Item delle Teste' + give: + given: '&6%amount% &7Heads token items sono stati a &6%player%' + got: '&7Hai ricevuto &6%amount% &7Heads token Items' + unknown-player: '&cImpossibile trovare il Player &4%player%' + help: + command: '/heads itemeco give [amount]' + description: 'Dai l''economy item ad un Player' diff --git a/src/italian/menus.yml b/src/italian/menus.yml new file mode 100644 index 0000000..9581a66 --- /dev/null +++ b/src/italian/menus.yml @@ -0,0 +1,289 @@ +search-heads: + title: Cerca Teste + head: + type: skull_item + name: '&7%name%' + lore: + - '&8%category%' + damage: 3 + head-cost: + type: skull_item + name: '&7%name%' + lore: + - '&8%category%' + - '' + - '&6Costo: &e%cost%' + damage: 3 + head-no-perms: + type: skull_item + name: '&7%name%' + lore: + - '&8%category%' + - '' + - '&cNon hai il Permesso' + - '&cDi usare questa Testa' + damage: 3 + filler: + type: stained_glass_pane + name: ' ' + damage: 15 + back: + type: redstone_block + name: '&cTorna al Menu Principale' + forwards: + type: arrow + name: '&7Salta una Pagina' + backwards: + type: arrow + name: '&7Pagina precedente' +get-categories: + title: Categorie + head: + type: skull_item + name: '&6%category%' + lore: + - '&e%heads% Teste' + damage: 3 +get-heads: + title: '%category%' + head: + type: skull_item + name: '&7%name%' + lore: + - '&6Costo: &e%cost%' + damage: 3 + filler: + type: stained_glass_pane + name: ' ' + damage: 15 + back: + type: redstone_block + name: '&cTorna al Menu principale' + forwards: + type: arrow + name: '&7Pagina successiva' + backwards: + type: arrow + name: '&7Pagina precedente' +get-confirm: + title: Compra Testa + head: + type: skull_item + name: '&aAcquista %name% per $%cost%' + damage: 3 + accept: + type: stained_clay + name: '&aAcquista %name% per $%cost%' + damage: 5 + deny: + type: stained_clay + name: '&cAnnulla Acquisto' + damage: 14 +id-categories: + title: Categorie + head: + type: skull_item + name: '&6%category%' + lore: + - '&e%heads% Teste' + damage: 3 +id-heads: + title: '%category%' + head: + type: skull_item + name: '&7%name%' + lore: + - '&6ID&8: &a%id%' + damage: 3 + filler: + type: stained_glass_pane + name: ' ' + damage: 15 + back: + type: redstone_block + name: '&cTorna al Menu principale' + forwards: + type: arrow + name: '&7Pagina successiva' + backwards: + type: arrow + name: '&7Pagina precedente' +remove-categories: + title: Categorie + head: + type: skull_item + name: '&6%category%' + lore: + - '&e%heads% Teste' + damage: 3 +remove-heads: + title: '%category%' + head: + type: skull_item + name: '&cRimuovi %name%' + damage: 3 + filler: + type: stained_glass_pane + name: ' ' + damage: 15 + back: + type: redstone_block + name: '&cTorna al Menu principale' + forwards: + type: arrow + name: '&7Pagina successiva' + backwards: + type: arrow + name: '&7Pagina precedente' +remove-confirm: + title: Rimuovi testa + head: + type: skull_item + name: '&cRimuovi %name%' + damage: 3 + accept: + type: stained_clay + name: '&cRimuovi %name%' + damage: 5 + deny: + type: stained_clay + name: '&aNon rimuovere %name%' + damage: 14 +rename-categories: + title: Categorie + head: + type: skull_item + name: '&6%category%' + lore: + - '&e%heads% Teste' + damage: 3 +rename-heads: + title: '%category%' + head: + type: skull_item + name: '&aRinomina %name%' + damage: 3 + filler: + type: stained_glass_pane + name: ' ' + damage: 15 + back: + type: redstone_block + name: '&cTorna al Menu principale' + forwards: + type: arrow + name: '&7Pagina successiva' + backwards: + type: arrow + name: '&7Pagina precedente' +rename-confirm: + title: Rename Head + head: + type: skull_item + name: '&aRinomina %name% in %newname%' + damage: 3 + accept: + type: stained_clay + name: '&aRinomina %name% in %newname%' + damage: 5 + deny: + type: stained_clay + name: '&aNon rinominare %name%' + damage: 14 +cost-categories: + title: Categories + head: + type: skull_item + name: '&6%category%' + lore: + - '&e%heads% Teste' + damage: 3 +cost-heads: + title: '%category%' + head: + type: skull_item + name: '&aImposta il costo di %name%' + damage: 3 + filler: + type: stained_glass_pane + name: ' ' + damage: 15 + back: + type: redstone_block + name: '&cTorna al Menu principale' + forwards: + type: arrow + name: '&7Pagina successiva' + backwards: + type: arrow + name: '&7Pagina precedente' +cost-confirm: + title: Imposta il Costo di una Testa + head: + type: skull_item + name: '&aImposta il Costo di %name%' + lore: + - '&7In &6%newcost%' + damage: 3 + accept: + type: stained_clay + name: '&aImposta il Costo di %name%' + lore: + - '&7in &6%newcost%' + damage: 5 + deny: + type: stained_clay + name: '&aNon impostare il Costo di %name%' + damage: 14 +category-cost-categories: + title: Categories + head: + type: skull_item + name: '&7Imposta il costo di &6%category%' + lore: + - '&e%heads% Teste' + damage: 3 +category-cost-confirm: + title: Imposta il Costo della Categoria + head: + type: skull_item + name: '&aImposta il Costo di %category%' + lore: + - '&7in &6%newcost%' + damage: 3 + accept: + type: stained_clay + name: '&aImposta il Costo di %category%' + lore: + - '&7in &6%newcost%' + damage: 5 + deny: + type: stained_clay + name: '&aNon impostare il Costo di %category%' + damage: 14 +category-cost-remove-categories: + title: Categorie + head: + type: skull_item + name: '&7Ripristina il Costo di &6%category%' + lore: + - '&e%heads% Teste' + damage: 3 +category-cost-remove-confirm: + title: Imposta il Costo della Categoria + head: + type: skull_item + name: '&aRipristina il Costo di %category%' + lore: + - '&7in &6%newcost%' + damage: 3 + accept: + type: stained_clay + name: '&aRipristina il Costo di %category%' + lore: + - '&7in &6%newcost%' + damage: 5 + deny: + type: stained_clay + name: '&aNon impostare il Costo di %category%' + damage: 14 diff --git a/src/italian/menus/browse.yml b/src/italian/menus/browse.yml new file mode 100644 index 0000000..d3bf972 --- /dev/null +++ b/src/italian/menus/browse.yml @@ -0,0 +1,68 @@ +menu: + categories-title: Categorie + category-title: '%category%' + close: + type: redstone_block + name: '&cChiudi Menu' + back: + type: redstone_block + name: '&cTorna alle Categorie' + search: + type: compass + name: '&7Cerca Teste' + categories: + category: + type: skull_item + name: '&7%category%' + lore: + - '&6%heads% &eTeste' + damage: 3 + unselected-page: + type: paper + name: '&7Pagina %page%' + selected-page: + type: empty_map + name: '&7Pagina %page%' + scrollbar: + left: + type: arrow + name: '&7Sinistra' + right: + type: arrow + name: '&7Destra' + no-left: + type: air + no-right: + type: air + filler: + type: stained_glass_pane + name: ' ' + damage: 15 + heads: + head: + type: skull_item + name: '&7%name%' + lore: + - '&eCosto: &6%cost%' + damage: 3 + unselected-page: + type: paper + name: '&7Pagina %page%' + selected-page: + type: empty_map + name: '&7Pagina %page%' + scrollbar: + left: + type: arrow + name: '&7Sinistro' + right: + type: arrow + name: '&7Destro' + no-left: + type: air + no-right: + type: air + filler: + type: stained_glass_pane + name: ' ' + damage: 15 diff --git a/src/net/sothatsit/heads/config/oldmenu/Menu.java b/src/net/sothatsit/heads/config/oldmenu/Menu.java deleted file mode 100644 index 9cadde8..0000000 --- a/src/net/sothatsit/heads/config/oldmenu/Menu.java +++ /dev/null @@ -1,92 +0,0 @@ -package net.sothatsit.heads.config.oldmenu; - -import java.util.HashMap; -import java.util.Map; -import java.util.concurrent.atomic.AtomicBoolean; -import java.util.function.Function; - -import net.sothatsit.heads.Heads; - -import net.sothatsit.heads.menu.ui.item.Item; -import net.sothatsit.heads.config.lang.Placeholder; -import org.bukkit.configuration.ConfigurationSection; -import org.bukkit.inventory.ItemStack; - -public class Menu { - - private Function FILTER_ECONOMY_LINES_OUT = line -> !line.contains("%cost%"); - - private String title; - private final Map items = new HashMap<>(); - private final Menu defaults; - - public Menu() { - this(null); - } - - public Menu(Menu defaults) { - this.defaults = defaults; - } - - public String getTitle(Placeholder... placeholders) { - return title != null ? Placeholder.applyAll(title, placeholders) : "Menu"; - } - - public Item getItem(String name) { - Item item = items.get(name.toLowerCase()); - - return item != null ? item : getDefaultItem(name); - } - - public ItemStack getItemStack(String name, Placeholder... placeholders) { - Item item = getItem(name); - - return item != null ? item.build(getItemLoreFilter(), placeholders) : null; - } - - private Item getDefaultItem(String name) { - return defaults != null ? defaults.getItem(name) : null; - } - - private Function getItemLoreFilter() { - return Heads.getMainConfig().isEconomyEnabled() ? null : FILTER_ECONOMY_LINES_OUT; - } - - public void load(String filename, ConfigurationSection section, AtomicBoolean shouldSave) { - for (String key : section.getKeys(false)) { - if (!section.isConfigurationSection(key)) { - loadValue(section, key); - continue; - } - - Item item = Item.load(filename, section.getConfigurationSection(key), shouldSave); - - if(item == null) - continue; - - items.put(key.toLowerCase(), item); - } - } - - private void loadValue(ConfigurationSection section, String key) { - if(key.equals("title")) { - title = section.getString(key, null); - return; - } - - Heads.warning("Unknown use of value \"" + key + "\" in menu \"" + section.getCurrentPath() + "\""); - } - - public static Menu loadMenu(String filename, ConfigurationSection section, AtomicBoolean shouldSave) { - return loadMenu(filename, section, shouldSave, null); - } - - public static Menu loadMenu(String filename, ConfigurationSection section, AtomicBoolean shouldSave, Menu defaults) { - Menu menu = new Menu(defaults); - - menu.load(filename, section, shouldSave); - - return menu; - } - -} diff --git a/src/net/sothatsit/heads/config/oldmenu/Menus.java b/src/net/sothatsit/heads/config/oldmenu/Menus.java deleted file mode 100644 index 3304d8c..0000000 --- a/src/net/sothatsit/heads/config/oldmenu/Menus.java +++ /dev/null @@ -1,76 +0,0 @@ -package net.sothatsit.heads.config.oldmenu; - -import net.sothatsit.heads.Heads; -import net.sothatsit.heads.oldmenu.InventoryType; - -public class Menus { - - public static final String SPLIT = "-"; - - public static final String CATEGORIES = "categories"; - public static final String HEADS = "heads"; - public static final String CONFIRM = "confirm"; - - public static final MenusGroup GET = new MenusGroup("get"); - public static final MenusGroup SEARCH = new MenusGroup("search"); - public static final MenusGroup REMOVE = new MenusGroup("remove"); - public static final MenusGroup RENAME = new MenusGroup("rename"); - public static final MenusGroup COST = new MenusGroup("cost"); - public static final MenusGroup CATEGORY_COST = new MenusGroup("category-cost"); - public static final MenusGroup CATEGORY_COST_REMOVE = new MenusGroup("category-cost-remove"); - public static final MenusGroup ID = new MenusGroup("id"); - - public static Menu get(String name) { - return Heads.getMenuConfig().getMenu(name); - } - - public static class MenusGroup { - private String prefix; - - public MenusGroup(String prefix) { - this.prefix = prefix; - } - - public String getPrefix() { - return prefix; - } - - public String getCategoriesName() { - return prefix + SPLIT + CATEGORIES; - } - - public String getHeadsName() { - return prefix + SPLIT + HEADS; - } - - public String getConfirmName() { - return prefix + SPLIT + CONFIRM; - } - - public Menu categories() { - return get(getCategoriesName()); - } - - public Menu heads() { - return get(getHeadsName()); - } - - public Menu confirm() { - return get(getConfirmName()); - } - - public Menu fromType(InventoryType type) { - switch (type) { - case CATEGORY: - return categories(); - case HEADS: - return heads(); - case CONFIRM: - return confirm(); - default: - return null; - } - } - } - -} \ No newline at end of file diff --git a/src/net/sothatsit/heads/volatilecode/ItemNBT.java b/src/net/sothatsit/heads/volatilecode/ItemNBT.java deleted file mode 100644 index 5e381e9..0000000 --- a/src/net/sothatsit/heads/volatilecode/ItemNBT.java +++ /dev/null @@ -1,234 +0,0 @@ -package net.sothatsit.heads.volatilecode; - -import java.util.UUID; - -import com.mojang.authlib.GameProfile; -import com.mojang.authlib.properties.Property; -import net.md_5.bungee.api.chat.TextComponent; -import net.md_5.bungee.chat.ComponentSerializer; -import net.sothatsit.heads.cache.CacheHead; -import net.sothatsit.heads.volatilecode.reflection.Version; -import net.sothatsit.heads.volatilecode.reflection.nms.nbt.NBTTagString; -import org.bukkit.Bukkit; -import org.bukkit.ChatColor; - -import net.sothatsit.heads.volatilecode.reflection.craftbukkit.CraftItemStack; -import net.sothatsit.heads.volatilecode.reflection.nms.ItemStack; -import net.sothatsit.heads.volatilecode.reflection.nms.nbt.NBTTagCompound; -import net.sothatsit.heads.volatilecode.reflection.nms.nbt.NBTTagList; -import org.bukkit.enchantments.Enchantment; -import org.bukkit.inventory.ItemFlag; -import org.bukkit.inventory.meta.ItemMeta; - -public class ItemNBT { - - public static org.bukkit.inventory.ItemStack addGlow(org.bukkit.inventory.ItemStack itemstack) { - itemstack = itemstack.clone(); - - if(Version.getVersion().higherThan(Version.v1_10)) { - itemstack.addUnsafeEnchantment(Enchantment.LURE, 1); - - ItemMeta meta = itemstack.getItemMeta(); - meta.addItemFlags(ItemFlag.HIDE_ENCHANTS); - itemstack.setItemMeta(meta); - - return itemstack; - } else { - ItemStack item = CraftItemStack.asNMSCopy(itemstack); - - NBTTagCompound tag = item.getTag(); - - if (tag.isNull()) - tag = new NBTTagCompound(); - - tag.set("ench", new NBTTagList()); - - item.setTag(tag); - - return CraftItemStack.asBukkitCopy(item); - } - } - - public static String getTextureProperty(org.bukkit.inventory.ItemStack item) { - return getTextureProperty(CraftItemStack.asNMSCopy(item)); - } - - public static String getTextureProperty(ItemStack item) { - NBTTagCompound tag = item.getTag(); - - if (tag == null || tag.getHandle() == null) { - return null; - } - - NBTTagCompound skullOwner = tag.getCompound("SkullOwner"); - - if (skullOwner == null || skullOwner.getHandle() == null) { - return null; - } - - NBTTagCompound properties = skullOwner.getCompound("Properties"); - - if (properties == null || properties.getHandle() == null) { - return null; - } - - NBTTagList textures = properties.getList("textures", 10); - - if (textures == null || textures.getHandle() == null || textures.size() == 0) { - return null; - } - - return textures.get(0).getString("Value"); - } - - private static ItemStack createNMSSkull() { - if(Version.isBelow(Version.v1_13)) - return new ItemStack(net.sothatsit.heads.volatilecode.reflection.nms.Items.getItem("SKULL"), 1, 3); - - return new ItemStack(net.sothatsit.heads.volatilecode.reflection.nms.Items.getItem("PLAYER_HEAD"), 1); - } - - public static org.bukkit.inventory.ItemStack createHead(CacheHead head, String name) { - if(name == null) { - name = ChatColor.GRAY + head.getName(); - } - - ItemStack nmsItemstack = createNMSSkull(); - NBTTagCompound tag = nmsItemstack.getTag(); - - if (tag.getHandle() == null) { - tag = new NBTTagCompound(); - - nmsItemstack.setTag(tag); - } - - tag.set("display", createDisplayTag(name, new String[] {ChatColor.DARK_GRAY + head.getCategory()})); - - return CraftItemStack.asBukkitCopy(applyNBT(head, nmsItemstack)); - } - - public static org.bukkit.inventory.ItemStack createHead(GameProfile profile, String name) { - ItemStack nmsItemstack = createNMSSkull(); - NBTTagCompound tag = nmsItemstack.getTag(); - - if (tag.getHandle() == null) { - tag = new NBTTagCompound(); - - nmsItemstack.setTag(tag); - } - - NBTTagCompound skullOwner = tag.getCompound("SkullOwner"); - skullOwner.setString("Id", UUID.randomUUID().toString()); - skullOwner.setString("Name", "SpigotHeadPlugin"); - - NBTTagCompound properties = skullOwner.getCompound("Properties"); - NBTTagList textures = new NBTTagList(); - - for (Property property : profile.getProperties().get("textures")) { - NBTTagCompound value = new NBTTagCompound(); - value.setString("Value", property.getValue()); - - if(property.hasSignature()) { - value.setString("Signature", property.getSignature()); - } - - textures.add(value); - } - - properties.set("textures", textures); - skullOwner.set("Properties", properties); - tag.set("SkullOwner", skullOwner); - - tag.set("display", createDisplayTag(name, new String[0])); - - nmsItemstack.setTag(tag); - - return CraftItemStack.asBukkitCopy(nmsItemstack); - } - - public static NBTTagCompound createDisplayTag(String name, String[] lore) { - NBTTagCompound display = new NBTTagCompound(); - - if(Version.isBelow(Version.v1_13)) { - display.setString("Name", name); - - NBTTagList list = new NBTTagList(); - for(String line : lore) { - list.add(new NBTTagString(line)); - } - - display.set("Lore", list); - } else { - display.setString("Name", ComponentSerializer.toString(TextComponent.fromLegacyText(name))); - - NBTTagList list = new NBTTagList(); - for(String line : lore) { - list.add(new NBTTagString(ComponentSerializer.toString(TextComponent.fromLegacyText(line)))); - } - - display.set("Lore", list); - } - - return display; - } - - public static org.bukkit.inventory.ItemStack applyHead(CacheHead head, org.bukkit.inventory.ItemStack item) { - if(!Items.isSkull(item)) - return item; - - ItemStack itemstack = CraftItemStack.asNMSCopy(item); - - return CraftItemStack.asBukkitCopy(applyNBT(head, itemstack)); - } - - private static ItemStack copy(ItemStack itemstack) { - return CraftItemStack.asNMSCopy(CraftItemStack.asBukkitCopy(itemstack)); - } - - public static ItemStack applyNBT(CacheHead head, ItemStack itemstack) { - itemstack = copy(itemstack); - NBTTagCompound tag = itemstack.getTag(); - - if (tag.getHandle() == null) { - tag = new NBTTagCompound(); - - itemstack.setTag(tag); - } - - NBTTagCompound skullOwner = tag.getCompound("SkullOwner"); - skullOwner.setString("Id", UUID.randomUUID().toString()); - skullOwner.setString("Name", "SpigotHeadPlugin"); - - NBTTagCompound properties = skullOwner.getCompound("Properties"); - NBTTagList textures = new NBTTagList(); - - NBTTagCompound value = new NBTTagCompound(); - value.setString("Value", head.getTexture()); - - if(Bukkit.getPluginManager().getPlugin("SkinsRestorer") == null) { - value.setString("Signature", ""); - } - - textures.add(value); - - properties.set("textures", textures); - skullOwner.set("Properties", properties); - tag.set("SkullOwner", skullOwner); - - NBTTagCompound headInfo = new NBTTagCompound(); - - headInfo.setString("id", Integer.toString(head.getId())); - headInfo.setString("name", head.getName()); - headInfo.setString("category", head.getCategory()); - headInfo.setString("texture", head.getTexture()); - headInfo.setString("cost", Double.toString(head.getCost())); - headInfo.setString("permission", head.getPermission()); - - tag.set("SpigotHeadPlugin", headInfo); - - itemstack.setTag(tag); - - return itemstack; - } - -} diff --git a/src/net/sothatsit/heads/HeadNamer.java b/src/nl/marido/heads/HeadNamer.java similarity index 93% rename from src/net/sothatsit/heads/HeadNamer.java rename to src/nl/marido/heads/HeadNamer.java index c15c1d5..4b873b8 100644 --- a/src/net/sothatsit/heads/HeadNamer.java +++ b/src/nl/marido/heads/HeadNamer.java @@ -1,4 +1,4 @@ -package net.sothatsit.heads; +package nl.marido.heads; import java.util.ArrayList; import java.util.List; @@ -27,13 +27,13 @@ import org.bukkit.plugin.RegisteredListener; import com.mojang.authlib.GameProfile; import net.sothatsit.blockstore.BlockStoreApi; -import net.sothatsit.heads.cache.CacheHead; -import net.sothatsit.heads.volatilecode.ItemNBT; -import net.sothatsit.heads.volatilecode.Items; -import net.sothatsit.heads.volatilecode.TextureGetter; -import net.sothatsit.heads.volatilecode.reflection.nms.BlockPosition; -import net.sothatsit.heads.volatilecode.reflection.nms.TileEntitySkull; -import net.sothatsit.heads.volatilecode.reflection.nms.World; +import nl.marido.heads.cache.CacheHead; +import nl.marido.heads.volatilecode.ItemNBT; +import nl.marido.heads.volatilecode.Items; +import nl.marido.heads.volatilecode.TextureGetter; +import nl.marido.heads.volatilecode.reflection.nms.BlockPosition; +import nl.marido.heads.volatilecode.reflection.nms.TileEntitySkull; +import nl.marido.heads.volatilecode.reflection.nms.World; public class HeadNamer implements Listener { diff --git a/src/net/sothatsit/heads/Heads.java b/src/nl/marido/heads/Heads.java similarity index 88% rename from src/net/sothatsit/heads/Heads.java rename to src/nl/marido/heads/Heads.java index 9fa0848..ee06d2f 100644 --- a/src/net/sothatsit/heads/Heads.java +++ b/src/nl/marido/heads/Heads.java @@ -1,4 +1,4 @@ -package net.sothatsit.heads; +package nl.marido.heads; import java.io.File; import java.io.IOException; @@ -21,33 +21,33 @@ import org.bukkit.inventory.InventoryHolder; import org.bukkit.plugin.Plugin; import org.bukkit.plugin.java.JavaPlugin; -import net.sothatsit.heads.cache.CacheFile; -import net.sothatsit.heads.cache.CacheHead; -import net.sothatsit.heads.cache.ModsFile; -import net.sothatsit.heads.cache.ModsFileHeader; -import net.sothatsit.heads.cache.legacy.CacheFileConverter; -import net.sothatsit.heads.cache.legacy.LegacyCacheConfig; -import net.sothatsit.heads.command.HeadsCommand; -import net.sothatsit.heads.command.RuntimeCommand; -import net.sothatsit.heads.config.FileConfigFile; -import net.sothatsit.heads.config.MainConfig; -import net.sothatsit.heads.config.lang.Lang; -import net.sothatsit.heads.config.lang.LangConfig; -import net.sothatsit.heads.config.menu.Menus; -import net.sothatsit.heads.config.oldmenu.MenuConfig; -import net.sothatsit.heads.economy.Economy; -import net.sothatsit.heads.economy.ItemEconomy; -import net.sothatsit.heads.economy.NoEconomy; -import net.sothatsit.heads.economy.PlayerPointsEconomy; -import net.sothatsit.heads.economy.VaultEconomy; -import net.sothatsit.heads.menu.ui.InventoryMenu; -import net.sothatsit.heads.oldmenu.ClickInventory; -import net.sothatsit.heads.util.Clock; -import net.sothatsit.heads.volatilecode.injection.ProtocolHackFixer; -import net.sothatsit.heads.volatilecode.reflection.Version; -import net.sothatsit.heads.volatilecode.reflection.craftbukkit.CommandMap; -import net.sothatsit.heads.volatilecode.reflection.craftbukkit.CraftMetaItem; -import net.sothatsit.heads.volatilecode.reflection.craftbukkit.CraftServer; +import nl.marido.heads.cache.CacheFile; +import nl.marido.heads.cache.CacheHead; +import nl.marido.heads.cache.ModsFile; +import nl.marido.heads.cache.ModsFileHeader; +import nl.marido.heads.cache.legacy.CacheFileConverter; +import nl.marido.heads.cache.legacy.LegacyCacheConfig; +import nl.marido.heads.command.HeadsCommand; +import nl.marido.heads.command.RuntimeCommand; +import nl.marido.heads.config.FileConfigFile; +import nl.marido.heads.config.MainConfig; +import nl.marido.heads.config.lang.Lang; +import nl.marido.heads.config.lang.LangConfig; +import nl.marido.heads.config.menu.Menus; +import nl.marido.heads.config.oldmenu.MenuConfig; +import nl.marido.heads.economy.Economy; +import nl.marido.heads.economy.ItemEconomy; +import nl.marido.heads.economy.NoEconomy; +import nl.marido.heads.economy.PlayerPointsEconomy; +import nl.marido.heads.economy.VaultEconomy; +import nl.marido.heads.menu.ui.InventoryMenu; +import nl.marido.heads.oldmenu.ClickInventory; +import nl.marido.heads.util.Clock; +import nl.marido.heads.volatilecode.injection.ProtocolHackFixer; +import nl.marido.heads.volatilecode.reflection.Version; +import nl.marido.heads.volatilecode.reflection.craftbukkit.CommandMap; +import nl.marido.heads.volatilecode.reflection.craftbukkit.CraftMetaItem; +import nl.marido.heads.volatilecode.reflection.craftbukkit.CraftServer; public class Heads extends JavaPlugin implements Listener { diff --git a/src/net/sothatsit/heads/LegacyIDs.java b/src/nl/marido/heads/LegacyIDs.java similarity index 96% rename from src/net/sothatsit/heads/LegacyIDs.java rename to src/nl/marido/heads/LegacyIDs.java index 4c74252..773b742 100644 --- a/src/net/sothatsit/heads/LegacyIDs.java +++ b/src/nl/marido/heads/LegacyIDs.java @@ -1,4 +1,4 @@ -package net.sothatsit.heads; +package nl.marido.heads; import java.io.BufferedReader; import java.io.BufferedWriter; @@ -14,7 +14,7 @@ import java.util.Map; import org.bukkit.Material; -import net.sothatsit.heads.util.Checks; +import nl.marido.heads.util.Checks; public class LegacyIDs { diff --git a/src/net/sothatsit/heads/LiveHead.java b/src/nl/marido/heads/LiveHead.java similarity index 93% rename from src/net/sothatsit/heads/LiveHead.java rename to src/nl/marido/heads/LiveHead.java index 5e62eb6..8d7f0d9 100644 --- a/src/net/sothatsit/heads/LiveHead.java +++ b/src/nl/marido/heads/LiveHead.java @@ -1,4 +1,4 @@ -package net.sothatsit.heads; +package nl.marido.heads; import java.util.List; diff --git a/src/net/sothatsit/heads/Search.java b/src/nl/marido/heads/Search.java similarity index 98% rename from src/net/sothatsit/heads/Search.java rename to src/nl/marido/heads/Search.java index 9cfa6b7..c30916f 100644 --- a/src/net/sothatsit/heads/Search.java +++ b/src/nl/marido/heads/Search.java @@ -1,10 +1,10 @@ -package net.sothatsit.heads; - -import net.sothatsit.heads.cache.CacheHead; -import net.sothatsit.heads.util.Checks; +package nl.marido.heads; import java.util.*; +import nl.marido.heads.cache.CacheHead; +import nl.marido.heads.util.Checks; + public final class Search { private Query query; diff --git a/src/net/sothatsit/heads/UpdateChecker.java b/src/nl/marido/heads/UpdateChecker.java similarity index 98% rename from src/net/sothatsit/heads/UpdateChecker.java rename to src/nl/marido/heads/UpdateChecker.java index 3986ca6..414d13e 100644 --- a/src/net/sothatsit/heads/UpdateChecker.java +++ b/src/nl/marido/heads/UpdateChecker.java @@ -1,4 +1,4 @@ -package net.sothatsit.heads; +package nl.marido.heads; import java.io.BufferedReader; import java.io.IOException; diff --git a/src/net/sothatsit/heads/animation/Animations.java b/src/nl/marido/heads/animation/Animations.java similarity index 70% rename from src/net/sothatsit/heads/animation/Animations.java rename to src/nl/marido/heads/animation/Animations.java index 31d493f..de4e6bb 100644 --- a/src/net/sothatsit/heads/animation/Animations.java +++ b/src/nl/marido/heads/animation/Animations.java @@ -1,4 +1,4 @@ -package net.sothatsit.heads.animation; +package nl.marido.heads.animation; public class Animations { diff --git a/src/net/sothatsit/heads/animation/LiveData.java b/src/nl/marido/heads/animation/LiveData.java similarity index 70% rename from src/net/sothatsit/heads/animation/LiveData.java rename to src/nl/marido/heads/animation/LiveData.java index 4537981..923a469 100644 --- a/src/net/sothatsit/heads/animation/LiveData.java +++ b/src/nl/marido/heads/animation/LiveData.java @@ -1,4 +1,4 @@ -package net.sothatsit.heads.animation; +package nl.marido.heads.animation; public class LiveData { diff --git a/src/net/sothatsit/heads/animation/Monitor.java b/src/nl/marido/heads/animation/Monitor.java similarity index 70% rename from src/net/sothatsit/heads/animation/Monitor.java rename to src/nl/marido/heads/animation/Monitor.java index c8d24f1..4ea8291 100644 --- a/src/net/sothatsit/heads/animation/Monitor.java +++ b/src/nl/marido/heads/animation/Monitor.java @@ -1,4 +1,4 @@ -package net.sothatsit.heads.animation; +package nl.marido.heads.animation; public class Monitor { diff --git a/src/net/sothatsit/heads/api/HeadsAPI.java b/src/nl/marido/heads/api/HeadsAPI.java similarity index 92% rename from src/net/sothatsit/heads/api/HeadsAPI.java rename to src/nl/marido/heads/api/HeadsAPI.java index 8728ba1..3486d62 100644 --- a/src/net/sothatsit/heads/api/HeadsAPI.java +++ b/src/nl/marido/heads/api/HeadsAPI.java @@ -1,4 +1,4 @@ -package net.sothatsit.heads.api; +package nl.marido.heads.api; import java.util.List; import java.util.Set; @@ -8,10 +8,10 @@ import org.bukkit.inventory.ItemStack; import com.google.common.collect.ImmutableList; -import net.sothatsit.heads.Heads; -import net.sothatsit.heads.cache.CacheHead; -import net.sothatsit.heads.util.Checks; -import net.sothatsit.heads.volatilecode.TextureGetter; +import nl.marido.heads.Heads; +import nl.marido.heads.cache.CacheHead; +import nl.marido.heads.util.Checks; +import nl.marido.heads.volatilecode.TextureGetter; public class HeadsAPI { diff --git a/src/net/sothatsit/heads/cache/CacheFile.java b/src/nl/marido/heads/cache/CacheFile.java similarity index 97% rename from src/net/sothatsit/heads/cache/CacheFile.java rename to src/nl/marido/heads/cache/CacheFile.java index d24a60b..62c635d 100644 --- a/src/net/sothatsit/heads/cache/CacheFile.java +++ b/src/nl/marido/heads/cache/CacheFile.java @@ -1,4 +1,4 @@ -package net.sothatsit.heads.cache; +package nl.marido.heads.cache; import java.io.File; import java.io.FileInputStream; @@ -21,10 +21,10 @@ import java.util.function.Consumer; import java.util.zip.GZIPInputStream; import java.util.zip.GZIPOutputStream; -import net.sothatsit.heads.Heads; -import net.sothatsit.heads.Search; -import net.sothatsit.heads.util.Checks; -import net.sothatsit.heads.util.IOUtils; +import nl.marido.heads.Heads; +import nl.marido.heads.Search; +import nl.marido.heads.util.Checks; +import nl.marido.heads.util.IOUtils; public final class CacheFile implements Mod { diff --git a/src/net/sothatsit/heads/cache/CacheHead.java b/src/nl/marido/heads/cache/CacheHead.java similarity index 94% rename from src/net/sothatsit/heads/cache/CacheHead.java rename to src/nl/marido/heads/cache/CacheHead.java index 3389f85..da689dc 100644 --- a/src/net/sothatsit/heads/cache/CacheHead.java +++ b/src/nl/marido/heads/cache/CacheHead.java @@ -1,4 +1,4 @@ -package net.sothatsit.heads.cache; +package nl.marido.heads.cache; import java.io.IOException; import java.io.ObjectInputStream; @@ -19,12 +19,12 @@ import org.bukkit.inventory.ItemStack; import com.google.gson.JsonObject; import com.google.gson.JsonParser; -import net.sothatsit.heads.Heads; -import net.sothatsit.heads.config.lang.Lang; -import net.sothatsit.heads.config.lang.Placeholder; -import net.sothatsit.heads.util.Checks; -import net.sothatsit.heads.util.IOUtils; -import net.sothatsit.heads.volatilecode.ItemNBT; +import nl.marido.heads.Heads; +import nl.marido.heads.config.lang.Lang; +import nl.marido.heads.config.lang.Placeholder; +import nl.marido.heads.util.Checks; +import nl.marido.heads.util.IOUtils; +import nl.marido.heads.volatilecode.ItemNBT; public final class CacheHead implements Comparable { diff --git a/src/net/sothatsit/heads/cache/HeadPatch.java b/src/nl/marido/heads/cache/HeadPatch.java similarity index 97% rename from src/net/sothatsit/heads/cache/HeadPatch.java rename to src/nl/marido/heads/cache/HeadPatch.java index b9963ef..1d5b655 100644 --- a/src/net/sothatsit/heads/cache/HeadPatch.java +++ b/src/nl/marido/heads/cache/HeadPatch.java @@ -1,7 +1,4 @@ -package net.sothatsit.heads.cache; - -import net.sothatsit.heads.util.Checks; -import net.sothatsit.heads.util.IOUtils; +package nl.marido.heads.cache; import java.io.IOException; import java.io.ObjectInputStream; @@ -10,6 +7,9 @@ import java.util.HashSet; import java.util.List; import java.util.UUID; +import nl.marido.heads.util.Checks; +import nl.marido.heads.util.IOUtils; + public final class HeadPatch { private final UUID uniqueId; diff --git a/src/net/sothatsit/heads/cache/Mod.java b/src/nl/marido/heads/cache/Mod.java similarity index 97% rename from src/net/sothatsit/heads/cache/Mod.java rename to src/nl/marido/heads/cache/Mod.java index 5ff9978..1a4e8ff 100644 --- a/src/net/sothatsit/heads/cache/Mod.java +++ b/src/nl/marido/heads/cache/Mod.java @@ -1,4 +1,4 @@ -package net.sothatsit.heads.cache; +package nl.marido.heads.cache; import java.io.IOException; import java.io.ObjectInputStream; diff --git a/src/net/sothatsit/heads/cache/ModsFile.java b/src/nl/marido/heads/cache/ModsFile.java similarity index 98% rename from src/net/sothatsit/heads/cache/ModsFile.java rename to src/nl/marido/heads/cache/ModsFile.java index 00bd888..dd74b42 100644 --- a/src/net/sothatsit/heads/cache/ModsFile.java +++ b/src/nl/marido/heads/cache/ModsFile.java @@ -1,6 +1,4 @@ -package net.sothatsit.heads.cache; - -import net.sothatsit.heads.Heads; +package nl.marido.heads.cache; import java.io.*; import java.util.*; @@ -8,6 +6,8 @@ import java.util.stream.Collectors; import java.util.zip.GZIPInputStream; import java.util.zip.GZIPOutputStream; +import nl.marido.heads.Heads; + public final class ModsFile { private final List mods = new ArrayList<>(); diff --git a/src/net/sothatsit/heads/cache/ModsFileHeader.java b/src/nl/marido/heads/cache/ModsFileHeader.java similarity index 94% rename from src/net/sothatsit/heads/cache/ModsFileHeader.java rename to src/nl/marido/heads/cache/ModsFileHeader.java index bdbf60a..4dcf778 100644 --- a/src/net/sothatsit/heads/cache/ModsFileHeader.java +++ b/src/nl/marido/heads/cache/ModsFileHeader.java @@ -1,12 +1,12 @@ -package net.sothatsit.heads.cache; - -import net.sothatsit.heads.Heads; -import net.sothatsit.heads.util.IOUtils; +package nl.marido.heads.cache; import java.io.*; import java.util.*; import java.util.zip.GZIPInputStream; +import nl.marido.heads.Heads; +import nl.marido.heads.util.IOUtils; + public class ModsFileHeader { private final int version; diff --git a/src/net/sothatsit/heads/cache/PatchFile.java b/src/nl/marido/heads/cache/PatchFile.java similarity index 97% rename from src/net/sothatsit/heads/cache/PatchFile.java rename to src/nl/marido/heads/cache/PatchFile.java index 9ad8e93..34c2d3c 100644 --- a/src/net/sothatsit/heads/cache/PatchFile.java +++ b/src/nl/marido/heads/cache/PatchFile.java @@ -1,12 +1,12 @@ -package net.sothatsit.heads.cache; - -import net.sothatsit.heads.Heads; +package nl.marido.heads.cache; import java.io.*; import java.util.*; import java.util.zip.GZIPInputStream; import java.util.zip.GZIPOutputStream; +import nl.marido.heads.Heads; + public class PatchFile implements Mod { private final String name; diff --git a/src/net/sothatsit/heads/cache/legacy/CacheFileConverter.java b/src/nl/marido/heads/cache/legacy/CacheFileConverter.java similarity index 86% rename from src/net/sothatsit/heads/cache/legacy/CacheFileConverter.java rename to src/nl/marido/heads/cache/legacy/CacheFileConverter.java index 5a063d4..c35d301 100644 --- a/src/net/sothatsit/heads/cache/legacy/CacheFileConverter.java +++ b/src/nl/marido/heads/cache/legacy/CacheFileConverter.java @@ -1,4 +1,4 @@ -package net.sothatsit.heads.cache.legacy; +package nl.marido.heads.cache.legacy; import java.io.File; import java.io.IOException; @@ -8,9 +8,9 @@ import java.util.List; import java.util.Set; import java.util.stream.Collectors; -import net.sothatsit.heads.cache.CacheFile; -import net.sothatsit.heads.cache.CacheHead; -import net.sothatsit.heads.config.DefaultsConfigFile; +import nl.marido.heads.cache.CacheFile; +import nl.marido.heads.cache.CacheHead; +import nl.marido.heads.config.DefaultsConfigFile; public class CacheFileConverter { diff --git a/src/net/sothatsit/heads/cache/legacy/LegacyCacheConfig.java b/src/nl/marido/heads/cache/legacy/LegacyCacheConfig.java similarity index 93% rename from src/net/sothatsit/heads/cache/legacy/LegacyCacheConfig.java rename to src/nl/marido/heads/cache/legacy/LegacyCacheConfig.java index b6e8895..0cdd01b 100644 --- a/src/net/sothatsit/heads/cache/legacy/LegacyCacheConfig.java +++ b/src/nl/marido/heads/cache/legacy/LegacyCacheConfig.java @@ -1,4 +1,4 @@ -package net.sothatsit.heads.cache.legacy; +package nl.marido.heads.cache.legacy; import java.util.ArrayList; import java.util.Collections; @@ -8,7 +8,7 @@ import java.util.Set; import org.bukkit.configuration.ConfigurationSection; -import net.sothatsit.heads.config.ConfigFile; +import nl.marido.heads.config.ConfigFile; public class LegacyCacheConfig { diff --git a/src/net/sothatsit/heads/cache/legacy/LegacyCachedHead.java b/src/nl/marido/heads/cache/legacy/LegacyCachedHead.java similarity index 97% rename from src/net/sothatsit/heads/cache/legacy/LegacyCachedHead.java rename to src/nl/marido/heads/cache/legacy/LegacyCachedHead.java index b629a4d..c3b7abd 100644 --- a/src/net/sothatsit/heads/cache/legacy/LegacyCachedHead.java +++ b/src/nl/marido/heads/cache/legacy/LegacyCachedHead.java @@ -1,4 +1,4 @@ -package net.sothatsit.heads.cache.legacy; +package nl.marido.heads.cache.legacy; import org.bukkit.configuration.ConfigurationSection; diff --git a/src/net/sothatsit/heads/command/AbstractCommand.java b/src/nl/marido/heads/command/AbstractCommand.java similarity index 76% rename from src/net/sothatsit/heads/command/AbstractCommand.java rename to src/nl/marido/heads/command/AbstractCommand.java index abc4d0f..23e1b7d 100644 --- a/src/net/sothatsit/heads/command/AbstractCommand.java +++ b/src/nl/marido/heads/command/AbstractCommand.java @@ -1,10 +1,11 @@ -package net.sothatsit.heads.command; +package nl.marido.heads.command; -import net.sothatsit.heads.config.MainConfig; -import net.sothatsit.heads.config.lang.Lang; import org.bukkit.command.CommandExecutor; import org.bukkit.command.CommandSender; +import nl.marido.heads.config.MainConfig; +import nl.marido.heads.config.lang.Lang; + public abstract class AbstractCommand implements CommandExecutor { public abstract String getCommandLabel(MainConfig config); diff --git a/src/net/sothatsit/heads/command/HeadsCommand.java b/src/nl/marido/heads/command/HeadsCommand.java similarity index 64% rename from src/net/sothatsit/heads/command/HeadsCommand.java rename to src/nl/marido/heads/command/HeadsCommand.java index e95b4eb..07b9103 100644 --- a/src/net/sothatsit/heads/command/HeadsCommand.java +++ b/src/nl/marido/heads/command/HeadsCommand.java @@ -1,27 +1,27 @@ -package net.sothatsit.heads.command; +package nl.marido.heads.command; import org.bukkit.command.Command; import org.bukkit.command.CommandExecutor; import org.bukkit.command.CommandSender; -import net.sothatsit.heads.Heads; -import net.sothatsit.heads.command.admin.AddCommand; -import net.sothatsit.heads.command.admin.CategoryCostCommand; -import net.sothatsit.heads.command.admin.CostCommand; -import net.sothatsit.heads.command.admin.GiveCommand; -import net.sothatsit.heads.command.admin.HandCommand; -import net.sothatsit.heads.command.admin.IdCommand; -import net.sothatsit.heads.command.admin.ItemEcoCommand; -import net.sothatsit.heads.command.admin.ReloadCommand; -import net.sothatsit.heads.command.admin.RemoveCommand; -import net.sothatsit.heads.command.admin.RenameCommand; -import net.sothatsit.heads.command.user.GetCommand; -import net.sothatsit.heads.command.user.OpenMenuCommand; -import net.sothatsit.heads.command.user.RandomCommand; -import net.sothatsit.heads.command.user.SearchCommand; -import net.sothatsit.heads.config.MainConfig; -import net.sothatsit.heads.config.lang.Lang; -import net.sothatsit.heads.config.lang.LangMessage; +import nl.marido.heads.Heads; +import nl.marido.heads.command.admin.AddCommand; +import nl.marido.heads.command.admin.CategoryCostCommand; +import nl.marido.heads.command.admin.CostCommand; +import nl.marido.heads.command.admin.GiveCommand; +import nl.marido.heads.command.admin.HandCommand; +import nl.marido.heads.command.admin.IdCommand; +import nl.marido.heads.command.admin.ItemEcoCommand; +import nl.marido.heads.command.admin.ReloadCommand; +import nl.marido.heads.command.admin.RemoveCommand; +import nl.marido.heads.command.admin.RenameCommand; +import nl.marido.heads.command.user.GetCommand; +import nl.marido.heads.command.user.OpenMenuCommand; +import nl.marido.heads.command.user.RandomCommand; +import nl.marido.heads.command.user.SearchCommand; +import nl.marido.heads.config.MainConfig; +import nl.marido.heads.config.lang.Lang; +import nl.marido.heads.config.lang.LangMessage; public class HeadsCommand implements CommandExecutor { diff --git a/src/net/sothatsit/heads/command/HelpCommand.java b/src/nl/marido/heads/command/HelpCommand.java similarity index 92% rename from src/net/sothatsit/heads/command/HelpCommand.java rename to src/nl/marido/heads/command/HelpCommand.java index 397cac6..aebc099 100644 --- a/src/net/sothatsit/heads/command/HelpCommand.java +++ b/src/nl/marido/heads/command/HelpCommand.java @@ -1,12 +1,12 @@ -package net.sothatsit.heads.command; - -import net.sothatsit.heads.config.MainConfig; -import net.sothatsit.heads.config.lang.Lang; -import net.sothatsit.heads.config.lang.Lang.HelpSection; +package nl.marido.heads.command; import org.bukkit.command.Command; import org.bukkit.command.CommandSender; +import nl.marido.heads.config.MainConfig; +import nl.marido.heads.config.lang.Lang; +import nl.marido.heads.config.lang.Lang.HelpSection; + public class HelpCommand extends AbstractCommand { @Override diff --git a/src/net/sothatsit/heads/command/RuntimeCommand.java b/src/nl/marido/heads/command/RuntimeCommand.java similarity index 94% rename from src/net/sothatsit/heads/command/RuntimeCommand.java rename to src/nl/marido/heads/command/RuntimeCommand.java index be73276..16730ef 100644 --- a/src/net/sothatsit/heads/command/RuntimeCommand.java +++ b/src/nl/marido/heads/command/RuntimeCommand.java @@ -1,4 +1,4 @@ -package net.sothatsit.heads.command; +package nl.marido.heads.command; import org.bukkit.command.Command; import org.bukkit.command.CommandExecutor; diff --git a/src/net/sothatsit/heads/command/admin/AddCommand.java b/src/nl/marido/heads/command/admin/AddCommand.java similarity index 86% rename from src/net/sothatsit/heads/command/admin/AddCommand.java rename to src/nl/marido/heads/command/admin/AddCommand.java index 4627421..c77f620 100644 --- a/src/net/sothatsit/heads/command/admin/AddCommand.java +++ b/src/nl/marido/heads/command/admin/AddCommand.java @@ -1,16 +1,16 @@ -package net.sothatsit.heads.command.admin; - -import net.sothatsit.heads.Heads; -import net.sothatsit.heads.cache.CacheHead; -import net.sothatsit.heads.command.AbstractCommand; -import net.sothatsit.heads.config.MainConfig; -import net.sothatsit.heads.config.lang.Lang; -import net.sothatsit.heads.volatilecode.TextureGetter; -import net.sothatsit.heads.volatilecode.reflection.Version; +package nl.marido.heads.command.admin; import org.bukkit.command.Command; import org.bukkit.command.CommandSender; +import nl.marido.heads.Heads; +import nl.marido.heads.cache.CacheHead; +import nl.marido.heads.command.AbstractCommand; +import nl.marido.heads.config.MainConfig; +import nl.marido.heads.config.lang.Lang; +import nl.marido.heads.volatilecode.TextureGetter; +import nl.marido.heads.volatilecode.reflection.Version; + public class AddCommand extends AbstractCommand { @Override diff --git a/src/net/sothatsit/heads/command/admin/CategoryCostCommand.java b/src/nl/marido/heads/command/admin/CategoryCostCommand.java similarity index 83% rename from src/net/sothatsit/heads/command/admin/CategoryCostCommand.java rename to src/nl/marido/heads/command/admin/CategoryCostCommand.java index 9554cda..2672773 100644 --- a/src/net/sothatsit/heads/command/admin/CategoryCostCommand.java +++ b/src/nl/marido/heads/command/admin/CategoryCostCommand.java @@ -1,14 +1,15 @@ -package net.sothatsit.heads.command.admin; +package nl.marido.heads.command.admin; -import net.sothatsit.heads.command.AbstractCommand; -import net.sothatsit.heads.config.MainConfig; -import net.sothatsit.heads.config.lang.Lang; -import net.sothatsit.heads.oldmenu.mode.CategoryCostMode; -import net.sothatsit.heads.oldmenu.mode.InvModeType; import org.bukkit.command.Command; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; +import nl.marido.heads.command.AbstractCommand; +import nl.marido.heads.config.MainConfig; +import nl.marido.heads.config.lang.Lang; +import nl.marido.heads.oldmenu.mode.CategoryCostMode; +import nl.marido.heads.oldmenu.mode.InvModeType; + public class CategoryCostCommand extends AbstractCommand { @Override diff --git a/src/net/sothatsit/heads/command/admin/CostCommand.java b/src/nl/marido/heads/command/admin/CostCommand.java similarity index 82% rename from src/net/sothatsit/heads/command/admin/CostCommand.java rename to src/nl/marido/heads/command/admin/CostCommand.java index ce5c5ef..c8a98fa 100644 --- a/src/net/sothatsit/heads/command/admin/CostCommand.java +++ b/src/nl/marido/heads/command/admin/CostCommand.java @@ -1,15 +1,15 @@ -package net.sothatsit.heads.command.admin; - -import net.sothatsit.heads.command.AbstractCommand; -import net.sothatsit.heads.config.MainConfig; -import net.sothatsit.heads.config.lang.Lang; -import net.sothatsit.heads.oldmenu.mode.CostMode; -import net.sothatsit.heads.oldmenu.mode.InvModeType; +package nl.marido.heads.command.admin; import org.bukkit.command.Command; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; +import nl.marido.heads.command.AbstractCommand; +import nl.marido.heads.config.MainConfig; +import nl.marido.heads.config.lang.Lang; +import nl.marido.heads.oldmenu.mode.CostMode; +import nl.marido.heads.oldmenu.mode.InvModeType; + public class CostCommand extends AbstractCommand { @Override diff --git a/src/net/sothatsit/heads/command/admin/GiveCommand.java b/src/nl/marido/heads/command/admin/GiveCommand.java similarity index 89% rename from src/net/sothatsit/heads/command/admin/GiveCommand.java rename to src/nl/marido/heads/command/admin/GiveCommand.java index c9d29b4..dd6de85 100644 --- a/src/net/sothatsit/heads/command/admin/GiveCommand.java +++ b/src/nl/marido/heads/command/admin/GiveCommand.java @@ -1,10 +1,4 @@ -package net.sothatsit.heads.command.admin; - -import net.sothatsit.heads.Heads; -import net.sothatsit.heads.cache.CacheHead; -import net.sothatsit.heads.command.AbstractCommand; -import net.sothatsit.heads.config.MainConfig; -import net.sothatsit.heads.config.lang.Lang; +package nl.marido.heads.command.admin; import org.bukkit.Bukkit; import org.bukkit.command.Command; @@ -13,6 +7,12 @@ import org.bukkit.entity.Item; import org.bukkit.entity.Player; import org.bukkit.inventory.ItemStack; +import nl.marido.heads.Heads; +import nl.marido.heads.cache.CacheHead; +import nl.marido.heads.command.AbstractCommand; +import nl.marido.heads.config.MainConfig; +import nl.marido.heads.config.lang.Lang; + public class GiveCommand extends AbstractCommand { @Override diff --git a/src/net/sothatsit/heads/command/admin/HandCommand.java b/src/nl/marido/heads/command/admin/HandCommand.java similarity index 84% rename from src/net/sothatsit/heads/command/admin/HandCommand.java rename to src/nl/marido/heads/command/admin/HandCommand.java index 1903d67..7efe80a 100644 --- a/src/net/sothatsit/heads/command/admin/HandCommand.java +++ b/src/nl/marido/heads/command/admin/HandCommand.java @@ -1,4 +1,4 @@ -package net.sothatsit.heads.command.admin; +package nl.marido.heads.command.admin; import org.bukkit.command.Command; import org.bukkit.command.CommandSender; @@ -6,15 +6,15 @@ import org.bukkit.entity.Player; import org.bukkit.inventory.ItemStack; import org.bukkit.inventory.meta.SkullMeta; -import net.sothatsit.heads.Heads; -import net.sothatsit.heads.cache.CacheHead; -import net.sothatsit.heads.command.AbstractCommand; -import net.sothatsit.heads.config.MainConfig; -import net.sothatsit.heads.config.lang.Lang; -import net.sothatsit.heads.volatilecode.ItemNBT; -import net.sothatsit.heads.volatilecode.Items; -import net.sothatsit.heads.volatilecode.TextureGetter; -import net.sothatsit.heads.volatilecode.reflection.Version; +import nl.marido.heads.Heads; +import nl.marido.heads.cache.CacheHead; +import nl.marido.heads.command.AbstractCommand; +import nl.marido.heads.config.MainConfig; +import nl.marido.heads.config.lang.Lang; +import nl.marido.heads.volatilecode.ItemNBT; +import nl.marido.heads.volatilecode.Items; +import nl.marido.heads.volatilecode.TextureGetter; +import nl.marido.heads.volatilecode.reflection.Version; public class HandCommand extends AbstractCommand { diff --git a/src/net/sothatsit/heads/command/admin/IdCommand.java b/src/nl/marido/heads/command/admin/IdCommand.java similarity index 80% rename from src/net/sothatsit/heads/command/admin/IdCommand.java rename to src/nl/marido/heads/command/admin/IdCommand.java index 09fd565..4dcd794 100644 --- a/src/net/sothatsit/heads/command/admin/IdCommand.java +++ b/src/nl/marido/heads/command/admin/IdCommand.java @@ -1,4 +1,4 @@ -package net.sothatsit.heads.command.admin; +package nl.marido.heads.command.admin; import org.bukkit.ChatColor; import org.bukkit.command.Command; @@ -7,13 +7,13 @@ import org.bukkit.entity.Player; import org.bukkit.inventory.ItemStack; import org.bukkit.inventory.meta.ItemMeta; -import net.sothatsit.heads.Heads; -import net.sothatsit.heads.cache.CacheHead; -import net.sothatsit.heads.command.AbstractCommand; -import net.sothatsit.heads.config.MainConfig; -import net.sothatsit.heads.config.lang.Lang; -import net.sothatsit.heads.volatilecode.ItemNBT; -import net.sothatsit.heads.volatilecode.Items; +import nl.marido.heads.Heads; +import nl.marido.heads.cache.CacheHead; +import nl.marido.heads.command.AbstractCommand; +import nl.marido.heads.config.MainConfig; +import nl.marido.heads.config.lang.Lang; +import nl.marido.heads.volatilecode.ItemNBT; +import nl.marido.heads.volatilecode.Items; public class IdCommand extends AbstractCommand { diff --git a/src/net/sothatsit/heads/command/admin/ItemEcoCommand.java b/src/nl/marido/heads/command/admin/ItemEcoCommand.java similarity index 93% rename from src/net/sothatsit/heads/command/admin/ItemEcoCommand.java rename to src/nl/marido/heads/command/admin/ItemEcoCommand.java index d4c8438..1d4c2bc 100644 --- a/src/net/sothatsit/heads/command/admin/ItemEcoCommand.java +++ b/src/nl/marido/heads/command/admin/ItemEcoCommand.java @@ -1,4 +1,4 @@ -package net.sothatsit.heads.command.admin; +package nl.marido.heads.command.admin; import org.bukkit.Bukkit; import org.bukkit.command.Command; @@ -6,11 +6,11 @@ import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; import org.bukkit.inventory.ItemStack; -import net.sothatsit.heads.Heads; -import net.sothatsit.heads.command.AbstractCommand; -import net.sothatsit.heads.config.MainConfig; -import net.sothatsit.heads.config.lang.Lang; -import net.sothatsit.heads.menu.ui.item.Item; +import nl.marido.heads.Heads; +import nl.marido.heads.command.AbstractCommand; +import nl.marido.heads.config.MainConfig; +import nl.marido.heads.config.lang.Lang; +import nl.marido.heads.menu.ui.item.Item; public class ItemEcoCommand extends AbstractCommand { diff --git a/src/net/sothatsit/heads/command/admin/ReloadCommand.java b/src/nl/marido/heads/command/admin/ReloadCommand.java similarity index 78% rename from src/net/sothatsit/heads/command/admin/ReloadCommand.java rename to src/nl/marido/heads/command/admin/ReloadCommand.java index 34ed01b..adec8d2 100644 --- a/src/net/sothatsit/heads/command/admin/ReloadCommand.java +++ b/src/nl/marido/heads/command/admin/ReloadCommand.java @@ -1,12 +1,13 @@ -package net.sothatsit.heads.command.admin; +package nl.marido.heads.command.admin; -import net.sothatsit.heads.Heads; -import net.sothatsit.heads.command.AbstractCommand; -import net.sothatsit.heads.config.MainConfig; -import net.sothatsit.heads.config.lang.Lang; import org.bukkit.command.Command; import org.bukkit.command.CommandSender; +import nl.marido.heads.Heads; +import nl.marido.heads.command.AbstractCommand; +import nl.marido.heads.config.MainConfig; +import nl.marido.heads.config.lang.Lang; + public class ReloadCommand extends AbstractCommand { @Override diff --git a/src/net/sothatsit/heads/command/admin/RemoveCommand.java b/src/nl/marido/heads/command/admin/RemoveCommand.java similarity index 79% rename from src/net/sothatsit/heads/command/admin/RemoveCommand.java rename to src/nl/marido/heads/command/admin/RemoveCommand.java index ec2fe8e..59687e0 100644 --- a/src/net/sothatsit/heads/command/admin/RemoveCommand.java +++ b/src/nl/marido/heads/command/admin/RemoveCommand.java @@ -1,14 +1,14 @@ -package net.sothatsit.heads.command.admin; - -import net.sothatsit.heads.command.AbstractCommand; -import net.sothatsit.heads.config.MainConfig; -import net.sothatsit.heads.config.lang.Lang; -import net.sothatsit.heads.oldmenu.mode.InvModeType; +package nl.marido.heads.command.admin; import org.bukkit.command.Command; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; +import nl.marido.heads.command.AbstractCommand; +import nl.marido.heads.config.MainConfig; +import nl.marido.heads.config.lang.Lang; +import nl.marido.heads.oldmenu.mode.InvModeType; + public class RemoveCommand extends AbstractCommand { @Override diff --git a/src/net/sothatsit/heads/command/admin/RenameCommand.java b/src/nl/marido/heads/command/admin/RenameCommand.java similarity index 81% rename from src/net/sothatsit/heads/command/admin/RenameCommand.java rename to src/nl/marido/heads/command/admin/RenameCommand.java index 714420c..a0f0adf 100644 --- a/src/net/sothatsit/heads/command/admin/RenameCommand.java +++ b/src/nl/marido/heads/command/admin/RenameCommand.java @@ -1,15 +1,15 @@ -package net.sothatsit.heads.command.admin; - -import net.sothatsit.heads.command.AbstractCommand; -import net.sothatsit.heads.config.MainConfig; -import net.sothatsit.heads.config.lang.Lang; -import net.sothatsit.heads.oldmenu.mode.InvModeType; -import net.sothatsit.heads.oldmenu.mode.RenameMode; +package nl.marido.heads.command.admin; import org.bukkit.command.Command; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; +import nl.marido.heads.command.AbstractCommand; +import nl.marido.heads.config.MainConfig; +import nl.marido.heads.config.lang.Lang; +import nl.marido.heads.oldmenu.mode.InvModeType; +import nl.marido.heads.oldmenu.mode.RenameMode; + public class RenameCommand extends AbstractCommand { @Override diff --git a/src/net/sothatsit/heads/command/user/GetCommand.java b/src/nl/marido/heads/command/user/GetCommand.java similarity index 84% rename from src/net/sothatsit/heads/command/user/GetCommand.java rename to src/nl/marido/heads/command/user/GetCommand.java index 7a86f14..b94cf6d 100644 --- a/src/net/sothatsit/heads/command/user/GetCommand.java +++ b/src/nl/marido/heads/command/user/GetCommand.java @@ -1,4 +1,4 @@ -package net.sothatsit.heads.command.user; +package nl.marido.heads.command.user; import java.util.UUID; @@ -9,13 +9,13 @@ import org.bukkit.entity.Player; import org.bukkit.inventory.ItemStack; import org.bukkit.inventory.meta.SkullMeta; -import net.sothatsit.heads.cache.CacheHead; -import net.sothatsit.heads.command.AbstractCommand; -import net.sothatsit.heads.config.MainConfig; -import net.sothatsit.heads.config.lang.Lang; -import net.sothatsit.heads.volatilecode.Items; -import net.sothatsit.heads.volatilecode.TextureGetter; -import net.sothatsit.heads.volatilecode.reflection.Version; +import nl.marido.heads.cache.CacheHead; +import nl.marido.heads.command.AbstractCommand; +import nl.marido.heads.config.MainConfig; +import nl.marido.heads.config.lang.Lang; +import nl.marido.heads.volatilecode.Items; +import nl.marido.heads.volatilecode.TextureGetter; +import nl.marido.heads.volatilecode.reflection.Version; public class GetCommand extends AbstractCommand { diff --git a/src/net/sothatsit/heads/command/user/OpenMenuCommand.java b/src/nl/marido/heads/command/user/OpenMenuCommand.java similarity index 75% rename from src/net/sothatsit/heads/command/user/OpenMenuCommand.java rename to src/nl/marido/heads/command/user/OpenMenuCommand.java index 5fa6013..c810ffa 100644 --- a/src/net/sothatsit/heads/command/user/OpenMenuCommand.java +++ b/src/nl/marido/heads/command/user/OpenMenuCommand.java @@ -1,13 +1,13 @@ -package net.sothatsit.heads.command.user; +package nl.marido.heads.command.user; import org.bukkit.command.Command; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; -import net.sothatsit.heads.command.AbstractCommand; -import net.sothatsit.heads.config.MainConfig; -import net.sothatsit.heads.config.lang.Lang; -import net.sothatsit.heads.oldmenu.mode.InvModeType; +import nl.marido.heads.command.AbstractCommand; +import nl.marido.heads.config.MainConfig; +import nl.marido.heads.config.lang.Lang; +import nl.marido.heads.oldmenu.mode.InvModeType; public class OpenMenuCommand extends AbstractCommand { diff --git a/src/net/sothatsit/heads/command/user/RandomCommand.java b/src/nl/marido/heads/command/user/RandomCommand.java similarity index 87% rename from src/net/sothatsit/heads/command/user/RandomCommand.java rename to src/nl/marido/heads/command/user/RandomCommand.java index 8607b45..84bee2b 100644 --- a/src/net/sothatsit/heads/command/user/RandomCommand.java +++ b/src/nl/marido/heads/command/user/RandomCommand.java @@ -1,18 +1,18 @@ -package net.sothatsit.heads.command.user; +package nl.marido.heads.command.user; import java.util.Random; -import net.sothatsit.heads.Heads; -import net.sothatsit.heads.cache.CacheHead; -import net.sothatsit.heads.command.AbstractCommand; -import net.sothatsit.heads.config.MainConfig; -import net.sothatsit.heads.config.lang.Lang; - import org.bukkit.Bukkit; import org.bukkit.command.Command; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; +import nl.marido.heads.Heads; +import nl.marido.heads.cache.CacheHead; +import nl.marido.heads.command.AbstractCommand; +import nl.marido.heads.config.MainConfig; +import nl.marido.heads.config.lang.Lang; + public class RandomCommand extends AbstractCommand { private static final Random RANDOM = new Random(); diff --git a/src/net/sothatsit/heads/command/user/SearchCommand.java b/src/nl/marido/heads/command/user/SearchCommand.java similarity index 84% rename from src/net/sothatsit/heads/command/user/SearchCommand.java rename to src/nl/marido/heads/command/user/SearchCommand.java index 550ada9..93142b0 100644 --- a/src/net/sothatsit/heads/command/user/SearchCommand.java +++ b/src/nl/marido/heads/command/user/SearchCommand.java @@ -1,14 +1,15 @@ -package net.sothatsit.heads.command.user; +package nl.marido.heads.command.user; -import net.sothatsit.heads.Heads; -import net.sothatsit.heads.command.AbstractCommand; -import net.sothatsit.heads.config.MainConfig; -import net.sothatsit.heads.config.lang.Lang; -import net.sothatsit.heads.oldmenu.mode.SearchMode; import org.bukkit.command.Command; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; +import nl.marido.heads.Heads; +import nl.marido.heads.command.AbstractCommand; +import nl.marido.heads.config.MainConfig; +import nl.marido.heads.config.lang.Lang; +import nl.marido.heads.oldmenu.mode.SearchMode; + public class SearchCommand extends AbstractCommand { @Override diff --git a/src/net/sothatsit/heads/config/ConfigFile.java b/src/nl/marido/heads/config/ConfigFile.java similarity index 96% rename from src/net/sothatsit/heads/config/ConfigFile.java rename to src/nl/marido/heads/config/ConfigFile.java index f1b277c..444bf1c 100644 --- a/src/net/sothatsit/heads/config/ConfigFile.java +++ b/src/nl/marido/heads/config/ConfigFile.java @@ -1,10 +1,11 @@ -package net.sothatsit.heads.config; +package nl.marido.heads.config; -import net.sothatsit.heads.Heads; -import net.sothatsit.heads.menu.ui.item.Item; -import net.sothatsit.heads.util.Checks; import org.bukkit.configuration.ConfigurationSection; +import nl.marido.heads.Heads; +import nl.marido.heads.menu.ui.item.Item; +import nl.marido.heads.util.Checks; + import java.util.concurrent.atomic.AtomicBoolean; public abstract class ConfigFile { diff --git a/src/net/sothatsit/heads/config/DefaultsConfigFile.java b/src/nl/marido/heads/config/DefaultsConfigFile.java similarity index 93% rename from src/net/sothatsit/heads/config/DefaultsConfigFile.java rename to src/nl/marido/heads/config/DefaultsConfigFile.java index c06e259..523cea3 100644 --- a/src/net/sothatsit/heads/config/DefaultsConfigFile.java +++ b/src/nl/marido/heads/config/DefaultsConfigFile.java @@ -1,13 +1,13 @@ -package net.sothatsit.heads.config; +package nl.marido.heads.config; import java.io.InputStream; import java.io.InputStreamReader; -import net.sothatsit.heads.Heads; - import org.bukkit.configuration.ConfigurationSection; import org.bukkit.configuration.file.YamlConfiguration; +import nl.marido.heads.Heads; + public class DefaultsConfigFile extends ConfigFile { private ConfigurationSection config; diff --git a/src/net/sothatsit/heads/config/FileConfigFile.java b/src/nl/marido/heads/config/FileConfigFile.java similarity index 95% rename from src/net/sothatsit/heads/config/FileConfigFile.java rename to src/nl/marido/heads/config/FileConfigFile.java index 1976f84..aa89a0d 100644 --- a/src/net/sothatsit/heads/config/FileConfigFile.java +++ b/src/nl/marido/heads/config/FileConfigFile.java @@ -1,13 +1,13 @@ -package net.sothatsit.heads.config; +package nl.marido.heads.config; import java.io.*; -import net.sothatsit.heads.Heads; - -import net.sothatsit.heads.util.Checks; import org.bukkit.configuration.ConfigurationSection; import org.bukkit.configuration.file.YamlConfiguration; +import nl.marido.heads.Heads; +import nl.marido.heads.util.Checks; + public class FileConfigFile extends ConfigFile { private YamlConfiguration config; diff --git a/src/net/sothatsit/heads/config/MainConfig.java b/src/nl/marido/heads/config/MainConfig.java similarity index 98% rename from src/net/sothatsit/heads/config/MainConfig.java rename to src/nl/marido/heads/config/MainConfig.java index ce872a7..4ba4014 100644 --- a/src/net/sothatsit/heads/config/MainConfig.java +++ b/src/nl/marido/heads/config/MainConfig.java @@ -1,19 +1,19 @@ -package net.sothatsit.heads.config; +package nl.marido.heads.config; import java.util.Arrays; import java.util.HashMap; import java.util.Map; import java.util.concurrent.atomic.AtomicBoolean; -import net.sothatsit.heads.Heads; - -import net.sothatsit.heads.menu.ui.item.Item; -import net.sothatsit.heads.util.Checks; -import net.sothatsit.heads.util.Clock; -import net.sothatsit.heads.volatilecode.Items; import org.bukkit.Bukkit; import org.bukkit.configuration.ConfigurationSection; +import nl.marido.heads.Heads; +import nl.marido.heads.menu.ui.item.Item; +import nl.marido.heads.util.Checks; +import nl.marido.heads.util.Clock; +import nl.marido.heads.volatilecode.Items; + public class MainConfig { private final ConfigFile configFile; diff --git a/src/net/sothatsit/heads/config/lang/Lang.java b/src/nl/marido/heads/config/lang/Lang.java similarity index 99% rename from src/net/sothatsit/heads/config/lang/Lang.java rename to src/nl/marido/heads/config/lang/Lang.java index 41b4d74..676d7ed 100644 --- a/src/net/sothatsit/heads/config/lang/Lang.java +++ b/src/nl/marido/heads/config/lang/Lang.java @@ -1,10 +1,10 @@ -package net.sothatsit.heads.config.lang; +package nl.marido.heads.config.lang; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; -import net.sothatsit.heads.Heads; -import net.sothatsit.heads.cache.CacheHead; +import nl.marido.heads.Heads; +import nl.marido.heads.cache.CacheHead; public class Lang { diff --git a/src/net/sothatsit/heads/config/lang/LangConfig.java b/src/nl/marido/heads/config/lang/LangConfig.java similarity index 92% rename from src/net/sothatsit/heads/config/lang/LangConfig.java rename to src/nl/marido/heads/config/lang/LangConfig.java index 072e40c..ebf2f06 100644 --- a/src/net/sothatsit/heads/config/lang/LangConfig.java +++ b/src/nl/marido/heads/config/lang/LangConfig.java @@ -1,17 +1,17 @@ -package net.sothatsit.heads.config.lang; +package nl.marido.heads.config.lang; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Map.Entry; -import net.sothatsit.heads.Heads; -import net.sothatsit.heads.config.ConfigFile; - -import net.sothatsit.heads.config.FileConfigFile; -import net.sothatsit.heads.util.Clock; import org.bukkit.configuration.ConfigurationSection; +import nl.marido.heads.Heads; +import nl.marido.heads.config.ConfigFile; +import nl.marido.heads.config.FileConfigFile; +import nl.marido.heads.util.Clock; + public class LangConfig { private final ConfigFile configFile; diff --git a/src/net/sothatsit/heads/config/lang/LangMessage.java b/src/nl/marido/heads/config/lang/LangMessage.java similarity index 94% rename from src/net/sothatsit/heads/config/lang/LangMessage.java rename to src/nl/marido/heads/config/lang/LangMessage.java index 12c2786..856ed90 100644 --- a/src/net/sothatsit/heads/config/lang/LangMessage.java +++ b/src/nl/marido/heads/config/lang/LangMessage.java @@ -1,11 +1,11 @@ -package net.sothatsit.heads.config.lang; +package nl.marido.heads.config.lang; import java.util.Arrays; -import net.sothatsit.heads.util.ArrayUtils; - import org.bukkit.command.CommandSender; +import nl.marido.heads.util.ArrayUtils; + public final class LangMessage { private final String[] messages; diff --git a/src/net/sothatsit/heads/config/lang/Placeholder.java b/src/nl/marido/heads/config/lang/Placeholder.java similarity index 97% rename from src/net/sothatsit/heads/config/lang/Placeholder.java rename to src/nl/marido/heads/config/lang/Placeholder.java index e5c8e77..254aeaf 100644 --- a/src/net/sothatsit/heads/config/lang/Placeholder.java +++ b/src/nl/marido/heads/config/lang/Placeholder.java @@ -1,8 +1,9 @@ -package net.sothatsit.heads.config.lang; +package nl.marido.heads.config.lang; -import net.sothatsit.heads.util.Checks; import org.bukkit.ChatColor; +import nl.marido.heads.util.Checks; + import java.util.ArrayList; import java.util.List; import java.util.Objects; diff --git a/src/net/sothatsit/heads/config/menu/MenuConfig.java b/src/nl/marido/heads/config/menu/MenuConfig.java similarity index 87% rename from src/net/sothatsit/heads/config/menu/MenuConfig.java rename to src/nl/marido/heads/config/menu/MenuConfig.java index 30e5bdc..fc67484 100644 --- a/src/net/sothatsit/heads/config/menu/MenuConfig.java +++ b/src/nl/marido/heads/config/menu/MenuConfig.java @@ -1,16 +1,16 @@ -package net.sothatsit.heads.config.menu; +package nl.marido.heads.config.menu; import java.util.concurrent.atomic.AtomicBoolean; -import net.sothatsit.heads.Heads; -import net.sothatsit.heads.config.ConfigFile; -import net.sothatsit.heads.menu.CacheHeadsMenu; -import net.sothatsit.heads.menu.CategoriesMenu; -import net.sothatsit.heads.menu.HeadsMenu; -import net.sothatsit.heads.menu.ui.element.PagedBox; -import net.sothatsit.heads.menu.ui.element.Scrollbar; -import net.sothatsit.heads.menu.ui.item.Item; -import net.sothatsit.heads.util.Checks; +import nl.marido.heads.Heads; +import nl.marido.heads.config.ConfigFile; +import nl.marido.heads.menu.CacheHeadsMenu; +import nl.marido.heads.menu.CategoriesMenu; +import nl.marido.heads.menu.HeadsMenu; +import nl.marido.heads.menu.ui.element.PagedBox; +import nl.marido.heads.menu.ui.element.Scrollbar; +import nl.marido.heads.menu.ui.item.Item; +import nl.marido.heads.util.Checks; public class MenuConfig { diff --git a/src/net/sothatsit/heads/config/menu/Menus.java b/src/nl/marido/heads/config/menu/Menus.java similarity index 85% rename from src/net/sothatsit/heads/config/menu/Menus.java rename to src/nl/marido/heads/config/menu/Menus.java index 13cef77..c39c669 100644 --- a/src/net/sothatsit/heads/config/menu/Menus.java +++ b/src/nl/marido/heads/config/menu/Menus.java @@ -1,10 +1,10 @@ -package net.sothatsit.heads.config.menu; - -import net.sothatsit.heads.Heads; -import net.sothatsit.heads.menu.CacheHeadsMenu; +package nl.marido.heads.config.menu; import java.io.File; +import nl.marido.heads.Heads; +import nl.marido.heads.menu.CacheHeadsMenu; + public class Menus { private MenuConfig browseConfig; diff --git a/src/nl/marido/heads/config/oldmenu/Menu.java b/src/nl/marido/heads/config/oldmenu/Menu.java new file mode 100644 index 0000000..8af0c23 --- /dev/null +++ b/src/nl/marido/heads/config/oldmenu/Menu.java @@ -0,0 +1,93 @@ +package nl.marido.heads.config.oldmenu; + +import java.util.HashMap; +import java.util.Map; +import java.util.concurrent.atomic.AtomicBoolean; +import java.util.function.Function; + +import org.bukkit.configuration.ConfigurationSection; +import org.bukkit.inventory.ItemStack; + +import nl.marido.heads.Heads; +import nl.marido.heads.config.lang.Placeholder; +import nl.marido.heads.menu.ui.item.Item; + +@Deprecated +public class Menu { + + private Function FILTER_ECONOMY_LINES_OUT = line -> !line.contains("%cost%"); + + private String title; + private final Map items = new HashMap<>(); + private final Menu defaults; + + public Menu() { + this(null); + } + + public Menu(Menu defaults) { + this.defaults = defaults; + } + + public String getTitle(Placeholder... placeholders) { + return title != null ? Placeholder.applyAll(title, placeholders) : "Menu"; + } + + public Item getItem(String name) { + Item item = items.get(name.toLowerCase()); + + return item != null ? item : getDefaultItem(name); + } + + public ItemStack getItemStack(String name, Placeholder... placeholders) { + Item item = getItem(name); + + return item != null ? item.build(getItemLoreFilter(), placeholders) : null; + } + + private Item getDefaultItem(String name) { + return defaults != null ? defaults.getItem(name) : null; + } + + private Function getItemLoreFilter() { + return Heads.getMainConfig().isEconomyEnabled() ? null : FILTER_ECONOMY_LINES_OUT; + } + + public void load(String filename, ConfigurationSection section, AtomicBoolean shouldSave) { + for (String key : section.getKeys(false)) { + if (!section.isConfigurationSection(key)) { + loadValue(section, key); + continue; + } + + Item item = Item.load(filename, section.getConfigurationSection(key), shouldSave); + + if (item == null) + continue; + + items.put(key.toLowerCase(), item); + } + } + + private void loadValue(ConfigurationSection section, String key) { + if (key.equals("title")) { + title = section.getString(key, null); + return; + } + + Heads.warning("Unknown use of value \"" + key + "\" in menu \"" + section.getCurrentPath() + "\""); + } + + public static Menu loadMenu(String filename, ConfigurationSection section, AtomicBoolean shouldSave) { + return loadMenu(filename, section, shouldSave, null); + } + + public static Menu loadMenu(String filename, ConfigurationSection section, AtomicBoolean shouldSave, Menu defaults) { + Menu menu = new Menu(defaults); + + menu.load(filename, section, shouldSave); + + return menu; + } + +} diff --git a/src/net/sothatsit/heads/config/oldmenu/MenuConfig.java b/src/nl/marido/heads/config/oldmenu/MenuConfig.java similarity index 93% rename from src/net/sothatsit/heads/config/oldmenu/MenuConfig.java rename to src/nl/marido/heads/config/oldmenu/MenuConfig.java index 84016f9..515b33b 100644 --- a/src/net/sothatsit/heads/config/oldmenu/MenuConfig.java +++ b/src/nl/marido/heads/config/oldmenu/MenuConfig.java @@ -1,4 +1,4 @@ -package net.sothatsit.heads.config.oldmenu; +package nl.marido.heads.config.oldmenu; import java.util.HashMap; import java.util.Map; @@ -6,10 +6,11 @@ import java.util.concurrent.atomic.AtomicBoolean; import org.bukkit.configuration.ConfigurationSection; -import net.sothatsit.heads.Heads; -import net.sothatsit.heads.config.ConfigFile; -import net.sothatsit.heads.util.Clock; +import nl.marido.heads.Heads; +import nl.marido.heads.config.ConfigFile; +import nl.marido.heads.util.Clock; +@Deprecated public class MenuConfig { private final ConfigurationSection defaults; diff --git a/src/nl/marido/heads/config/oldmenu/Menus.java b/src/nl/marido/heads/config/oldmenu/Menus.java new file mode 100644 index 0000000..55131be --- /dev/null +++ b/src/nl/marido/heads/config/oldmenu/Menus.java @@ -0,0 +1,77 @@ +package nl.marido.heads.config.oldmenu; + +import nl.marido.heads.Heads; +import nl.marido.heads.oldmenu.InventoryType; + +@Deprecated +public class Menus { + + public static final String SPLIT = "-"; + + public static final String CATEGORIES = "categories"; + public static final String HEADS = "heads"; + public static final String CONFIRM = "confirm"; + + public static final MenusGroup GET = new MenusGroup("get"); + public static final MenusGroup SEARCH = new MenusGroup("search"); + public static final MenusGroup REMOVE = new MenusGroup("remove"); + public static final MenusGroup RENAME = new MenusGroup("rename"); + public static final MenusGroup COST = new MenusGroup("cost"); + public static final MenusGroup CATEGORY_COST = new MenusGroup("category-cost"); + public static final MenusGroup CATEGORY_COST_REMOVE = new MenusGroup("category-cost-remove"); + public static final MenusGroup ID = new MenusGroup("id"); + + public static Menu get(String name) { + return Heads.getMenuConfig().getMenu(name); + } + + public static class MenusGroup { + private String prefix; + + public MenusGroup(String prefix) { + this.prefix = prefix; + } + + public String getPrefix() { + return prefix; + } + + public String getCategoriesName() { + return prefix + SPLIT + CATEGORIES; + } + + public String getHeadsName() { + return prefix + SPLIT + HEADS; + } + + public String getConfirmName() { + return prefix + SPLIT + CONFIRM; + } + + public Menu categories() { + return get(getCategoriesName()); + } + + public Menu heads() { + return get(getHeadsName()); + } + + public Menu confirm() { + return get(getConfirmName()); + } + + public Menu fromType(InventoryType type) { + switch (type) { + case CATEGORY: + return categories(); + case HEADS: + return heads(); + case CONFIRM: + return confirm(); + default: + return null; + } + } + } + +} \ No newline at end of file diff --git a/src/net/sothatsit/heads/economy/Economy.java b/src/nl/marido/heads/economy/Economy.java similarity index 89% rename from src/net/sothatsit/heads/economy/Economy.java rename to src/nl/marido/heads/economy/Economy.java index e2dfe10..b9b6c7b 100644 --- a/src/net/sothatsit/heads/economy/Economy.java +++ b/src/nl/marido/heads/economy/Economy.java @@ -1,4 +1,4 @@ -package net.sothatsit.heads.economy; +package nl.marido.heads.economy; import org.bukkit.entity.Player; diff --git a/src/net/sothatsit/heads/economy/ItemEconomy.java b/src/nl/marido/heads/economy/ItemEconomy.java similarity index 94% rename from src/net/sothatsit/heads/economy/ItemEconomy.java rename to src/nl/marido/heads/economy/ItemEconomy.java index 697dda3..e23be0b 100644 --- a/src/net/sothatsit/heads/economy/ItemEconomy.java +++ b/src/nl/marido/heads/economy/ItemEconomy.java @@ -1,10 +1,11 @@ -package net.sothatsit.heads.economy; +package nl.marido.heads.economy; -import net.sothatsit.heads.Heads; -import net.sothatsit.heads.menu.ui.item.Item; import org.bukkit.entity.Player; import org.bukkit.inventory.ItemStack; +import nl.marido.heads.Heads; +import nl.marido.heads.menu.ui.item.Item; + public class ItemEconomy implements Economy { public boolean isItem(ItemStack itemStack) { diff --git a/src/net/sothatsit/heads/economy/NoEconomy.java b/src/nl/marido/heads/economy/NoEconomy.java similarity index 94% rename from src/net/sothatsit/heads/economy/NoEconomy.java rename to src/nl/marido/heads/economy/NoEconomy.java index a18b5ae..b867b0f 100644 --- a/src/net/sothatsit/heads/economy/NoEconomy.java +++ b/src/nl/marido/heads/economy/NoEconomy.java @@ -1,4 +1,4 @@ -package net.sothatsit.heads.economy; +package nl.marido.heads.economy; import org.bukkit.entity.Player; diff --git a/src/net/sothatsit/heads/economy/PlayerPointsEconomy.java b/src/nl/marido/heads/economy/PlayerPointsEconomy.java similarity index 97% rename from src/net/sothatsit/heads/economy/PlayerPointsEconomy.java rename to src/nl/marido/heads/economy/PlayerPointsEconomy.java index 3d5ce14..4c74227 100644 --- a/src/net/sothatsit/heads/economy/PlayerPointsEconomy.java +++ b/src/nl/marido/heads/economy/PlayerPointsEconomy.java @@ -1,4 +1,4 @@ -package net.sothatsit.heads.economy; +package nl.marido.heads.economy; import org.black_ixx.playerpoints.PlayerPoints; import org.bukkit.Bukkit; diff --git a/src/net/sothatsit/heads/economy/VaultEconomy.java b/src/nl/marido/heads/economy/VaultEconomy.java similarity index 97% rename from src/net/sothatsit/heads/economy/VaultEconomy.java rename to src/nl/marido/heads/economy/VaultEconomy.java index 85b378e..0a6db1d 100644 --- a/src/net/sothatsit/heads/economy/VaultEconomy.java +++ b/src/nl/marido/heads/economy/VaultEconomy.java @@ -1,4 +1,4 @@ -package net.sothatsit.heads.economy; +package nl.marido.heads.economy; import org.bukkit.Bukkit; import org.bukkit.entity.Player; diff --git a/src/net/sothatsit/heads/menu/CacheHeadsMenu.java b/src/nl/marido/heads/menu/CacheHeadsMenu.java similarity index 91% rename from src/net/sothatsit/heads/menu/CacheHeadsMenu.java rename to src/nl/marido/heads/menu/CacheHeadsMenu.java index e067e27..1a32338 100644 --- a/src/net/sothatsit/heads/menu/CacheHeadsMenu.java +++ b/src/nl/marido/heads/menu/CacheHeadsMenu.java @@ -1,4 +1,4 @@ -package net.sothatsit.heads.menu; +package nl.marido.heads.menu; import java.util.List; import java.util.function.Function; @@ -7,17 +7,17 @@ import org.bukkit.ChatColor; import org.bukkit.Material; import org.bukkit.entity.Player; -import net.sothatsit.heads.Heads; -import net.sothatsit.heads.cache.CacheFile; -import net.sothatsit.heads.cache.CacheHead; -import net.sothatsit.heads.menu.ui.Bounds; -import net.sothatsit.heads.menu.ui.InventoryMenu; -import net.sothatsit.heads.menu.ui.MenuResponse; -import net.sothatsit.heads.menu.ui.element.Element; -import net.sothatsit.heads.menu.ui.item.Button; -import net.sothatsit.heads.menu.ui.item.Item; -import net.sothatsit.heads.util.Checks; -import net.sothatsit.heads.util.Stringify; +import nl.marido.heads.Heads; +import nl.marido.heads.cache.CacheFile; +import nl.marido.heads.cache.CacheHead; +import nl.marido.heads.menu.ui.Bounds; +import nl.marido.heads.menu.ui.InventoryMenu; +import nl.marido.heads.menu.ui.MenuResponse; +import nl.marido.heads.menu.ui.element.Element; +import nl.marido.heads.menu.ui.item.Button; +import nl.marido.heads.menu.ui.item.Item; +import nl.marido.heads.util.Checks; +import nl.marido.heads.util.Stringify; public class CacheHeadsMenu extends Element { diff --git a/src/net/sothatsit/heads/menu/CategoriesMenu.java b/src/nl/marido/heads/menu/CategoriesMenu.java similarity index 86% rename from src/net/sothatsit/heads/menu/CategoriesMenu.java rename to src/nl/marido/heads/menu/CategoriesMenu.java index e3128bf..d653758 100644 --- a/src/net/sothatsit/heads/menu/CategoriesMenu.java +++ b/src/nl/marido/heads/menu/CategoriesMenu.java @@ -1,20 +1,21 @@ -package net.sothatsit.heads.menu; +package nl.marido.heads.menu; -import net.sothatsit.heads.cache.CacheFile; -import net.sothatsit.heads.cache.CacheHead; -import net.sothatsit.heads.config.lang.Placeholder; -import net.sothatsit.heads.menu.ui.Bounds; -import net.sothatsit.heads.menu.ui.item.Item; -import net.sothatsit.heads.menu.ui.MenuResponse; -import net.sothatsit.heads.menu.ui.element.Element; -import net.sothatsit.heads.menu.ui.element.PagedBox; -import net.sothatsit.heads.menu.ui.item.Button; -import net.sothatsit.heads.util.Checks; -import net.sothatsit.heads.util.SafeCall; -import net.sothatsit.heads.util.Stringify; -import net.sothatsit.heads.volatilecode.Items; import org.bukkit.inventory.ItemStack; +import nl.marido.heads.cache.CacheFile; +import nl.marido.heads.cache.CacheHead; +import nl.marido.heads.config.lang.Placeholder; +import nl.marido.heads.menu.ui.Bounds; +import nl.marido.heads.menu.ui.MenuResponse; +import nl.marido.heads.menu.ui.element.Element; +import nl.marido.heads.menu.ui.element.PagedBox; +import nl.marido.heads.menu.ui.item.Button; +import nl.marido.heads.menu.ui.item.Item; +import nl.marido.heads.util.Checks; +import nl.marido.heads.util.SafeCall; +import nl.marido.heads.util.Stringify; +import nl.marido.heads.volatilecode.Items; + import java.util.ArrayList; import java.util.Collections; import java.util.List; diff --git a/src/net/sothatsit/heads/menu/ConfirmationMenu.java b/src/nl/marido/heads/menu/ConfirmationMenu.java similarity index 85% rename from src/net/sothatsit/heads/menu/ConfirmationMenu.java rename to src/nl/marido/heads/menu/ConfirmationMenu.java index 04b13a8..fb688c8 100644 --- a/src/net/sothatsit/heads/menu/ConfirmationMenu.java +++ b/src/nl/marido/heads/menu/ConfirmationMenu.java @@ -1,18 +1,19 @@ -package net.sothatsit.heads.menu; +package nl.marido.heads.menu; -import net.sothatsit.heads.menu.ui.Bounds; -import net.sothatsit.heads.menu.ui.MenuResponse; -import net.sothatsit.heads.menu.ui.Position; -import net.sothatsit.heads.menu.ui.element.Container; -import net.sothatsit.heads.menu.ui.element.Element; -import net.sothatsit.heads.menu.ui.item.Button; -import net.sothatsit.heads.menu.ui.item.Item; -import net.sothatsit.heads.util.Checks; -import net.sothatsit.heads.util.SafeCall; -import net.sothatsit.heads.util.Stringify; -import net.sothatsit.heads.volatilecode.Items; import org.bukkit.Material; +import nl.marido.heads.menu.ui.Bounds; +import nl.marido.heads.menu.ui.MenuResponse; +import nl.marido.heads.menu.ui.Position; +import nl.marido.heads.menu.ui.element.Container; +import nl.marido.heads.menu.ui.element.Element; +import nl.marido.heads.menu.ui.item.Button; +import nl.marido.heads.menu.ui.item.Item; +import nl.marido.heads.util.Checks; +import nl.marido.heads.util.SafeCall; +import nl.marido.heads.util.Stringify; +import nl.marido.heads.volatilecode.Items; + import java.util.concurrent.Callable; public class ConfirmationMenu extends Element { diff --git a/src/net/sothatsit/heads/menu/HeadsMenu.java b/src/nl/marido/heads/menu/HeadsMenu.java similarity index 85% rename from src/net/sothatsit/heads/menu/HeadsMenu.java rename to src/nl/marido/heads/menu/HeadsMenu.java index 4da21f9..26b7d75 100644 --- a/src/net/sothatsit/heads/menu/HeadsMenu.java +++ b/src/nl/marido/heads/menu/HeadsMenu.java @@ -1,18 +1,19 @@ -package net.sothatsit.heads.menu; +package nl.marido.heads.menu; -import net.sothatsit.heads.cache.CacheHead; -import net.sothatsit.heads.menu.ui.Bounds; -import net.sothatsit.heads.menu.ui.MenuResponse; -import net.sothatsit.heads.menu.ui.element.Element; -import net.sothatsit.heads.menu.ui.element.PagedBox; -import net.sothatsit.heads.menu.ui.item.Button; -import net.sothatsit.heads.menu.ui.item.Item; -import net.sothatsit.heads.util.Checks; -import net.sothatsit.heads.util.SafeCall; -import net.sothatsit.heads.util.Stringify; -import net.sothatsit.heads.volatilecode.Items; import org.bukkit.inventory.ItemStack; +import nl.marido.heads.cache.CacheHead; +import nl.marido.heads.menu.ui.Bounds; +import nl.marido.heads.menu.ui.MenuResponse; +import nl.marido.heads.menu.ui.element.Element; +import nl.marido.heads.menu.ui.element.PagedBox; +import nl.marido.heads.menu.ui.item.Button; +import nl.marido.heads.menu.ui.item.Item; +import nl.marido.heads.util.Checks; +import nl.marido.heads.util.SafeCall; +import nl.marido.heads.util.Stringify; +import nl.marido.heads.volatilecode.Items; + import java.util.ArrayList; import java.util.Collection; import java.util.List; diff --git a/src/net/sothatsit/heads/menu/ui/Bounds.java b/src/nl/marido/heads/menu/ui/Bounds.java similarity index 93% rename from src/net/sothatsit/heads/menu/ui/Bounds.java rename to src/nl/marido/heads/menu/ui/Bounds.java index 95167ff..216a46a 100644 --- a/src/net/sothatsit/heads/menu/ui/Bounds.java +++ b/src/nl/marido/heads/menu/ui/Bounds.java @@ -1,7 +1,7 @@ -package net.sothatsit.heads.menu.ui; +package nl.marido.heads.menu.ui; -import net.sothatsit.heads.util.Checks; -import net.sothatsit.heads.util.Stringify; +import nl.marido.heads.util.Checks; +import nl.marido.heads.util.Stringify; public final class Bounds { diff --git a/src/net/sothatsit/heads/menu/ui/InventoryMenu.java b/src/nl/marido/heads/menu/ui/InventoryMenu.java similarity index 93% rename from src/net/sothatsit/heads/menu/ui/InventoryMenu.java rename to src/nl/marido/heads/menu/ui/InventoryMenu.java index 4852049..e8f246c 100644 --- a/src/net/sothatsit/heads/menu/ui/InventoryMenu.java +++ b/src/nl/marido/heads/menu/ui/InventoryMenu.java @@ -1,11 +1,5 @@ -package net.sothatsit.heads.menu.ui; +package nl.marido.heads.menu.ui; -import net.sothatsit.heads.Heads; -import net.sothatsit.heads.menu.ui.element.Container; -import net.sothatsit.heads.menu.ui.element.Element; -import net.sothatsit.heads.menu.ui.item.Button; -import net.sothatsit.heads.util.Checks; -import net.sothatsit.heads.util.Stringify; import org.bukkit.Bukkit; import org.bukkit.entity.Player; import org.bukkit.event.inventory.InventoryClickEvent; @@ -14,6 +8,13 @@ import org.bukkit.inventory.InventoryHolder; import org.bukkit.inventory.InventoryView; import org.bukkit.inventory.ItemStack; +import nl.marido.heads.Heads; +import nl.marido.heads.menu.ui.element.Container; +import nl.marido.heads.menu.ui.element.Element; +import nl.marido.heads.menu.ui.item.Button; +import nl.marido.heads.util.Checks; +import nl.marido.heads.util.Stringify; + import java.util.ArrayList; import java.util.List; diff --git a/src/net/sothatsit/heads/menu/ui/MenuResponse.java b/src/nl/marido/heads/menu/ui/MenuResponse.java similarity index 63% rename from src/net/sothatsit/heads/menu/ui/MenuResponse.java rename to src/nl/marido/heads/menu/ui/MenuResponse.java index 307f509..5e5b15d 100644 --- a/src/net/sothatsit/heads/menu/ui/MenuResponse.java +++ b/src/nl/marido/heads/menu/ui/MenuResponse.java @@ -1,4 +1,4 @@ -package net.sothatsit.heads.menu.ui; +package nl.marido.heads.menu.ui; public enum MenuResponse { diff --git a/src/net/sothatsit/heads/menu/ui/Position.java b/src/nl/marido/heads/menu/ui/Position.java similarity index 86% rename from src/net/sothatsit/heads/menu/ui/Position.java rename to src/nl/marido/heads/menu/ui/Position.java index 2e8d32a..0649a29 100644 --- a/src/net/sothatsit/heads/menu/ui/Position.java +++ b/src/nl/marido/heads/menu/ui/Position.java @@ -1,7 +1,7 @@ -package net.sothatsit.heads.menu.ui; +package nl.marido.heads.menu.ui; -import net.sothatsit.heads.util.Checks; -import net.sothatsit.heads.util.Stringify; +import nl.marido.heads.util.Checks; +import nl.marido.heads.util.Stringify; public final class Position { diff --git a/src/net/sothatsit/heads/menu/ui/element/Container.java b/src/nl/marido/heads/menu/ui/element/Container.java similarity index 87% rename from src/net/sothatsit/heads/menu/ui/element/Container.java rename to src/nl/marido/heads/menu/ui/element/Container.java index 1c1d462..e72a735 100644 --- a/src/net/sothatsit/heads/menu/ui/element/Container.java +++ b/src/nl/marido/heads/menu/ui/element/Container.java @@ -1,13 +1,13 @@ -package net.sothatsit.heads.menu.ui.element; - -import net.sothatsit.heads.menu.ui.Bounds; -import net.sothatsit.heads.menu.ui.MenuResponse; -import net.sothatsit.heads.menu.ui.Position; -import net.sothatsit.heads.menu.ui.item.Button; -import net.sothatsit.heads.util.Checks; +package nl.marido.heads.menu.ui.element; import java.util.Arrays; +import nl.marido.heads.menu.ui.Bounds; +import nl.marido.heads.menu.ui.MenuResponse; +import nl.marido.heads.menu.ui.Position; +import nl.marido.heads.menu.ui.item.Button; +import nl.marido.heads.util.Checks; + public final class Container extends Element { private final Button[] items; diff --git a/src/net/sothatsit/heads/menu/ui/element/Element.java b/src/nl/marido/heads/menu/ui/element/Element.java similarity index 63% rename from src/net/sothatsit/heads/menu/ui/element/Element.java rename to src/nl/marido/heads/menu/ui/element/Element.java index 748d67b..3ff7758 100644 --- a/src/net/sothatsit/heads/menu/ui/element/Element.java +++ b/src/nl/marido/heads/menu/ui/element/Element.java @@ -1,9 +1,9 @@ -package net.sothatsit.heads.menu.ui.element; +package nl.marido.heads.menu.ui.element; -import net.sothatsit.heads.menu.ui.Bounds; -import net.sothatsit.heads.menu.ui.item.Button; -import net.sothatsit.heads.util.Checks; -import net.sothatsit.heads.util.Stringify; +import nl.marido.heads.menu.ui.Bounds; +import nl.marido.heads.menu.ui.item.Button; +import nl.marido.heads.util.Checks; +import nl.marido.heads.util.Stringify; public abstract class Element { diff --git a/src/net/sothatsit/heads/menu/ui/element/PagedBox.java b/src/nl/marido/heads/menu/ui/element/PagedBox.java similarity index 94% rename from src/net/sothatsit/heads/menu/ui/element/PagedBox.java rename to src/nl/marido/heads/menu/ui/element/PagedBox.java index 0c99716..677c3ba 100644 --- a/src/net/sothatsit/heads/menu/ui/element/PagedBox.java +++ b/src/nl/marido/heads/menu/ui/element/PagedBox.java @@ -1,15 +1,16 @@ -package net.sothatsit.heads.menu.ui.element; +package nl.marido.heads.menu.ui.element; -import net.sothatsit.heads.config.lang.Placeholder; -import net.sothatsit.heads.menu.ui.Bounds; -import net.sothatsit.heads.menu.ui.item.*; -import net.sothatsit.heads.menu.ui.MenuResponse; -import net.sothatsit.heads.util.Checks; -import net.sothatsit.heads.util.Stringify; -import net.sothatsit.heads.volatilecode.Items; import org.bukkit.Material; import org.bukkit.inventory.ItemStack; +import nl.marido.heads.config.lang.Placeholder; +import nl.marido.heads.menu.ui.Bounds; +import nl.marido.heads.menu.ui.MenuResponse; +import nl.marido.heads.menu.ui.item.*; +import nl.marido.heads.util.Checks; +import nl.marido.heads.util.Stringify; +import nl.marido.heads.volatilecode.Items; + public class PagedBox extends Element { public static final Item defaultUnselected = Item.create(Material.PAPER).name("&7Page %page%"); diff --git a/src/net/sothatsit/heads/menu/ui/element/Scrollbar.java b/src/nl/marido/heads/menu/ui/element/Scrollbar.java similarity index 93% rename from src/net/sothatsit/heads/menu/ui/element/Scrollbar.java rename to src/nl/marido/heads/menu/ui/element/Scrollbar.java index 5fe3fbf..5d1d02e 100644 --- a/src/net/sothatsit/heads/menu/ui/element/Scrollbar.java +++ b/src/nl/marido/heads/menu/ui/element/Scrollbar.java @@ -1,14 +1,15 @@ -package net.sothatsit.heads.menu.ui.element; +package nl.marido.heads.menu.ui.element; -import net.sothatsit.heads.menu.ui.Bounds; -import net.sothatsit.heads.menu.ui.item.Item; -import net.sothatsit.heads.menu.ui.MenuResponse; -import net.sothatsit.heads.menu.ui.item.Button; -import net.sothatsit.heads.util.Checks; -import net.sothatsit.heads.util.Stringify; -import net.sothatsit.heads.volatilecode.Items; import org.bukkit.Material; +import nl.marido.heads.menu.ui.Bounds; +import nl.marido.heads.menu.ui.MenuResponse; +import nl.marido.heads.menu.ui.item.Button; +import nl.marido.heads.menu.ui.item.Item; +import nl.marido.heads.util.Checks; +import nl.marido.heads.util.Stringify; +import nl.marido.heads.volatilecode.Items; + import java.util.Arrays; public class Scrollbar extends Element { diff --git a/src/net/sothatsit/heads/menu/ui/item/Button.java b/src/nl/marido/heads/menu/ui/item/Button.java similarity index 78% rename from src/net/sothatsit/heads/menu/ui/item/Button.java rename to src/nl/marido/heads/menu/ui/item/Button.java index 07d0393..4f9722c 100644 --- a/src/net/sothatsit/heads/menu/ui/item/Button.java +++ b/src/nl/marido/heads/menu/ui/item/Button.java @@ -1,12 +1,13 @@ -package net.sothatsit.heads.menu.ui.item; +package nl.marido.heads.menu.ui.item; -import net.sothatsit.heads.menu.ui.MenuResponse; -import net.sothatsit.heads.util.Checks; -import net.sothatsit.heads.util.SafeCall; -import net.sothatsit.heads.util.SafeCall.SafeCallable; -import net.sothatsit.heads.util.Stringify; import org.bukkit.inventory.ItemStack; +import nl.marido.heads.menu.ui.MenuResponse; +import nl.marido.heads.util.Checks; +import nl.marido.heads.util.SafeCall; +import nl.marido.heads.util.Stringify; +import nl.marido.heads.util.SafeCall.SafeCallable; + import java.util.concurrent.Callable; public class Button { diff --git a/src/net/sothatsit/heads/menu/ui/item/ButtonGroup.java b/src/nl/marido/heads/menu/ui/item/ButtonGroup.java similarity index 88% rename from src/net/sothatsit/heads/menu/ui/item/ButtonGroup.java rename to src/nl/marido/heads/menu/ui/item/ButtonGroup.java index c71d4db..1c20cf5 100644 --- a/src/net/sothatsit/heads/menu/ui/item/ButtonGroup.java +++ b/src/nl/marido/heads/menu/ui/item/ButtonGroup.java @@ -1,11 +1,11 @@ -package net.sothatsit.heads.menu.ui.item; - -import net.sothatsit.heads.util.Checks; -import net.sothatsit.heads.util.Stringify; +package nl.marido.heads.menu.ui.item; import java.util.ArrayList; import java.util.List; +import nl.marido.heads.util.Checks; +import nl.marido.heads.util.Stringify; + public class ButtonGroup { private final List buttons = new ArrayList<>(); diff --git a/src/net/sothatsit/heads/menu/ui/item/Item.java b/src/nl/marido/heads/menu/ui/item/Item.java similarity index 96% rename from src/net/sothatsit/heads/menu/ui/item/Item.java rename to src/nl/marido/heads/menu/ui/item/Item.java index 693bc5f..11be30f 100644 --- a/src/net/sothatsit/heads/menu/ui/item/Item.java +++ b/src/nl/marido/heads/menu/ui/item/Item.java @@ -1,4 +1,4 @@ -package net.sothatsit.heads.menu.ui.item; +package nl.marido.heads.menu.ui.item; import java.util.Arrays; import java.util.List; @@ -15,13 +15,13 @@ import org.bukkit.inventory.ItemStack; import org.bukkit.inventory.meta.ItemMeta; import org.bukkit.material.MaterialData; -import net.sothatsit.heads.Heads; -import net.sothatsit.heads.config.lang.Placeholder; -import net.sothatsit.heads.menu.ui.MenuResponse; -import net.sothatsit.heads.util.Checks; -import net.sothatsit.heads.util.Stringify; -import net.sothatsit.heads.volatilecode.ItemNBT; -import net.sothatsit.heads.volatilecode.reflection.Version; +import nl.marido.heads.Heads; +import nl.marido.heads.config.lang.Placeholder; +import nl.marido.heads.menu.ui.MenuResponse; +import nl.marido.heads.util.Checks; +import nl.marido.heads.util.Stringify; +import nl.marido.heads.volatilecode.ItemNBT; +import nl.marido.heads.volatilecode.reflection.Version; @SuppressWarnings("deprecation") public final class Item { diff --git a/src/net/sothatsit/heads/menu/ui/item/SelectableButton.java b/src/nl/marido/heads/menu/ui/item/SelectableButton.java similarity index 90% rename from src/net/sothatsit/heads/menu/ui/item/SelectableButton.java rename to src/nl/marido/heads/menu/ui/item/SelectableButton.java index 4c5bcc8..5bb5455 100644 --- a/src/net/sothatsit/heads/menu/ui/item/SelectableButton.java +++ b/src/nl/marido/heads/menu/ui/item/SelectableButton.java @@ -1,10 +1,11 @@ -package net.sothatsit.heads.menu.ui.item; +package nl.marido.heads.menu.ui.item; -import net.sothatsit.heads.menu.ui.MenuResponse; -import net.sothatsit.heads.util.Checks; -import net.sothatsit.heads.util.Stringify; import org.bukkit.inventory.ItemStack; +import nl.marido.heads.menu.ui.MenuResponse; +import nl.marido.heads.util.Checks; +import nl.marido.heads.util.Stringify; + import java.util.concurrent.Callable; public class SelectableButton extends Button { diff --git a/src/net/sothatsit/heads/oldmenu/AbstractModedInventory.java b/src/nl/marido/heads/oldmenu/AbstractModedInventory.java similarity index 90% rename from src/net/sothatsit/heads/oldmenu/AbstractModedInventory.java rename to src/nl/marido/heads/oldmenu/AbstractModedInventory.java index a829044..3647105 100644 --- a/src/net/sothatsit/heads/oldmenu/AbstractModedInventory.java +++ b/src/nl/marido/heads/oldmenu/AbstractModedInventory.java @@ -1,8 +1,5 @@ -package net.sothatsit.heads.oldmenu; +package nl.marido.heads.oldmenu; -import net.sothatsit.heads.config.oldmenu.Menu; -import net.sothatsit.heads.config.lang.Placeholder; -import net.sothatsit.heads.oldmenu.mode.InvMode; import org.bukkit.ChatColor; import org.bukkit.Bukkit; @@ -10,6 +7,10 @@ import org.bukkit.command.CommandSender; import org.bukkit.event.inventory.InventoryClickEvent; import org.bukkit.inventory.Inventory; +import nl.marido.heads.config.lang.Placeholder; +import nl.marido.heads.config.oldmenu.Menu; +import nl.marido.heads.oldmenu.mode.InvMode; + public abstract class AbstractModedInventory implements ClickInventory { private InventoryType type; diff --git a/src/net/sothatsit/heads/oldmenu/CategorySelectMenu.java b/src/nl/marido/heads/oldmenu/CategorySelectMenu.java similarity index 94% rename from src/net/sothatsit/heads/oldmenu/CategorySelectMenu.java rename to src/nl/marido/heads/oldmenu/CategorySelectMenu.java index 9b0e18d..982a4e6 100644 --- a/src/net/sothatsit/heads/oldmenu/CategorySelectMenu.java +++ b/src/nl/marido/heads/oldmenu/CategorySelectMenu.java @@ -1,21 +1,21 @@ -package net.sothatsit.heads.oldmenu; +package nl.marido.heads.oldmenu; import java.util.*; -import net.sothatsit.heads.cache.CacheFile; -import net.sothatsit.heads.cache.CacheHead; -import net.sothatsit.heads.volatilecode.Items; import org.bukkit.Bukkit; import org.bukkit.ChatColor; import org.bukkit.entity.Player; import org.bukkit.inventory.Inventory; import org.bukkit.inventory.ItemStack; - -import net.sothatsit.heads.Heads; -import net.sothatsit.heads.config.lang.Placeholder; -import net.sothatsit.heads.oldmenu.mode.InvMode; import org.bukkit.inventory.meta.ItemMeta; +import nl.marido.heads.Heads; +import nl.marido.heads.cache.CacheFile; +import nl.marido.heads.cache.CacheHead; +import nl.marido.heads.config.lang.Placeholder; +import nl.marido.heads.oldmenu.mode.InvMode; +import nl.marido.heads.volatilecode.Items; + public class CategorySelectMenu extends AbstractModedInventory { private Map> heads; diff --git a/src/net/sothatsit/heads/oldmenu/ClickInventory.java b/src/nl/marido/heads/oldmenu/ClickInventory.java similarity index 87% rename from src/net/sothatsit/heads/oldmenu/ClickInventory.java rename to src/nl/marido/heads/oldmenu/ClickInventory.java index 8c09e06..f471a10 100644 --- a/src/net/sothatsit/heads/oldmenu/ClickInventory.java +++ b/src/nl/marido/heads/oldmenu/ClickInventory.java @@ -1,4 +1,4 @@ -package net.sothatsit.heads.oldmenu; +package nl.marido.heads.oldmenu; import org.bukkit.event.inventory.InventoryClickEvent; import org.bukkit.inventory.InventoryHolder; diff --git a/src/net/sothatsit/heads/oldmenu/ConfirmMenu.java b/src/nl/marido/heads/oldmenu/ConfirmMenu.java similarity index 84% rename from src/net/sothatsit/heads/oldmenu/ConfirmMenu.java rename to src/nl/marido/heads/oldmenu/ConfirmMenu.java index 7cba16d..40a28bd 100644 --- a/src/net/sothatsit/heads/oldmenu/ConfirmMenu.java +++ b/src/nl/marido/heads/oldmenu/ConfirmMenu.java @@ -1,14 +1,14 @@ -package net.sothatsit.heads.oldmenu; - -import net.sothatsit.heads.cache.CacheHead; -import net.sothatsit.heads.config.oldmenu.Menu; -import net.sothatsit.heads.config.lang.Placeholder; -import net.sothatsit.heads.oldmenu.mode.InvMode; -import net.sothatsit.heads.util.ArrayUtils; +package nl.marido.heads.oldmenu; import org.bukkit.inventory.Inventory; import org.bukkit.inventory.ItemStack; +import nl.marido.heads.cache.CacheHead; +import nl.marido.heads.config.lang.Placeholder; +import nl.marido.heads.config.oldmenu.Menu; +import nl.marido.heads.oldmenu.mode.InvMode; +import nl.marido.heads.util.ArrayUtils; + public class ConfirmMenu extends AbstractModedInventory { private CacheHead subject; diff --git a/src/net/sothatsit/heads/oldmenu/HeadMenu.java b/src/nl/marido/heads/oldmenu/HeadMenu.java similarity index 92% rename from src/net/sothatsit/heads/oldmenu/HeadMenu.java rename to src/nl/marido/heads/oldmenu/HeadMenu.java index c1b9fef..8935657 100644 --- a/src/net/sothatsit/heads/oldmenu/HeadMenu.java +++ b/src/nl/marido/heads/oldmenu/HeadMenu.java @@ -1,15 +1,15 @@ -package net.sothatsit.heads.oldmenu; - -import net.sothatsit.heads.cache.CacheHead; -import net.sothatsit.heads.config.oldmenu.Menu; -import net.sothatsit.heads.config.lang.Placeholder; -import net.sothatsit.heads.oldmenu.mode.InvMode; -import net.sothatsit.heads.oldmenu.mode.SearchMode; -import net.sothatsit.heads.util.ArrayUtils; +package nl.marido.heads.oldmenu; import org.bukkit.entity.Player; import org.bukkit.inventory.ItemStack; +import nl.marido.heads.cache.CacheHead; +import nl.marido.heads.config.lang.Placeholder; +import nl.marido.heads.config.oldmenu.Menu; +import nl.marido.heads.oldmenu.mode.InvMode; +import nl.marido.heads.oldmenu.mode.SearchMode; +import nl.marido.heads.util.ArrayUtils; + import java.util.List; public class HeadMenu extends AbstractModedInventory { diff --git a/src/net/sothatsit/heads/oldmenu/InventoryType.java b/src/nl/marido/heads/oldmenu/InventoryType.java similarity index 96% rename from src/net/sothatsit/heads/oldmenu/InventoryType.java rename to src/nl/marido/heads/oldmenu/InventoryType.java index 92d43a6..c5619a9 100644 --- a/src/net/sothatsit/heads/oldmenu/InventoryType.java +++ b/src/nl/marido/heads/oldmenu/InventoryType.java @@ -1,8 +1,8 @@ -package net.sothatsit.heads.oldmenu; +package nl.marido.heads.oldmenu; import java.lang.reflect.Constructor; -import net.sothatsit.heads.oldmenu.mode.InvMode; +import nl.marido.heads.oldmenu.mode.InvMode; public enum InventoryType { diff --git a/src/net/sothatsit/heads/oldmenu/mode/BaseMode.java b/src/nl/marido/heads/oldmenu/mode/BaseMode.java similarity index 90% rename from src/net/sothatsit/heads/oldmenu/mode/BaseMode.java rename to src/nl/marido/heads/oldmenu/mode/BaseMode.java index 7f7ddf6..285082a 100644 --- a/src/net/sothatsit/heads/oldmenu/mode/BaseMode.java +++ b/src/nl/marido/heads/oldmenu/mode/BaseMode.java @@ -1,14 +1,14 @@ -package net.sothatsit.heads.oldmenu.mode; - -import net.sothatsit.heads.cache.CacheHead; -import net.sothatsit.heads.oldmenu.CategorySelectMenu; -import net.sothatsit.heads.oldmenu.ConfirmMenu; -import net.sothatsit.heads.oldmenu.HeadMenu; -import net.sothatsit.heads.oldmenu.InventoryType; +package nl.marido.heads.oldmenu.mode; import org.bukkit.entity.Player; import org.bukkit.event.inventory.InventoryClickEvent; +import nl.marido.heads.cache.CacheHead; +import nl.marido.heads.oldmenu.CategorySelectMenu; +import nl.marido.heads.oldmenu.ConfirmMenu; +import nl.marido.heads.oldmenu.HeadMenu; +import nl.marido.heads.oldmenu.InventoryType; + public abstract class BaseMode extends InvMode { public BaseMode(Player player) { diff --git a/src/net/sothatsit/heads/oldmenu/mode/CategoryCostMode.java b/src/nl/marido/heads/oldmenu/mode/CategoryCostMode.java similarity index 76% rename from src/net/sothatsit/heads/oldmenu/mode/CategoryCostMode.java rename to src/nl/marido/heads/oldmenu/mode/CategoryCostMode.java index d52fd73..15361ee 100644 --- a/src/net/sothatsit/heads/oldmenu/mode/CategoryCostMode.java +++ b/src/nl/marido/heads/oldmenu/mode/CategoryCostMode.java @@ -1,16 +1,17 @@ -package net.sothatsit.heads.oldmenu.mode; +package nl.marido.heads.oldmenu.mode; import net.md_5.bungee.api.ChatColor; -import net.sothatsit.heads.Heads; -import net.sothatsit.heads.config.oldmenu.Menus; -import net.sothatsit.heads.cache.CacheHead; -import net.sothatsit.heads.config.oldmenu.Menu; -import net.sothatsit.heads.config.lang.Placeholder; -import net.sothatsit.heads.config.lang.Lang; -import net.sothatsit.heads.oldmenu.ConfirmMenu; -import net.sothatsit.heads.oldmenu.HeadMenu; -import net.sothatsit.heads.oldmenu.InventoryType; -import net.sothatsit.heads.util.ArrayUtils; +import nl.marido.heads.Heads; +import nl.marido.heads.cache.CacheHead; +import nl.marido.heads.config.lang.Lang; +import nl.marido.heads.config.lang.Placeholder; +import nl.marido.heads.config.oldmenu.Menu; +import nl.marido.heads.config.oldmenu.Menus; +import nl.marido.heads.oldmenu.ConfirmMenu; +import nl.marido.heads.oldmenu.HeadMenu; +import nl.marido.heads.oldmenu.InventoryType; +import nl.marido.heads.util.ArrayUtils; + import org.bukkit.entity.Player; import org.bukkit.event.inventory.InventoryClickEvent; diff --git a/src/net/sothatsit/heads/oldmenu/mode/CategoryCostRemoveMode.java b/src/nl/marido/heads/oldmenu/mode/CategoryCostRemoveMode.java similarity index 76% rename from src/net/sothatsit/heads/oldmenu/mode/CategoryCostRemoveMode.java rename to src/nl/marido/heads/oldmenu/mode/CategoryCostRemoveMode.java index 8730960..ec3ef1a 100644 --- a/src/net/sothatsit/heads/oldmenu/mode/CategoryCostRemoveMode.java +++ b/src/nl/marido/heads/oldmenu/mode/CategoryCostRemoveMode.java @@ -1,16 +1,17 @@ -package net.sothatsit.heads.oldmenu.mode; +package nl.marido.heads.oldmenu.mode; import net.md_5.bungee.api.ChatColor; -import net.sothatsit.heads.Heads; -import net.sothatsit.heads.config.oldmenu.Menus; -import net.sothatsit.heads.cache.CacheHead; -import net.sothatsit.heads.config.oldmenu.Menu; -import net.sothatsit.heads.config.lang.Placeholder; -import net.sothatsit.heads.config.lang.Lang; -import net.sothatsit.heads.oldmenu.ConfirmMenu; -import net.sothatsit.heads.oldmenu.HeadMenu; -import net.sothatsit.heads.oldmenu.InventoryType; -import net.sothatsit.heads.util.ArrayUtils; +import nl.marido.heads.Heads; +import nl.marido.heads.cache.CacheHead; +import nl.marido.heads.config.lang.Lang; +import nl.marido.heads.config.lang.Placeholder; +import nl.marido.heads.config.oldmenu.Menu; +import nl.marido.heads.config.oldmenu.Menus; +import nl.marido.heads.oldmenu.ConfirmMenu; +import nl.marido.heads.oldmenu.HeadMenu; +import nl.marido.heads.oldmenu.InventoryType; +import nl.marido.heads.util.ArrayUtils; + import org.bukkit.entity.Player; import org.bukkit.event.inventory.InventoryClickEvent; diff --git a/src/net/sothatsit/heads/oldmenu/mode/CostMode.java b/src/nl/marido/heads/oldmenu/mode/CostMode.java similarity index 70% rename from src/net/sothatsit/heads/oldmenu/mode/CostMode.java rename to src/nl/marido/heads/oldmenu/mode/CostMode.java index 537e796..84676c0 100644 --- a/src/net/sothatsit/heads/oldmenu/mode/CostMode.java +++ b/src/nl/marido/heads/oldmenu/mode/CostMode.java @@ -1,19 +1,19 @@ -package net.sothatsit.heads.oldmenu.mode; - -import net.sothatsit.heads.Heads; -import net.sothatsit.heads.config.oldmenu.Menus; -import net.sothatsit.heads.cache.CacheHead; -import net.sothatsit.heads.config.oldmenu.Menu; -import net.sothatsit.heads.config.lang.Placeholder; -import net.sothatsit.heads.config.lang.Lang; -import net.sothatsit.heads.oldmenu.ConfirmMenu; -import net.sothatsit.heads.oldmenu.HeadMenu; -import net.sothatsit.heads.oldmenu.InventoryType; -import net.sothatsit.heads.util.ArrayUtils; +package nl.marido.heads.oldmenu.mode; import org.bukkit.entity.Player; import org.bukkit.event.inventory.InventoryClickEvent; +import nl.marido.heads.Heads; +import nl.marido.heads.cache.CacheHead; +import nl.marido.heads.config.lang.Lang; +import nl.marido.heads.config.lang.Placeholder; +import nl.marido.heads.config.oldmenu.Menu; +import nl.marido.heads.config.oldmenu.Menus; +import nl.marido.heads.oldmenu.ConfirmMenu; +import nl.marido.heads.oldmenu.HeadMenu; +import nl.marido.heads.oldmenu.InventoryType; +import nl.marido.heads.util.ArrayUtils; + public class CostMode extends BaseMode { private Double cost = null; diff --git a/src/net/sothatsit/heads/oldmenu/mode/GetMode.java b/src/nl/marido/heads/oldmenu/mode/GetMode.java similarity index 71% rename from src/net/sothatsit/heads/oldmenu/mode/GetMode.java rename to src/nl/marido/heads/oldmenu/mode/GetMode.java index de863bc..51ce487 100644 --- a/src/net/sothatsit/heads/oldmenu/mode/GetMode.java +++ b/src/nl/marido/heads/oldmenu/mode/GetMode.java @@ -1,16 +1,16 @@ -package net.sothatsit.heads.oldmenu.mode; +package nl.marido.heads.oldmenu.mode; import org.bukkit.entity.Player; import org.bukkit.event.inventory.InventoryClickEvent; -import net.sothatsit.heads.Heads; -import net.sothatsit.heads.cache.CacheHead; -import net.sothatsit.heads.config.lang.Lang; -import net.sothatsit.heads.config.oldmenu.Menu; -import net.sothatsit.heads.config.oldmenu.Menus; -import net.sothatsit.heads.oldmenu.ConfirmMenu; -import net.sothatsit.heads.oldmenu.HeadMenu; -import net.sothatsit.heads.oldmenu.InventoryType; +import nl.marido.heads.Heads; +import nl.marido.heads.cache.CacheHead; +import nl.marido.heads.config.lang.Lang; +import nl.marido.heads.config.oldmenu.Menu; +import nl.marido.heads.config.oldmenu.Menus; +import nl.marido.heads.oldmenu.ConfirmMenu; +import nl.marido.heads.oldmenu.HeadMenu; +import nl.marido.heads.oldmenu.InventoryType; public class GetMode extends BaseMode { diff --git a/src/net/sothatsit/heads/oldmenu/mode/IdMode.java b/src/nl/marido/heads/oldmenu/mode/IdMode.java similarity index 68% rename from src/net/sothatsit/heads/oldmenu/mode/IdMode.java rename to src/nl/marido/heads/oldmenu/mode/IdMode.java index 89d47da..8f72e2b 100644 --- a/src/net/sothatsit/heads/oldmenu/mode/IdMode.java +++ b/src/nl/marido/heads/oldmenu/mode/IdMode.java @@ -1,16 +1,16 @@ -package net.sothatsit.heads.oldmenu.mode; - -import net.sothatsit.heads.config.oldmenu.Menus; -import net.sothatsit.heads.cache.CacheHead; -import net.sothatsit.heads.config.oldmenu.Menu; -import net.sothatsit.heads.config.lang.Lang; -import net.sothatsit.heads.oldmenu.ConfirmMenu; -import net.sothatsit.heads.oldmenu.HeadMenu; -import net.sothatsit.heads.oldmenu.InventoryType; +package nl.marido.heads.oldmenu.mode; import org.bukkit.entity.Player; import org.bukkit.event.inventory.InventoryClickEvent; +import nl.marido.heads.cache.CacheHead; +import nl.marido.heads.config.lang.Lang; +import nl.marido.heads.config.oldmenu.Menu; +import nl.marido.heads.config.oldmenu.Menus; +import nl.marido.heads.oldmenu.ConfirmMenu; +import nl.marido.heads.oldmenu.HeadMenu; +import nl.marido.heads.oldmenu.InventoryType; + public class IdMode extends BaseMode { public IdMode(Player player) { diff --git a/src/net/sothatsit/heads/oldmenu/mode/InvMode.java b/src/nl/marido/heads/oldmenu/mode/InvMode.java similarity index 87% rename from src/net/sothatsit/heads/oldmenu/mode/InvMode.java rename to src/nl/marido/heads/oldmenu/mode/InvMode.java index 04913dc..38b4877 100644 --- a/src/net/sothatsit/heads/oldmenu/mode/InvMode.java +++ b/src/nl/marido/heads/oldmenu/mode/InvMode.java @@ -1,12 +1,12 @@ -package net.sothatsit.heads.oldmenu.mode; - -import net.sothatsit.heads.config.oldmenu.Menu; -import net.sothatsit.heads.oldmenu.AbstractModedInventory; -import net.sothatsit.heads.oldmenu.InventoryType; +package nl.marido.heads.oldmenu.mode; import org.bukkit.entity.Player; import org.bukkit.event.inventory.InventoryClickEvent; +import nl.marido.heads.config.oldmenu.Menu; +import nl.marido.heads.oldmenu.AbstractModedInventory; +import nl.marido.heads.oldmenu.InventoryType; + public abstract class InvMode { private AbstractModedInventory inventory; diff --git a/src/net/sothatsit/heads/oldmenu/mode/InvModeType.java b/src/nl/marido/heads/oldmenu/mode/InvModeType.java similarity index 94% rename from src/net/sothatsit/heads/oldmenu/mode/InvModeType.java rename to src/nl/marido/heads/oldmenu/mode/InvModeType.java index f81c1b9..9fcdad0 100644 --- a/src/net/sothatsit/heads/oldmenu/mode/InvModeType.java +++ b/src/nl/marido/heads/oldmenu/mode/InvModeType.java @@ -1,4 +1,4 @@ -package net.sothatsit.heads.oldmenu.mode; +package nl.marido.heads.oldmenu.mode; import org.bukkit.entity.Player; diff --git a/src/net/sothatsit/heads/oldmenu/mode/RemoveMode.java b/src/nl/marido/heads/oldmenu/mode/RemoveMode.java similarity index 69% rename from src/net/sothatsit/heads/oldmenu/mode/RemoveMode.java rename to src/nl/marido/heads/oldmenu/mode/RemoveMode.java index b2f19f2..196d69d 100644 --- a/src/net/sothatsit/heads/oldmenu/mode/RemoveMode.java +++ b/src/nl/marido/heads/oldmenu/mode/RemoveMode.java @@ -1,17 +1,17 @@ -package net.sothatsit.heads.oldmenu.mode; - -import net.sothatsit.heads.Heads; -import net.sothatsit.heads.config.oldmenu.Menus; -import net.sothatsit.heads.cache.CacheHead; -import net.sothatsit.heads.config.oldmenu.Menu; -import net.sothatsit.heads.config.lang.Lang; -import net.sothatsit.heads.oldmenu.ConfirmMenu; -import net.sothatsit.heads.oldmenu.HeadMenu; -import net.sothatsit.heads.oldmenu.InventoryType; +package nl.marido.heads.oldmenu.mode; import org.bukkit.entity.Player; import org.bukkit.event.inventory.InventoryClickEvent; +import nl.marido.heads.Heads; +import nl.marido.heads.cache.CacheHead; +import nl.marido.heads.config.lang.Lang; +import nl.marido.heads.config.oldmenu.Menu; +import nl.marido.heads.config.oldmenu.Menus; +import nl.marido.heads.oldmenu.ConfirmMenu; +import nl.marido.heads.oldmenu.HeadMenu; +import nl.marido.heads.oldmenu.InventoryType; + public class RemoveMode extends BaseMode { public RemoveMode(Player player) { diff --git a/src/net/sothatsit/heads/oldmenu/mode/RenameMode.java b/src/nl/marido/heads/oldmenu/mode/RenameMode.java similarity index 70% rename from src/net/sothatsit/heads/oldmenu/mode/RenameMode.java rename to src/nl/marido/heads/oldmenu/mode/RenameMode.java index f497984..6490b76 100644 --- a/src/net/sothatsit/heads/oldmenu/mode/RenameMode.java +++ b/src/nl/marido/heads/oldmenu/mode/RenameMode.java @@ -1,19 +1,19 @@ -package net.sothatsit.heads.oldmenu.mode; - -import net.sothatsit.heads.Heads; -import net.sothatsit.heads.config.oldmenu.Menus; -import net.sothatsit.heads.cache.CacheHead; -import net.sothatsit.heads.config.oldmenu.Menu; -import net.sothatsit.heads.config.lang.Placeholder; -import net.sothatsit.heads.config.lang.Lang; -import net.sothatsit.heads.oldmenu.ConfirmMenu; -import net.sothatsit.heads.oldmenu.HeadMenu; -import net.sothatsit.heads.oldmenu.InventoryType; -import net.sothatsit.heads.util.ArrayUtils; +package nl.marido.heads.oldmenu.mode; import org.bukkit.entity.Player; import org.bukkit.event.inventory.InventoryClickEvent; +import nl.marido.heads.Heads; +import nl.marido.heads.cache.CacheHead; +import nl.marido.heads.config.lang.Lang; +import nl.marido.heads.config.lang.Placeholder; +import nl.marido.heads.config.oldmenu.Menu; +import nl.marido.heads.config.oldmenu.Menus; +import nl.marido.heads.oldmenu.ConfirmMenu; +import nl.marido.heads.oldmenu.HeadMenu; +import nl.marido.heads.oldmenu.InventoryType; +import nl.marido.heads.util.ArrayUtils; + public class RenameMode extends BaseMode { private String name = null; diff --git a/src/net/sothatsit/heads/oldmenu/mode/SearchMode.java b/src/nl/marido/heads/oldmenu/mode/SearchMode.java similarity index 77% rename from src/net/sothatsit/heads/oldmenu/mode/SearchMode.java rename to src/nl/marido/heads/oldmenu/mode/SearchMode.java index d0c848a..5e7211c 100644 --- a/src/net/sothatsit/heads/oldmenu/mode/SearchMode.java +++ b/src/nl/marido/heads/oldmenu/mode/SearchMode.java @@ -1,18 +1,18 @@ -package net.sothatsit.heads.oldmenu.mode; +package nl.marido.heads.oldmenu.mode; import java.util.List; import org.bukkit.entity.Player; import org.bukkit.event.inventory.InventoryClickEvent; -import net.sothatsit.heads.Heads; -import net.sothatsit.heads.cache.CacheHead; -import net.sothatsit.heads.config.lang.Lang; -import net.sothatsit.heads.config.oldmenu.Menu; -import net.sothatsit.heads.config.oldmenu.Menus; -import net.sothatsit.heads.oldmenu.ConfirmMenu; -import net.sothatsit.heads.oldmenu.HeadMenu; -import net.sothatsit.heads.oldmenu.InventoryType; +import nl.marido.heads.Heads; +import nl.marido.heads.cache.CacheHead; +import nl.marido.heads.config.lang.Lang; +import nl.marido.heads.config.oldmenu.Menu; +import nl.marido.heads.config.oldmenu.Menus; +import nl.marido.heads.oldmenu.ConfirmMenu; +import nl.marido.heads.oldmenu.HeadMenu; +import nl.marido.heads.oldmenu.InventoryType; public class SearchMode extends BaseMode { diff --git a/src/net/sothatsit/heads/patches/HeadPlace.java b/src/nl/marido/heads/patches/HeadPlace.java similarity index 71% rename from src/net/sothatsit/heads/patches/HeadPlace.java rename to src/nl/marido/heads/patches/HeadPlace.java index fbdc5b9..454f988 100644 --- a/src/net/sothatsit/heads/patches/HeadPlace.java +++ b/src/nl/marido/heads/patches/HeadPlace.java @@ -1,10 +1,10 @@ -package net.sothatsit.heads.patches; +package nl.marido.heads.patches; import org.bukkit.event.EventHandler; import org.bukkit.event.Listener; import org.bukkit.event.block.BlockPlaceEvent; -import net.sothatsit.heads.volatilecode.reflection.Version; +import nl.marido.heads.volatilecode.reflection.Version; public class HeadPlace implements Listener { diff --git a/src/net/sothatsit/heads/util/ArrayUtils.java b/src/nl/marido/heads/util/ArrayUtils.java similarity index 94% rename from src/net/sothatsit/heads/util/ArrayUtils.java rename to src/nl/marido/heads/util/ArrayUtils.java index 5fc2414..a2f0c30 100644 --- a/src/net/sothatsit/heads/util/ArrayUtils.java +++ b/src/nl/marido/heads/util/ArrayUtils.java @@ -1,4 +1,4 @@ -package net.sothatsit.heads.util; +package nl.marido.heads.util; import java.util.Arrays; diff --git a/src/net/sothatsit/heads/util/Checks.java b/src/nl/marido/heads/util/Checks.java similarity index 95% rename from src/net/sothatsit/heads/util/Checks.java rename to src/nl/marido/heads/util/Checks.java index 7696f1b..ac6dde0 100644 --- a/src/net/sothatsit/heads/util/Checks.java +++ b/src/nl/marido/heads/util/Checks.java @@ -1,4 +1,4 @@ -package net.sothatsit.heads.util; +package nl.marido.heads.util; public class Checks { diff --git a/src/net/sothatsit/heads/util/Clock.java b/src/nl/marido/heads/util/Clock.java similarity index 96% rename from src/net/sothatsit/heads/util/Clock.java rename to src/nl/marido/heads/util/Clock.java index eb435de..4e5feb1 100644 --- a/src/net/sothatsit/heads/util/Clock.java +++ b/src/nl/marido/heads/util/Clock.java @@ -1,4 +1,4 @@ -package net.sothatsit.heads.util; +package nl.marido.heads.util; import java.text.DecimalFormat; diff --git a/src/net/sothatsit/heads/util/ExceptionDetailer.java b/src/nl/marido/heads/util/ExceptionDetailer.java similarity index 97% rename from src/net/sothatsit/heads/util/ExceptionDetailer.java rename to src/nl/marido/heads/util/ExceptionDetailer.java index 3e40f7c..8c533e9 100644 --- a/src/net/sothatsit/heads/util/ExceptionDetailer.java +++ b/src/nl/marido/heads/util/ExceptionDetailer.java @@ -1,4 +1,4 @@ -package net.sothatsit.heads.util; +package nl.marido.heads.util; public abstract class ExceptionDetailer { diff --git a/src/net/sothatsit/heads/util/IOUtils.java b/src/nl/marido/heads/util/IOUtils.java similarity index 98% rename from src/net/sothatsit/heads/util/IOUtils.java rename to src/nl/marido/heads/util/IOUtils.java index 540da98..9b7a40a 100644 --- a/src/net/sothatsit/heads/util/IOUtils.java +++ b/src/nl/marido/heads/util/IOUtils.java @@ -1,4 +1,4 @@ -package net.sothatsit.heads.util; +package nl.marido.heads.util; import java.io.IOException; import java.io.ObjectInputStream; diff --git a/src/net/sothatsit/heads/util/SafeCall.java b/src/nl/marido/heads/util/SafeCall.java similarity index 99% rename from src/net/sothatsit/heads/util/SafeCall.java rename to src/nl/marido/heads/util/SafeCall.java index 1064d1f..40493fa 100644 --- a/src/net/sothatsit/heads/util/SafeCall.java +++ b/src/nl/marido/heads/util/SafeCall.java @@ -1,4 +1,4 @@ -package net.sothatsit.heads.util; +package nl.marido.heads.util; import com.google.common.base.Predicate; diff --git a/src/net/sothatsit/heads/util/Stringify.java b/src/nl/marido/heads/util/Stringify.java similarity index 99% rename from src/net/sothatsit/heads/util/Stringify.java rename to src/nl/marido/heads/util/Stringify.java index 21e4356..c6e1e82 100644 --- a/src/net/sothatsit/heads/util/Stringify.java +++ b/src/nl/marido/heads/util/Stringify.java @@ -1,4 +1,4 @@ -package net.sothatsit.heads.util; +package nl.marido.heads.util; import org.bukkit.entity.Player; import org.bukkit.inventory.Inventory; diff --git a/src/nl/marido/heads/volatilecode/ItemNBT.java b/src/nl/marido/heads/volatilecode/ItemNBT.java new file mode 100644 index 0000000..5665599 --- /dev/null +++ b/src/nl/marido/heads/volatilecode/ItemNBT.java @@ -0,0 +1,235 @@ +package nl.marido.heads.volatilecode; + +import java.util.UUID; + +import org.bukkit.Bukkit; +import org.bukkit.ChatColor; +import org.bukkit.enchantments.Enchantment; +import org.bukkit.inventory.ItemFlag; +import org.bukkit.inventory.meta.ItemMeta; + +import com.mojang.authlib.GameProfile; +import com.mojang.authlib.properties.Property; + +import net.md_5.bungee.api.chat.TextComponent; +import net.md_5.bungee.chat.ComponentSerializer; +import nl.marido.heads.cache.CacheHead; +import nl.marido.heads.volatilecode.reflection.Version; +import nl.marido.heads.volatilecode.reflection.craftbukkit.CraftItemStack; +import nl.marido.heads.volatilecode.reflection.nms.ItemStack; +import nl.marido.heads.volatilecode.reflection.nms.nbt.NBTTagCompound; +import nl.marido.heads.volatilecode.reflection.nms.nbt.NBTTagList; +import nl.marido.heads.volatilecode.reflection.nms.nbt.NBTTagString; + +public class ItemNBT { + + public static org.bukkit.inventory.ItemStack addGlow(org.bukkit.inventory.ItemStack itemstack) { + itemstack = itemstack.clone(); + + if (Version.getVersion().higherThan(Version.v1_10)) { + itemstack.addUnsafeEnchantment(Enchantment.LURE, 1); + + ItemMeta meta = itemstack.getItemMeta(); + meta.addItemFlags(ItemFlag.HIDE_ENCHANTS); + itemstack.setItemMeta(meta); + + return itemstack; + } else { + ItemStack item = CraftItemStack.asNMSCopy(itemstack); + + NBTTagCompound tag = item.getTag(); + + if (tag.isNull()) + tag = new NBTTagCompound(); + + tag.set("ench", new NBTTagList()); + + item.setTag(tag); + + return CraftItemStack.asBukkitCopy(item); + } + } + + public static String getTextureProperty(org.bukkit.inventory.ItemStack item) { + return getTextureProperty(CraftItemStack.asNMSCopy(item)); + } + + public static String getTextureProperty(ItemStack item) { + NBTTagCompound tag = item.getTag(); + + if (tag == null || tag.getHandle() == null) { + return null; + } + + NBTTagCompound skullOwner = tag.getCompound("SkullOwner"); + + if (skullOwner == null || skullOwner.getHandle() == null) { + return null; + } + + NBTTagCompound properties = skullOwner.getCompound("Properties"); + + if (properties == null || properties.getHandle() == null) { + return null; + } + + NBTTagList textures = properties.getList("textures", 10); + + if (/*textures == null || */textures.getHandle() == null || textures.size() == 0 || textures.isNull()) { + return null; + } + + return textures.get(0).getString("Value"); + } + + private static ItemStack createNMSSkull() { + if (Version.isBelow(Version.v1_13)) + return new ItemStack(nl.marido.heads.volatilecode.reflection.nms.Items.getItem("SKULL"), 1, 3); + + return new ItemStack(nl.marido.heads.volatilecode.reflection.nms.Items.getItem("PLAYER_HEAD"), 1); + } + + public static org.bukkit.inventory.ItemStack createHead(CacheHead head, String name) { + if (name == null) { + name = ChatColor.GRAY + head.getName(); + } + + ItemStack nmsItemstack = createNMSSkull(); + NBTTagCompound tag = nmsItemstack.getTag(); + + if (tag.getHandle() == null) { + tag = new NBTTagCompound(); + + nmsItemstack.setTag(tag); + } + + tag.set("display", createDisplayTag(name, new String[] { ChatColor.DARK_GRAY + head.getCategory() })); + + return CraftItemStack.asBukkitCopy(applyNBT(head, nmsItemstack)); + } + + public static org.bukkit.inventory.ItemStack createHead(GameProfile profile, String name) { + ItemStack nmsItemstack = createNMSSkull(); + NBTTagCompound tag = nmsItemstack.getTag(); + + if (tag.getHandle() == null) { + tag = new NBTTagCompound(); + + nmsItemstack.setTag(tag); + } + + NBTTagCompound skullOwner = tag.getCompound("SkullOwner"); + skullOwner.setString("Id", UUID.randomUUID().toString()); + skullOwner.setString("Name", "SpigotHeadPlugin"); + + NBTTagCompound properties = skullOwner.getCompound("Properties"); + NBTTagList textures = new NBTTagList(); + + for (Property property : profile.getProperties().get("textures")) { + NBTTagCompound value = new NBTTagCompound(); + value.setString("Value", property.getValue()); + + if (property.hasSignature()) { + value.setString("Signature", property.getSignature()); + } + + textures.add(value); + } + + properties.set("textures", textures); + skullOwner.set("Properties", properties); + tag.set("SkullOwner", skullOwner); + + tag.set("display", createDisplayTag(name, new String[0])); + + nmsItemstack.setTag(tag); + + return CraftItemStack.asBukkitCopy(nmsItemstack); + } + + public static NBTTagCompound createDisplayTag(String name, String[] lore) { + NBTTagCompound display = new NBTTagCompound(); + + if (Version.isBelow(Version.v1_13)) { + display.setString("Name", name); + + NBTTagList list = new NBTTagList(); + for (String line : lore) { + list.add(new NBTTagString(line)); + } + + display.set("Lore", list); + } else { + display.setString("Name", ComponentSerializer.toString(TextComponent.fromLegacyText(name))); + + NBTTagList list = new NBTTagList(); + for (String line : lore) { + list.add(new NBTTagString(ComponentSerializer.toString(TextComponent.fromLegacyText(line)))); + } + + display.set("Lore", list); + } + + return display; + } + + public static org.bukkit.inventory.ItemStack applyHead(CacheHead head, org.bukkit.inventory.ItemStack item) { + if (!Items.isSkull(item)) + return item; + + ItemStack itemstack = CraftItemStack.asNMSCopy(item); + + return CraftItemStack.asBukkitCopy(applyNBT(head, itemstack)); + } + + private static ItemStack copy(ItemStack itemstack) { + return CraftItemStack.asNMSCopy(CraftItemStack.asBukkitCopy(itemstack)); + } + + public static ItemStack applyNBT(CacheHead head, ItemStack itemstack) { + itemstack = copy(itemstack); + NBTTagCompound tag = itemstack.getTag(); + + if (tag.getHandle() == null) { + tag = new NBTTagCompound(); + + itemstack.setTag(tag); + } + + NBTTagCompound skullOwner = tag.getCompound("SkullOwner"); + skullOwner.setString("Id", UUID.randomUUID().toString()); + skullOwner.setString("Name", "SpigotHeadPlugin"); + + NBTTagCompound properties = skullOwner.getCompound("Properties"); + NBTTagList textures = new NBTTagList(); + + NBTTagCompound value = new NBTTagCompound(); + value.setString("Value", head.getTexture()); + + if (Bukkit.getPluginManager().getPlugin("SkinsRestorer") == null) { + value.setString("Signature", ""); + } + + textures.add(value); + + properties.set("textures", textures); + skullOwner.set("Properties", properties); + tag.set("SkullOwner", skullOwner); + + NBTTagCompound headInfo = new NBTTagCompound(); + + headInfo.setString("id", Integer.toString(head.getId())); + headInfo.setString("name", head.getName()); + headInfo.setString("category", head.getCategory()); + headInfo.setString("texture", head.getTexture()); + headInfo.setString("cost", Double.toString(head.getCost())); + headInfo.setString("permission", head.getPermission()); + + tag.set("SpigotHeadPlugin", headInfo); + + itemstack.setTag(tag); + + return itemstack; + } + +} diff --git a/src/net/sothatsit/heads/volatilecode/Items.java b/src/nl/marido/heads/volatilecode/Items.java similarity index 91% rename from src/net/sothatsit/heads/volatilecode/Items.java rename to src/nl/marido/heads/volatilecode/Items.java index fce37f0..66e6b90 100644 --- a/src/net/sothatsit/heads/volatilecode/Items.java +++ b/src/nl/marido/heads/volatilecode/Items.java @@ -1,10 +1,10 @@ -package net.sothatsit.heads.volatilecode; +package nl.marido.heads.volatilecode; import org.bukkit.Material; import org.bukkit.inventory.ItemStack; -import net.sothatsit.heads.menu.ui.item.Item; -import net.sothatsit.heads.volatilecode.reflection.Version; +import nl.marido.heads.menu.ui.item.Item; +import nl.marido.heads.volatilecode.reflection.Version; /** * Methods to deal with items on different Spigot versions. diff --git a/src/net/sothatsit/heads/volatilecode/TextureGetter.java b/src/nl/marido/heads/volatilecode/TextureGetter.java similarity index 85% rename from src/net/sothatsit/heads/volatilecode/TextureGetter.java rename to src/nl/marido/heads/volatilecode/TextureGetter.java index 05e3989..41a68b7 100644 --- a/src/net/sothatsit/heads/volatilecode/TextureGetter.java +++ b/src/nl/marido/heads/volatilecode/TextureGetter.java @@ -1,13 +1,14 @@ -package net.sothatsit.heads.volatilecode; +package nl.marido.heads.volatilecode; import com.mojang.authlib.GameProfile; import com.mojang.authlib.properties.Property; import com.mojang.authlib.properties.PropertyMap; -import net.sothatsit.heads.Heads; -import net.sothatsit.heads.util.Checks; -import net.sothatsit.heads.util.SafeCall; -import net.sothatsit.heads.volatilecode.reflection.nms.MinecraftServer; -import net.sothatsit.heads.volatilecode.reflection.nms.TileEntitySkull; + +import nl.marido.heads.Heads; +import nl.marido.heads.util.Checks; +import nl.marido.heads.util.SafeCall; +import nl.marido.heads.volatilecode.reflection.nms.MinecraftServer; +import nl.marido.heads.volatilecode.reflection.nms.TileEntitySkull; import java.util.Iterator; import java.util.function.Consumer; diff --git a/src/net/sothatsit/heads/volatilecode/injection/ProtocolHackFixer.java b/src/nl/marido/heads/volatilecode/injection/ProtocolHackFixer.java similarity index 77% rename from src/net/sothatsit/heads/volatilecode/injection/ProtocolHackFixer.java rename to src/nl/marido/heads/volatilecode/injection/ProtocolHackFixer.java index debe39c..654180b 100644 --- a/src/net/sothatsit/heads/volatilecode/injection/ProtocolHackFixer.java +++ b/src/nl/marido/heads/volatilecode/injection/ProtocolHackFixer.java @@ -1,12 +1,12 @@ -package net.sothatsit.heads.volatilecode.injection; +package nl.marido.heads.volatilecode.injection; import java.util.concurrent.Executor; import javax.annotation.Nonnull; -import net.sothatsit.heads.volatilecode.reflection.Version; -import net.sothatsit.heads.volatilecode.reflection.craftbukkit.CraftMetaSkullSub1; -import net.sothatsit.heads.volatilecode.reflection.nms.TileEntitySkull; +import nl.marido.heads.volatilecode.reflection.Version; +import nl.marido.heads.volatilecode.reflection.craftbukkit.CraftMetaSkullSub1; +import nl.marido.heads.volatilecode.reflection.nms.TileEntitySkull; public class ProtocolHackFixer { diff --git a/src/net/sothatsit/heads/volatilecode/reflection/ReflectObject.java b/src/nl/marido/heads/volatilecode/reflection/ReflectObject.java similarity index 85% rename from src/net/sothatsit/heads/volatilecode/reflection/ReflectObject.java rename to src/nl/marido/heads/volatilecode/reflection/ReflectObject.java index 0255b9b..472a45b 100644 --- a/src/net/sothatsit/heads/volatilecode/reflection/ReflectObject.java +++ b/src/nl/marido/heads/volatilecode/reflection/ReflectObject.java @@ -1,4 +1,4 @@ -package net.sothatsit.heads.volatilecode.reflection; +package nl.marido.heads.volatilecode.reflection; public abstract class ReflectObject { diff --git a/src/net/sothatsit/heads/volatilecode/reflection/ReflectionUtils.java b/src/nl/marido/heads/volatilecode/reflection/ReflectionUtils.java similarity index 98% rename from src/net/sothatsit/heads/volatilecode/reflection/ReflectionUtils.java rename to src/nl/marido/heads/volatilecode/reflection/ReflectionUtils.java index 4e1446c..af8b664 100644 --- a/src/net/sothatsit/heads/volatilecode/reflection/ReflectionUtils.java +++ b/src/nl/marido/heads/volatilecode/reflection/ReflectionUtils.java @@ -1,4 +1,4 @@ -package net.sothatsit.heads.volatilecode.reflection; +package nl.marido.heads.volatilecode.reflection; import java.lang.reflect.Constructor; import java.lang.reflect.Method; diff --git a/src/net/sothatsit/heads/volatilecode/reflection/Version.java b/src/nl/marido/heads/volatilecode/reflection/Version.java similarity index 97% rename from src/net/sothatsit/heads/volatilecode/reflection/Version.java rename to src/nl/marido/heads/volatilecode/reflection/Version.java index 6a9f25f..f2a5fd4 100644 --- a/src/net/sothatsit/heads/volatilecode/reflection/Version.java +++ b/src/nl/marido/heads/volatilecode/reflection/Version.java @@ -1,4 +1,4 @@ -package net.sothatsit.heads.volatilecode.reflection; +package nl.marido.heads.volatilecode.reflection; public class Version { diff --git a/src/net/sothatsit/heads/volatilecode/reflection/craftbukkit/CommandMap.java b/src/nl/marido/heads/volatilecode/reflection/craftbukkit/CommandMap.java similarity index 93% rename from src/net/sothatsit/heads/volatilecode/reflection/craftbukkit/CommandMap.java rename to src/nl/marido/heads/volatilecode/reflection/craftbukkit/CommandMap.java index e932df9..d7d6e41 100644 --- a/src/net/sothatsit/heads/volatilecode/reflection/craftbukkit/CommandMap.java +++ b/src/nl/marido/heads/volatilecode/reflection/craftbukkit/CommandMap.java @@ -1,4 +1,4 @@ -package net.sothatsit.heads.volatilecode.reflection.craftbukkit; +package nl.marido.heads.volatilecode.reflection.craftbukkit; import java.lang.reflect.Field; import java.util.Map; diff --git a/src/net/sothatsit/heads/volatilecode/reflection/craftbukkit/CraftItemStack.java b/src/nl/marido/heads/volatilecode/reflection/craftbukkit/CraftItemStack.java similarity index 83% rename from src/net/sothatsit/heads/volatilecode/reflection/craftbukkit/CraftItemStack.java rename to src/nl/marido/heads/volatilecode/reflection/craftbukkit/CraftItemStack.java index ee038f6..abbb10e 100644 --- a/src/net/sothatsit/heads/volatilecode/reflection/craftbukkit/CraftItemStack.java +++ b/src/nl/marido/heads/volatilecode/reflection/craftbukkit/CraftItemStack.java @@ -1,10 +1,10 @@ -package net.sothatsit.heads.volatilecode.reflection.craftbukkit; +package nl.marido.heads.volatilecode.reflection.craftbukkit; import java.lang.reflect.Method; -import net.sothatsit.heads.volatilecode.reflection.ReflectObject; -import net.sothatsit.heads.volatilecode.reflection.ReflectionUtils; -import net.sothatsit.heads.volatilecode.reflection.nms.ItemStack; +import nl.marido.heads.volatilecode.reflection.ReflectObject; +import nl.marido.heads.volatilecode.reflection.ReflectionUtils; +import nl.marido.heads.volatilecode.reflection.nms.ItemStack; public class CraftItemStack extends ReflectObject { diff --git a/src/net/sothatsit/heads/volatilecode/reflection/craftbukkit/CraftMetaSkull.java b/src/nl/marido/heads/volatilecode/reflection/craftbukkit/CraftMetaSkull.java similarity index 79% rename from src/net/sothatsit/heads/volatilecode/reflection/craftbukkit/CraftMetaSkull.java rename to src/nl/marido/heads/volatilecode/reflection/craftbukkit/CraftMetaSkull.java index 02f54f5..b82f1c5 100644 --- a/src/net/sothatsit/heads/volatilecode/reflection/craftbukkit/CraftMetaSkull.java +++ b/src/nl/marido/heads/volatilecode/reflection/craftbukkit/CraftMetaSkull.java @@ -1,11 +1,12 @@ -package net.sothatsit.heads.volatilecode.reflection.craftbukkit; +package nl.marido.heads.volatilecode.reflection.craftbukkit; import java.lang.reflect.Field; import com.mojang.authlib.GameProfile; -import net.sothatsit.heads.util.Checks; -import net.sothatsit.heads.volatilecode.reflection.ReflectObject; -import net.sothatsit.heads.volatilecode.reflection.ReflectionUtils; + +import nl.marido.heads.util.Checks; +import nl.marido.heads.volatilecode.reflection.ReflectObject; +import nl.marido.heads.volatilecode.reflection.ReflectionUtils; public class CraftMetaSkull extends ReflectObject { diff --git a/src/net/sothatsit/heads/volatilecode/reflection/craftbukkit/CraftMetaSkullSub1.java b/src/nl/marido/heads/volatilecode/reflection/craftbukkit/CraftMetaSkullSub1.java similarity index 81% rename from src/net/sothatsit/heads/volatilecode/reflection/craftbukkit/CraftMetaSkullSub1.java rename to src/nl/marido/heads/volatilecode/reflection/craftbukkit/CraftMetaSkullSub1.java index 7e4015f..a417d93 100644 --- a/src/net/sothatsit/heads/volatilecode/reflection/craftbukkit/CraftMetaSkullSub1.java +++ b/src/nl/marido/heads/volatilecode/reflection/craftbukkit/CraftMetaSkullSub1.java @@ -1,11 +1,11 @@ -package net.sothatsit.heads.volatilecode.reflection.craftbukkit; +package nl.marido.heads.volatilecode.reflection.craftbukkit; import java.lang.reflect.Field; -import net.sothatsit.heads.util.Checks; -import net.sothatsit.heads.volatilecode.reflection.ReflectObject; -import net.sothatsit.heads.volatilecode.reflection.ReflectionUtils; -import net.sothatsit.heads.volatilecode.reflection.nms.nbt.NBTTagCompound; +import nl.marido.heads.util.Checks; +import nl.marido.heads.volatilecode.reflection.ReflectObject; +import nl.marido.heads.volatilecode.reflection.ReflectionUtils; +import nl.marido.heads.volatilecode.reflection.nms.nbt.NBTTagCompound; public class CraftMetaSkullSub1 extends ReflectObject { diff --git a/src/net/sothatsit/heads/volatilecode/reflection/craftbukkit/CraftServer.java b/src/nl/marido/heads/volatilecode/reflection/craftbukkit/CraftServer.java similarity index 82% rename from src/net/sothatsit/heads/volatilecode/reflection/craftbukkit/CraftServer.java rename to src/nl/marido/heads/volatilecode/reflection/craftbukkit/CraftServer.java index 1d96637..df5b883 100644 --- a/src/net/sothatsit/heads/volatilecode/reflection/craftbukkit/CraftServer.java +++ b/src/nl/marido/heads/volatilecode/reflection/craftbukkit/CraftServer.java @@ -1,14 +1,14 @@ -package net.sothatsit.heads.volatilecode.reflection.craftbukkit; +package nl.marido.heads.volatilecode.reflection.craftbukkit; import java.lang.reflect.Field; -import net.sothatsit.heads.util.Checks; -import net.sothatsit.heads.volatilecode.reflection.ReflectObject; -import net.sothatsit.heads.volatilecode.reflection.ReflectionUtils; - import org.bukkit.Bukkit; import org.bukkit.command.*; +import nl.marido.heads.util.Checks; +import nl.marido.heads.volatilecode.reflection.ReflectObject; +import nl.marido.heads.volatilecode.reflection.ReflectionUtils; + public class CraftServer extends ReflectObject { public static Class CraftServerClass; diff --git a/src/net/sothatsit/heads/volatilecode/reflection/nms/BlockPosition.java b/src/nl/marido/heads/volatilecode/reflection/nms/BlockPosition.java similarity index 81% rename from src/net/sothatsit/heads/volatilecode/reflection/nms/BlockPosition.java rename to src/nl/marido/heads/volatilecode/reflection/nms/BlockPosition.java index 3e91a55..e8cf56d 100644 --- a/src/net/sothatsit/heads/volatilecode/reflection/nms/BlockPosition.java +++ b/src/nl/marido/heads/volatilecode/reflection/nms/BlockPosition.java @@ -1,9 +1,9 @@ -package net.sothatsit.heads.volatilecode.reflection.nms; +package nl.marido.heads.volatilecode.reflection.nms; import java.lang.reflect.Constructor; -import net.sothatsit.heads.volatilecode.reflection.ReflectObject; -import net.sothatsit.heads.volatilecode.reflection.ReflectionUtils; +import nl.marido.heads.volatilecode.reflection.ReflectObject; +import nl.marido.heads.volatilecode.reflection.ReflectionUtils; public class BlockPosition extends ReflectObject { diff --git a/src/net/sothatsit/heads/volatilecode/reflection/nms/Item.java b/src/nl/marido/heads/volatilecode/reflection/nms/Item.java similarity index 55% rename from src/net/sothatsit/heads/volatilecode/reflection/nms/Item.java rename to src/nl/marido/heads/volatilecode/reflection/nms/Item.java index 8acb48d..bf6e23d 100644 --- a/src/net/sothatsit/heads/volatilecode/reflection/nms/Item.java +++ b/src/nl/marido/heads/volatilecode/reflection/nms/Item.java @@ -1,7 +1,7 @@ -package net.sothatsit.heads.volatilecode.reflection.nms; +package nl.marido.heads.volatilecode.reflection.nms; -import net.sothatsit.heads.volatilecode.reflection.ReflectObject; -import net.sothatsit.heads.volatilecode.reflection.ReflectionUtils; +import nl.marido.heads.volatilecode.reflection.ReflectObject; +import nl.marido.heads.volatilecode.reflection.ReflectionUtils; public class Item extends ReflectObject { diff --git a/src/net/sothatsit/heads/volatilecode/reflection/nms/ItemStack.java b/src/nl/marido/heads/volatilecode/reflection/nms/ItemStack.java similarity index 86% rename from src/net/sothatsit/heads/volatilecode/reflection/nms/ItemStack.java rename to src/nl/marido/heads/volatilecode/reflection/nms/ItemStack.java index f18920d..8802243 100644 --- a/src/net/sothatsit/heads/volatilecode/reflection/nms/ItemStack.java +++ b/src/nl/marido/heads/volatilecode/reflection/nms/ItemStack.java @@ -1,12 +1,12 @@ -package net.sothatsit.heads.volatilecode.reflection.nms; +package nl.marido.heads.volatilecode.reflection.nms; import java.lang.reflect.Constructor; import java.lang.reflect.Method; -import net.sothatsit.heads.volatilecode.reflection.ReflectObject; -import net.sothatsit.heads.volatilecode.reflection.ReflectionUtils; -import net.sothatsit.heads.volatilecode.reflection.Version; -import net.sothatsit.heads.volatilecode.reflection.nms.nbt.NBTTagCompound; +import nl.marido.heads.volatilecode.reflection.ReflectObject; +import nl.marido.heads.volatilecode.reflection.ReflectionUtils; +import nl.marido.heads.volatilecode.reflection.Version; +import nl.marido.heads.volatilecode.reflection.nms.nbt.NBTTagCompound; public class ItemStack extends ReflectObject { diff --git a/src/net/sothatsit/heads/volatilecode/reflection/nms/Items.java b/src/nl/marido/heads/volatilecode/reflection/nms/Items.java similarity index 85% rename from src/net/sothatsit/heads/volatilecode/reflection/nms/Items.java rename to src/nl/marido/heads/volatilecode/reflection/nms/Items.java index 3494b99..ba0e828 100644 --- a/src/net/sothatsit/heads/volatilecode/reflection/nms/Items.java +++ b/src/nl/marido/heads/volatilecode/reflection/nms/Items.java @@ -1,12 +1,12 @@ -package net.sothatsit.heads.volatilecode.reflection.nms; +package nl.marido.heads.volatilecode.reflection.nms; import java.lang.reflect.Field; import java.lang.reflect.Modifier; import java.util.HashMap; import java.util.Map; -import net.sothatsit.heads.volatilecode.reflection.ReflectObject; -import net.sothatsit.heads.volatilecode.reflection.ReflectionUtils; +import nl.marido.heads.volatilecode.reflection.ReflectObject; +import nl.marido.heads.volatilecode.reflection.ReflectionUtils; public class Items extends ReflectObject { diff --git a/src/net/sothatsit/heads/volatilecode/reflection/nms/MinecraftServer.java b/src/nl/marido/heads/volatilecode/reflection/nms/MinecraftServer.java similarity index 85% rename from src/net/sothatsit/heads/volatilecode/reflection/nms/MinecraftServer.java rename to src/nl/marido/heads/volatilecode/reflection/nms/MinecraftServer.java index d8fb04c..161edaa 100644 --- a/src/net/sothatsit/heads/volatilecode/reflection/nms/MinecraftServer.java +++ b/src/nl/marido/heads/volatilecode/reflection/nms/MinecraftServer.java @@ -1,9 +1,9 @@ -package net.sothatsit.heads.volatilecode.reflection.nms; +package nl.marido.heads.volatilecode.reflection.nms; import java.lang.reflect.Method; -import net.sothatsit.heads.volatilecode.reflection.ReflectObject; -import net.sothatsit.heads.volatilecode.reflection.ReflectionUtils; +import nl.marido.heads.volatilecode.reflection.ReflectObject; +import nl.marido.heads.volatilecode.reflection.ReflectionUtils; public class MinecraftServer extends ReflectObject { diff --git a/src/net/sothatsit/heads/volatilecode/reflection/nms/TileEntity.java b/src/nl/marido/heads/volatilecode/reflection/nms/TileEntity.java similarity index 66% rename from src/net/sothatsit/heads/volatilecode/reflection/nms/TileEntity.java rename to src/nl/marido/heads/volatilecode/reflection/nms/TileEntity.java index 4104ab0..3dcd5da 100644 --- a/src/net/sothatsit/heads/volatilecode/reflection/nms/TileEntity.java +++ b/src/nl/marido/heads/volatilecode/reflection/nms/TileEntity.java @@ -1,7 +1,7 @@ -package net.sothatsit.heads.volatilecode.reflection.nms; +package nl.marido.heads.volatilecode.reflection.nms; -import net.sothatsit.heads.volatilecode.reflection.ReflectObject; -import net.sothatsit.heads.volatilecode.reflection.ReflectionUtils; +import nl.marido.heads.volatilecode.reflection.ReflectObject; +import nl.marido.heads.volatilecode.reflection.ReflectionUtils; public class TileEntity extends ReflectObject { diff --git a/src/net/sothatsit/heads/volatilecode/reflection/nms/TileEntitySkull.java b/src/nl/marido/heads/volatilecode/reflection/nms/TileEntitySkull.java similarity index 94% rename from src/net/sothatsit/heads/volatilecode/reflection/nms/TileEntitySkull.java rename to src/nl/marido/heads/volatilecode/reflection/nms/TileEntitySkull.java index fc26561..bdbdbfa 100644 --- a/src/net/sothatsit/heads/volatilecode/reflection/nms/TileEntitySkull.java +++ b/src/nl/marido/heads/volatilecode/reflection/nms/TileEntitySkull.java @@ -1,4 +1,4 @@ -package net.sothatsit.heads.volatilecode.reflection.nms; +package nl.marido.heads.volatilecode.reflection.nms; import java.lang.reflect.Field; import java.lang.reflect.Method; @@ -8,8 +8,9 @@ import java.util.concurrent.Executor; import com.google.common.base.Predicate; import com.mojang.authlib.GameProfile; -import net.sothatsit.heads.volatilecode.reflection.ReflectObject; -import net.sothatsit.heads.volatilecode.reflection.ReflectionUtils; + +import nl.marido.heads.volatilecode.reflection.ReflectObject; +import nl.marido.heads.volatilecode.reflection.ReflectionUtils; public class TileEntitySkull extends ReflectObject { diff --git a/src/net/sothatsit/heads/volatilecode/reflection/nms/UserCache.java b/src/nl/marido/heads/volatilecode/reflection/nms/UserCache.java similarity index 91% rename from src/net/sothatsit/heads/volatilecode/reflection/nms/UserCache.java rename to src/nl/marido/heads/volatilecode/reflection/nms/UserCache.java index 3108309..ee2127a 100644 --- a/src/net/sothatsit/heads/volatilecode/reflection/nms/UserCache.java +++ b/src/nl/marido/heads/volatilecode/reflection/nms/UserCache.java @@ -1,4 +1,4 @@ -package net.sothatsit.heads.volatilecode.reflection.nms; +package nl.marido.heads.volatilecode.reflection.nms; import java.lang.reflect.Field; import java.lang.reflect.Method; @@ -8,8 +8,9 @@ import java.util.Locale; import java.util.Map; import com.mojang.authlib.GameProfile; -import net.sothatsit.heads.volatilecode.reflection.ReflectObject; -import net.sothatsit.heads.volatilecode.reflection.ReflectionUtils; + +import nl.marido.heads.volatilecode.reflection.ReflectObject; +import nl.marido.heads.volatilecode.reflection.ReflectionUtils; public class UserCache extends ReflectObject { diff --git a/src/net/sothatsit/heads/volatilecode/reflection/nms/UserCacheEntry.java b/src/nl/marido/heads/volatilecode/reflection/nms/UserCacheEntry.java similarity index 85% rename from src/net/sothatsit/heads/volatilecode/reflection/nms/UserCacheEntry.java rename to src/nl/marido/heads/volatilecode/reflection/nms/UserCacheEntry.java index 0d85e95..7774e9d 100644 --- a/src/net/sothatsit/heads/volatilecode/reflection/nms/UserCacheEntry.java +++ b/src/nl/marido/heads/volatilecode/reflection/nms/UserCacheEntry.java @@ -1,8 +1,9 @@ -package net.sothatsit.heads.volatilecode.reflection.nms; +package nl.marido.heads.volatilecode.reflection.nms; import com.mojang.authlib.GameProfile; -import net.sothatsit.heads.volatilecode.reflection.ReflectObject; -import net.sothatsit.heads.volatilecode.reflection.ReflectionUtils; + +import nl.marido.heads.volatilecode.reflection.ReflectObject; +import nl.marido.heads.volatilecode.reflection.ReflectionUtils; import java.lang.reflect.Field; diff --git a/src/net/sothatsit/heads/volatilecode/reflection/nms/World.java b/src/nl/marido/heads/volatilecode/reflection/nms/World.java similarity index 86% rename from src/net/sothatsit/heads/volatilecode/reflection/nms/World.java rename to src/nl/marido/heads/volatilecode/reflection/nms/World.java index b0cb18a..016113e 100644 --- a/src/net/sothatsit/heads/volatilecode/reflection/nms/World.java +++ b/src/nl/marido/heads/volatilecode/reflection/nms/World.java @@ -1,9 +1,9 @@ -package net.sothatsit.heads.volatilecode.reflection.nms; +package nl.marido.heads.volatilecode.reflection.nms; import java.lang.reflect.Method; -import net.sothatsit.heads.volatilecode.reflection.ReflectObject; -import net.sothatsit.heads.volatilecode.reflection.ReflectionUtils; +import nl.marido.heads.volatilecode.reflection.ReflectObject; +import nl.marido.heads.volatilecode.reflection.ReflectionUtils; public class World extends ReflectObject { diff --git a/src/net/sothatsit/heads/volatilecode/reflection/nms/nbt/NBTBase.java b/src/nl/marido/heads/volatilecode/reflection/nms/nbt/NBTBase.java similarity index 56% rename from src/net/sothatsit/heads/volatilecode/reflection/nms/nbt/NBTBase.java rename to src/nl/marido/heads/volatilecode/reflection/nms/nbt/NBTBase.java index 2813fa0..08a3229 100644 --- a/src/net/sothatsit/heads/volatilecode/reflection/nms/nbt/NBTBase.java +++ b/src/nl/marido/heads/volatilecode/reflection/nms/nbt/NBTBase.java @@ -1,7 +1,7 @@ -package net.sothatsit.heads.volatilecode.reflection.nms.nbt; +package nl.marido.heads.volatilecode.reflection.nms.nbt; -import net.sothatsit.heads.volatilecode.reflection.ReflectObject; -import net.sothatsit.heads.volatilecode.reflection.ReflectionUtils; +import nl.marido.heads.volatilecode.reflection.ReflectObject; +import nl.marido.heads.volatilecode.reflection.ReflectionUtils; public class NBTBase extends ReflectObject { diff --git a/src/net/sothatsit/heads/volatilecode/reflection/nms/nbt/NBTTagCompound.java b/src/nl/marido/heads/volatilecode/reflection/nms/nbt/NBTTagCompound.java similarity index 95% rename from src/net/sothatsit/heads/volatilecode/reflection/nms/nbt/NBTTagCompound.java rename to src/nl/marido/heads/volatilecode/reflection/nms/nbt/NBTTagCompound.java index 776a0ad..20738bf 100644 --- a/src/net/sothatsit/heads/volatilecode/reflection/nms/nbt/NBTTagCompound.java +++ b/src/nl/marido/heads/volatilecode/reflection/nms/nbt/NBTTagCompound.java @@ -1,10 +1,10 @@ -package net.sothatsit.heads.volatilecode.reflection.nms.nbt; +package nl.marido.heads.volatilecode.reflection.nms.nbt; import java.lang.reflect.Method; import java.util.Set; -import net.sothatsit.heads.volatilecode.reflection.ReflectObject; -import net.sothatsit.heads.volatilecode.reflection.ReflectionUtils; +import nl.marido.heads.volatilecode.reflection.ReflectObject; +import nl.marido.heads.volatilecode.reflection.ReflectionUtils; public class NBTTagCompound extends ReflectObject { diff --git a/src/net/sothatsit/heads/volatilecode/reflection/nms/nbt/NBTTagList.java b/src/nl/marido/heads/volatilecode/reflection/nms/nbt/NBTTagList.java similarity index 90% rename from src/net/sothatsit/heads/volatilecode/reflection/nms/nbt/NBTTagList.java rename to src/nl/marido/heads/volatilecode/reflection/nms/nbt/NBTTagList.java index 436c77b..204243d 100644 --- a/src/net/sothatsit/heads/volatilecode/reflection/nms/nbt/NBTTagList.java +++ b/src/nl/marido/heads/volatilecode/reflection/nms/nbt/NBTTagList.java @@ -1,11 +1,11 @@ -package net.sothatsit.heads.volatilecode.reflection.nms.nbt; +package nl.marido.heads.volatilecode.reflection.nms.nbt; import java.lang.reflect.Field; import java.lang.reflect.Method; -import net.sothatsit.heads.volatilecode.reflection.ReflectObject; -import net.sothatsit.heads.volatilecode.reflection.ReflectionUtils; -import net.sothatsit.heads.volatilecode.reflection.Version; +import nl.marido.heads.volatilecode.reflection.ReflectObject; +import nl.marido.heads.volatilecode.reflection.ReflectionUtils; +import nl.marido.heads.volatilecode.reflection.Version; public class NBTTagList extends ReflectObject { diff --git a/src/net/sothatsit/heads/volatilecode/reflection/nms/nbt/NBTTagString.java b/src/nl/marido/heads/volatilecode/reflection/nms/nbt/NBTTagString.java similarity index 83% rename from src/net/sothatsit/heads/volatilecode/reflection/nms/nbt/NBTTagString.java rename to src/nl/marido/heads/volatilecode/reflection/nms/nbt/NBTTagString.java index d0b31c9..baaf8b0 100644 --- a/src/net/sothatsit/heads/volatilecode/reflection/nms/nbt/NBTTagString.java +++ b/src/nl/marido/heads/volatilecode/reflection/nms/nbt/NBTTagString.java @@ -1,10 +1,10 @@ -package net.sothatsit.heads.volatilecode.reflection.nms.nbt; - -import net.sothatsit.heads.volatilecode.reflection.ReflectObject; -import net.sothatsit.heads.volatilecode.reflection.ReflectionUtils; +package nl.marido.heads.volatilecode.reflection.nms.nbt; import java.lang.reflect.Constructor; +import nl.marido.heads.volatilecode.reflection.ReflectObject; +import nl.marido.heads.volatilecode.reflection.ReflectionUtils; + public class NBTTagString extends ReflectObject { public static Class NBTTagStringClass; diff --git a/src/plugin.yml b/src/plugin.yml index bfb669f..9e93b47 100644 --- a/src/plugin.yml +++ b/src/plugin.yml @@ -1,7 +1,7 @@ -main: net.sothatsit.heads.Heads +main: nl.marido.heads.Heads author: Marido name: Heads -version: 2.0.8 +version: 2.0.9 api-version: 1.13 softdepend: [Vault, PlayerPoints, BlockStore] loadbefore: [DeluxeMenus]