Error while Exporting.

Discussion in 'Plugin Development' started by streedie, Jan 16, 2011.

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

    streedie

    Hello all,

    I'm new to Java and making Plugins but I got an error while exporting:

    The error is:
    Code:
    JAR creation failed. See details for additional information.
      FunShout1.0/com/bukkit/Streedie/FunShout1.0 [in FunShout] is not on its project's build path
      Unable to get package fragment root: FunShout/FunShout1.0/com/bukkit/Streedie/FunShout1.0/FunShout1.0PlayerListener.java
        FunShout1.0/com/bukkit/Streedie/FunShout1.0 [in FunShout] is not on its project's build path
    
    Please help!

    ~Streedie
     
  2. Offline

    DjDCH

  3. Offline

    streedie

    Ok thanks for the help. Btw: UR SONG IS AWESOME ! :D
    But... I don't know what I miss.
     
  4. Offline

    DjDCH

    Hey hey ! I'm also here to make entertaining. [​IMG]
     
  5. Offline

    streedie

    Pleas someone help! I don't know what I miss..
     
  6. Offline

    DjDCH

    Do you check my link ? And what have you try so far ?
     
  7. Offline

    streedie

    I fixed that bug, by just starting over. The tutorial code has errors:

    Main code:

    Code:
    package
      
    com.bukkit.Streedie.FunShout;
    
    import
      
    java.io.File;
    
    import
      
    java.util.HashMap;
    
    import
      
    org.bukkit.Player;
    
    import
      
    org.bukkit.Server;
    
    import
      
    org.bukkit.event.Event.Priority;
    
    import
      
    org.bukkit.event.Event;
    
    import
      
    org.bukkit.plugin.PluginDescriptionFile;
    
    import
      
    org.bukkit.plugin.PluginLoader;
    
    import
      
    org.bukkit.plugin.java.JavaPlugin;
    
    import
      
    org.bukkit.plugin.PluginManager;
    
    /**
    
    * FunShout for Bukkit
    
    *
    
    *@author
      
    FunShout
    
    */
    
    publicclass FunShout extends
      
    JavaPlugin { private final FunShoutPlayerListener playerListener = new FunShoutPlayerListener(this
      
    ); private final FunShoutBlockListener blockListener = new FunShoutBlockListener(this
      
    ); private final HashMap<Player, Boolean> debugees = new
      
    HashMap<Player, Boolean>(); public
      
    (PluginLoader pluginLoader, Server instance, PluginDescriptionFile desc, File plugin, ClassLoader cLoader) { super
      
    (pluginLoader, instance, desc, plugin, cLoader); // TODO
      
    : Place any custom initialisation code here
      
    // NOTE: Event registration should be done in onEnable not here as all events are unregistered when a plugin is disabled
    
    }
    
    public void
      
    onEnable() { // TODO
      
    : Place any custom enable code here including the registration of any events
      
    // Register our events
    
    PluginManager pm = getServer().getPluginManager();
        
    // EXAMPLE: Custom code, here we just output some info so we can check all is well
    
    PluginDescriptionFile pdfFile =this
      
    .getDescription();
    
    System.out.println( pdfFile.getName() +"! v" + pdfFile.getVersion() + " is enable!"
      
    );
    
    }public void
      
    onDisable() { // TODO
      
    : Place any custom disable code here
      
    // NOTE: All registered events are automatically unregistered when a plugin is disabled
      
    // EXAMPLE: Custom code, here we just output some info so we can check all is well
    
    System.out.println("Goodbye world!"
      
    );
    
    }
    
    public boolean isDebugging(final
      
    Player player) { if
      
    (debugees.containsKey(player)) { return
      
    debugees.get(player);
    
    }
        
    else
    
    {
    
    return false
      
    ;
    
    }
    
    }
    
    public void setDebugging(final Player player, final boolean
      
    value) {
    
    debugees.put(player, value);
    
    }
    
    }
    
    
    Block Code:

    Code:
    package
      
    com.bukkit.Streedie.FunShout;
    
    import
      
    org.bukkit.Block;
    
    import
      
    org.bukkit.BlockFace;
    
    import
      
    org.bukkit.Material;
    
    import
      
    org.bukkit.event.block.BlockCanBuildEvent;
    
    import
      
    org.bukkit.event.block.BlockListener;
    
    import
      
    org.bukkit.event.block.BlockPhysicsEvent;
    
    /**
    
    * FunShout block listener
    
    *@author
      
    Streedie
    
    */
    
    publicclass FunShoutBlockListener extends
      
    BlockListener { private final FunShout plugin
      
    ; public FunShoutBlockListener(final
      
    FunShout plugin) { this.plugin
      
    = plugin;
      
    //put all Block related code here
    
    }
    
    }
    
    
    Player Code:

    Code:
    package
          
    com.bukkit.Streedie.FunShout;
    
    import
       
    org.bukkit.Location;
    
    import
       
    org.bukkit.Player;
    
    import
       
    org.bukkit.event.player.PlayerChatEvent;
    
    import
       
    org.bukkit.event.player.PlayerEvent;
    
    import
       
    org.bukkit.event.player.PlayerListener;
    
    import
       
    org.bukkit.event.player.PlayerMoveEvent;
    
    /**
    
    * Handle events for all Player related events
    
    *@author
       
    Streedie
    
    */
    
    publicclass FunShoutPlayerListener extends
       
    PlayerListener { private final FunShout plugin
       
    ; public
       
    FunShoutPlayerListener(FunShout instance) { plugin
       
    = instance;
    
    }
    
    }
    
     
  8. use the
    Code:
    [CODE]
    tags
     
  9. Offline

    streedie

    But it's nice ;D
    U can see the error's witht the Underline
     
  10. Offline

    streedie

    Edited, can someone pleas help?
     
  11. The answers to most, if not all, of your problem are in the thread I linked you to.
     
  12. Offline

    streedie

    I used it, some got helped, some don't:

    The things:
    Code:
    1. import org.bukkit.Player; / Player
    2. Debugees
    3. import org.bukkit.Block;
    4. import org.bukkit.BlockFace;
    are having some problems.
     
  13. 1,3,4 are solved if you read the thread. I don't see a problem with 2, perhaps someone more learned than me may help.
     
  14. Offline

    streedie

    Can't find the solution... I already did, didn't work...
     
  15. 1. import org.bukkit.entity.Player;
    3. import org.bukkit.block.Block;
    4. import org.bukkit.block.BlockFace;
     
  16. Offline

    streedie

    Everything of the script got fixed, thanks dude, even 2.
    Only now, this exporting error:
    Code:
    Resource is out of sync with the file system: '/FunShout/plugin.yml'.
    Exported with compile warnings: FunShout/src/com/bukkit/Streedie/FunShout/FunShoutBlockListener.java
    Exported with compile warnings: FunShout/src/com/bukkit/Streedie/FunShout/FunShoutPlayerListener.java
    Exported with compile warnings: FunShout/src/com/bukkit/Streedie/FunShout/FunShout.java
    
    The only error I don't know how to fix, is the first one.
     
Thread Status:
Not open for further replies.

Share This Page