Own Event-Handler?

Discussion in 'Plugin Development' started by Uniclaw, Jan 15, 2013.

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



    I've tryed to make a little own game, and now i would make a eventhandler. But i've no idea how! A Command Handler, like the Bukkit CommandExecutor is easy - But how can i make a eventhandler?

  2. Offline


  3. Offline


    I don't want to make own Events or other for a Plugin. I want make a own Handler for Events in a new javagame.
  4. Offline


    Do you mean a separate class?
  5. Offline


    Yes :)

    So that for example (i'm using slick as engine) in the update method i don't move entitys itself, but i call a event and in this event i move the entity ^^
  6. Offline


    Is this even bukkit? Or your own game?

    It sounds like the latter to me
  7. Offline


    The same way as the command handler. You need a register with all events, and when an event is happened you need to call the event from the register.
  8. Offline


    slick util? what
  9. Offline


    gomeow A own game. I post it here, cause i've already created upon a time a thread wich has nothing to do with plugins - the thread was moved in this section.

    camyono Yeah, but here's a Problem; In my Command Handler i call a specific Method wich is inherit from a superclass, but in the eventhandler the method can be named whatever the user want - Like the Bukkit-Event-System.

    caxco93 "Slick" is a Java-Game Engine based on LWJGL :)
  10. Offline


    There is no problem, use annotations to mark the method, like bukkit do: http://docs.oracle.com/javase/tutorial/java/javaOO/annotations.html
  11. Offline


    camyono Yes, but how can i for example just call all methods with a specific event as argument :(?
  12. Offline


    Let me just tell you that everything you're talking about, commands, events, handlers, are all part of Bukkit, and Bukkit alone. They're soley part of the Bukkit API that people use the make plugins with. To create your own game, you have to approach it from an entirely different angle, and use completely different methods and completely different ways of running your game.
  13. Offline


    Uniclaw maybe its better if you learn firstly java and then you try to programm your own game. That would do a lot things easier for you.
  14. Offline


    devilquak I would just make a thing like the bukkiteventhandler - Thats make things easier - Commandhandler and stuff is already finished :)
Thread Status:
Not open for further replies.

Share This Page