key remapping: remove some unused widget and keylistener checks

This commit is contained in:
Adam
2019-06-07 19:06:06 -04:00
parent bb25aee4cc
commit 5f972f5bcc

View File

@@ -178,9 +178,6 @@ public class KeyRemappingPlugin extends Plugin
} }
void lockChat() void lockChat()
{
Widget chatboxParent = client.getWidget(WidgetInfo.CHATBOX_PARENT);
if (chatboxParent != null && chatboxParent.getOnKeyListener() != null)
{ {
Widget chatboxInput = client.getWidget(WidgetInfo.CHATBOX_INPUT); Widget chatboxInput = client.getWidget(WidgetInfo.CHATBOX_INPUT);
if (chatboxInput != null) if (chatboxInput != null)
@@ -188,12 +185,8 @@ public class KeyRemappingPlugin extends Plugin
chatboxInput.setText(getPlayerNameWithIcon() + ": " + PRESS_ENTER_TO_CHAT); chatboxInput.setText(getPlayerNameWithIcon() + ": " + PRESS_ENTER_TO_CHAT);
} }
} }
}
void unlockChat() void unlockChat()
{
Widget chatboxParent = client.getWidget(WidgetInfo.CHATBOX_PARENT);
if (chatboxParent != null)
{ {
Widget chatboxInput = client.getWidget(WidgetInfo.CHATBOX_INPUT); Widget chatboxInput = client.getWidget(WidgetInfo.CHATBOX_INPUT);
if (chatboxInput != null) if (chatboxInput != null)
@@ -206,7 +199,6 @@ public class KeyRemappingPlugin extends Plugin
} }
} }
} }
}
private String getPlayerNameWithIcon() private String getPlayerNameWithIcon()
{ {