Pex API Help

Discussion in 'Plugin Development' started by GoogleMaps, Jan 2, 2016.

Thread Status:
Not open for further replies.
  1. Offline

    GoogleMaps

    Here is the error
    Code:
    [PermissionsEx] Error occurred with PermissionsEx! Please post it to http://git.io/vukpm. Full error:
    java.lang.NoSuchMethodError: com.google.common.cache.CacheBuilder.maximumSize(I)Lcom/google/common/cache/CacheBuilder;
            at ru.tehkode.permissions.RegExpMatcher.<init>(RegExpMatcher.java:17)
            at ru.tehkode.permissions.PermissionManager.<init>(PermissionManager.java:58)
            at ru.tehkode.permissions.bukkit.PermissionsEx.onEnable(PermissionsEx.java:163)
            at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:321)
            at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:332)
            at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:404)
            at org.bukkit.craftbukkit.v1_8_R3.CraftServer.loadPlugin(CraftServer.java:342)
            at org.bukkit.craftbukkit.v1_8_R3.CraftServer.enablePlugins(CraftServer.java:314)
            at net.minecraft.server.v1_8_R3.MinecraftServer.s(MinecraftServer.java:406)
            at net.minecraft.server.v1_8_R3.MinecraftServer.k(MinecraftServer.java:370)
            at net.minecraft.server.v1_8_R3.MinecraftServer.a(MinecraftServer.java:325)
            at net.minecraft.server.v1_8_R3.DedicatedServer.init(DedicatedServer.java:235)
            at net.minecraft.server.v1_8_R3.MinecraftServer.run(MinecraftServer.java:504)
            at java.lang.Thread.run(Unknown Source)
    This is the class I use pex in
    Code:
    package com.GoogleMaps.GUI;
    
    import java.util.Arrays;
    
    import org.bukkit.Bukkit;
    import org.bukkit.ChatColor;
    import org.bukkit.Material;
    import org.bukkit.entity.Player;
    import org.bukkit.event.EventHandler;
    import org.bukkit.event.Listener;
    import org.bukkit.event.inventory.InventoryClickEvent;
    import org.bukkit.event.inventory.InventoryType;
    import org.bukkit.inventory.Inventory;
    import org.bukkit.inventory.ItemStack;
    import org.bukkit.inventory.meta.ItemMeta;
    import org.bukkit.plugin.Plugin;
    
    import ru.tehkode.permissions.PermissionUser;
    import ru.tehkode.permissions.bukkit.PermissionsEx;
    
    public class TagMenu implements Listener{
        private Inventory inv;
        public ItemStack trash,mad,og,drop,ezr,can,des,
        ezs,rekt,babe,getd,wannabe
        = new ItemStack(Material.NAME_TAG);
       
         public TagMenu(Plugin p)
         {
             setName("Trash Talker",trash);
             setName("YouMadBro?", mad);
             setName("OG", og);
             setName("QuickDropper", drop);
             setName("EzRaided", ezr);
             setName("Cannoner", can);
             setName("Destroyer", des);
             setName("EzSplit", ezs);
             setName("GetEzRekt", rekt);
             setName("Babe", babe);
             setName("Get Dropped", getd);
             setName("Wannabe", wannabe);
             inv = Bukkit.getServer().createInventory(null, InventoryType.ENDER_CHEST, ChatColor.AQUA + "Tags");
             Bukkit.getServer().getPluginManager().registerEvents(this, p);
             inv.setItem(0, trash);
             inv.setItem(1, mad);
             inv.setItem(2, og);
             inv.setItem(3, drop);
             inv.setItem(4, ezr);
             inv.setItem(5, can);
             inv.setItem(6, des);
             inv.setItem(7, ezs);
             inv.setItem(8, rekt);
             inv.setItem(9, babe);
             inv.setItem(10, getd);
             inv.setItem(11, wannabe);
            
            
         }
         public void setLore(String lore, ItemStack c)
         {
             ItemMeta meta = c.getItemMeta();
             meta.setLore(Arrays.asList(lore));
         }
         private void setName(String name, ItemStack c)
         {
             ItemMeta meta = c.getItemMeta();
             meta.setDisplayName(ChatColor.AQUA + name);
             c.setItemMeta(meta);
            
         }
         public void openInv(Player p)
         {
             p.openInventory(inv);
         }
         @EventHandler
         public void onInvClick(InventoryClickEvent e)
         {
           
             Player p = (Player) e.getWhoClicked();
             PermissionUser user = PermissionsEx.getUser(p);
             String itemname = e.getCurrentItem().getItemMeta().getDisplayName();
             if (!e.getInventory().getName().equalsIgnoreCase(inv.getName())) return;
             if(itemname.contains("Trash Talker"))
             {
                 if(!p.hasPermission("googlemaps.tags.trashtalker"))
                 {
                     e.setCancelled(true);
                     p.closeInventory();
                     p.sendMessage("§8[§cTranscendingTags§8] §7>>> You don't have permission to use this tag! You can buy it from /buy");
                 }else{
                     p.sendMessage("§8[§cTranscendingTags§8] §7>>> You have Successfully set your new tag! :)");
                     user.setSuffix(ChatColor.translateAlternateColorCodes('&', "&8[&3TrashTalker&8]"), null);
    // here and below
                 }
                
                
                 if(!p.hasPermission("googlemaps.tags.youmadbro"))
                 {
                     e.setCancelled(true);
                     p.closeInventory();
                     p.sendMessage("§8[§cTranscendingTags§8] §7>>> You don't have permission to use this tag! You can buy it from /buy");
                 }else{
                     p.sendMessage("§8[§cTranscendingTags§8] §7>>> You have Successfully set your new tag! :)");
                     user.setSuffix(ChatColor.translateAlternateColorCodes('&', "&8[&6YouMadBro&8]"), null);
                 }
                 if(!p.hasPermission("googlemaps.tags.ezraid"))
                 {
                     e.setCancelled(true);
                     p.closeInventory();
                     p.sendMessage("§8[§cTranscendingTags§8] §7>>> You don't have permission to use this tag! You can buy it from /buy");
                 }else{
                     p.sendMessage("§8[§cTranscendingTags§8] §7>>> You have Successfully set your new tag! :)");
                     user.setSuffix(ChatColor.translateAlternateColorCodes('&', "&8[&bEzRaided&8]"), null);
                 }
                 if(!p.hasPermission("googlemaps.tags.og"))
                 {
                     e.setCancelled(true);
                     p.closeInventory();
                     p.sendMessage("§8[§cTranscendingTags§8] §7>>> You don't have permission to use this tag! You can buy it from /buy");
                 }else{
                     p.sendMessage("§8[§cTranscendingTags§8] §7>>> You have Successfully set your new tag! :)");
                     user.setSuffix(ChatColor.translateAlternateColorCodes('&', "&8[&c&lO&6&lG&8]"), null);
                 }
                 if(!p.hasPermission("googlemaps.tags.quickd"))
                 {
                     e.setCancelled(true);
                     p.closeInventory();
                     p.sendMessage("§8[§cTranscendingTags§8] §7>>> You don't have permission to use this tag! You can buy it from /buy");
                 }else{
                     p.sendMessage("§8[§cTranscendingTags§8] §7>>> You have Successfully set your new tag! :)");
                     user.setSuffix(ChatColor.translateAlternateColorCodes('&', "&8[&5QuickDropper&8]"), null);
                 }
                 if(!p.hasPermission("googlemaps.tags.cannon"))
                 {
                     e.setCancelled(true);
                     p.closeInventory();
                     p.sendMessage("§8[§cTranscendingTags§8] §7>>> You don't have permission to use this tag! You can buy it from /buy");
                 }else{
                     p.sendMessage("§8[§cTranscendingTags§8] §7>>> You have Successfully set your new tag! :)");
                     user.setSuffix(ChatColor.translateAlternateColorCodes('&', "&8[&aCannoner&8]"), null);
                 }
                 if(!p.hasPermission("googlemaps.tags.destroyer"))
                 {
                     e.setCancelled(true);
                     p.closeInventory();
                     p.sendMessage("§8[§cTranscendingTags§8] §7>>> You don't have permission to use this tag! You can buy it from /buy");
                 }else{
                     p.sendMessage("§8[§cTranscendingTags§8] §7>>> You have Successfully set your new tag! :)");
                     user.setSuffix(ChatColor.translateAlternateColorCodes('&', "&8[&2Destroyer&8]"), null);
                 }
                 if(!p.hasPermission("googlemaps.tags.ezsplit"))
                 {
                     e.setCancelled(true);
                     p.closeInventory();
                     p.sendMessage("§8[§cTranscendingTags§8] §7>>> You don't have permission to use this tag! You can buy it from /buy");
                 }else{
                     p.sendMessage("§8[§cTranscendingTags§8] §7>>> You have Successfully set your new tag! :)");
                     user.setSuffix(ChatColor.translateAlternateColorCodes('&', "&8[&1EzSplit&8]"), null);
                 }
                 if(!p.hasPermission("googlemaps.tags.rekt"))
                 {
                     e.setCancelled(true);
                     p.closeInventory();
                     p.sendMessage("§8[§cTranscendingTags§8] §7>>> You don't have permission to use this tag! You can buy it from /buy");
                 }else{
                     p.sendMessage("§8[§cTranscendingTags§8] §7>>> You have Successfully set your new tag! :)");
                     user.setSuffix(ChatColor.translateAlternateColorCodes('&', "&8[&cGetEzRekt&8]"), null);
                 }
                 if(!p.hasPermission("googlemaps.tags.babe"))
                 {
                     e.setCancelled(true);
                     p.closeInventory();
                     p.sendMessage("§8[§cTranscendingTags§8] §7>>> You don't have permission to use this tag! You can buy it from /buy");
                 }else{
                     p.sendMessage("§8[§cTranscendingTags§8] §7>>> You have Successfully set your new tag! :)");
                     user.setSuffix(ChatColor.translateAlternateColorCodes('&', "&8[&cF&ba&cZ&be&8]"), null);
                 }
                 if(!p.hasPermission("googlemaps.tags.dropped"))
                 {
                     e.setCancelled(true);
                     p.closeInventory();
                     p.sendMessage("§8[§cTranscendingTags§8] §7>>> You don't have permission to use this tag! You can buy it from /buy");
                 }else{
                     p.sendMessage("§8[§cTranscendingTags§8] §7>>> You have Successfully set your new tag! :)");
                     user.setSuffix(ChatColor.translateAlternateColorCodes('&', "&8[&5GetDropped&8]"), null);
                 }
                 if(!p.hasPermission("googlemaps.tags.wannabe"))
                 {
                     e.setCancelled(true);
                     p.closeInventory();
                     p.sendMessage("§8[§cTranscendingTags§8] §7>>> You don't have permission to use this tag! You can buy it from /buy");
                 }else{
                     p.sendMessage("§8[§cTranscendingTags§8] §7>>> You have Successfully set your new tag! :)");
                     user.setSuffix(ChatColor.translateAlternateColorCodes('&', "&8[&&4Wannabe&8]"), null);
                 }
                
                
                
                
                
             }
         
            
                
            
                
         }
        
        
        
        
        
        
    
    }
    
    Here is main just because you might need it
    Code:
    name: GoogleGUI
    version: 1.0
    main: com.GoogleMaps.GUI.Main
    author: GoogleMaps
    description: eZ Plugin
    depend: [PermissionsEx]
    commands:
       youtubers:
         description: Set yourself on fire.
    Plugin.yml
    Code:
    package com.GoogleMaps.GUI;
    
    import org.bukkit.Bukkit;
    import org.bukkit.ChatColor;
    import org.bukkit.command.Command;
    import org.bukkit.command.CommandSender;
    import org.bukkit.entity.Player;
    import org.bukkit.event.EventHandler;
    import org.bukkit.event.Listener;
    import org.bukkit.event.player.PlayerCommandPreprocessEvent;
    import org.bukkit.plugin.java.JavaPlugin;
    
    public class Main extends JavaPlugin implements Listener {
         private YTMenu ytmenu;
        private TagMenu tagmenu;
        
         public void onEnable() {
            
             tagmenu = new TagMenu(this);
             ytmenu = new YTMenu(this);
             Bukkit.getServer().getPluginManager().registerEvents(this, this);
    }
         @Override
        public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
            Player p = (Player) sender;
             if(label.equalsIgnoreCase("youtubers"))
            {
                ytmenu.show(p);
               
            }
             if(label.equalsIgnoreCase("tags"))
             {
                 if(p.hasPermission("googlemaps.tags.trashtalker"))
                 {
                     tagmenu.setLore(ChatColor.GREEN + "You have this tag", tagmenu.trash);
                 }else{
                     tagmenu.setLore(ChatColor.GREEN + "You have this tag", tagmenu.trash);
                     return true;
                 }
                 if(p.hasPermission("googlemaps.tags.ezraid"))
                 {
                     tagmenu.setLore(ChatColor.GREEN + "You have this tag", tagmenu.ezr);
                 }else{
                     tagmenu.setLore(ChatColor.GREEN + "You have this tag", tagmenu.ezr);
                     return true;
                 }
                 if(p.hasPermission("googlemaps.tags.youmadbro"))
                 {
                     tagmenu.setLore(ChatColor.GREEN + "You have this tag", tagmenu.mad);
                 }else{
                     tagmenu.setLore(ChatColor.GREEN + "You have this tag", tagmenu.mad);
                     return true;
                 }
                 if(p.hasPermission("googlemaps.tags.og"))
                 {
                     tagmenu.setLore(ChatColor.GREEN + "You have this tag", tagmenu.og);
                 }else{
                     tagmenu.setLore(ChatColor.GREEN + "You have this tag", tagmenu.og);
                     return true;
                 }
                 if(p.hasPermission("googlemaps.tags.quickd"))
                 {
                     tagmenu.setLore(ChatColor.GREEN + "You have this tag", tagmenu.drop);
                 }else{
                     tagmenu.setLore(ChatColor.GREEN + "You have this tag", tagmenu.drop);
                     return true;
                 }
                 if(p.hasPermission("googlemaps.tags.cannon"))
                 {
                     tagmenu.setLore(ChatColor.GREEN + "You have this tag", tagmenu.can);
                 }else{
                     tagmenu.setLore(ChatColor.GREEN + "You have this tag", tagmenu.can);
                     return true;
                 }
                 if(p.hasPermission("googlemaps.tags.destroyer"))
                 {
                     tagmenu.setLore(ChatColor.GREEN + "You have this tag", tagmenu.des);
                 }else{
                     tagmenu.setLore(ChatColor.GREEN + "You have this tag", tagmenu.des);
                     return true;
                 }
                 if(p.hasPermission("googlemaps.tags.ezsplit"))
                 {
                     tagmenu.setLore(ChatColor.GREEN + "You have this tag", tagmenu.ezs);
                 }else{
                     tagmenu.setLore(ChatColor.GREEN + "You have this tag", tagmenu.ezs);
                     return true;
                 }
                 if(p.hasPermission("googlemaps.tags.rekt"))
                 {
                     tagmenu.setLore(ChatColor.GREEN + "You have this tag", tagmenu.rekt);
                 }else{
                     tagmenu.setLore(ChatColor.GREEN + "You have this tag", tagmenu.rekt);
                     return true;
                 }
                 if(p.hasPermission("googlemaps.tags.trashtalker"))
                 {
                     tagmenu.setLore(ChatColor.GREEN + "You have this tag", tagmenu.trash);
                 }else{
                     tagmenu.setLore(ChatColor.GREEN + "You have this tag", tagmenu.trash);
                     return true;
                 } if(p.hasPermission("googlemaps.tags.babe"))
                 {
                     tagmenu.setLore(ChatColor.GREEN + "You have this tag", tagmenu.babe);
                 }else{
                     tagmenu.setLore(ChatColor.GREEN + "You have this tag", tagmenu.babe);
                     return true;
                 }
                 if(p.hasPermission("googlemaps.tags.dropped"))
                 {
                     tagmenu.setLore(ChatColor.GREEN + "You have this tag", tagmenu.getd);
                 }else{
                     tagmenu.setLore(ChatColor.GREEN + "You have this tag", tagmenu.getd);
                     return true;
                 }
                 if(p.hasPermission("googlemaps.tags.wannabe"))
                 {
                     tagmenu.setLore(ChatColor.GREEN + "You have this tag", tagmenu.wannabe);
                 }else{
                     tagmenu.setLore(ChatColor.GREEN + "You have this tag", tagmenu.wannabe);
                     return true;
                 }
                 ytmenu.show(p);
           
                
             }
            return false;
        }
        
         @EventHandler
         public void onCommand(PlayerCommandPreprocessEvent e)
         {
             if(e.getMessage().equalsIgnoreCase("/yt") || e.getMessage().equalsIgnoreCase("youtuber"))
             {
                 e.setMessage("/youtubers");
             }
         }
        
       
       
    
    }
    
     
  2. Offline

    mythbusterma

    @GoogleMaps

    The issue here is admitedly rather difficult to diagnose, and it stems from some implementations of the BukkitAPI not including the Google Commons, if you search the forums for "fanciful error" you might be able to find a solution, as it suffers from the same issue.
     
  3. Offline

    GoogleMaps

    But why is it happening?
     
  4. Offline

    mythbusterma

    @GoogleMaps

     
  5. Offline

    GoogleMaps

    So I guess there's nothing I can do?
     
  6. Offline

    mythbusterma

    @GoogleMaps

     
  7. Offline

    GoogleMaps

    Already have can't find anything, ALLL it is is fancy text plugins with JSON
     
  8. Offline

    KingFaris11

    It's ironic how your username has 'Google' in it yet you seem to lack the ability to Google things (this is just a joke, not an insult, I felt inclined to make it)

    First result that came up when I searched "Fanciful error".
    https://bukkit.org/threads/fanciful-error.380194/

    Just include the SRC of Guava which includes CacheBuilder:
    https://github.com/google/guava/tree/master/guava
     
    Last edited: Jan 2, 2016
    WolfMage1 likes this.
  9. Offline

    GoogleMaps

    Where do I ind the google commons src and how do I put it in my jar
     
  10. Offline

    KingFaris11

    I edited it, forgot to paste the link. 'How do I put it in my JAR', you should know this. Add the SRC to your 'src' folder in your project and recompile the plugin.

    By the way, why not use Vault API instead of PermissionsEx API directly?

    Quote from the GitHub page:
    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
  11. Offline

    GoogleMaps

    There is no download section on that link
     
  12. Offline

    KingFaris11

    Which link? The one I edited in before?

    It's in the main page:
    https://github.com/google/guava

    Look for 'Download ZIP'.
     
  13. Offline

    GoogleMaps

    Ok I went into the /guava/guava/src and put from com into there and theres just a bunch of errors in all of the files idk what to do
    @KingFaris11
     
  14. Offline

    mcdorli

    Don't just copy th source code out. Scroll down, and download it.
     
  15. Offline

    Gorbit99

    Don't use the package name "com.googlemaps". You don't own that domain and you can get fined for that.
     
  16. Offline

    GoogleMaps

    @mcdorli
    Wait do I put the zip in there ? or the file in the zip
    because I put all the files in the zip into it and a bunch of errors
     
  17. Offline

    mcdorli

    You open the zip, then inside that, open the src, and put the content of that in your src folder
     
  18. Offline

    GoogleMaps

    @mcdorli I've done that and a bunch of errors still show up
     
  19. Offline

    KingFaris11

    Show your SRC folder layout.
     
  20. Offline

    GoogleMaps

    [​IMG]

    @KingFaris11 @mcdorli

    Now using vault this is the class I'm using it in and my main class is still the same code.

    Code:
    package com.GoogleMaps.GUI;
    
    import java.util.Arrays;
    
    import org.bukkit.Bukkit;
    import org.bukkit.ChatColor;
    import org.bukkit.Material;
    import org.bukkit.entity.Player;
    import org.bukkit.event.EventHandler;
    import org.bukkit.event.Listener;
    import org.bukkit.event.inventory.InventoryClickEvent;
    import org.bukkit.event.inventory.InventoryType;
    import org.bukkit.inventory.Inventory;
    import org.bukkit.inventory.ItemStack;
    import org.bukkit.inventory.meta.ItemMeta;
    import org.bukkit.plugin.Plugin;
    import org.bukkit.plugin.RegisteredServiceProvider;
    
    import net.milkbowl.vault.chat.Chat;
    
    public class TagMenu implements Listener{
        private Inventory inv;
        public ItemStack trash,mad,og,drop,ezr,can,des,
        ezs,rekt,babe,getd,wannabe
        = new ItemStack(Material.NAME_TAG);
        public static Chat chat = null;
         public TagMenu(Plugin p)
         {
             setupChat();
             setName("Trash Talker",trash);
             setName("YouMadBro?", mad);
             setName("OG", og);
             setName("QuickDropper", drop);
             setName("EzRaided", ezr);
             setName("Cannoner", can);
             setName("Destroyer", des);
             setName("EzSplit", ezs);
             setName("GetEzRekt", rekt);
             setName("Babe", babe);
             setName("Get Dropped", getd);
             setName("Wannabe", wannabe);
             inv = Bukkit.getServer().createInventory(null, InventoryType.ENDER_CHEST, ChatColor.AQUA + "Tags");
             Bukkit.getServer().getPluginManager().registerEvents(this, p);
             inv.setItem(0, trash);
             inv.setItem(1, mad);
             inv.setItem(2, og);
             inv.setItem(3, drop);
             inv.setItem(4, ezr);
             inv.setItem(5, can);
             inv.setItem(6, des);
             inv.setItem(7, ezs);
             inv.setItem(8, rekt);
             inv.setItem(9, babe);
             inv.setItem(10, getd);
             inv.setItem(11, wannabe);
            
            
         }
         public void setLore(String lore, ItemStack c)
         {
             ItemMeta meta = c.getItemMeta();
             meta.setLore(Arrays.asList(lore));
             c.setItemMeta(meta);
         }
         private void setName(String name, ItemStack c)
         {
             ItemMeta meta = c.getItemMeta();
             meta.setDisplayName(ChatColor.AQUA + name);
             c.setItemMeta(meta);
            
         }
         public void openInv(Player p)
         {
             p.openInventory(inv);
         }
           private boolean setupChat() {
                RegisteredServiceProvider<Chat> rsp = Bukkit.getServer().getServicesManager().getRegistration(Chat.class);
                chat = rsp.getProvider();
                return chat != null;
            }
         @EventHandler
         public void onInvClick(InventoryClickEvent e)
         {
            
           
             Player p = (Player) e.getWhoClicked();
             String itemname = e.getCurrentItem().getItemMeta().getDisplayName();
             if (!e.getInventory().getName().equalsIgnoreCase(inv.getName())) return;
             if(itemname.contains("Trash Talker"))
             {
                 if(!p.hasPermission("googlemaps.tags.trashtalker"))
                 {
                     e.setCancelled(true);
                     p.closeInventory();
                     p.sendMessage("§8[§cTranscendingTags§8] §7>>> You don't have permission to use this tag! You can buy it from /buy");
                 }else{
                     p.sendMessage("§8[§cTranscendingTags§8] §7>>> You have Successfully set your new tag! :)");
           
                     chat.setPlayerSuffix(p, ChatColor.translateAlternateColorCodes('&', "&&8[&3TrashTalker&8]"));
                 }
                
                
                 if(!p.hasPermission("googlemaps.tags.youmadbro"))
                 {
                     e.setCancelled(true);
                     p.closeInventory();
                     p.sendMessage("§8[§cTranscendingTags§8] §7>>> You don't have permission to use this tag! You can buy it from /buy");
                 }else{
                     p.sendMessage("§8[§cTranscendingTags§8] §7>>> You have Successfully set your new tag! :)");
                     chat.setPlayerSuffix(p, ChatColor.translateAlternateColorCodes('&', "&8[&6YouMadBro&8]"));
                 }
                 if(!p.hasPermission("googlemaps.tags.ezraid"))
                 {
                     e.setCancelled(true);
                     p.closeInventory();
                     p.sendMessage("§8[§cTranscendingTags§8] §7>>> You don't have permission to use this tag! You can buy it from /buy");
                 }else{
                     p.sendMessage("§8[§cTranscendingTags§8] §7>>> You have Successfully set your new tag! :)");
                     chat.setPlayerSuffix(p, ChatColor.translateAlternateColorCodes('&', "&8[&bEzRaided&8]"));
                 }
                 if(!p.hasPermission("googlemaps.tags.og"))
                 {
                     e.setCancelled(true);
                     p.closeInventory();
                     p.sendMessage("§8[§cTranscendingTags§8] §7>>> You don't have permission to use this tag! You can buy it from /buy");
                 }else{
                     p.sendMessage("§8[§cTranscendingTags§8] §7>>> You have Successfully set your new tag! :)");
    
                     chat.setPlayerSuffix(p, ChatColor.translateAlternateColorCodes('&', "&8[&c&lO&6&lG&8]"));
                 }
                 if(!p.hasPermission("googlemaps.tags.quickd"))
                 {
                     e.setCancelled(true);
                     p.closeInventory();
                     p.sendMessage("§8[§cTranscendingTags§8] §7>>> You don't have permission to use this tag! You can buy it from /buy");
                 }else{
                     p.sendMessage("§8[§cTranscendingTags§8] §7>>> You have Successfully set your new tag! :)");
                     chat.setPlayerSuffix(p, ChatColor.translateAlternateColorCodes('&', "&8[&5QuickDropper&8]"));
                 }
                 if(!p.hasPermission("googlemaps.tags.cannon"))
                 {
                     e.setCancelled(true);
                     p.closeInventory();
                     p.sendMessage("§8[§cTranscendingTags§8] §7>>> You don't have permission to use this tag! You can buy it from /buy");
                 }else{
                    
                     p.sendMessage("§8[§cTranscendingTags§8] §7>>> You have Successfully set your new tag! :)");
                     chat.setPlayerSuffix(p, ChatColor.translateAlternateColorCodes('&', "&8[&aCannoner&8]"));
                 }
                 if(!p.hasPermission("googlemaps.tags.destroyer"))
                 {
                     e.setCancelled(true);
                     p.closeInventory();
                     p.sendMessage("§8[§cTranscendingTags§8] §7>>> You don't have permission to use this tag! You can buy it from /buy");
                 }else{
                     p.sendMessage("§8[§cTranscendingTags§8] §7>>> You have Successfully set your new tag! :)");
                        chat.setPlayerSuffix(p, ChatColor.translateAlternateColorCodes('&', "&8[&2Destroyer&8]"));
                 }
                 if(!p.hasPermission("googlemaps.tags.ezsplit"))
                 {
                     e.setCancelled(true);
                     p.closeInventory();
                     p.sendMessage("§8[§cTranscendingTags§8] §7>>> You don't have permission to use this tag! You can buy it from /buy");
                 }else{
                     p.sendMessage("§8[§cTranscendingTags§8] §7>>> You have Successfully set your new tag! :)");
                        chat.setPlayerSuffix(p, ChatColor.translateAlternateColorCodes('&', "&8[&1EzSplit&8]"));
                 }
                 if(!p.hasPermission("googlemaps.tags.rekt"))
                 {
                     e.setCancelled(true);
                     p.closeInventory();
                     p.sendMessage("§8[§cTranscendingTags§8] §7>>> You don't have permission to use this tag! You can buy it from /buy");
                 }else{
                     p.sendMessage("§8[§cTranscendingTags§8] §7>>> You have Successfully set your new tag! :)");
                        chat.setPlayerSuffix(p, ChatColor.translateAlternateColorCodes('&', "&8[&cGetEzRekt&8]"));
                 }
                 if(!p.hasPermission("googlemaps.tags.babe"))
                 {
                     e.setCancelled(true);
                     p.closeInventory();
                     p.sendMessage("§8[§cTranscendingTags§8] §7>>> You don't have permission to use this tag! You can buy it from /buy");
                 }else{
                     p.sendMessage("§8[§cTranscendingTags§8] §7>>> You have Successfully set your new tag! :)");
                        chat.setPlayerSuffix(p, ChatColor.translateAlternateColorCodes('&', "&8[&cF&ba&cZ&be&8"));
                 }
                 if(!p.hasPermission("googlemaps.tags.dropped"))
                 {
                     e.setCancelled(true);
                     p.closeInventory();
                     p.sendMessage("§8[§cTranscendingTags§8] §7>>> You don't have permission to use this tag! You can buy it from /buy");
                 }else{
                     p.sendMessage("§8[§cTranscendingTags§8] §7>>> You have Successfully set your new tag! :)");
                        chat.setPlayerSuffix(p, ChatColor.translateAlternateColorCodes('&', "&8[&5GetDropped&8]"));
                 }
                 if(!p.hasPermission("googlemaps.tags.wannabe"))
                 {
                     e.setCancelled(true);
                     p.closeInventory();
                     p.sendMessage("§8[§cTranscendingTags§8] §7>>> You don't have permission to use this tag! You can buy it from /buy");
                 }else{
                     p.sendMessage("§8[§cTranscendingTags§8] §7>>> You have Successfully set your new tag! :)");
                        chat.setPlayerSuffix(p, ChatColor.translateAlternateColorCodes('&', "&8[&&4Wannabe&8]"));
                 }
                
                
                
                
                
             }
         
            
                
            
                
         }
    
    }
    
    Now I get the same error plus another one
    Code:
    ]: Error occurred while enabling GoogleGUI v1.0 (Is it up to date?)
    java.lang.NullPointerException
            at com.GoogleMaps.GUI.TagMenu.setName(TagMenu.java:66) ~[?:?]
            at com.GoogleMaps.GUI.TagMenu.<init>(TagMenu.java:30) ~[?:?]
            at com.GoogleMaps.GUI.Main.onEnable(Main.java:19) ~[?:?]
            at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:321) ~[craftbukkit.jar:git-Bukkit-18fbb24]
            at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:332) [craftbukkit.jar:git-Bukkit-18fbb24]
            at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:404) [craftbukkit.jar:git-Bukkit-18fbb24]
            at org.bukkit.craftbukkit.v1_8_R3.CraftServer.loadPlugin(CraftServer.java:342) [craftbukkit.jar:git-Bukkit-18fbb24]
            at org.bukkit.craftbukkit.v1_8_R3.CraftServer.enablePlugins(CraftServer.java:314) [craftbukkit.jar:git-Bukkit-18fbb24]
            at net.minecraft.server.v1_8_R3.MinecraftServer.s(MinecraftServer.java:406) [craftbukkit.jar:git-Bukkit-18fbb24]
            at net.minecraft.server.v1_8_R3.MinecraftServer.k(MinecraftServer.java:370) [craftbukkit.jar:git-Bukkit-18fbb24]
            at net.minecraft.server.v1_8_R3.MinecraftServer.a(MinecraftServer.java:325) [craftbukkit.jar:git-Bukkit-18fbb24]
            at net.minecraft.server.v1_8_R3.DedicatedServer.init(DedicatedServer.java:235) [craftbukkit.jar:git-Bukkit-18fbb24]
            at net.minecraft.server.v1_8_R3.MinecraftServer.run(MinecraftServer.java:504) [craftbukkit.jar:git-Bukkit-18fbb24]
            at java.lang.Thread.run(Unknown Source) [?:1.8.0_65]
    [09:53:47 INFO]: [GoogleRandom] Enabling GoogleRandom v1.0
    [09:53:47 INFO]: [GoogleChat] Enabling GoogleChat v1.0
    [09:53:47 INFO]: [Essentials] Enabling Essentials vTeamCity
    [09:53:47 INFO]: Bukkit version format changed. Version not checked.
    [09:53:47 INFO]: git-Bukkit-18fbb24 (MC: 1.8.8)
    [09:53:47 INFO]: 1.8.8-R0.1-SNAPSHOT
    [09:53:47 INFO]: Using locale en_AU
    [09:53:52 INFO]: Using locale en_AU
    [09:53:53 INFO]: [Vault][Economy] Essentials Economy hooked.
    [09:53:53 INFO]: Essentials: Using config file enhanced permissions.
    [09:53:53 INFO]: Permissions listed in as player-commands will be given to all users.
    [09:53:53 INFO]: [GoogleMagic] Enabling GoogleMagic v1.0
    [09:53:53 INFO]: [EasyTrollz] Enabling EasyTrollz v1.0
    [09:53:53 INFO]: DeezNutz
    [09:53:53 INFO]: [GoogleJoin] Enabling GoogleJoin v1.0
    [09:53:53 INFO]: Server permissions file permissions.yml is empty, ignoring it
    [09:53:54 INFO]: Done (24.304s)! For help, type "help" or "?"
    [09:53:55 INFO]: [Vault] Checking for Updates ...
    [09:53:56 ERROR]: [PermissionsEx] Error occurred with PermissionsEx! Please post it to http://git.io/vutXp. Full error:
    java.lang.NoSuchMethodError: com.google.common.cache.CacheBuilder.maximumSize(I)Lcom/google/common/cache/CacheBuilder;
            at ru.tehkode.permissions.RegExpMatcher.<init>(RegExpMatcher.java:17)
            at ru.tehkode.permissions.PermissionManager.<init>(PermissionManager.java:58)
            at ru.tehkode.permissions.bukkit.PermissionsEx.onEnable(PermissionsEx.java:163)
            at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:321)
            at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:332)
            at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:404)
            at org.bukkit.craftbukkit.v1_8_R3.CraftServer.loadPlugin(CraftServer.java:342)
            at org.bukkit.craftbukkit.v1_8_R3.CraftServer.enablePlugins(CraftServer.java:314)
            at net.minecraft.server.v1_8_R3.MinecraftServer.s(MinecraftServer.java:406)
            at net.minecraft.server.v1_8_R3.MinecraftServer.k(MinecraftServer.java:370)
            at net.minecraft.server.v1_8_R3.MinecraftServer.a(MinecraftServer.java:325)
            at net.minecraft.server.v1_8_R3.DedicatedServer.init(DedicatedServer.java:235)
            at net.minecraft.server.v1_8_R3.MinecraftServer.run(MinecraftServer.java:504)
            at java.lang.Thread.run(Unknown Source)
    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jan 2, 2016
  21. Offline

    Zombie_Striker

    The line 66 for TagMenu you provided should not give you an NPE. Are you sure you updated your code/ posted the right code?

    For the second error, something somewhere is trying to access a method that does not exist.
     
  22. Offline

    GoogleMaps

    @Zombie_Striker
    Yep

    @Zombie_Striker If you want I can add u on skype and screen share possibly

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jan 2, 2016
  23. Offline

    KingFaris11

    Oh wait, for the last error, it might mean you need to add Guava to PermissionsEx JAR, not to your project, I wasn't thinking properly, woops.

    I'm guessing that PermissionsEx for v1.8+ does have Guava built-in or something similar (or they stopped using Guava in general). This means you're probably using an outdated version of PermissionsEx.

    You're probably using: http://dev.bukkit.org/bukkit-plugins/permissionsex/files/44-permissions-ex-v1-22-9/
    Which says: 'This release is not compatible with Spigot 1.8 and other servers that have updated their guavas'

    You should be using: http://dev.bukkit.org/bukkit-plugins/permissionsex/files/46-permissions-ex-v1-23-3/

    Or, if you're actually using Minecraft 1.7, then you'd want to use the first link instead of the last link. The latest PermissionsEx plugins are not compatible with 1.7.
     
Thread Status:
Not open for further replies.

Share This Page