Plugin Help Plugin Interferance?

Discussion in 'Plugin Help/Development/Requests' started by TheDiamond06, Dec 25, 2014.

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

    TheDiamond06

    So on my test server I have an event handler that tests for certain item names and then dispatches a command from the player. It works , Ive tried it on my test server and it works, but when I send it to my friend to put it on his server it does not work.
    Here is the Code:
    Code:
        @SuppressWarnings("deprecation")
           @EventHandler
           public void PickBoost(PlayerInteractEvent e){
               Player p = e.getPlayer();
               ItemStack item = p.getItemInHand();
               Action action = e.getAction();
               if (!(e.getAction() == Action.RIGHT_CLICK_AIR || action.equals(Action.RIGHT_CLICK_BLOCK))) return;
               if (!(e.getItem().getType() == Material.DIAMOND_PICKAXE)) return;
                  p.playSound(p.getLocation(), Sound.LEVEL_UP, 1, 1);
                  p.addPotionEffect(new PotionEffect(PotionEffectType.FAST_DIGGING, 20000000, 3));
                  p.addPotionEffect(new PotionEffect(PotionEffectType.SPEED, 20000000, 1));
                  p.getPlayer().setAllowFlight(true);
                  p.getPlayer().setFlying(true);
              if(e.getPlayer().getItemInHand().getType() == (Material.DIAMOND_PICKAXE))
              {
              if(e.getAction() == Action.RIGHT_CLICK_AIR || e.getAction() == Action.RIGHT_CLICK_BLOCK)
                 {
                  Player p1 = e.getPlayer();
                  ItemStack i = p1.getItemInHand();
                  ItemMeta im = i.getItemMeta();
                  if (im.getDisplayName().equalsIgnoreCase("§c§lA-Pickaxe"))
                  {
                      Bukkit.dispatchCommand(p1, "sellall a");
                  }
                    if (im.getDisplayName().equalsIgnoreCase("§c§lB-Pickaxe"))
                    {
                        Bukkit.dispatchCommand(p1, "sellall b");
                    }
                    if (im.getDisplayName().equalsIgnoreCase("§c§lC-Pickaxe"))
                    {
                        Bukkit.dispatchCommand(p1, "sellall c");
                    }
    etc.... and so on with more ranks
    
    This works fine for me
    Here is my friends Plugin List:
    LightningEdit [My Plugin]
    ProtocolLib-3.4.0
    Vault-1.4.1
    AdvancedMOTD
    AlphaChest
    AlwaysDay
    AntiBotUltra
    AutoAnnouncer
    BKCommonLib
    Buycraft
    ChatControl
    ChestCommands
    Citizens
    ClearLag
    CommandBlocker
    CrateReloaded
    CustomDeathMessages
    DragonMOTD
    EZPrestige
    EZRanksLite
    EnderRankup
    Essentials
    EzBlocks
    FirstJoinPlus
    GAListener
    HolographicDisplays
    ImmortalCustom
    ItemRenamer
    LoginCommand
    MultiWorld
    Multiverse-Core
    Multiverse-Portals
    Onjoincommand
    PermissionsEx
    PlayerVaults
    PlotMe
    PluginMetrics
    PrisonMine
    PrisonSuite
    QuickSell
    ServerSigns
    TokenEnchant
    Updater
    VoteParty
    Votifier
    VoxelSniper
    WarpPortals
    WhatisIt
    WorldEdit
    WorldGuard
    contrib
    floAuction
    McMMO

    These are all his plugins....
    I don't know if these are interfering with anything. I do know that my Plugin depends on Vault and ProtocolLib. He does have the correct versions.

    Plugin Yml:
    Code:
     
    name: LightningEdit
    main: com.enjin.lightningedit.LightningEdit
    depend: [ProtocolLib, Vault]
    version: 1.0
    description: LightningEdit - A Custom Made Plugin by TheDiamond06
    author: TheDiamond06
    website: lightningmchd.enjin.com
    commands:
    
     
  2. Offline

    pie_flavor

    Any locally-grown plugins may be compiled with new releases of Java that your friend may not have. It's always best to avoid Java 8 and try to stick to Java 6 whenever possible, and your friend might have an outdated version of Java.
     
  3. Offline

    TheDiamond06

    Ok. Thanks, didn't know that the version of java had to do with anything. I'll tell him to update it.
     
  4. Offline

    pie_flavor

    Yup. Higher releases of Java can work with things compiled in lower releases, but not vice versa. They keep adding new features in each version of Java, so the client has to have an environment that can handle all of the features in the program's version.
     
Thread Status:
Not open for further replies.

Share This Page