summaryrefslogtreecommitdiffstats
path: root/EssentialsUpdate
diff options
context:
space:
mode:
Diffstat (limited to 'EssentialsUpdate')
-rw-r--r--EssentialsUpdate/src/com/earth2me/essentials/update/states/StateMachine.java2
-rw-r--r--EssentialsUpdate/src/com/earth2me/essentials/update/states/StateMap.java5
2 files changed, 6 insertions, 1 deletions
diff --git a/EssentialsUpdate/src/com/earth2me/essentials/update/states/StateMachine.java b/EssentialsUpdate/src/com/earth2me/essentials/update/states/StateMachine.java
index 53612715e..4a32b69e4 100644
--- a/EssentialsUpdate/src/com/earth2me/essentials/update/states/StateMachine.java
+++ b/EssentialsUpdate/src/com/earth2me/essentials/update/states/StateMachine.java
@@ -22,7 +22,7 @@ public class StateMachine extends WorkListener
super(plugin, newVersionInfo);
this.player = player;
states.clear();
- states.put(EssentialsChat.class, new EssentialsChat(states));
+ states.add(new EssentialsChat(states));
current = states.get(0);
}
diff --git a/EssentialsUpdate/src/com/earth2me/essentials/update/states/StateMap.java b/EssentialsUpdate/src/com/earth2me/essentials/update/states/StateMap.java
index 02d6cc129..a2cf7b719 100644
--- a/EssentialsUpdate/src/com/earth2me/essentials/update/states/StateMap.java
+++ b/EssentialsUpdate/src/com/earth2me/essentials/update/states/StateMap.java
@@ -9,4 +9,9 @@ public class StateMap extends LinkedHashMap<Class<? extends AbstractState>, Abst
{
super();
}
+
+ public AbstractState add(AbstractState state)
+ {
+ return put(state.getClass(), state);
+ }
}