Plugin Development Video Tutorial Series

Discussion in 'Resources' started by Jacek, Sep 8, 2011.

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

    Jacek

  2. Offline

    jobud9

    yay!
    they are awesome ;)
     
  3. Offline

    Adamki11s

    Just watched about 1 min of the first one, I already know all this so I don't need to watch them. But the quality is very good and speech is clear and you explain it clearly; good job!
     
  4. Offline

    Jacek

    I'll get to more advanced stuff eventually. If I started with custom events I would have got loads of messages asking what an event was.
     
  5. Offline

    Adamki11s

    I think it would be good if you maybe followed the setup of my huge plugin tutorial and then expanded from that.
     
  6. Offline

    BeerHuntor

    These are awesome, and now know and fully understand what goes into a plugin etc... Cant wait for the next videos :)

    Keep up the good work.
     
  7. Offline

    Jacek

    I will do :D

    Thanks for the support.

    I will try to make the next few a bit less random and maybe start building a actual useful plugin to use as an example.

    This is after I stop being distracted by 1.8 that is :D

    I'm also looking for suggestions on what I could include in future videos, post 'em here :D

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 19, 2016
  8. Offline

    BeerHuntor

    You mean like different style plugins? Well you could do a variation of things, from something simple like your TnT plugin, up to a leveling based system plugin for a skill or something... Im sure in that array of things, you would cover most things available to you anyway :)
     
  9. Offline

    Jacek

    Well I mean specific things, like terrain generation or using the map API for example.
     
  10. Offline

    BeerHuntor


    Oh in that case, idk, thats way over my head to know what you could do with that sorry...

    This is why im watching your tuts ^^ :p

    EDIT: I have just thaught of something.. Maybe it fits into it maybe it doesnt... But create some sort of instances for RPG server like they have on WOW :)

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 19, 2016
  11. Offline

    jobud9

    maybe something like mob arena? that was such a good plugin, but maybe a little too complex for beginners :p
     
  12. Offline

    Junrall

    Hello,

    I've have watched the first two videos and have followed the TNTNotifier example as far as the second video.
    I'm having a bit of a problem in that when TNT is placed nothing happens... TNT does not turn to cake, nor are there any messages written to the console.
    The plugin is being logged as enabled.
    I have no errors when compiling.
    I'm not using any other plugins.
    And I have triple checked my code to be sure that it matches what was shown in the videos.

    I'm using:
    The latest Bukkit
    Eclipse Version: Indigo
    Java development 7

    Is it possible that the latest Bukkit has changes that will effect this programming example?

    Thanks
     
  13. Offline

    Celeixen

    WOW, back when i was learning i watched samiko's video and they were horrible compared to yours. i only watched the first 5min because i don't really need it but i like it how you actually explain the stuff properly most others just expect you to copy code. I was even thinking i may have to make a tutorial if no-one sooner or later does it right :)

    So Great Job (well the first 5min was great, can't comment on the rest but still..)
    +Like 4 you!
     
  14. Offline

    Don Redhorse

    very good videos... I did like it a lot.. but I didn't release my plugin from it... hint hint :eek:

    I would keep on going with it... it is simple but very easy to comprehend and the steps are good.

    Thinks to do:

    Config file
    Ingame Commands
    some more best practices or "framework / Layout" of plugins
    some more special bukkit cases on how to do stuff

    Don't have any more ideas atm.. except please create a playlist for those videos.. they are hard to come by on youtube itself
     
  15. Offline

    Jacek

    There already is one, you should see it next to the video.
     
  16. Offline

    Don Redhorse

  17. Offline

    Jacek

    I never said not to use it to make a plugin and submit it ;)

    The source is not exactly the same either so this person has obviously put a bit of time and thought into it.

    In other news, I made some layout changes and renamed the videos to make more sense.

    This was a lot more popular than I expected it to be so I have expanded my original plan :D

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 19, 2016
  18. Offline

    Don Redhorse

    good.. and you posted in the the thread too.. read more about it there...

    and I agree you never said it... but.. well... lol...
     
  19. Offline

    nil0bject

    Hey Jacek, awesome videos. thanks for making them!

    Would you be open to making a tutorial based upon my text one? It's about storing config values using mySQL. It doesn't cover things like setting up a mySQL server or anything, though you could add this if you wanted. I can write more instructions if needed.
    Anyway, here it is: http://forums.bukkit.org/threads/java-tut-use-mysql-to-store-your-config.37204/
    If you can't, I will give it a shot :D
     
  20. Offline

    Jacek

    I might do something with MySQL, but using it to replace the config file really a good idea ? I mean the config file is only read once anyway right so you won't gain that much performance.
     
  21. Offline

    nil0bject

    yes and no. depends on how much data you are storing.
    i had a few requests for it to be built into my plugins, so I guess the benefit might not be performance, but ease of management.
     
  22. Offline

    Jacek

    Due to the silly amount of requests I got, I just added some videos on config files. Now stop PMing me ! :D
     
  23. Offline

    madd15

    In regards to the damage true/false option when I followed your tutorial it doesn't work.

    EntityListener:
    Code:
    package arc.madd.tntnote;
    
    import org.bukkit.entity.Entity;
    import org.bukkit.entity.TNTPrimed;
    import org.bukkit.event.entity.EntityListener;
    import org.bukkit.event.entity.ExplosionPrimeEvent;
    
    public class TNTNoteEntityListener extends EntityListener {
        
        private TNTNote plugin;
        
        public TNTNoteEntityListener(TNTNote instance) {
            
            this.plugin = instance;
            
        }
        
        public void onExplosionPrime(ExplosionPrimeEvent event) {
            
            if (event.isCancelled()) return;
                
            Entity entity = event.getEntity();
                    
            if (entity instanceof TNTPrimed){
                        
                TNTPrimed tnt = (TNTPrimed) entity;
                
                if (plugin.config.getBoolean("damage") == false) {
                    
                    tnt.setIsIncendiary(false);
                    tnt.setYield(0);
                    
                    tnt.remove();
                    
                }
                
                event.setCancelled(true);
                
            }
                
        }
        
    }
    
    Config:
    Code:
    package arc.madd.tntnote;
    
    import java.io.File;
    import java.util.HashMap;
    
    import org.bukkit.util.config.Configuration;
    
    public class TNTNoteConfig {
    
        private Configuration config;
        private HashMap<String, Object> configDefaults = new HashMap<String, Object>();
    
        public TNTNoteConfig(File configFile) {
    
            this.config = new Configuration(configFile);
    
            this.configDefaults.put("drop", 4);
            this.configDefaults.put("place", 4);
            this.configDefaults.put("damage", true);
    
            if (configFile.exists() == false) {
    
                for (String key : this.configDefaults.keySet()) {
                    this.config.setProperty(key, this.configDefaults.get(key));
                }
    
                this.config.save();
    
            } else {
    
                this.config.load();
    
            }
    
        }
    
        public int getInt(String key) {
    
            if (this.configDefaults.containsKey(key) == false) {
                return 0;
            }
    
            return this.config.getInt(key, (Integer) this.configDefaults.get(key));
        }
    
        public boolean getBoolean(String key) {
    
            if (this.configDefaults.containsKey(key) == false) {
                return false;
            }
    
            return this.config.getBoolean(key, (Boolean) this.configDefaults.get(key));
    
        }
    
    }
    
    Also when im op i am unable to detonate the tnt, is there a way to make it so ops can detonate?
     
  24. Offline

    Jacek

    In what way does it not work ?
     
  25. Offline

    madd15

    whether the setting is true or false no damage is done
     
  26. Offline

    Jacek

    Okay, well your code looks okay. Perhaps try logging a message inside the

    Code:
    if (plugin.config.getBoolean("damage") == false) {
    block. That would tell you if the problem lies with the config or the tnt blocking.
     
  27. Offline

    madd15

    ok i added System.out.println("Damage False"); and when the config is false it is written but when true it doesn't
     
  28. Offline

    Jacek

    Which version of CB are you using ? In one part of the documentation setYield is described as setting the size of the explosion, in another part it is described as setting the percentage of blocks that are not totally destroyed (ie the percentage of drops). So it is possible that it was actually a bug that gave the effect of player damage, it's also possible that when I was testing this I completely misunderstood what was happening.
     
  29. Offline

    Astaen

    Just after the first video, i done everything same u-U but ... :

    Code:
    [SEVERE] Could not load 'plugins\TNTNotifier.jar' in folder 'plugins':
    java.lang.ClassNotFoundException: fr.astaen.bukkit
        at java.net.URLClassLoader$1.run(Unknown Source)
        at java.net.URLClassLoader$1.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(Unknown Source)
        at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:36)
        at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:24)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Unknown Source)
        at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:168)
        at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.java:215)
        at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:136)
        at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:139)
        at org.bukkit.craftbukkit.CraftServer.<init>(CraftServer.java:104)
        at net.minecraft.server.ServerConfigurationManager.<init>(ServerConfigurationManager.java:101)
        at net.minecraft.server.MinecraftServer.init(MinecraftServer.java:136)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:348)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:417)
     
  30. Offline

    Jacek

    What does your plugin.yml look like ? You probably got the main wrong.
     
Thread Status:
Not open for further replies.

Share This Page