Getting started with Bukkit and CraftBukkit

Discussion in 'Bukkit Help' started by Oslarathos, Jan 4, 2011.

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


    Mmk, so Windows can't find java.exe. Your batch file is fine, and is in the same directory, Win7 64-bit shouldn't make a difference, I'm running the same thing. Good that Java is up to date, but not necessary (I don't think?). Hmmm... Alright, here we go:
    1. Remove '\java.exe' from the path name you added to the PATH variable and try again. It's supposed to be a path to a folder, not a file. Still doesn't work? Next step.
    2. Check the location you added to the PATH variable. Are you sure that's exactly where your java.exe file is stored? I know that in mine (also Win7 64-bit), there's another folder under 'java' called something like 'java6' (I need to re-check). Not working? One more step.
    3. Make sure you've separated the entries in the PATH variable by semicolons. If this doesn't work, post your entire PATH variable. Yes, all of it. There may be an error in there you need to correct for it to parse right.
  2. Offline


    Haha lol yeah removing the java.exe worked. Also it was located at 'java\jre6\bin' or something like that my bad lol.

    Weird thou how I need to add it the the PATH environment when the .bat file i use for hMod works fine.

    Any who cheers mate knew I was overlooking something.
  3. Offline


    2 things...sorry Im pretty illiterate when it comes to this type of thing

    1.Alright the server seems to be up and running in the cmd window but when I try and log into localhost i get Connection Lost

    Intenal exception: FormatException:malformed input around byte 2

    2.What would be the best way to go about get IConomy and ICShop pluggins working?
  4. Offline


    Thanks for the tut. The pos and debug comands work, but if I add the Block Listener it royally breaks. I get this error when I try and place a Cactus:If I try and add the Sand falling part, it keeps on sending me errors
    In eclipse Cactus is underlined in red, but if I put in CACTUS it turns italic blue. It doesn't work either.
    Also, I can place Cactus on Snow and Water :S
  5. Offline


    Could I have some Mac instructions please?
  6. Offline


    I tried to install bukkit with maven and eclipse, but didn't make it.
    So i installed it the easy way (Like they say on the forums FAQ), i have mac so i can't use sudo and i can't use .bat files, so i combined the Linux and the Windows installation and it worked :)
    But every plugin i install it came an error, i searched at google and found this thread :confused:

    Its just the same like hansudo has, but instead of sampleplugin.jar its all the plugins .jar files
    Is it possible that its similar?
  7. Offline


    I have no idea what to do with coding, but can anyone tell me where to download (Craft)Bukkit and/or give me a download of all the files ready?
  8. Offline



    Second post.
  9. Offline


    ^there is no download link that i found on them unless you are a member,which caused me to give up instantly. Im fed up with tying to install it, ive tried 9 times with 8 tutorials and drawn the same error.

    Exception in thread "main" java.lang.NoClassDefFoundError: org/bukkit/craftbukki​
    Caused by: java.lang.ClassNotFoundException: org.bukkit.craftbukkit.Main​
    at$ Source)​
    at Method)​
    at Source)​
    at java.lang.ClassLoader.loadClass(Unknown Source)​
    at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)​
    at java.lang.ClassLoader.loadClass(Unknown Source)​
    Could not find the main class: org.bukkit.craftbukkit.Main. Program will exit.​
    Press any key to continue . . .​

    and my start.bat is​

    @echo off​
    "%ProgramFiles(x86)%\Java\jre6\bin\java.exe" -Xms512M -Xmx512M -jar craftbukkit.jar​

    And i have a copy of craftbukkit.jar in that directory.​

    I even tried with the original name. Nada.​
  10. Offline


    I followed the video tut but when I download SampleProject and draw the com folder to src in the project, I get a lot of errors in the code. The error messages are mainly "Player cannot be resolved to a type" and "Block cannot be resolved to a type".

    In bukkit repos there is no such thing as org.bukkit.Player and org.bukkit.Block. Is this broken because of some update?
  11. Offline


    i keep getting an error in "private final SamplePlugin plugin;" where it says plugin there is a squiggly orange line under it
  12. Offline


    can someone give me a link where i can download bukkit and how to install it properly
  13. Offline


    I can't download Bukkit because i keep getting bad gateway or there's no download link there :O
    This didn't happen some days ago. I guess they've changed it. Anyone knows where i can get it now or is this gonna fix or something?
  14. Offline


    The link is not working, if somebody could try to fix this, it would be greatly appreciated.
  15. Offline


    Links are dead
  16. Offline


  17. Offline

    Astro MacGuffin

    Noob question, hopefully of the semi-competent variety. My (first) plugin compiles, but I think I've packaged the jar file wrong. As briefly as possible:

    What I did (open)
    ~/src/bukkit/HelloBukkit$ ls com/AstroMacGuffin/Hullo/HulloCitizen/
    HulloCitizen.class  HulloCitizenCustomListener.class
    ~/src/bukkit/HelloBukkit$ cat plugin.yml
    name: HulloCitizen
    main: com.AstroMacGuffin.Hullo.HulloCitizen
    version: 0.1
    ~/src/bukkit/HelloBukkit$ jar cvf HulloCitizen.jar plugin.yml com/AstroMacGuffin/Hullo/HulloCitizen/*.class
    I copy to the plugins folder and let 'er rip, but she complains about stuff. After that I open the .jar in file-roller and move the folder HulloCitizen, and the file plugin.yml, to the root folder. Then I copy the jar file to my server's plugins folder and let 'er rip again.

    [SEVERE] Could not load plugins/HulloCitizen.jar in plugins: null
    	at org.bukkit.plugin.SimplePluginManager.loadPlugin(
    	at org.bukkit.plugin.SimplePluginManager.loadPlugins(
    	at org.bukkit.craftbukkit.CraftServer.loadPlugins(
    	at net.minecraft.server.MinecraftServer.e(
    	at net.minecraft.server.MinecraftServer.a(
    	at net.minecraft.server.MinecraftServer.d(
    Caused by: java.lang.ClassNotFoundException: com.AstroMacGuffin.Hullo.HulloCitizen
    	at Method)
    	at java.lang.ClassLoader.loadClass(
    	at java.lang.ClassLoader.loadClass(
    	at java.lang.Class.forName0(Native Method)
    	at java.lang.Class.forName(
    	... 8 more

    Unfortunately, I still have errors. I suspect the problem is my folder structure; but I'm just now learning Java, so this is my first mod, and my 2nd day with Java at all.

    Tips? Halp?

    EDIT: In case anyone's just chomping at the bit to help me... source (open)

    package com.AstroMacGuffin.Hullo.HulloCitizen;
    import java.util.HashMap;
    import org.bukkit.entity.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.PluginManager;
    import com.fullwall.Citizens.Citizens;
     * HulloCitizen plugin for Bukkit
     * @author Astro MacGuffin
     * Based on the sample by Dinnerbone (thank you)
     * Imports fullwall's Citizens and hopefully does something with it.
    public class HulloCitizen extends JavaPlugin {
        private final HulloCitizenCustomListener customListener = new HulloCitizenCustomListener(this);
        private final HashMap<Player, Boolean> debugees = new HashMap<Player, Boolean>();
        // NOTE: There should be no need to define a constructor any more for more info on moving from
        // the old constructor see:
        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 void onEnable() {
            PluginManager pm = getServer().getPluginManager();
            // Register our events
            pm.registerEvent(Event.Type.CUSTOM_EVENT, customListener, Priority.Normal, this);
            // 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() + " version " + pdfFile.getVersion() + " is enabled!" );
        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);
 source (open)

    package com.AstroMacGuffin.Hullo.HulloCitizen;
    import java.util.HashMap;
    import org.bukkit.entity.Player;
    import org.bukkit.Server;
    import org.bukkit.event.Event.Priority;
    import org.bukkit.event.Event;
    import org.bukkit.event.CustomEventListener;
    import org.bukkit.plugin.PluginDescriptionFile;
    import org.bukkit.plugin.PluginLoader;
    import org.bukkit.plugin.PluginManager;
    import com.fullwall.Citizens.Citizens;
    public class HulloCitizenCustomListener extends CustomEventListener {
      private HulloCitizen plugin;
      public HulloCitizenCustomListener( HulloCitizen plugin ) {
        this.plugin = plugin;
      public void onCustomEvent(Event ev) {
        if (!ev.getType().equals(Event.Type.CUSTOM_EVENT)) {
        if (!ev.getEventName().equals("CitizensBasicNPCEvent")) {
        CitizensBasicNPCEvent e = (CitizensBasicNPCEvent) ev;
        System.out.println( "Hullo, Citizen!" );

    I'm happy to say, nevermind my previous post :D Figured it out - was compiling from /above/ the src folder the whole time, making the flags like it but leaving PluginLoader unable to find it.
  18. Offline


    Thank you for this tutorial, it helps!

    How do I use egit to set my local src files to a certain commit?
    Also how do I revert a commit locally so I can build without a specific commit?
  19. Offline

    Mosh Mage

    Forgive me for the dumbest of questions, i just woke up but here it goes, but is the proccess of making a plugin in NetBeans IDE 7 excatly the same as in Eclipse?

    Because i couldnt get Eclipse to work, god knows why
  20. Offline


    Whenever I try to run the server I get the following error:
    according to Eclipse, it's a problem with the main SamplePlugin class.
    Can someone help?
Thread Status:
Not open for further replies.

Share This Page