Skip to content

Commit

Permalink
Move private methods to bottom of minimap plugin
Browse files Browse the repository at this point in the history
Move private methods to bottom, after subscribe methods for better
readability.

Signed-off-by: Tomas Slusny <[email protected]>
  • Loading branch information
deathbeam committed Jul 20, 2018
1 parent 26daee6 commit 0002a25
Showing 1 changed file with 36 additions and 36 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -89,42 +89,6 @@ public void onGameStateChange(GameStateChanged event)
}
}

private Color[] getColors()
{
Color[] colors = new Color[NUM_MAPDOTS];
colors[0] = config.itemColor();
colors[1] = config.npcColor();
colors[2] = config.playerColor();
colors[3] = config.friendColor();
colors[4] = config.teamColor();
colors[5] = config.clanColor();
return colors;
}

private void storeOriginalDots()
{
SpritePixels[] originalDots = client.getMapDots();

if (originalDots == null)
{
return;
}

originalDotSprites = Arrays.copyOf(originalDots, originalDots.length);
}

private void restoreOriginalDots()
{
SpritePixels[] mapDots = client.getMapDots();

if (originalDotSprites == null || mapDots == null)
{
return;
}

System.arraycopy(originalDotSprites, 0, mapDots, 0, mapDots.length);
}

@Subscribe
public void configChanged(ConfigChanged event)
{
Expand Down Expand Up @@ -180,4 +144,40 @@ private void replaceMapDots()
mapDots[i] = MinimapDot.create(this.client, minimapDotColors[i]);
}
}

private Color[] getColors()
{
Color[] colors = new Color[NUM_MAPDOTS];
colors[0] = config.itemColor();
colors[1] = config.npcColor();
colors[2] = config.playerColor();
colors[3] = config.friendColor();
colors[4] = config.teamColor();
colors[5] = config.clanColor();
return colors;
}

private void storeOriginalDots()
{
SpritePixels[] originalDots = client.getMapDots();

if (originalDots == null)
{
return;
}

originalDotSprites = Arrays.copyOf(originalDots, originalDots.length);
}

private void restoreOriginalDots()
{
SpritePixels[] mapDots = client.getMapDots();

if (originalDotSprites == null || mapDots == null)
{
return;
}

System.arraycopy(originalDotSprites, 0, mapDots, 0, mapDots.length);
}
}

0 comments on commit 0002a25

Please sign in to comment.