clanchat: don't load icons more than once
This commit is contained in:
@@ -92,7 +92,8 @@ public class ClanChatPlugin extends Plugin
|
|||||||
@Subscribe
|
@Subscribe
|
||||||
public void onGameStateChanged(GameStateChanged gameStateChanged)
|
public void onGameStateChanged(GameStateChanged gameStateChanged)
|
||||||
{
|
{
|
||||||
if (gameStateChanged.getGameState() == GameState.LOGIN_SCREEN)
|
if (gameStateChanged.getGameState() == GameState.LOGIN_SCREEN
|
||||||
|
&& modIconsLength == 0)
|
||||||
{
|
{
|
||||||
// this is after "Loading sprites" so we can modify modicons now
|
// this is after "Loading sprites" so we can modify modicons now
|
||||||
loadClanChatIcons();
|
loadClanChatIcons();
|
||||||
@@ -201,7 +202,6 @@ public class ClanChatPlugin extends Plugin
|
|||||||
catch (IOException e)
|
catch (IOException e)
|
||||||
{
|
{
|
||||||
log.warn("Failed loading of clan chat icons", e);
|
log.warn("Failed loading of clan chat icons", e);
|
||||||
modIconsLength = 0;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user