diff options
author | snowleo <schneeleo@gmail.com> | 2011-10-23 23:11:47 +0200 |
---|---|---|
committer | snowleo <schneeleo@gmail.com> | 2011-10-23 23:11:47 +0200 |
commit | ff92e0bf6f9996542160b2f9de40878e1879202a (patch) | |
tree | 794371627b9dad2dc665f93d8e6a2878b6c3cb7f /EssentialsUpdate | |
parent | 8854b3f56585d480cd0c8151e7bbbf12d00cd984 (diff) | |
download | Essentials-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.java | 2 | ||||
-rw-r--r-- | EssentialsUpdate/src/com/earth2me/essentials/update/states/StateMap.java | 5 |
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); + } } |