aboutsummaryrefslogtreecommitdiffstats
path: root/src/ru/olamedia/olacraft/events/GameEvent.java
diff options
context:
space:
mode:
authorolamedia <[email protected]>2012-09-28 18:46:42 +0600
committerolamedia <[email protected]>2012-09-28 18:46:42 +0600
commitb4192c7a88bad111bebbd42d391d6e729c8617d6 (patch)
treeb05a586dbc60c5427fcc7f3fe01cf2fdcb970272 /src/ru/olamedia/olacraft/events/GameEvent.java
initial
Diffstat (limited to 'src/ru/olamedia/olacraft/events/GameEvent.java')
-rw-r--r--src/ru/olamedia/olacraft/events/GameEvent.java32
1 files changed, 32 insertions, 0 deletions
diff --git a/src/ru/olamedia/olacraft/events/GameEvent.java b/src/ru/olamedia/olacraft/events/GameEvent.java
new file mode 100644
index 0000000..94b291c
--- /dev/null
+++ b/src/ru/olamedia/olacraft/events/GameEvent.java
@@ -0,0 +1,32 @@
+package ru.olamedia.olacraft.events;
+
+public class GameEvent {
+ public static int GAME_START = GameEventRegistry.get("game.start");
+ public static int PLAYER_SPAWN = GameEventRegistry.get("player.spawn");
+ private Object source;
+ private int type;
+
+ public GameEvent(Object source) {
+ this.setSource(source);
+ }
+
+ public int getType() {
+ return type;
+ }
+
+ public void setType(int type) {
+ this.type = type;
+ }
+
+ public Object getSource() {
+ return source;
+ }
+
+ public void setSource(Object source) {
+ this.source = source;
+ }
+
+ public void dispatch() {
+ GameEventDispatcher.dispatch(this);
+ }
+}