summaryrefslogtreecommitdiffstats
path: root/EssentialsUpdate
diff options
context:
space:
mode:
authorsnowleo <schneeleo@gmail.com>2011-10-23 23:11:47 +0200
committersnowleo <schneeleo@gmail.com>2011-10-23 23:11:47 +0200
commitff92e0bf6f9996542160b2f9de40878e1879202a (patch)
tree794371627b9dad2dc665f93d8e6a2878b6c3cb7f /EssentialsUpdate
parent8854b3f56585d480cd0c8151e7bbbf12d00cd984 (diff)
downloadEssentials-ff92e0bf6f9996542160b2f9de40878e1879202a.tar
Essentials-ff92e0bf6f9996542160b2f9de40878e1879202a.tar.gz
Essentials-ff92e0bf6f9996542160b2f9de40878e1879202a.tar.lz
Essentials-ff92e0bf6f9996542160b2f9de40878e1879202a.tar.xz
Essentials-ff92e0bf6f9996542160b2f9de40878e1879202a.zip
Less chance for C&P error
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);
+ }
}