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 | b573516470da92a3c6460c310e257396d598faa1 (patch) | |
tree | 4ed3a0c59f670cfacf544f4cedd67f014b71a588 /EssentialsUpdate | |
parent | 7a7232c832f69f3f6a7b853b66f642afaedf8687 (diff) | |
download | Essentials-b573516470da92a3c6460c310e257396d598faa1.tar Essentials-b573516470da92a3c6460c310e257396d598faa1.tar.gz Essentials-b573516470da92a3c6460c310e257396d598faa1.tar.lz Essentials-b573516470da92a3c6460c310e257396d598faa1.tar.xz Essentials-b573516470da92a3c6460c310e257396d598faa1.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); + } } |