Development Assistance VanishNoPacket

Discussion in 'Plugin Help/Development/Requests' started by DaChiimp, Apr 8, 2015.

Thread Status:
Not open for further replies.
  1. I am trying to use VanishNoPacket in my plugin to check if the player is Vanished. This is optional therefore I check if the plugin is not null
    Code:
    if(Bukkit.getServer().getPluginManager().getPlugin("VanishNoPacket") !=null) {
    The issue is though no matter what I do it gives me the following error.

    Error (open)

    org.bukkit.plugin.InvalidPluginException: java.lang.NoClassDefFoundError: org/ki
    tteh/vanish/staticaccess/VanishNotLoadedException
    at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.j
    ava:135) ~[spigot-1.8.jar:git-Spigot-35348a5-ee6d0fa]
    at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.
    java:329) ~[spigot-1.8.jar:git-Spigot-35348a5-ee6d0fa]
    at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager
    .java:251) [spigot-1.8.jar:git-Spigot-35348a5-ee6d0fa]
    at org.bukkit.craftbukkit.v1_8_R1.CraftServer.loadPlugins(CraftServer.ja
    va:291) [spigot-1.8.jar:git-Spigot-35348a5-ee6d0fa]
    at net.minecraft.server.v1_8_R1.DedicatedServer.init(DedicatedServer.jav
    a:152) [spigot-1.8.jar:git-Spigot-35348a5-ee6d0fa]
    at net.minecraft.server.v1_8_R1.MinecraftServer.run(MinecraftServer.java
    :505) [spigot-1.8.jar:git-Spigot-35348a5-ee6d0fa]
    at java.lang.Thread.run(Unknown Source) [?:1.7.0_75]
    Caused by: java.lang.NoClassDefFoundError: org/kitteh/vanish/staticaccess/Vanish
    NotLoadedException
    at java.lang.Class.forName0(Native Method) ~[?:1.7.0_75]
    at java.lang.Class.forName(Unknown Source) ~[?:1.7.0_75]
    at org.bukkit.plugin.java.PluginClassLoader.<init>(PluginClassLoader.jav
    a:64) ~[spigot-1.8.jar:git-Spigot-35348a5-ee6d0fa]
    at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.j
    ava:131) ~[spigot-1.8.jar:git-Spigot-35348a5-ee6d0fa]
    ... 6 more
    Caused by: java.lang.ClassNotFoundException: org.kitteh.vanish.staticaccess.Vani
    shNotLoadedException
    at java.net.URLClassLoader$1.run(Unknown Source) ~[?:1.7.0_75]
    at java.net.URLClassLoader$1.run(Unknown Source) ~[?:1.7.0_75]
    at java.security.AccessController.doPrivileged(Native Method) ~[?:1.7.0_
    75]
    at java.net.URLClassLoader.findClass(Unknown Source) ~[?:1.7.0_75]
    at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.
    java:101) ~[spigot-1.8.jar:git-Spigot-35348a5-ee6d0fa]
    at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.
    java:86) ~[spigot-1.8.jar:git-Spigot-35348a5-ee6d0fa]
    at java.lang.ClassLoader.loadClass(Unknown Source) ~[?:1.7.0_75]
    at java.lang.ClassLoader.loadClass(Unknown Source) ~[?:1.7.0_75]
    at java.lang.Class.forName0(Native Method) ~[?:1.7.0_75]
    at java.lang.Class.forName(Unknown Source) ~[?:1.7.0_75]
    at org.bukkit.plugin.java.PluginClassLoader.<init>(PluginClassLoader.jav
    a:64) ~[spigot-1.8.jar:git-Spigot-35348a5-ee6d0fa]
    at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.j
    ava:131) ~[spigot-1.8.jar:git-Spigot-35348a5-ee6d0fa]
    ... 6 more

    Error on Hastebin and not in spoiler.

    Basically i've read this as the class is not loaded (because I removed VanishNoPacket) and therefore it doesn't want to load. Why is this the method isn't even being called when it is being enabled.

    My Code:
    (References you may want to know:
    Line 45 = onEnable
    Line 462 = isNoPacketVanished Method Being Called At 262)
    Code:
    package com.dachiimp.stafflist;
    
    import com.earth2me.essentials.Essentials;
    import com.google.common.io.Files;
    import org.bukkit.Bukkit;
    import org.bukkit.ChatColor;
    import org.bukkit.Material;
    import org.bukkit.SkullType;
    import org.bukkit.command.Command;
    import org.bukkit.command.CommandSender;
    import org.bukkit.configuration.file.YamlConfiguration;
    import org.bukkit.entity.Player;
    import org.bukkit.event.EventHandler;
    import org.bukkit.event.Listener;
    import org.bukkit.event.player.PlayerJoinEvent;
    import org.bukkit.inventory.Inventory;
    import org.bukkit.inventory.ItemStack;
    import org.bukkit.inventory.meta.SkullMeta;
    import org.bukkit.plugin.Plugin;
    import org.bukkit.plugin.PluginManager;
    import org.bukkit.plugin.java.JavaPlugin;
    
    import java.io.*;
    import java.text.DateFormat;
    import java.text.ParseException;
    import java.text.SimpleDateFormat;
    import java.util.ArrayList;
    import java.util.Date;
    import java.util.Iterator;
    import java.util.List;
    
    /**
    * Created by DaChiimp on 4/6/2015.
    */
    public class StaffList extends JavaPlugin implements Listener {
    
        static Plugin _plugin = null;
    
    
        static boolean sr;
        static boolean sll;
        static boolean ot;
    
    
        public void onEnable() {
            System.out.println("[" + getDescription().getName() + "] enabled");
            _plugin = this;
            setupDataFolder();
            PluginManager pm = Bukkit.getServer().getPluginManager();
            pm.registerEvents(new StopTakingEtc(), this);
            pm.registerEvents(this, this);
            if(new File("plugins/StaffList/deleteMe.txt").exists()) {
                System.out.print("Deleting deleteMe.txt");
                new File("plugins/StaffList/deleteMe.txt").delete();
            }
            setupDataFolder();
            setupDir();
            setupConfig();
            setupBooleans();
        }
    
    
        public void onDisable() {
            System.out.println("[" + getDescription().getName() + "] disabled");
            _plugin = null;
        }
    
        public static void setupBooleans() {
            if(new File("plugins/StaffList/config.yml").exists()) {
                System.out.print("Exists");
                if (getCfgValue("ShowRank").equalsIgnoreCase("true")) {
                    sr = true;
                } else {
                    sr = false;
                }
    
                if (getCfgValue("ShowLastLogin").equalsIgnoreCase("true")) {
                    sll = true;
                } else {
                    sll = false;
                }
    
                if(getCfgValue("ShowOnlineTime").equalsIgnoreCase("true")) {
                    ot = true;
                } else {
                    ot = false;
                }
            } else {
                setupConfig();
                setupBooleans();
            }
    
        }
    
    
    
    
    
    
        public Inventory gui(final Player player) {
            List<String> list = getStaffList();
            int size = 54;
            if(list.size() <= 9) {
                size = 9;
            } else if(list.size() <=18) {
                size = 18;
            } else if(list.size() <=27) {
                size = 27;
            } else if(list.size() <= 36) {
                size = 36;
            } else if(list.size() <= 45) {
                size = 45;
            } else if(list.size() <= 54) {
                size = 54;
            }
            final Inventory staffgui = Bukkit.createInventory(null, size, ChatColor.DARK_RED + "Staff Members");
    
            if(list.size() > 0) {
                Iterator<String> it = list.iterator();
                while(it.hasNext()) {
                    final String p = it.next();
                    final ItemStack head = new ItemStack(Material.SKULL_ITEM, 1, (short) SkullType.PLAYER.ordinal());
                    final SkullMeta sm = (SkullMeta) head.getItemMeta();
                    final List<String> lores = new ArrayList<>();
                    sm.setOwner(p);
    
                    String cfg_dname = getCfgValue("StaffHeadTitle");
                    cfg_dname = replaceAll(cfg_dname, p);
    
                    String cfg_ign = getCfgValue("IGN_Template");
                    cfg_ign = replaceAll(cfg_ign, p);
                    String cfg_rank = getCfgValue("RANK_Template");
                    cfg_rank = replaceAll(cfg_rank, p);
                    String cfg_lastlogin = getCfgValue("LASTLOGIN_Template");
                    cfg_lastlogin = replaceAll(cfg_lastlogin, p);
                    String cfg_onlinetime = getCfgValue("ONLINETIME_Template");
                    cfg_onlinetime = replaceAll(cfg_onlinetime,p);
    
    
                    lores.add(cfg_ign);
                    sm.setDisplayName(cfg_dname);
                    if(sr) {
                        lores.add(cfg_rank);
                    }
                    if(sll) {
                        if(Bukkit.getServer().getPlayer(p) == null) {
                            lores.add(cfg_lastlogin);
                        } else {
                            if(ot) {
                                lores.add(cfg_onlinetime);
                            }
                        }
                    }
                    if (Bukkit.getServer().getPlayer(p) != null) {
                        if (isEssentialsVanished(player)) {
                            lores.add(ChatColor.DARK_RED + "Offline");
                        } else {
                            if(isNoPacketVanished(player)) {
                                lores.add(ChatColor.DARK_RED + "Offline");
                            } else {
                                lores.add(ChatColor.GREEN + "Online");
                            }
                        }
                    } else {
                        lores.add(ChatColor.DARK_RED + "Offline");
                    }
    
                    sm.setLore(lores);
                    head.setItemMeta(sm);
                    staffgui.addItem(head);
    
    
                }
                return staffgui;
            } else {
                return null;
            }
    
        }
    
        public Inventory guiModify(final Player player) {
            List<String> list = getStaffList();
            int size = 54;
            if(list.size() <= 9) {
                size = 9;
            } else if(list.size() <=18) {
                size = 18;
            } else if(list.size() <=27) {
                size = 27;
            } else if(list.size() <= 36) {
                size = 36;
            } else if(list.size() <= 45) {
                size = 45;
            } else if(list.size() <= 54) {
                size = 54;
            }
            final Inventory staffgui = Bukkit.createInventory(null, size, ChatColor.DARK_RED + "[EDIT] Staff");
    
            if(list.size() > 0) {
                Iterator<String> it = list.iterator();
                while(it.hasNext()) {
                    final String p = it.next();
                    final ItemStack head = new ItemStack(Material.SKULL_ITEM, 1, (short) SkullType.PLAYER.ordinal());
                    final SkullMeta sm = (SkullMeta) head.getItemMeta();
                    final List<String> lores = new ArrayList<>();
                    sm.setOwner(p);
    
                    String cfg_dname = getCfgValue("StaffHeadTitle");
                    cfg_dname = replaceAll(cfg_dname, p);
    
                    String cfg_ign = getCfgValue("IGN_Template");
                    cfg_ign = replaceAll(cfg_ign, p);
                    String cfg_rank = getCfgValue("RANK_Template");
                    cfg_rank = replaceAll(cfg_rank, p);
                    String cfg_lastlogin = getCfgValue("LASTLOGIN_Template");
                    cfg_lastlogin = replaceAll(cfg_lastlogin, p);
                    String cfg_onlinetime = getCfgValue("ONLINETIME_Template");
                    cfg_onlinetime = replaceAll(cfg_onlinetime,p);
    
    
                    lores.add(cfg_ign);
                    sm.setDisplayName(cfg_dname);
                    if(sr) {
                        lores.add(cfg_rank);
                    }
                    if(sll) {
                        if(Bukkit.getServer().getPlayer(p) == null) {
                            lores.add(cfg_lastlogin);
                        } else {
                            if(ot) {
                                lores.add(cfg_onlinetime);
                            }
                        }
                    }
                    if (Bukkit.getServer().getPlayer(p) != null) {
                        if (isEssentialsVanished(player)) {
                            lores.add(ChatColor.DARK_RED + "Offline");
                        } else {
                            if(isNoPacketVanished(player)) {
                                lores.add(ChatColor.DARK_RED + "Offline");
                            } else {
                                lores.add(ChatColor.GREEN + "Online");
                            }
                        }
                    } else {
                        lores.add(ChatColor.DARK_RED + "Offline");
                    }
    
                    sm.setLore(lores);
                    head.setItemMeta(sm);
                    staffgui.addItem(head);
    
    
                }
                return staffgui;
    
            } else {
                return null;
            }
    
        }
    
        public static String getOnlineTime(String player) {
            DateFormat format = new SimpleDateFormat("dd/MM/yyyy HH:mm:ss");
            Date date = new Date();
            Date d1 = null;
            String ll = getValue(player + ".LastLogin");
            if(!ll.equalsIgnoreCase("Unknown")) {
                try {
                    d1 = format.parse(ll);
                } catch (ParseException e) {
                    e.printStackTrace();
                }
    
                long diff = date.getTime() - d1.getTime();
                long diffSeconds = diff / 1000 % 60;
                long diffMinutes = diff / (60 * 1000) % 60;
                long diffHours = diff / (60 * 60 * 1000);
                String time = "";
                if (diffHours != 0) {
                    if (diffHours == 1) {
                        time = diffHours + " hour ";
                    } else {
                        time = diffHours + " hours ";
                    }
                }
    
                if (diffMinutes != 0) {
                    if (diffMinutes == 1) {
                        time = time + diffMinutes + " minute ";
                    } else {
                        time = time + diffMinutes + " minutes ";
                    }
                }
                if (diffSeconds == 1) {
                    time = time + diffSeconds + " second";
                } else {
                    time = time + diffSeconds + " seconds";
                }
                return time;
            } else {
                return null;
            }
    
    
        }
    
        @Override
        public boolean onCommand(CommandSender sender, Command cmd, String commandLabel, String[] args) {
            if(cmd.getName().equalsIgnoreCase("staff")) {
                if(sender instanceof Player) {
                    Player player = (Player) sender;
                    if (args.length == 0) {
                        Inventory gui = gui(player);
                        if(gui == null) {
                            player.sendMessage(ChatColor.RED + "There are no staff setup.");
                        } else {
                            player.openInventory(gui);
                        }
                    } else if (args.length == 3) {
                        if(player.hasPermission("staff.modify")) {
                            if(args[0].equalsIgnoreCase("add")) {
                                if(args[1].length() >=3) {
                                    if(!checkStaff(args[1])) {
                                        addStaffMember(args[1], args[2]);
                                        player.sendMessage(ChatColor.GRAY + "Added " + ChatColor.RED + args[1] + ChatColor.GRAY + " to staff with the rank of " + ChatColor.RED + args[2] + ChatColor.GRAY + ".");
                                    } else {
                                        player.sendMessage(ChatColor.RED + "That staff member already exists.");
                                    }
                                } else {
                                    player.sendMessage(ChatColor.RED + "Please enter a valid Minecraft username");
                                }
                            } else {
                                unknownCommand(player);
                            }
                        } else {
                            noCommandPerm(player);
                        }
                    } else if(args.length == 2) {
                        if(player.hasPermission("staff.modify")) {
                            if(args[0].equalsIgnoreCase("remove") || args[0].equalsIgnoreCase("delete")) {
                                if(checkStaff(args[1])) {
                                    player.sendMessage(ChatColor.GRAY + "Removed staff member " + ChatColor.RED + args[1] + ChatColor.GRAY + " from the staff list.");
                                    removeStaffMember(args[1]);
                                } else {
                                    player.sendMessage(ChatColor.RED + "There is no such staff member added.");
                                }
                            } else {
                                unknownCommand(player);
                            }
                        } else {
                            noCommandPerm(player);
                        }
                    } else if(args.length == 1) {
                        if(player.hasPermission("staff.modify")) {
                            if (args[0].equalsIgnoreCase("modify")) {
                                player.sendMessage(ChatColor.GRAY + "Move the items in the inventory to edit their position or remove them from the inventory to delete the staff member.");
                                player.openInventory(guiModify(player));
                            } else if(args[0].equalsIgnoreCase("reload")) {
                                _plugin.reloadConfig();
                                setupBooleans();
                                player.sendMessage(ChatColor.GREEN + "Config Reloaded");
                            } else {
                                unknownCommand(player);
                            }
                        } else {
                            noCommandPerm(player);
                        }
                    }
                } else {
                    sender.sendMessage("You must be a player to run this command!");
                }
            }
            return false;
        }
    
        public void setupDataFolder() {
            File dir = new File("plugins/StaffList/");
            File file = new File("plugins/StaffList/staff.dat");
            if(!dir.exists()) {
                dir.mkdirs();
            }
            if(!file.exists()) {
                try{
                    file.createNewFile();
                } catch(IOException e) {
                    e.printStackTrace();
                    System.out.println("Error creating Staff list file.");
                }
            }
        }
    
        public static List getStaffList() {
            File file = new File("plugins/StaffList/staff.dat");
            YamlConfiguration yc = YamlConfiguration.loadConfiguration(file);
            return yc.getStringList("Staff");
        }
    
        public static void addStaffMember(String player, String rank) {
            List<String> list = getStaffList();
            list.add(player);
            File file = new File("plugins/StaffList/staff.dat");
            YamlConfiguration yc = YamlConfiguration.loadConfiguration(file);
            yc.set("Staff", list);
            yc.set(player + ".Rank", rank);
            DateFormat dateFormat = new SimpleDateFormat("dd/MM/yyyy HH:mm:ss");
            Date date = new Date();
            yc.set(player + ".LastLogin", "Unknown");
            try{
                yc.save(file);
            } catch(IOException e) {
                e.printStackTrace();
            }
        }
    
        public static boolean checkStaff(String player) {
            List<String> list = getStaffList();
            if(list.contains(player)) {
                return true;
            } else {
                return false;
            }
        }
    
        public static void removeStaffMember(String player) {
            List<String> list = getStaffList();
            list.remove(player);
            File file = new File("plugins/StaffList/staff.dat");
            YamlConfiguration yc = YamlConfiguration.loadConfiguration(file);
            yc.set("Staff", list);
            yc.set(player, null);
            try{
                yc.save(file);
            } catch(IOException e) {
                e.printStackTrace();
            }
        }
    
        public static void noCommandPerm(Player player) {
            player.sendMessage(ChatColor.DARK_RED + "You do not have access to that command.");
        }
    
        public static void unknownCommand(Player player) {
            player.sendMessage("Unknown command.");
        }
    
        public static boolean isEssentialsVanished(Player player) {
            Essentials ess = (Essentials) Bukkit.getPluginManager().getPlugin("Essentials");
            if(ess != null) {
                List<String> vanished = ess.getVanishedPlayers();
                if (vanished.contains(player.getName())) {
                    return true;
                } else {
                    return false;
                }
            } else {
                return false;
            }
        }
    
        @SuppressWarnings("deprecation")
        public static boolean isNoPacketVanished(Player player) {
           if(Bukkit.getServer().getPluginManager().getPlugin("VanishNoPacket") !=null) {
                try {
                    String pname = player.getName();
                    org.kitteh.vanish.VanishPlugin vp = (org.kitteh.vanish.VanishPlugin) Bukkit.getServer().getPluginManager().getPlugin("VanishNoPacket");
                    if(vp.isEnabled()) {
                            if (org.kitteh.vanish.staticaccess.VanishNoPacket.isVanished(pname)) {
                                return true;
                            } else {
                                return false;
                            }
                    } else {
                        return false;
                    }
    
                }   catch(org.kitteh.vanish.staticaccess.VanishNotLoadedException e) {
                    e.printStackTrace();
                    return false;
                }
            } else {
               System.out.print("VanishNoPacket is null");
                return false;
            }
        }
    
        public static void setupDir() {
            File file = new File("plugins/StaffList/");
            if(!file.exists()) {
                file.mkdirs();
            }
        }
    
        public static void setupConfig() {
            final File file = new File("plugins/StaffList/config.yml");
            final File tempfile = new File("plugins/StaffList/deleteMe.txt");
            setupDir();
            if(!file.exists()) {
               try{
                   BufferedWriter writer = new BufferedWriter(new FileWriter(tempfile));
                   try {
                       writer.write(
                               "############################################################" +
                               "\n# +------------------------------------------------------+ #" +
                               "\n# |                       Notes                          | #" +
                               "\n# +------------------------------------------------------+ #\n" +
                               "############################################################\n" +
                               "#This is the config file in which things can be configured\n" +
                               "#There are global variables in which they can be used and replaced. They are:\n" +
                               "#%player% = Replaced with the players name (staffhead)\n" +
                               "#%rank% = Replaced with the rank of the player (staffhead)\n" +
                               "#%lastlogin% = Replaced with the last login of the player\n" +
                               "#%onlinetime% = Replaced with the online time of the player\n" +
                               "#&1-9 + &a-f = Color Codes" +
                               "\n############################################################" +
                               "\n# +------------------------------------------------------+ #" +
                               "\n# |                       Config Options                 | #" +
                               "\n# +------------------------------------------------------+ #\n" +
                               "############################################################\n" +
                               "\nStaffHeadTitle: '&6Staff'\n" +
                               "ShowRank: 'true'\n" +
                               "ShowLastLogin: 'true'\n" +
                               "ShowOnlineTime: 'true'\n" +
                               "IGN_Template: '&7IGN &8&l// &c%player%'\n" +
                               "RANK_Template: '&7Rank &8&l// &c%rank%'\n" +
                               "LASTLOGIN_Template: '&7Last Login &8&l// &c%lastlogin%'\n" +
                               "ONLINETIME_Template: '&7Online For &8&l// &c%onlinetime%'\n"
                       );
                   }
                   catch (Exception e) {
                       System.out.print("Error writing to config");
                       e.printStackTrace();
                   }
                   finally {
                       writer.flush();
                       writer.close();
                       Files.copy(tempfile, file);
                       setupBooleans();
                   }
    
               } catch(IOException e) {
                   e.printStackTrace();
               }
            }
        }
    
    
        public static String getCfgValue(String value) {
            File file = new File("plugins/StaffList/config.yml");
            YamlConfiguration yc = YamlConfiguration.loadConfiguration(file);
            if(yc.contains(value)) {
                return yc.getString(value);
            } else {
                return null;
            }
        }
    
        public static String getValue(String value) {
            File file = new File("plugins/StaffList/staff.dat");
            YamlConfiguration yc = YamlConfiguration.loadConfiguration(file);
            if(yc.contains(value)) {
                return yc.getString(value);
            } else {
                return null;
            }
        }
    
        public static String replaceAll(String string, String player) {
            string = string.replaceAll("%player%", player);
            string = string.replaceAll("%rank%", getValue(player + ".Rank"));
            string = string.replaceAll("%lastlogin%", getValue(player + ".LastLogin"));
            String ot = getOnlineTime(player);
            if(ot == null) {
                string = string.replaceAll("%onlinetime%", "Unknown");
            } else {
                string = string.replaceAll("%onlinetime%", ot);
            }
            string = string.replaceAll("(&([a-f0-9k-or]))", "\u00A7$2");
            return string;
        }
    
        @EventHandler
        public void onLogin(PlayerJoinEvent e) {
            Player player = e.getPlayer();
            File f = new File("plugins/StaffList/staff.dat");
            if(f.exists()) {
                YamlConfiguration yc = YamlConfiguration.loadConfiguration(f);
                if (yc.contains(player.getName())) {
                    DateFormat dateFormat = new SimpleDateFormat("dd/MM/yyyy HH:mm:ss");
                    Date date = new Date();
                    yc.set(player.getName() + ".LastLogin", dateFormat.format(date));
                    try {
                        yc.save(f);
                    } catch (IOException e1) {
                        e1.printStackTrace();
                    }
                }
            }
        }
    
    
    }
    
     
    Last edited: Apr 8, 2015
  2. Offline

    mine-care

    Umm, why are there static fields in a class that will never ever be instanciated over once?
    EDIT: you can get booleans from config instead of parsing string to boolean (FileConfiguration#getBoolean(String paramPath);)

    Anyway the problem apears to be Caused by: java.lang.ClassNotFoundException: org.kitteh.vanish.staticaccess.Vani
    shNotLoadedException
    that i think means it is not loaded, Can we see your plugin.yml? have you registered dependensies
     
  3. Offline

    timtower Administrator Administrator Moderator

    Moved to Bukkit alternatives
     
  4. @DaChiimp Are you sure it's on the server?
     
  5. @bwfcwalshy It's not on the server no because it's optional. This means that if they have the plugin then it uses the code.

    plugin.yml
    Code:
    name: StaffList
    version: 2.1
    main: com.dachiimp.stafflist.StaffList
    commands:
        staff:
            description: Generic base command.
     
  6. @DaChiimp Add softdepend: [VanishNoPacket] also please show us your full onEnable
     
  7. @bwfcwalshy That is my full on enable?

    EDIT: Thanks for that softdepend. Forgot about that.

    @bwfcwalshy Sorry, forgot to reference that. Line 239 and it is calling the method at 462

    EDIT: The error is not fixed.

    Still giving me that error.
     
    Last edited by a moderator: Apr 8, 2015
  8. @DaChiimp Check if it exists in onEnable, if so print something like "Hooked into VanishNoPacket"
     
  9. @bwfcwalshy Still nothing. Do you think it may be the API that is broke? Have you tried downloading VanishNoPacket and tried to use it in a plugin but purposely not have it on the server so it is optional usage.
     
  10. @DaChiimp You are getting the error because it is running a VanishNoPacket method when it's not on.
     
  11. @bwfcwalshy I'm not. I check if the plugin is not null first.
     
  12. @DaChiimp I know you are but that is what the error says

    Print out a message each time it runs a VanishNoPacket method, see how many print.
     
  13. @bwfcwalshy
    I did and it was not called on enable. I am starting to think the API is broke because this error is thrown when you use a older version of WG with 1.8 (obviously a WorldGuard error though not VanishNoPacket)
     
Thread Status:
Not open for further replies.

Share This Page