Cleanup/fixes
This commit is contained in:
@@ -111,7 +111,7 @@ public class ChatMessageManager
|
||||
}
|
||||
}
|
||||
|
||||
private void onChatMessage(ChatMessage chatMessage)
|
||||
void onChatMessage(ChatMessage chatMessage)
|
||||
{
|
||||
MessageNode messageNode = chatMessage.getMessageNode();
|
||||
ChatMessageType chatMessageType = chatMessage.getType();
|
||||
|
||||
@@ -296,6 +296,7 @@ public class IdleNotifierPlugin extends Plugin
|
||||
private boolean notifyPkers;
|
||||
private boolean notifyResourceDoor;
|
||||
private boolean outOfItemsIdle;
|
||||
@Setter(AccessLevel.PACKAGE)
|
||||
private boolean movementIdle;
|
||||
|
||||
@Provides
|
||||
|
||||
@@ -37,6 +37,7 @@ import net.runelite.api.NPC;
|
||||
import net.runelite.api.NPCDefinition;
|
||||
import net.runelite.api.Player;
|
||||
import net.runelite.api.VarPlayer;
|
||||
import net.runelite.api.WorldType;
|
||||
import net.runelite.api.coords.WorldPoint;
|
||||
import net.runelite.api.events.AnimationChanged;
|
||||
import net.runelite.api.events.GameStateChanged;
|
||||
@@ -50,7 +51,6 @@ import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import static org.mockito.ArgumentMatchers.any;
|
||||
import static org.mockito.ArgumentMatchers.eq;
|
||||
import org.mockito.Matchers;
|
||||
import org.mockito.Mock;
|
||||
import static org.mockito.Mockito.mock;
|
||||
import static org.mockito.Mockito.never;
|
||||
@@ -282,14 +282,14 @@ public class IdleNotifierPluginTest
|
||||
@Test
|
||||
public void testMovementIdle()
|
||||
{
|
||||
when(config.movementIdle()).thenReturn(true);
|
||||
plugin.setMovementIdle(true);
|
||||
|
||||
when(player.getWorldLocation()).thenReturn(new WorldPoint(0, 0, 0));
|
||||
plugin.onGameTick(new GameTick());
|
||||
plugin.onGameTick(GameTick.INSTANCE);
|
||||
when(player.getWorldLocation()).thenReturn(new WorldPoint(1, 0, 0));
|
||||
plugin.onGameTick(new GameTick());
|
||||
plugin.onGameTick(GameTick.INSTANCE);
|
||||
// No movement here
|
||||
plugin.onGameTick(new GameTick());
|
||||
plugin.onGameTick(GameTick.INSTANCE);
|
||||
|
||||
verify(notifier).notify(eq("[" + PLAYER_NAME + "] has stopped moving!"));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user