Hi! 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? Greet
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.
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 ^^
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.
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
There is no problem, use annotations to mark the method, like bukkit do: http://docs.oracle.com/javase/tutorial/java/javaOO/annotations.html
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.
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.
devilquak I would just make a thing like the bukkiteventhandler - Thats make things easier - Commandhandler and stuff is already finished