EasyPlugin - Make a plugin in minutes!

Discussion in 'Resources' started by Canownueasy, Mar 3, 2012.

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

    Canownueasy

    EasyPlugin
    Make a plugin in minutes!

    EasyPlugin just does as its name implies, creates plugins with ease! With EasyPlugin, you don't have to worry about creating configuration files, as well as avoiding low-level Bukkit features.


    Learn to use EasyPlugin
    With EasyPlugin, plugin development is as simple as extending a class. The compiler (and probably your IDE) will enforce you meet requirements for creating a plugin. Every part of EasyPlugin is easy to understand.

    Example plugin:
    Code:
    package com.tnappo.exampleplugin;
     
    import org.bukkit.event.EventHandler;
    import org.bukkit.event.Listener;
    import org.bukkit.event.block.BlockBreakEvent;
     
    import easyplugin.Plugin;
    import easyplugin.configuration.Requirement;
     
    public class ExamplePlugin extends Plugin implements Listener {
     
    public ExamplePlugin() {
    super("ExamplePlugin");
    }
     
    @Override
    protected void addConfigurationRequirements() {
    getConfiguration().addRequirement(
    Requirement.getRequirement("disabled", new String[] { "Set to 'true' to disable the plugin." }, "false"));
    }
     
    @Override
    protected void registerListeners() {
    registerListener(this);
    }
     
    @EventHandler
    public void onBlockBreak(BlockBreakEvent event) {
    if (!getConfiguration().getBoolean("disabled")) {
    event.getPlayer().sendMessage("You broke a block!");
    }
    }
     
    }
    In the case where you want low-level "root" access to all of Bukkit's features, extend "RootAccessPlugin" (easyplugin.RootAccessPlugin).

    New version 1.1!
    • Removed the configuration value retrieval from Plugin (you can use getConfiguration() only now)
    • Includes Java documentation and source!

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

    Pacothegint

    failed to load Main-Class
     
  3. Offline

    Canownueasy

    Hello, I don't understand what you mean. Your plugin isn't loading? You need to have the EasyPlugin library in your plugins folder as well.

    New version 1.2!
    • Added command support! Just handle the event 'CommandEvent' (easyplugin.CommandEvent)
     
  4. Offline

    Pacothegint

    Wait is this a plugin or how do I get it to work?
     
  5. Offline

    blackvoid

    Its a class you extend to make plugins faster.
     
  6. Offline

    Pacothegint

  7. Offline

    karatetoes

    hmmm i still dont get this can u explain in the most noob terms possible
     
  8. Offline

    Quintin

    You extend EasyPlugin instead of JavaPlugin and it automatically does some stuff for you.

    Noob version:
    if JavaPlugin is advanced mode, EasyPlugin is simple Mode.
     
  9. Offline

    karatetoes

    wait so would I be able to copy like a class file and add a bunch of class files to one folder so like i can have the commands that I want on my server and literally delete the others and save me time with PEX
     
  10. Offline

    Mekixx1

    karatetoes this is for developers. not for server admins/owners.
     
  11. Offline

    Bertware

    Shouldn't this be in plugin development?
     
  12. Offline

    karatetoes

    Mekixx1 i understand that this is for developers. I am trying to become a developer at the time and I am trying to figure out what you mean. So would i be able to take another plugins 1 command out of say like 10 and add that to my plugin and then delete the plugin I took outta the one im NOT developing but still have that 1 command I took out and put into mine from it.
     
  13. Offline

    jamiemac262

    hmm, i think you might benifit from building a wiki for this
     
    Mekixx1 likes this.
  14. Offline

    ShootToMaim

    I don't see the features of this.
    What does this class do? Automatically creates, permissions, example commands... what?
     
    lol768 likes this.
  15. Offline

    jamiemac262

    are you aslo able to add a readwrite class? so....

    i wanna write to a txt file
    readwrite.set contents(file, contents) for example...

    and does the configuration thing work for something like (playername).yml

    so every player has one... similar to the way essentials keeps track of player stats?
     
  16. Offline

    colefrick

    I honestly am being a noob and don't know how to use this?
    I've tried just double clicking to open it, nothing.
     
  17. Offline

    Lolmewn Retired Staff

    karatetoes Ehm, no. That's not how Java or Bukkit works. Unless you somehow manage to pull that one command out from the plugin and compile it.
     
  18. Offline

    TnT Retired Staff

    Moved to a more appropriate forum.
     
  19. Offline

    MrInspector

    Are you trying to double click the *.jar file and expecting it to launch minecraft with bukkit and the plugin installed? :)

    If so, that's not how you do it, you need to drag the *.jar file to the 'plugins' folder, then either start or reload or restart your server. ;)

    I wish you the best of luck on your journeys!
     
  20. Offline

    WeeSkilz

    I believe that this is a library that you import into your IDE (just taken a quick glance - sorry if I am wrong).
    It's not a finished plugin - more an assisting piece in the puzzle to develop your own.

    Good luck.
     
  21. Offline

    swagmuffin1105

    so wait? this is a thing that you can make plugins from your server and don't need eclipse?

    oh and what version of server will i need?

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

    malandrix_bunny

    swagmuffin1105 You need an IDE, it is just a handy little library. I would recommend that you leafn some basic java first and then you will understand enough to use this. Know what classes are, methods, sub classes, interfaces etc.
    Good luck, it may seem hard but is worth it.
     
  23. Offline

    Jalau

    You should add a [Advanced] to the topic because it seems like it's really hard to understand for some people :D
     
  24. Offline

    AdamQpzm

    Jalau It's for people who already know how to make plugins, really. Not for advanced users.
     
    ZodiacTheories likes this.
  25. Offline

    Jalau

    Yeah i know :D
     
  26. Offline

    JBoss925

    A few things:

    I find this to be almost a different way of doing what the BukkitAPI was meant to do, I don't think it makes anything much easier as far as setup.

    This should be a Util, not something that goes into your plugins folder. In order for this to go into you plugins folder I'm assuming your easyplugin.Plugin extends JavaPlugin, otherwise some errors would be thrown. This is very bad, as if the newer devs try to make a main class or instantiate your plugin, it will throw the plugin already initialized exception.

    In order to make it a Util, just post the two classes with the source code for people to copy into their IDE. It gives them much more power.

    Otherwise, good job.
     
Thread Status:
Not open for further replies.

Share This Page