Refactor CommandsExecutor - is no longer static singleton
Preparing for change in Command#handle, which is going to take a CommandContext as an additional argument. This way we can pass in command dependencies in a safe way instead of requiring them to access static methods.
This commit is contained in:
@@ -142,7 +142,7 @@ public final class PacketProcessor {
|
||||
registerHandler(RecvOpcode.WORLD_TRANSFER, new TransferWorldHandler());
|
||||
registerHandler(RecvOpcode.CHANGE_CHANNEL, new ChangeChannelHandler());
|
||||
registerHandler(RecvOpcode.STRANGE_DATA, LoginRequiringNoOpHandler.getInstance());
|
||||
registerHandler(RecvOpcode.GENERAL_CHAT, new GeneralChatHandler());
|
||||
registerHandler(RecvOpcode.GENERAL_CHAT, new GeneralChatHandler(channelDeps.commandsExecutor()));
|
||||
registerHandler(RecvOpcode.WHISPER, new WhisperHandler());
|
||||
registerHandler(RecvOpcode.NPC_TALK, new NPCTalkHandler());
|
||||
registerHandler(RecvOpcode.NPC_TALK_MORE, new NPCMoreTalkHandler());
|
||||
|
||||
Reference in New Issue
Block a user