chat command manager: remove unnecessary null tests
This commit is contained in:
@@ -106,11 +106,6 @@ public class ChatCommandManager implements ChatboxInputListener
|
|||||||
String message = chatMessage.getMessage();
|
String message = chatMessage.getMessage();
|
||||||
|
|
||||||
String command = extractCommand(message);
|
String command = extractCommand(message);
|
||||||
if (command == null)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
ChatCommand chatCommand = commands.get(command.toLowerCase());
|
ChatCommand chatCommand = commands.get(command.toLowerCase());
|
||||||
if (chatCommand == null)
|
if (chatCommand == null)
|
||||||
{
|
{
|
||||||
@@ -137,11 +132,6 @@ public class ChatCommandManager implements ChatboxInputListener
|
|||||||
}
|
}
|
||||||
|
|
||||||
String command = extractCommand(message);
|
String command = extractCommand(message);
|
||||||
if (command == null)
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
ChatCommand chatCommand = commands.get(command.toLowerCase());
|
ChatCommand chatCommand = commands.get(command.toLowerCase());
|
||||||
if (chatCommand == null)
|
if (chatCommand == null)
|
||||||
{
|
{
|
||||||
@@ -163,11 +153,6 @@ public class ChatCommandManager implements ChatboxInputListener
|
|||||||
final String message = privateMessageInput.getMessage();
|
final String message = privateMessageInput.getMessage();
|
||||||
|
|
||||||
String command = extractCommand(message);
|
String command = extractCommand(message);
|
||||||
if (command == null)
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
ChatCommand chatCommand = commands.get(command.toLowerCase());
|
ChatCommand chatCommand = commands.get(command.toLowerCase());
|
||||||
if (chatCommand == null)
|
if (chatCommand == null)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user