Less chance for C&P error

This commit is contained in:
snowleo 2011-10-23 23:11:47 +02:00
parent 8854b3f565
commit ff92e0bf6f
2 changed files with 6 additions and 1 deletions

View file

@ -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);
}

View file

@ -9,4 +9,9 @@ public class StateMap extends LinkedHashMap<Class<? extends AbstractState>, Abst
{
super();
}
public AbstractState add(AbstractState state)
{
return put(state.getClass(), state);
}
}