diff options
Diffstat (limited to 'juick-commands/src/main/java/com/juick/command/Processor.java')
-rw-r--r-- | juick-commands/src/main/java/com/juick/command/Processor.java | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/juick-commands/src/main/java/com/juick/command/Processor.java b/juick-commands/src/main/java/com/juick/command/Processor.java index 60815d16..bf46a758 100644 --- a/juick-commands/src/main/java/com/juick/command/Processor.java +++ b/juick-commands/src/main/java/com/juick/command/Processor.java @@ -1,7 +1,6 @@ package com.juick.command; import com.juick.User; -import com.juick.server.protocol.ProtocolListener; import lombok.Getter; import lombok.Setter; import org.slf4j.Logger; @@ -23,7 +22,7 @@ public class Processor { private final Set<Command> commands; @Setter - private ProtocolListener protocolListener; + private MessageListener messageListener; @Autowired public Processor(Set<Command> commands) { @@ -46,7 +45,7 @@ public class Processor { if (LOGGER.isDebugEnabled()) { LOGGER.debug("Found command processor: {}", commandItem.getClass().getName()); } - return commandItem.execute(sender, getProtocolListener(), command); + return commandItem.execute(sender, getMessageListener(), command); } else { defaultCommand = commandItem; } @@ -56,9 +55,9 @@ public class Processor { if (LOGGER.isDebugEnabled()) { LOGGER.debug("Found default command processor: {}", defaultCommand.getClass().getName()); } - return defaultCommand.execute(sender, getProtocolListener(), command); + return defaultCommand.execute(sender, getMessageListener(), command); } LOGGER.debug("Command processor not found, return help"); - return helpCommand != null ? helpCommand.execute(sender, getProtocolListener(), command) : "Help not found"; + return helpCommand != null ? helpCommand.execute(sender, getMessageListener(), command) : "Help not found"; } } |