From b573516470da92a3c6460c310e257396d598faa1 Mon Sep 17 00:00:00 2001 From: snowleo Date: Sun, 23 Oct 2011 23:11:47 +0200 Subject: Less chance for C&P error --- .../src/com/earth2me/essentials/update/states/StateMachine.java | 2 +- .../src/com/earth2me/essentials/update/states/StateMap.java | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) (limited to 'EssentialsUpdate') 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, Abst { super(); } + + public AbstractState add(AbstractState state) + { + return put(state.getClass(), state); + } } -- cgit v1.2.3