runelite-client: use lombok for slf4j logger creation
This commit is contained in:
@@ -53,6 +53,7 @@
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-simple</artifactId>
|
||||
<version>${slf4j.version}</version>
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>net.sf.jopt-simple</groupId>
|
||||
@@ -85,6 +86,12 @@
|
||||
<version>1.4</version>
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.projectlombok</groupId>
|
||||
<artifactId>lombok</artifactId>
|
||||
<version>1.16.18</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>net.runelite</groupId>
|
||||
|
||||
@@ -28,13 +28,9 @@ import java.applet.Applet;
|
||||
import java.io.IOException;
|
||||
import java.net.URL;
|
||||
import java.net.URLClassLoader;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
public class ClientLoader
|
||||
{
|
||||
private static final Logger logger = LoggerFactory.getLogger(ClientLoader.class);
|
||||
|
||||
public Applet loadRunelite() throws ClassNotFoundException, IOException, InstantiationException, IllegalAccessException
|
||||
{
|
||||
ConfigLoader config = new ConfigLoader();
|
||||
|
||||
@@ -53,6 +53,7 @@ import javax.swing.UIManager;
|
||||
import javax.swing.UnsupportedLookAndFeelException;
|
||||
import joptsimple.OptionParser;
|
||||
import joptsimple.OptionSet;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import net.runelite.api.Client;
|
||||
import net.runelite.api.Query;
|
||||
import net.runelite.client.account.AccountSession;
|
||||
@@ -64,14 +65,11 @@ import net.runelite.client.plugins.PluginManager;
|
||||
import net.runelite.client.ui.ClientUI;
|
||||
import net.runelite.http.api.account.AccountClient;
|
||||
import org.pushingpixels.substance.api.skin.SubstanceGraphiteLookAndFeel;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
@Singleton
|
||||
@Slf4j
|
||||
public class RuneLite
|
||||
{
|
||||
private static final Logger logger = LoggerFactory.getLogger(RuneLite.class);
|
||||
|
||||
public static final File RUNELITE_DIR = new File(System.getProperty("user.home"), ".runelite");
|
||||
public static final File PROFILES_DIR = new File(RUNELITE_DIR, "profiles");
|
||||
public static final File SESSION_FILE = new File(RUNELITE_DIR, "session");
|
||||
@@ -116,7 +114,7 @@ public class RuneLite
|
||||
}
|
||||
catch (IOException ex)
|
||||
{
|
||||
logger.warn(null, ex);
|
||||
log.warn(null, ex);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -151,7 +149,7 @@ public class RuneLite
|
||||
}
|
||||
catch (UnsupportedLookAndFeelException ex)
|
||||
{
|
||||
logger.warn("unable to set look and feel", ex);
|
||||
log.warn("unable to set look and feel", ex);
|
||||
}
|
||||
|
||||
gui = new ClientUI(this);
|
||||
@@ -212,7 +210,7 @@ public class RuneLite
|
||||
}
|
||||
catch (AWTException ex)
|
||||
{
|
||||
logger.debug("Unable to add system tray icon", ex);
|
||||
log.debug("Unable to add system tray icon", ex);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -232,7 +230,7 @@ public class RuneLite
|
||||
{
|
||||
if (!SESSION_FILE.exists())
|
||||
{
|
||||
logger.info("No session file exists");
|
||||
log.info("No session file exists");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -242,11 +240,11 @@ public class RuneLite
|
||||
{
|
||||
session = new Gson().fromJson(new InputStreamReader(in), AccountSession.class);
|
||||
|
||||
logger.debug("Loaded session for {}", session.getUsername());
|
||||
log.debug("Loaded session for {}", session.getUsername());
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
logger.warn("Unable to load session file", ex);
|
||||
log.warn("Unable to load session file", ex);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -254,7 +252,7 @@ public class RuneLite
|
||||
AccountClient accountClient = new AccountClient(session.getUuid());
|
||||
if (!accountClient.sesssionCheck())
|
||||
{
|
||||
logger.debug("Loaded session {} is invalid", session.getUuid());
|
||||
log.debug("Loaded session {} is invalid", session.getUuid());
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -272,11 +270,11 @@ public class RuneLite
|
||||
{
|
||||
new Gson().toJson(accountSession, fw);
|
||||
|
||||
logger.debug("Saved session to {}", SESSION_FILE);
|
||||
log.debug("Saved session to {}", SESSION_FILE);
|
||||
}
|
||||
catch (IOException ex)
|
||||
{
|
||||
logger.warn("Unable to save session file", ex);
|
||||
log.warn("Unable to save session file", ex);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -330,7 +328,7 @@ public class RuneLite
|
||||
return;
|
||||
}
|
||||
|
||||
logger.debug("Logging out of account {}", accountSession.getUsername());
|
||||
log.debug("Logging out of account {}", accountSession.getUsername());
|
||||
|
||||
accountSession = null; // No more account
|
||||
|
||||
|
||||
@@ -31,6 +31,7 @@ import com.google.inject.Provides;
|
||||
import java.util.concurrent.Executors;
|
||||
import java.util.concurrent.ScheduledExecutorService;
|
||||
import javax.inject.Singleton;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import net.runelite.api.Client;
|
||||
import net.runelite.client.config.ConfigManager;
|
||||
import net.runelite.client.config.RuneliteConfig;
|
||||
@@ -40,13 +41,10 @@ import net.runelite.client.plugins.PluginManager;
|
||||
import net.runelite.client.task.Scheduler;
|
||||
import net.runelite.client.ui.ClientUI;
|
||||
import net.runelite.client.ui.overlay.infobox.InfoBoxManager;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
@Slf4j
|
||||
public class RuneliteModule extends AbstractModule
|
||||
{
|
||||
private static final Logger logger = LoggerFactory.getLogger(RuneliteModule.class);
|
||||
|
||||
@Override
|
||||
protected void configure()
|
||||
{
|
||||
@@ -87,6 +85,6 @@ public class RuneliteModule extends AbstractModule
|
||||
|
||||
private static void eventExceptionHandler(Throwable exception, SubscriberExceptionContext context)
|
||||
{
|
||||
logger.warn("uncaught exception in event subscriber", exception);
|
||||
log.warn("uncaught exception in event subscriber", exception);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,13 +27,11 @@ package net.runelite.client;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.util.Properties;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
@Slf4j
|
||||
public class RuneliteProperties
|
||||
{
|
||||
private static final Logger logger = LoggerFactory.getLogger(RuneliteProperties.class);
|
||||
|
||||
private static final String RUNELITE_VERSION = "runelite.version";
|
||||
|
||||
private final Properties properties = new Properties();
|
||||
@@ -47,7 +45,7 @@ public class RuneliteProperties
|
||||
}
|
||||
catch (IOException ex)
|
||||
{
|
||||
logger.warn("unable to load propertries", ex);
|
||||
log.warn("unable to load propertries", ex);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -31,6 +31,7 @@ import java.time.Instant;
|
||||
import java.util.concurrent.ScheduledExecutorService;
|
||||
import java.util.concurrent.ScheduledFuture;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import net.runelite.client.account.AccountSession;
|
||||
import net.runelite.http.api.RuneliteAPI;
|
||||
import net.runelite.http.api.ws.messages.Handshake;
|
||||
@@ -42,13 +43,10 @@ import okhttp3.Request;
|
||||
import okhttp3.Response;
|
||||
import okhttp3.WebSocket;
|
||||
import okhttp3.WebSocketListener;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
@Slf4j
|
||||
public class WSClient extends WebSocketListener implements AutoCloseable
|
||||
{
|
||||
private static final Logger logger = LoggerFactory.getLogger(WSClient.class);
|
||||
|
||||
private static final Duration PING_TIME = Duration.ofSeconds(30);
|
||||
|
||||
private static final Gson gson = WebsocketGsonFactory.build();
|
||||
@@ -96,7 +94,7 @@ public class WSClient extends WebSocketListener implements AutoCloseable
|
||||
{
|
||||
if (webSocket == null)
|
||||
{
|
||||
logger.debug("Reconnecting to server");
|
||||
log.debug("Reconnecting to server");
|
||||
|
||||
connect();
|
||||
}
|
||||
@@ -104,7 +102,7 @@ public class WSClient extends WebSocketListener implements AutoCloseable
|
||||
String json = gson.toJson(message, WebsocketMessage.class);
|
||||
webSocket.send(json);
|
||||
|
||||
logger.debug("Sent: {}", json);
|
||||
log.debug("Sent: {}", json);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -124,14 +122,14 @@ public class WSClient extends WebSocketListener implements AutoCloseable
|
||||
@Override
|
||||
public void onOpen(WebSocket webSocket, Response response)
|
||||
{
|
||||
logger.info("Websocket {} opened", webSocket);
|
||||
log.info("Websocket {} opened", webSocket);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onMessage(WebSocket webSocket, String text)
|
||||
{
|
||||
WebsocketMessage message = gson.fromJson(text, WebsocketMessage.class);
|
||||
logger.debug("Got message: {}", message);
|
||||
log.debug("Got message: {}", message);
|
||||
|
||||
eventBus.post(message);
|
||||
}
|
||||
@@ -139,14 +137,14 @@ public class WSClient extends WebSocketListener implements AutoCloseable
|
||||
@Override
|
||||
public void onClosed(WebSocket webSocket, int code, String reason)
|
||||
{
|
||||
logger.info("Websocket {} closed: {}/{}", webSocket, code, reason);
|
||||
log.info("Websocket {} closed: {}/{}", webSocket, code, reason);
|
||||
this.webSocket = null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(WebSocket webSocket, Throwable t, Response response)
|
||||
{
|
||||
logger.warn("Error in websocket", t);
|
||||
log.warn("Error in websocket", t);
|
||||
this.webSocket = null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28,6 +28,7 @@ import com.google.common.eventbus.EventBus;
|
||||
import com.google.inject.Injector;
|
||||
import java.awt.Graphics;
|
||||
import java.awt.image.BufferedImage;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import net.runelite.api.ChatMessageType;
|
||||
import net.runelite.api.Client;
|
||||
import net.runelite.api.MainBufferProvider;
|
||||
@@ -43,13 +44,10 @@ import net.runelite.client.game.DeathChecker;
|
||||
import net.runelite.client.task.Scheduler;
|
||||
import net.runelite.client.ui.overlay.OverlayRenderer;
|
||||
import net.runelite.client.ui.overlay.infobox.InfoBoxManager;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
@Slf4j
|
||||
public class Hooks
|
||||
{
|
||||
private static final Logger logger = LoggerFactory.getLogger(Hooks.class);
|
||||
|
||||
private static final long CHECK = 600; // ms - how often to run checks
|
||||
|
||||
private static final Injector injector = RuneLite.getInjector();
|
||||
@@ -79,7 +77,7 @@ public class Hooks
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
logger.warn("error during death check", ex);
|
||||
log.warn("error during death check", ex);
|
||||
}
|
||||
|
||||
// tick pending scheduled tasks
|
||||
@@ -101,7 +99,7 @@ public class Hooks
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
logger.warn("Error during overlay rendering", ex);
|
||||
log.warn("Error during overlay rendering", ex);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -166,17 +164,17 @@ public class Hooks
|
||||
break;
|
||||
}
|
||||
default:
|
||||
logger.warn("Unknown event {} triggered on {}", name, object);
|
||||
log.warn("Unknown event {} triggered on {}", name, object);
|
||||
return;
|
||||
}
|
||||
|
||||
if (object != null)
|
||||
{
|
||||
logger.trace("Event {} (idx {}) triggered on {}", name, idx, object);
|
||||
log.trace("Event {} (idx {}) triggered on {}", name, idx, object);
|
||||
}
|
||||
else
|
||||
{
|
||||
logger.trace("Event {} (idx {}) triggered", name, idx);
|
||||
log.trace("Event {} (idx {}) triggered", name, idx);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -195,7 +193,7 @@ public class Hooks
|
||||
menuAction -= 2000;
|
||||
}
|
||||
|
||||
logger.debug("Menu action clicked: {} ({}) on {} ({} widget: {})",
|
||||
log.debug("Menu action clicked: {} ({}) on {} ({} widget: {})",
|
||||
menuOption, menuAction, menuTarget.isEmpty() ? "<nothing>" : menuTarget, id, var0, widgetId);
|
||||
|
||||
MenuOptionClicked menuOptionClicked = new MenuOptionClicked();
|
||||
@@ -210,9 +208,9 @@ public class Hooks
|
||||
|
||||
public static void addMenuEntry(String option, String target, int type, int identifier, int param0, int param1)
|
||||
{
|
||||
if (logger.isTraceEnabled())
|
||||
if (log.isTraceEnabled())
|
||||
{
|
||||
logger.trace("Menu entry added {} {}", option, target);
|
||||
log.trace("Menu entry added {} {}", option, target);
|
||||
}
|
||||
|
||||
MenuEntryAdded menuEntry = new MenuEntryAdded(option, target, type, identifier, param0, param1);
|
||||
@@ -222,9 +220,9 @@ public class Hooks
|
||||
|
||||
public static void addChatMessage(int type, String sender, String message, String clan)
|
||||
{
|
||||
if (logger.isDebugEnabled())
|
||||
if (log.isDebugEnabled())
|
||||
{
|
||||
logger.debug("Chat message type {}: {}", ChatMessageType.of(type), message);
|
||||
log.debug("Chat message type {}: {}", ChatMessageType.of(type), message);
|
||||
}
|
||||
|
||||
ChatMessageType chatMessageType = ChatMessageType.of(type);
|
||||
|
||||
@@ -29,13 +29,11 @@ import java.lang.invoke.MethodHandles;
|
||||
import java.lang.reflect.Constructor;
|
||||
import java.lang.reflect.InvocationHandler;
|
||||
import java.lang.reflect.Method;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
@Slf4j
|
||||
class ConfigInvocationHandler implements InvocationHandler
|
||||
{
|
||||
private static final Logger logger = LoggerFactory.getLogger(ConfigInvocationHandler.class);
|
||||
|
||||
private final ConfigManager manager;
|
||||
|
||||
public ConfigInvocationHandler(ConfigManager manager)
|
||||
@@ -53,13 +51,13 @@ class ConfigInvocationHandler implements InvocationHandler
|
||||
|
||||
if (group == null)
|
||||
{
|
||||
logger.warn("Configuration proxy class {} has no @ConfigGroup!", proxy.getClass());
|
||||
log.warn("Configuration proxy class {} has no @ConfigGroup!", proxy.getClass());
|
||||
return null;
|
||||
}
|
||||
|
||||
if (item == null)
|
||||
{
|
||||
logger.warn("Configuration method {} has no @ConfigItem!", method);
|
||||
log.warn("Configuration method {} has no @ConfigItem!", method);
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -85,7 +83,7 @@ class ConfigInvocationHandler implements InvocationHandler
|
||||
// objectValue automatically gets unboxed
|
||||
// if (!objectValue.getClass().equals(returnType))
|
||||
// {
|
||||
// logger.warn("Unable to convert return type for configuration item {}.{}: {}", group.keyName(), item.keyName(), returnType);
|
||||
// log.warn("Unable to convert return type for configuration item {}.{}: {}", group.keyName(), item.keyName(), returnType);
|
||||
// return null;
|
||||
// }
|
||||
|
||||
|
||||
@@ -44,6 +44,7 @@ import java.util.concurrent.ScheduledExecutorService;
|
||||
import java.util.stream.Collectors;
|
||||
import javax.inject.Inject;
|
||||
import javax.inject.Singleton;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import net.runelite.client.RuneLite;
|
||||
import net.runelite.client.account.AccountSession;
|
||||
import net.runelite.client.events.ConfigChanged;
|
||||
@@ -51,14 +52,11 @@ import net.runelite.client.plugins.PluginManager;
|
||||
import net.runelite.http.api.config.ConfigClient;
|
||||
import net.runelite.http.api.config.ConfigEntry;
|
||||
import net.runelite.http.api.config.Configuration;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
@Singleton
|
||||
@Slf4j
|
||||
public class ConfigManager
|
||||
{
|
||||
private static final Logger logger = LoggerFactory.getLogger(ConfigManager.class);
|
||||
|
||||
private static final String SETTINGS_FILE_NAME = "settings.properties";
|
||||
|
||||
@Inject
|
||||
@@ -167,14 +165,14 @@ public class ConfigManager
|
||||
}
|
||||
catch (IOException ex)
|
||||
{
|
||||
logger.debug("Unable to load configuration from client, using saved configuration from disk", ex);
|
||||
log.debug("Unable to load configuration from client, using saved configuration from disk", ex);
|
||||
loadFromFile();
|
||||
return;
|
||||
}
|
||||
|
||||
if (configuration.getConfig().isEmpty())
|
||||
{
|
||||
logger.debug("No configuration from client, using saved configuration on disk");
|
||||
log.debug("No configuration from client, using saved configuration on disk");
|
||||
loadFromFile();
|
||||
return;
|
||||
}
|
||||
@@ -183,7 +181,7 @@ public class ConfigManager
|
||||
|
||||
for (ConfigEntry entry : configuration.getConfig())
|
||||
{
|
||||
logger.debug("Loading configuration value from client {}: {}", entry.getKey(), entry.getValue());
|
||||
log.debug("Loading configuration value from client {}: {}", entry.getKey(), entry.getValue());
|
||||
|
||||
properties.setProperty(entry.getKey(), entry.getValue());
|
||||
}
|
||||
@@ -192,11 +190,11 @@ public class ConfigManager
|
||||
{
|
||||
saveToFile();
|
||||
|
||||
logger.debug("Updated configuration on disk with the latest version");
|
||||
log.debug("Updated configuration on disk with the latest version");
|
||||
}
|
||||
catch (IOException ex)
|
||||
{
|
||||
logger.warn("Unable to update configuration on disk", ex);
|
||||
log.warn("Unable to update configuration on disk", ex);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -210,11 +208,11 @@ public class ConfigManager
|
||||
}
|
||||
catch (FileNotFoundException ex)
|
||||
{
|
||||
logger.debug("Unable to load settings - no such file");
|
||||
log.debug("Unable to load settings - no such file");
|
||||
}
|
||||
catch (IOException ex)
|
||||
{
|
||||
logger.warn("Unable to load settings", ex);
|
||||
log.warn("Unable to load settings", ex);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -250,7 +248,7 @@ public class ConfigManager
|
||||
|
||||
public void setConfiguration(String groupName, String key, String value)
|
||||
{
|
||||
logger.debug("Setting configuration value for {}.{} to {}", groupName, key, value);
|
||||
log.debug("Setting configuration value for {}.{} to {}", groupName, key, value);
|
||||
|
||||
String oldValue = (String) properties.setProperty(groupName + "." + key, value);
|
||||
|
||||
@@ -264,7 +262,7 @@ public class ConfigManager
|
||||
}
|
||||
catch (IOException ex)
|
||||
{
|
||||
logger.warn("unable to set configuration item", ex);
|
||||
log.warn("unable to set configuration item", ex);
|
||||
}
|
||||
};
|
||||
executor.execute(task);
|
||||
@@ -277,7 +275,7 @@ public class ConfigManager
|
||||
}
|
||||
catch (IOException ex)
|
||||
{
|
||||
logger.warn("unable to save configuration file", ex);
|
||||
log.warn("unable to save configuration file", ex);
|
||||
}
|
||||
|
||||
ConfigChanged configChanged = new ConfigChanged();
|
||||
@@ -291,7 +289,7 @@ public class ConfigManager
|
||||
|
||||
public void unsetConfiguration(String groupName, String key)
|
||||
{
|
||||
logger.debug("Unsetting configuration value for {}.{}", groupName, key);
|
||||
log.debug("Unsetting configuration value for {}.{}", groupName, key);
|
||||
|
||||
String oldValue = (String) properties.remove(groupName + "." + key);
|
||||
|
||||
@@ -303,7 +301,7 @@ public class ConfigManager
|
||||
}
|
||||
catch (IOException ex)
|
||||
{
|
||||
logger.warn("unable to set configuration item", ex);
|
||||
log.warn("unable to set configuration item", ex);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -313,7 +311,7 @@ public class ConfigManager
|
||||
}
|
||||
catch (IOException ex)
|
||||
{
|
||||
logger.warn("unable to save configuration file", ex);
|
||||
log.warn("unable to save configuration file", ex);
|
||||
}
|
||||
|
||||
ConfigChanged configChanged = new ConfigChanged();
|
||||
@@ -386,11 +384,11 @@ public class ConfigManager
|
||||
}
|
||||
catch (Throwable ex)
|
||||
{
|
||||
logger.warn(null, ex);
|
||||
log.warn(null, ex);
|
||||
continue;
|
||||
}
|
||||
|
||||
logger.debug("Setting default configuration value for {}.{} to {}", group.keyName(), item.keyName(), defaultValue);
|
||||
log.debug("Setting default configuration value for {}.{} to {}", group.keyName(), item.keyName(), defaultValue);
|
||||
|
||||
String valueString = objectToString(defaultValue);
|
||||
setConfiguration(group.keyName(), item.keyName(), valueString);
|
||||
|
||||
@@ -26,17 +26,15 @@ package net.runelite.client.game;
|
||||
|
||||
import com.google.common.eventbus.EventBus;
|
||||
import java.lang.ref.WeakReference;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import net.runelite.api.Actor;
|
||||
import net.runelite.api.Client;
|
||||
import net.runelite.api.Player;
|
||||
import net.runelite.client.events.ActorDeath;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
@Slf4j
|
||||
public class DeathChecker
|
||||
{
|
||||
private static final Logger logger = LoggerFactory.getLogger(DeathChecker.class);
|
||||
|
||||
private final EventBus eventBus;
|
||||
private final Client client;
|
||||
private WeakReference<Actor> last = new WeakReference<>(null);
|
||||
@@ -62,7 +60,7 @@ public class DeathChecker
|
||||
}
|
||||
|
||||
last = new WeakReference<>(opponent);
|
||||
logger.debug("Actor {} has died", opponent.getName());
|
||||
log.debug("Actor {} has died", opponent.getName());
|
||||
|
||||
ActorDeath death = new ActorDeath();
|
||||
death.setActor(opponent);
|
||||
|
||||
@@ -30,17 +30,15 @@ import com.google.common.util.concurrent.ListeningExecutorService;
|
||||
import com.google.common.util.concurrent.MoreExecutors;
|
||||
import java.io.IOException;
|
||||
import java.util.concurrent.ScheduledExecutorService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import static net.runelite.client.game.ItemManager.EMPTY;
|
||||
import static net.runelite.client.game.ItemManager.NONE;
|
||||
import net.runelite.http.api.item.ItemClient;
|
||||
import net.runelite.http.api.item.ItemPrice;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
@Slf4j
|
||||
class ItemPriceLoader extends CacheLoader<Integer, ItemPrice>
|
||||
{
|
||||
private static final Logger logger = LoggerFactory.getLogger(ItemPriceLoader.class);
|
||||
|
||||
private final ListeningExecutorService executorService;
|
||||
private final ItemClient client;
|
||||
|
||||
@@ -60,7 +58,7 @@ class ItemPriceLoader extends CacheLoader<Integer, ItemPrice>
|
||||
@Override
|
||||
public ListenableFuture<ItemPrice> reload(Integer key, ItemPrice oldValue)
|
||||
{
|
||||
logger.debug("Submitting lookup for item {}", key);
|
||||
log.debug("Submitting lookup for item {}", key);
|
||||
|
||||
return executorService.submit(() -> fetch(key));
|
||||
}
|
||||
@@ -78,7 +76,7 @@ class ItemPriceLoader extends CacheLoader<Integer, ItemPrice>
|
||||
}
|
||||
catch (IOException ex)
|
||||
{
|
||||
logger.warn("unable to look up item!", ex);
|
||||
log.warn("unable to look up item!", ex);
|
||||
return NONE;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -36,6 +36,7 @@ import java.util.Map;
|
||||
import javax.inject.Inject;
|
||||
import javax.inject.Provider;
|
||||
import javax.inject.Singleton;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import net.runelite.api.Client;
|
||||
import net.runelite.api.MenuAction;
|
||||
import net.runelite.api.MenuEntry;
|
||||
@@ -45,14 +46,11 @@ import net.runelite.client.events.MenuEntryAdded;
|
||||
import net.runelite.client.events.MenuOptionClicked;
|
||||
import net.runelite.client.events.PlayerMenuOptionClicked;
|
||||
import net.runelite.client.events.PlayerMenuOptionsChanged;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
@Singleton
|
||||
@Slf4j
|
||||
public class MenuManager
|
||||
{
|
||||
private static final Logger logger = LoggerFactory.getLogger(MenuManager.class);
|
||||
|
||||
/*
|
||||
* The index needs to be between 4 and 7,
|
||||
*/
|
||||
@@ -165,11 +163,11 @@ public class MenuManager
|
||||
int newIdx = findEmptyPlayerMenuIndex();
|
||||
if (newIdx == IDX_UPPER)
|
||||
{
|
||||
logger.debug("Client has updated player menu index {} where option {} was, and there are no more free slots available", idx, menuText);
|
||||
log.debug("Client has updated player menu index {} where option {} was, and there are no more free slots available", idx, menuText);
|
||||
return;
|
||||
}
|
||||
|
||||
logger.debug("Client has updated player menu index {} where option {} was, moving to index {}", idx, menuText, newIdx);
|
||||
log.debug("Client has updated player menu index {} where option {} was, moving to index {}", idx, menuText, newIdx);
|
||||
|
||||
playerMenuIndexMap.remove(idx);
|
||||
addPlayerMenuItem(newIdx, menuText);
|
||||
|
||||
@@ -42,18 +42,16 @@ import java.util.List;
|
||||
import java.util.concurrent.CopyOnWriteArrayList;
|
||||
import javax.inject.Singleton;
|
||||
import javax.swing.SwingUtilities;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import net.runelite.client.RuneLite;
|
||||
import net.runelite.client.task.Schedule;
|
||||
import net.runelite.client.task.ScheduledMethod;
|
||||
import net.runelite.client.task.Scheduler;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
@Singleton
|
||||
@Slf4j
|
||||
public class PluginManager
|
||||
{
|
||||
private static final Logger logger = LoggerFactory.getLogger(PluginManager.class);
|
||||
|
||||
/**
|
||||
* Base package where the core plugins are
|
||||
*/
|
||||
@@ -86,7 +84,7 @@ public class PluginManager
|
||||
}
|
||||
catch (PluginInstantiationException ex)
|
||||
{
|
||||
logger.warn("Unable to start plugin {}", plugin.getClass().getSimpleName(), ex);
|
||||
log.warn("Unable to start plugin {}", plugin.getClass().getSimpleName(), ex);
|
||||
plugins.remove(plugin);
|
||||
}
|
||||
}
|
||||
@@ -115,7 +113,7 @@ public class PluginManager
|
||||
{
|
||||
if (clazz.getSuperclass() == Plugin.class)
|
||||
{
|
||||
logger.warn("Class {} is a plugin, but has no plugin descriptor",
|
||||
log.warn("Class {} is a plugin, but has no plugin descriptor",
|
||||
clazz);
|
||||
}
|
||||
continue;
|
||||
@@ -123,7 +121,7 @@ public class PluginManager
|
||||
|
||||
if (clazz.getSuperclass() != Plugin.class)
|
||||
{
|
||||
logger.warn("Class {} has plugin descriptor, but is not a plugin",
|
||||
log.warn("Class {} has plugin descriptor, but is not a plugin",
|
||||
clazz);
|
||||
continue;
|
||||
}
|
||||
@@ -140,7 +138,7 @@ public class PluginManager
|
||||
}
|
||||
catch (PluginInstantiationException ex)
|
||||
{
|
||||
logger.warn("error instantiating plugin!", ex);
|
||||
log.warn("error instantiating plugin!", ex);
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -167,7 +165,7 @@ public class PluginManager
|
||||
}
|
||||
});
|
||||
|
||||
logger.debug("Plugin {} is now running", plugin.getClass().getSimpleName());
|
||||
log.debug("Plugin {} is now running", plugin.getClass().getSimpleName());
|
||||
eventBus.register(plugin);
|
||||
schedule(plugin);
|
||||
}
|
||||
@@ -232,7 +230,7 @@ public class PluginManager
|
||||
throw new PluginInstantiationException(ex);
|
||||
}
|
||||
|
||||
logger.debug("Loaded plugin {}", pluginDescriptor.name());
|
||||
log.debug("Loaded plugin {}", pluginDescriptor.name());
|
||||
return plugin;
|
||||
}
|
||||
|
||||
@@ -263,7 +261,7 @@ public class PluginManager
|
||||
}
|
||||
|
||||
ScheduledMethod scheduledMethod = new ScheduledMethod(schedule, method, plugin);
|
||||
logger.debug("Scheduled task {}", scheduledMethod);
|
||||
log.debug("Scheduled task {}", scheduledMethod);
|
||||
|
||||
scheduler.addScheduledMethod(scheduledMethod);
|
||||
}
|
||||
@@ -280,7 +278,7 @@ public class PluginManager
|
||||
continue;
|
||||
}
|
||||
|
||||
logger.debug("Removing scheduled task {}", method);
|
||||
log.debug("Removing scheduled task {}", method);
|
||||
scheduler.removeScheduledMethod(method);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -39,15 +39,14 @@ import java.nio.file.WatchService;
|
||||
import java.util.List;
|
||||
import javax.inject.Inject;
|
||||
import javax.inject.Singleton;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import net.runelite.client.RuneLite;
|
||||
import net.runelite.client.config.RuneliteConfig;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
@Singleton
|
||||
@Slf4j
|
||||
public class PluginWatcher extends Thread
|
||||
{
|
||||
private static final Logger logger = LoggerFactory.getLogger(PluginWatcher.class);
|
||||
private static final File BASE = RuneLite.PLUGIN_DIR;
|
||||
|
||||
private final RuneliteConfig runeliteConfig;
|
||||
@@ -102,19 +101,19 @@ public class PluginWatcher extends Thread
|
||||
Path path = (Path) event.context();
|
||||
File file = new File(BASE, path.toFile().getName());
|
||||
|
||||
logger.debug("Event {} file {}", kind, file);
|
||||
log.debug("Event {} file {}", kind, file);
|
||||
|
||||
if (kind == ENTRY_MODIFY)
|
||||
{
|
||||
Plugin existing = findPluginForFile(file);
|
||||
if (existing != null)
|
||||
{
|
||||
logger.info("Reloading plugin {}", file);
|
||||
log.info("Reloading plugin {}", file);
|
||||
unload(existing);
|
||||
}
|
||||
else
|
||||
{
|
||||
logger.info("Loading plugin {}", file);
|
||||
log.info("Loading plugin {}", file);
|
||||
}
|
||||
|
||||
load(file);
|
||||
@@ -124,7 +123,7 @@ public class PluginWatcher extends Thread
|
||||
Plugin existing = findPluginForFile(file);
|
||||
if (existing != null)
|
||||
{
|
||||
logger.info("Unloading plugin {}", file);
|
||||
log.info("Unloading plugin {}", file);
|
||||
|
||||
unload(existing);
|
||||
}
|
||||
@@ -135,7 +134,7 @@ public class PluginWatcher extends Thread
|
||||
}
|
||||
catch (InterruptedException ex)
|
||||
{
|
||||
logger.warn("error polling for plugins", ex);
|
||||
log.warn("error polling for plugins", ex);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -149,7 +148,7 @@ public class PluginWatcher extends Thread
|
||||
continue;
|
||||
}
|
||||
|
||||
logger.info("Loading plugin from {}", file);
|
||||
log.info("Loading plugin from {}", file);
|
||||
load(file);
|
||||
}
|
||||
}
|
||||
@@ -175,7 +174,7 @@ public class PluginWatcher extends Thread
|
||||
}
|
||||
catch (MalformedURLException ex)
|
||||
{
|
||||
logger.warn("Error loading plugin", ex);
|
||||
log.warn("Error loading plugin", ex);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -187,21 +186,21 @@ public class PluginWatcher extends Thread
|
||||
catch (IOException ex)
|
||||
{
|
||||
close(loader);
|
||||
logger.warn("Error loading plugin", ex);
|
||||
log.warn("Error loading plugin", ex);
|
||||
return;
|
||||
}
|
||||
|
||||
if (loadedPlugins.isEmpty())
|
||||
{
|
||||
close(loader);
|
||||
logger.warn("No plugin found in plugin {}", pluginFile);
|
||||
log.warn("No plugin found in plugin {}", pluginFile);
|
||||
return;
|
||||
}
|
||||
|
||||
if (loadedPlugins.size() != 1)
|
||||
{
|
||||
close(loader);
|
||||
logger.warn("You can not have more than one plugin per jar");
|
||||
log.warn("You can not have more than one plugin per jar");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -216,7 +215,7 @@ public class PluginWatcher extends Thread
|
||||
catch (PluginInstantiationException ex)
|
||||
{
|
||||
close(loader);
|
||||
logger.warn("unable to start plugin", ex);
|
||||
log.warn("unable to start plugin", ex);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -232,7 +231,7 @@ public class PluginWatcher extends Thread
|
||||
}
|
||||
catch (PluginInstantiationException ex)
|
||||
{
|
||||
logger.warn("unable to stop plugin", ex);
|
||||
log.warn("unable to stop plugin", ex);
|
||||
}
|
||||
|
||||
pluginManager.remove(plugin); // remove it regardless
|
||||
@@ -248,7 +247,7 @@ public class PluginWatcher extends Thread
|
||||
}
|
||||
catch (IOException ex1)
|
||||
{
|
||||
logger.warn(null, ex1);
|
||||
log.warn(null, ex1);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -35,6 +35,7 @@ import java.util.concurrent.ScheduledExecutorService;
|
||||
import javax.imageio.ImageIO;
|
||||
import javax.inject.Inject;
|
||||
import javax.swing.ImageIcon;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import net.runelite.client.RuneLite;
|
||||
import net.runelite.client.account.AccountSession;
|
||||
import net.runelite.client.events.SessionClose;
|
||||
@@ -48,16 +49,13 @@ import net.runelite.client.util.RunnableExceptionLogger;
|
||||
import net.runelite.http.api.account.AccountClient;
|
||||
import net.runelite.http.api.account.OAuthResponse;
|
||||
import net.runelite.http.api.ws.messages.LoginResponse;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
@PluginDescriptor(
|
||||
name = "Account plugin"
|
||||
)
|
||||
@Slf4j
|
||||
public class AccountPlugin extends Plugin
|
||||
{
|
||||
private static final Logger logger = LoggerFactory.getLogger(AccountPlugin.class);
|
||||
|
||||
@Inject
|
||||
RuneLite runelite;
|
||||
|
||||
@@ -108,7 +106,7 @@ public class AccountPlugin extends Plugin
|
||||
}
|
||||
catch (IOException ex)
|
||||
{
|
||||
logger.warn("Unable to logout of session", ex);
|
||||
log.warn("Unable to logout of session", ex);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -131,7 +129,7 @@ public class AccountPlugin extends Plugin
|
||||
}
|
||||
catch (IOException ex)
|
||||
{
|
||||
logger.warn("Unable to get oauth url", ex);
|
||||
log.warn("Unable to get oauth url", ex);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -144,14 +142,14 @@ public class AccountPlugin extends Plugin
|
||||
|
||||
if (!Desktop.isDesktopSupported())
|
||||
{
|
||||
logger.info("Desktop is not supported. Visit {}", login.getOauthUrl());
|
||||
log.info("Desktop is not supported. Visit {}", login.getOauthUrl());
|
||||
return;
|
||||
}
|
||||
|
||||
Desktop desktop = Desktop.getDesktop();
|
||||
if (!desktop.isSupported(Desktop.Action.BROWSE))
|
||||
{
|
||||
logger.info("Desktop browser is not supported. Visit {}", login.getOauthUrl());
|
||||
log.info("Desktop browser is not supported. Visit {}", login.getOauthUrl());
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -159,18 +157,18 @@ public class AccountPlugin extends Plugin
|
||||
{
|
||||
desktop.browse(new URI(login.getOauthUrl()));
|
||||
|
||||
logger.debug("Opened browser to {}", login.getOauthUrl());
|
||||
log.debug("Opened browser to {}", login.getOauthUrl());
|
||||
}
|
||||
catch (IOException | URISyntaxException ex)
|
||||
{
|
||||
logger.warn("Unable to open login page", ex);
|
||||
log.warn("Unable to open login page", ex);
|
||||
}
|
||||
}
|
||||
|
||||
@Subscribe
|
||||
public void onLogin(LoginResponse loginResponse)
|
||||
{
|
||||
logger.debug("Now logged in as {}", loginResponse.getUsername());
|
||||
log.debug("Now logged in as {}", loginResponse.getUsername());
|
||||
|
||||
AccountSession session = runelite.getAccountSession();
|
||||
session.setUsername(loginResponse.getUsername());
|
||||
@@ -193,7 +191,7 @@ public class AccountPlugin extends Plugin
|
||||
return; // No username yet
|
||||
}
|
||||
|
||||
logger.debug("Session opened as {}", session.getUsername());
|
||||
log.debug("Session opened as {}", session.getUsername());
|
||||
|
||||
runelite.setTitle("(" + session.getUsername() + ")");
|
||||
|
||||
|
||||
@@ -34,6 +34,7 @@ import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
import javax.annotation.Nullable;
|
||||
import javax.inject.Inject;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import net.runelite.api.Client;
|
||||
import net.runelite.api.Skill;
|
||||
import net.runelite.api.Varbits;
|
||||
@@ -46,16 +47,13 @@ import net.runelite.client.plugins.Plugin;
|
||||
import net.runelite.client.plugins.PluginDescriptor;
|
||||
import static net.runelite.client.plugins.attackindicator.AttackStyle.*;
|
||||
import net.runelite.client.task.Schedule;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
@PluginDescriptor(
|
||||
name = "Attack indicator plugin"
|
||||
)
|
||||
@Slf4j
|
||||
public class AttackIndicatorPlugin extends Plugin
|
||||
{
|
||||
private static final Logger logger = LoggerFactory.getLogger(AttackIndicatorPlugin.class);
|
||||
|
||||
private int attackStyleVarbit = -1;
|
||||
private int equippedWeaponTypeVarbit = -1;
|
||||
private int castingModeVarbit = -1;
|
||||
@@ -199,7 +197,7 @@ public class AttackIndicatorPlugin extends Plugin
|
||||
hideWarnedStyles(enabled);
|
||||
break;
|
||||
default:
|
||||
logger.warn("Unreachable default case for config keys");
|
||||
log.warn("Unreachable default case for config keys");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -312,7 +310,7 @@ public class AttackIndicatorPlugin extends Plugin
|
||||
widgetsToHide.put(equippedWeaponType, WidgetInfo.COMBAT_SPELLS, enabled && warnedSkill);
|
||||
break;
|
||||
default:
|
||||
logger.warn("Unreachable default case for equipped weapon type attack styles");
|
||||
log.warn("Unreachable default case for equipped weapon type attack styles");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -33,9 +33,9 @@ import java.time.temporal.ChronoUnit;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import javax.imageio.ImageIO;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
@Slf4j
|
||||
enum Boss
|
||||
{
|
||||
GENERAL_GRAARDOR("General Graardor", 90, ChronoUnit.SECONDS, "bando"),
|
||||
@@ -55,8 +55,6 @@ enum Boss
|
||||
CORPOREAL_BEAST("Corporeal Beast", 30, ChronoUnit.SECONDS, "corp"),
|
||||
GIANT_MOLE("Giant Mole", 10, ChronoUnit.SECONDS, "mole");
|
||||
|
||||
private static final Logger logger = LoggerFactory.getLogger(Boss.class);
|
||||
|
||||
private static final Map<String, Boss> bosses = new HashMap<>();
|
||||
|
||||
private final String name;
|
||||
@@ -104,7 +102,7 @@ enum Boss
|
||||
}
|
||||
catch (IOException ex)
|
||||
{
|
||||
logger.warn("unable to load image", ex);
|
||||
log.warn("unable to load image", ex);
|
||||
}
|
||||
|
||||
return image;
|
||||
|
||||
@@ -27,21 +27,19 @@ package net.runelite.client.plugins.bosstimer;
|
||||
|
||||
import com.google.common.eventbus.Subscribe;
|
||||
import javax.inject.Inject;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import net.runelite.api.Actor;
|
||||
import net.runelite.client.events.ActorDeath;
|
||||
import net.runelite.client.plugins.Plugin;
|
||||
import net.runelite.client.plugins.PluginDescriptor;
|
||||
import net.runelite.client.ui.overlay.infobox.InfoBoxManager;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
@PluginDescriptor(
|
||||
name = "Boss timers plugin"
|
||||
)
|
||||
@Slf4j
|
||||
public class BossTimersPlugin extends Plugin
|
||||
{
|
||||
private static final Logger logger = LoggerFactory.getLogger(BossTimersPlugin.class);
|
||||
|
||||
@Inject
|
||||
InfoBoxManager infoBoxManager;
|
||||
|
||||
@@ -59,7 +57,7 @@ public class BossTimersPlugin extends Plugin
|
||||
// remove existing timer
|
||||
infoBoxManager.removeIf(t -> t instanceof RespawnTimer && ((RespawnTimer) t).getBoss() == boss);
|
||||
|
||||
logger.debug("Creating spawn timer for {} ({} seconds)", actor.getName(), boss.getSpawnTime());
|
||||
log.debug("Creating spawn timer for {} ({} seconds)", actor.getName(), boss.getSpawnTime());
|
||||
|
||||
RespawnTimer timer = new RespawnTimer(boss);
|
||||
infoBoxManager.addInfoBox(timer);
|
||||
|
||||
@@ -37,6 +37,7 @@ import java.util.concurrent.ScheduledExecutorService;
|
||||
import java.util.stream.Collectors;
|
||||
import javax.annotation.Nullable;
|
||||
import javax.inject.Inject;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import net.runelite.api.ChatMessageType;
|
||||
import net.runelite.api.Client;
|
||||
import net.runelite.api.GameState;
|
||||
@@ -59,16 +60,13 @@ import net.runelite.http.api.item.Item;
|
||||
import net.runelite.http.api.item.ItemClient;
|
||||
import net.runelite.http.api.item.ItemPrice;
|
||||
import net.runelite.http.api.item.SearchResult;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
@PluginDescriptor(
|
||||
name = "Chat commands plugin"
|
||||
)
|
||||
@Slf4j
|
||||
public class ChatCommandsPlugin extends Plugin
|
||||
{
|
||||
private static final Logger logger = LoggerFactory.getLogger(ChatCommandsPlugin.class);
|
||||
|
||||
private static final float HIGH_ALCHEMY_CONSTANT = 0.6f;
|
||||
|
||||
private final String colKeyword = "<colRegular>";
|
||||
@@ -183,14 +181,14 @@ public class ChatCommandsPlugin extends Plugin
|
||||
|
||||
if (config.lvl() && message.toLowerCase().equals("!total"))
|
||||
{
|
||||
logger.debug("Running total level lookup");
|
||||
log.debug("Running total level lookup");
|
||||
executor.submit(() -> playerSkillLookup(setMessage.getType(), setMessage, "total"));
|
||||
}
|
||||
else if (config.price() && message.toLowerCase().startsWith("!price") && message.length() > 7)
|
||||
{
|
||||
String search = message.substring(7);
|
||||
|
||||
logger.debug("Running price lookup for {}", search);
|
||||
log.debug("Running price lookup for {}", search);
|
||||
|
||||
executor.submit(() -> lookup(setMessage.getType(), setMessage.getMessageNode(), search));
|
||||
}
|
||||
@@ -198,7 +196,7 @@ public class ChatCommandsPlugin extends Plugin
|
||||
{
|
||||
String search = message.substring(5);
|
||||
|
||||
logger.debug("Running level lookup for {}", search);
|
||||
log.debug("Running level lookup for {}", search);
|
||||
executor.submit(() -> playerSkillLookup(setMessage.getType(), setMessage, search));
|
||||
}
|
||||
}
|
||||
@@ -220,7 +218,7 @@ public class ChatCommandsPlugin extends Plugin
|
||||
}
|
||||
catch (IOException ex)
|
||||
{
|
||||
logger.warn("Unable to search for item {}", search, ex);
|
||||
log.warn("Unable to search for item {}", search, ex);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -229,7 +227,7 @@ public class ChatCommandsPlugin extends Plugin
|
||||
Item item = retrieveFromList(result.getItems(), search);
|
||||
if (item == null)
|
||||
{
|
||||
logger.debug("Unable to find item {} in result {}", search, result);
|
||||
log.debug("Unable to find item {} in result {}", search, result);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -242,7 +240,7 @@ public class ChatCommandsPlugin extends Plugin
|
||||
}
|
||||
catch (IOException ex)
|
||||
{
|
||||
logger.warn("Unable to fetch item price for {}", itemId, ex);
|
||||
log.warn("Unable to fetch item price for {}", itemId, ex);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -262,7 +260,7 @@ public class ChatCommandsPlugin extends Plugin
|
||||
|
||||
String response = builder.toString();
|
||||
|
||||
logger.debug("Setting response {}", response);
|
||||
log.debug("Setting response {}", response);
|
||||
|
||||
// XXX hopefully messageNode hasn't been reused yet?
|
||||
messageNode.setRuneLiteFormatMessage(response);
|
||||
@@ -321,7 +319,7 @@ public class ChatCommandsPlugin extends Plugin
|
||||
.append(colKeywordHighLight).append(String.format("%,d", hiscoreSkill.getRank()))
|
||||
.toString();
|
||||
|
||||
logger.debug("Setting response {}", response);
|
||||
log.debug("Setting response {}", response);
|
||||
|
||||
// XXX hopefully messageNode hasn't been reused yet?
|
||||
setMessage.getMessageNode().setRuneLiteFormatMessage(response);
|
||||
@@ -330,7 +328,7 @@ public class ChatCommandsPlugin extends Plugin
|
||||
}
|
||||
catch (IOException ex)
|
||||
{
|
||||
logger.warn("unable to look up skill {} for {}", skill, search, ex);
|
||||
log.warn("unable to look up skill {} for {}", skill, search, ex);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -61,18 +61,16 @@ import javax.swing.SpinnerModel;
|
||||
import javax.swing.SpinnerNumberModel;
|
||||
import javax.swing.SwingConstants;
|
||||
import javax.swing.border.EmptyBorder;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import net.runelite.client.config.ConfigDescriptor;
|
||||
import net.runelite.client.config.ConfigItem;
|
||||
import net.runelite.client.config.ConfigItemDescriptor;
|
||||
import net.runelite.client.config.ConfigManager;
|
||||
import net.runelite.client.ui.PluginPanel;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
@Slf4j
|
||||
public class ConfigPanel extends PluginPanel
|
||||
{
|
||||
private static final Logger logger = LoggerFactory.getLogger(ConfigPanel.class);
|
||||
|
||||
private static final EmptyBorder BORDER_PADDING = new EmptyBorder(6, 6, 6, 6);
|
||||
private static final int TEXT_FIELD_WIDTH = 7;
|
||||
private static final int SPINNER_FIELD_WIDTH = 6;
|
||||
@@ -298,7 +296,7 @@ public class ConfigPanel extends PluginPanel
|
||||
}
|
||||
catch (IllegalArgumentException ex)
|
||||
{
|
||||
logger.debug("invalid seleced item", ex);
|
||||
log.debug("invalid seleced item", ex);
|
||||
}
|
||||
box.addItemListener(e ->
|
||||
{
|
||||
|
||||
@@ -32,16 +32,12 @@ import net.runelite.client.plugins.Plugin;
|
||||
import net.runelite.client.plugins.PluginDescriptor;
|
||||
import net.runelite.client.ui.ClientUI;
|
||||
import net.runelite.client.ui.NavigationButton;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
@PluginDescriptor(
|
||||
name = "Configuration plugin"
|
||||
)
|
||||
public class ConfigPlugin extends Plugin
|
||||
{
|
||||
private static final Logger logger = LoggerFactory.getLogger(ConfigPlugin.class);
|
||||
|
||||
@Inject
|
||||
ClientUI ui;
|
||||
|
||||
|
||||
@@ -40,19 +40,17 @@ import javax.swing.JTree;
|
||||
import javax.swing.border.EmptyBorder;
|
||||
import javax.swing.tree.DefaultMutableTreeNode;
|
||||
import javax.swing.tree.DefaultTreeModel;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import net.runelite.api.Client;
|
||||
import net.runelite.api.widgets.Widget;
|
||||
import static net.runelite.api.widgets.WidgetInfo.TO_CHILD;
|
||||
import static net.runelite.api.widgets.WidgetInfo.TO_GROUP;
|
||||
import net.runelite.api.widgets.WidgetItem;
|
||||
import net.runelite.client.ui.PluginPanel;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
@Slf4j
|
||||
public class DevToolsPanel extends PluginPanel
|
||||
{
|
||||
private static final Logger logger = LoggerFactory.getLogger(DevToolsPanel.class);
|
||||
|
||||
private final EmptyBorder PADDING_BORDER = new EmptyBorder(3, 3, 3, 3);
|
||||
|
||||
private JButton renderPlayersBtn = new JButton();
|
||||
@@ -196,13 +194,13 @@ public class DevToolsPanel extends PluginPanel
|
||||
plugin.currentWidget = widget;
|
||||
plugin.itemIndex = widget.getItemId();
|
||||
setWidgetInfo(widget);
|
||||
logger.debug("Set widget to {} and item index to {}", widget, widget.getItemId());
|
||||
log.debug("Set widget to {} and item index to {}", widget, widget.getItemId());
|
||||
}
|
||||
else if (selected instanceof WidgetItemNode)
|
||||
{
|
||||
WidgetItemNode node = (WidgetItemNode) selected;
|
||||
plugin.itemIndex = node.getWidgetItem().getIndex();
|
||||
logger.debug("Set item index to {}", plugin.itemIndex);
|
||||
log.debug("Set item index to {}", plugin.itemIndex);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@@ -26,14 +26,12 @@ package net.runelite.client.plugins.devtools;
|
||||
|
||||
import java.awt.event.ActionEvent;
|
||||
import java.util.Arrays;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import net.runelite.api.Client;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
@Slf4j
|
||||
public class SettingsTracker
|
||||
{
|
||||
private static final Logger logger = LoggerFactory.getLogger(SettingsTracker.class);
|
||||
|
||||
private final Client client;
|
||||
|
||||
private int[] clientSettings;
|
||||
@@ -51,7 +49,7 @@ public class SettingsTracker
|
||||
clientSettings = copy(client.getSettings());
|
||||
widgetSettings = copy(client.getWidgetSettings());
|
||||
|
||||
logger.info("Snapshotted client and widget settings");
|
||||
log.info("Snapshotted client and widget settings");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -68,7 +66,7 @@ public class SettingsTracker
|
||||
continue;
|
||||
}
|
||||
|
||||
logger.info("Client setting index {} has changed from {} to {}: {} -> {}",
|
||||
log.info("Client setting index {} has changed from {} to {}: {} -> {}",
|
||||
i, before, after, prettyPrintInt(before), prettyPrintInt(after));
|
||||
}
|
||||
|
||||
@@ -82,7 +80,7 @@ public class SettingsTracker
|
||||
continue;
|
||||
}
|
||||
|
||||
logger.info("Widget setting index {} has changed from {} to {}: {} -> {}",
|
||||
log.info("Widget setting index {} has changed from {} to {}: {} -> {}",
|
||||
i, before, after, prettyPrintInt(before), prettyPrintInt(after));
|
||||
}
|
||||
|
||||
|
||||
@@ -33,14 +33,13 @@ import java.util.ArrayDeque;
|
||||
import java.util.Deque;
|
||||
import java.util.concurrent.ScheduledExecutorService;
|
||||
import javax.inject.Inject;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import net.runelite.client.events.ChatMessage;
|
||||
import net.runelite.client.events.GameStateChanged;
|
||||
import net.runelite.client.events.MenuOptionClicked;
|
||||
import net.runelite.client.plugins.Plugin;
|
||||
import net.runelite.client.plugins.PluginDescriptor;
|
||||
import net.runelite.http.api.examine.ExamineClient;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
/**
|
||||
* Submits exammine info to the api
|
||||
@@ -50,10 +49,9 @@ import org.slf4j.LoggerFactory;
|
||||
@PluginDescriptor(
|
||||
name = "Examine plugin"
|
||||
)
|
||||
@Slf4j
|
||||
public class ExaminePlugin extends Plugin
|
||||
{
|
||||
private static final Logger logger = LoggerFactory.getLogger(ExaminePlugin.class);
|
||||
|
||||
private final ExamineClient client = new ExamineClient();
|
||||
private final Deque<PendingExamine> pending = new ArrayDeque<>();
|
||||
private final Cache<CacheKey, Boolean> cache = CacheBuilder.newBuilder()
|
||||
@@ -117,7 +115,7 @@ public class ExaminePlugin extends Plugin
|
||||
|
||||
if (pending.isEmpty())
|
||||
{
|
||||
logger.debug("Got examine without a pending examine?");
|
||||
log.debug("Got examine without a pending examine?");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -125,12 +123,12 @@ public class ExaminePlugin extends Plugin
|
||||
|
||||
if (pendingExamine.getType() != type)
|
||||
{
|
||||
logger.debug("Type mismatch for pending examine: {} != {}", pendingExamine.getType(), type);
|
||||
log.debug("Type mismatch for pending examine: {} != {}", pendingExamine.getType(), type);
|
||||
pending.clear(); // eh
|
||||
return;
|
||||
}
|
||||
|
||||
logger.debug("Got examine for {} {}: {}", pendingExamine.getType(), pendingExamine.getId(), event.getMessage());
|
||||
log.debug("Got examine for {} {}: {}", pendingExamine.getType(), pendingExamine.getId(), event.getMessage());
|
||||
|
||||
CacheKey key = new CacheKey(type, pendingExamine.getId());
|
||||
Boolean cached = cache.getIfPresent(key);
|
||||
@@ -165,7 +163,7 @@ public class ExaminePlugin extends Plugin
|
||||
}
|
||||
catch (IOException ex)
|
||||
{
|
||||
logger.warn("Error submitting examine", ex);
|
||||
log.warn("Error submitting examine", ex);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -35,17 +35,15 @@ import java.io.InputStream;
|
||||
import javax.annotation.Nullable;
|
||||
import javax.imageio.ImageIO;
|
||||
import javax.inject.Inject;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import net.runelite.api.Client;
|
||||
import net.runelite.api.widgets.Widget;
|
||||
import net.runelite.client.ui.overlay.Overlay;
|
||||
import net.runelite.client.ui.overlay.OverlayPosition;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
@Slf4j
|
||||
public class FightCaveOverlay extends Overlay
|
||||
{
|
||||
private static final Logger logger = LoggerFactory.getLogger(FightCaveOverlay.class);
|
||||
|
||||
private static final int WIDTH = 70;
|
||||
private static final int SPACER = 6;
|
||||
private static final int BOTTOM_BORDER = 4;
|
||||
@@ -158,7 +156,7 @@ public class FightCaveOverlay extends Overlay
|
||||
}
|
||||
catch (IOException e)
|
||||
{
|
||||
logger.warn("Error loading image", e);
|
||||
log.warn("Error loading image", e);
|
||||
}
|
||||
return image;
|
||||
}
|
||||
|
||||
@@ -42,13 +42,9 @@ import net.runelite.client.game.ItemManager;
|
||||
import net.runelite.client.ui.overlay.Overlay;
|
||||
import net.runelite.client.ui.overlay.OverlayPosition;
|
||||
import net.runelite.client.ui.overlay.OverlayUtil;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
class FishingSpotOverlay extends Overlay
|
||||
{
|
||||
private static final Logger logger = LoggerFactory.getLogger(FishingSpotOverlay.class);
|
||||
|
||||
private final List<Integer> ids = new ArrayList<>();
|
||||
|
||||
private final RuneLite runelite;
|
||||
|
||||
@@ -37,18 +37,16 @@ import javax.inject.Inject;
|
||||
import javax.swing.*;
|
||||
import javax.swing.border.Border;
|
||||
import javax.swing.event.MouseInputAdapter;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import net.runelite.api.Experience;
|
||||
import net.runelite.client.ui.IconTextField;
|
||||
import net.runelite.client.ui.PluginPanel;
|
||||
import net.runelite.http.api.hiscore.*;
|
||||
import static net.runelite.http.api.hiscore.HiscoreSkill.*;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
@Slf4j
|
||||
public class HiscorePanel extends PluginPanel
|
||||
{
|
||||
private static final Logger logger = LoggerFactory.getLogger(HiscorePanel.class);
|
||||
|
||||
private static final String SKILL_NAME = "SKILL_NAME";
|
||||
private static final String SKILL = "SKILL";
|
||||
|
||||
@@ -326,7 +324,7 @@ public class HiscorePanel extends PluginPanel
|
||||
label.putClientProperty(SKILL, skill);
|
||||
|
||||
String skillIcon = "skill_icons_small/" + skillName.toLowerCase() + ".png";
|
||||
logger.debug("Loading skill icon from {}", skillIcon);
|
||||
log.debug("Loading skill icon from {}", skillIcon);
|
||||
|
||||
try
|
||||
{
|
||||
@@ -334,7 +332,7 @@ public class HiscorePanel extends PluginPanel
|
||||
}
|
||||
catch (IOException ex)
|
||||
{
|
||||
logger.warn(null, ex);
|
||||
log.warn(null, ex);
|
||||
}
|
||||
|
||||
// Show skill details on click
|
||||
@@ -377,13 +375,13 @@ public class HiscorePanel extends PluginPanel
|
||||
try
|
||||
{
|
||||
HiscoreEndpoint endpoint = HiscoreEndpoint.valueOf(endpointButtonGroup.getSelection().getActionCommand());
|
||||
logger.debug("Hiscore endpoint " + endpoint.name() + " selected");
|
||||
log.debug("Hiscore endpoint " + endpoint.name() + " selected");
|
||||
|
||||
result = client.lookup(lookup, endpoint);
|
||||
}
|
||||
catch (IOException ex)
|
||||
{
|
||||
logger.warn("Error fetching Hiscore data " + ex.getMessage());
|
||||
log.warn("Error fetching Hiscore data " + ex.getMessage());
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -35,16 +35,12 @@ import net.runelite.client.plugins.Plugin;
|
||||
import net.runelite.client.plugins.PluginDescriptor;
|
||||
import net.runelite.client.ui.ClientUI;
|
||||
import net.runelite.client.ui.NavigationButton;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
@PluginDescriptor(
|
||||
name = "Hiscore plugin"
|
||||
)
|
||||
public class HiscorePlugin extends Plugin
|
||||
{
|
||||
private static final Logger logger = LoggerFactory.getLogger(HiscorePlugin.class);
|
||||
|
||||
private static final String LOOKUP = "Lookup";
|
||||
|
||||
@Inject
|
||||
|
||||
@@ -27,17 +27,15 @@ package net.runelite.client.plugins.pestcontrol;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import static net.runelite.client.plugins.pestcontrol.Portal.BLUE;
|
||||
import static net.runelite.client.plugins.pestcontrol.Portal.PURPLE;
|
||||
import static net.runelite.client.plugins.pestcontrol.Portal.RED;
|
||||
import static net.runelite.client.plugins.pestcontrol.Portal.YELLOW;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
@Slf4j
|
||||
public class Game
|
||||
{
|
||||
private static final Logger logger = LoggerFactory.getLogger(Game.class);
|
||||
|
||||
// Game starts with all possible rotations
|
||||
private Rotation[] possibleRotations = Rotation.values();
|
||||
// Number of shields dropped
|
||||
@@ -55,7 +53,7 @@ public class Game
|
||||
return;
|
||||
}
|
||||
|
||||
logger.debug("Shield dropped for {}", portal.getPortal());
|
||||
log.debug("Shield dropped for {}", portal.getPortal());
|
||||
|
||||
portal.setIsShielded(false);
|
||||
int shieldDrop = shieldsDropped++;
|
||||
@@ -81,7 +79,7 @@ public class Game
|
||||
return;
|
||||
}
|
||||
|
||||
logger.debug("Portal {} died", portal.getPortal());
|
||||
log.debug("Portal {} died", portal.getPortal());
|
||||
|
||||
portal.setIsDead(true);
|
||||
}
|
||||
|
||||
@@ -33,6 +33,7 @@ import java.awt.Graphics2D;
|
||||
import java.awt.geom.Rectangle2D;
|
||||
import java.util.Arrays;
|
||||
import javax.inject.Inject;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import net.runelite.api.Client;
|
||||
import net.runelite.api.GameState;
|
||||
import net.runelite.api.NPC;
|
||||
@@ -48,13 +49,10 @@ import static net.runelite.client.plugins.pestcontrol.Portal.YELLOW;
|
||||
import net.runelite.client.ui.overlay.Overlay;
|
||||
import net.runelite.client.ui.overlay.OverlayPosition;
|
||||
import net.runelite.client.ui.overlay.OverlayUtil;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
@Slf4j
|
||||
public class PestControlOverlay extends Overlay
|
||||
{
|
||||
private static final Logger logger = LoggerFactory.getLogger(PestControlOverlay.class);
|
||||
|
||||
private final RuneLite runelite;
|
||||
private final Client client;
|
||||
|
||||
@@ -85,7 +83,7 @@ public class PestControlOverlay extends Overlay
|
||||
{
|
||||
if (game != null)
|
||||
{
|
||||
logger.debug("Pest control game has ended");
|
||||
log.debug("Pest control game has ended");
|
||||
game = null;
|
||||
}
|
||||
|
||||
@@ -94,7 +92,7 @@ public class PestControlOverlay extends Overlay
|
||||
|
||||
if (game == null)
|
||||
{
|
||||
logger.debug("Pest control game has started");
|
||||
log.debug("Pest control game has started");
|
||||
game = new Game();
|
||||
}
|
||||
|
||||
|
||||
@@ -31,13 +31,11 @@ import java.awt.image.BufferedImage;
|
||||
import java.io.InputStream;
|
||||
import java.util.concurrent.ExecutionException;
|
||||
import javax.imageio.ImageIO;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
@Slf4j
|
||||
public class RuneImageCache
|
||||
{
|
||||
private static final Logger logger = LoggerFactory.getLogger(RuneImageCache.class);
|
||||
|
||||
// ids from the varbit
|
||||
private static final String[] RUNE_NAMES =
|
||||
{
|
||||
@@ -92,7 +90,7 @@ public class RuneImageCache
|
||||
}
|
||||
catch (ExecutionException e)
|
||||
{
|
||||
logger.warn("unable to load rune image", e);
|
||||
log.warn("unable to load rune image", e);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -35,6 +35,7 @@ import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
import javax.annotation.Nullable;
|
||||
import javax.inject.Inject;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import net.runelite.api.ChatMessageType;
|
||||
import net.runelite.api.Client;
|
||||
import net.runelite.api.ItemID;
|
||||
@@ -51,16 +52,13 @@ import net.runelite.client.plugins.PluginDescriptor;
|
||||
import net.runelite.client.task.Schedule;
|
||||
import net.runelite.client.ui.overlay.Overlay;
|
||||
import net.runelite.client.ui.overlay.infobox.InfoBoxManager;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
@PluginDescriptor(
|
||||
name = "Slayer plugin"
|
||||
)
|
||||
@Slf4j
|
||||
public class SlayerPlugin extends Plugin
|
||||
{
|
||||
private static final Logger logger = LoggerFactory.getLogger(SlayerPlugin.class);
|
||||
|
||||
//Chat messages
|
||||
private static final Pattern CHAT_GEM_PROGRESS_MESSAGE = Pattern.compile("You're assigned to kill (.*); only (\\d*) more to go\\.");
|
||||
private static final String CHAT_GEM_COMPLETE_MESSAGE = "You need something new to hunt.";
|
||||
@@ -218,7 +216,7 @@ public class SlayerPlugin extends Plugin
|
||||
points = Integer.parseInt(matches.get(2).replaceAll(",", ""));
|
||||
break;
|
||||
default:
|
||||
logger.warn("Unreachable default case for message ending in '; return to Slayer master'");
|
||||
log.warn("Unreachable default case for message ending in '; return to Slayer master'");
|
||||
}
|
||||
setTask("", 0);
|
||||
return;
|
||||
@@ -287,7 +285,7 @@ public class SlayerPlugin extends Plugin
|
||||
int itemSpriteId = ItemID.ENCHANTED_GEM;
|
||||
if (task == null)
|
||||
{
|
||||
logger.warn("No slayer task for {} in the Task database", taskName);
|
||||
log.warn("No slayer task for {} in the Task database", taskName);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -27,8 +27,6 @@ package net.runelite.client.plugins.slayer;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import net.runelite.api.ItemID;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
enum Task
|
||||
{
|
||||
@@ -130,8 +128,6 @@ enum Task
|
||||
ZOMBIES("zombies", ItemID.ZOMBIE_HEAD);
|
||||
//</editor-fold>
|
||||
|
||||
private static final Logger logger = LoggerFactory.getLogger(Task.class);
|
||||
|
||||
private static final Map<String, Task> tasks = new HashMap<>();
|
||||
|
||||
private final String name;
|
||||
|
||||
@@ -31,9 +31,9 @@ import java.io.InputStream;
|
||||
import java.time.Duration;
|
||||
import java.time.temporal.ChronoUnit;
|
||||
import javax.imageio.ImageIO;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
@Slf4j
|
||||
public enum GameTimer
|
||||
{
|
||||
STAMINA("stamina", 2, ChronoUnit.MINUTES),
|
||||
@@ -46,8 +46,6 @@ public enum GameTimer
|
||||
HALFTB("teleblock", 150, ChronoUnit.SECONDS),
|
||||
SUPERANTIVENOM("antivenom", 3, ChronoUnit.MINUTES);
|
||||
|
||||
private static final Logger logger = LoggerFactory.getLogger(GameTimer.class);
|
||||
|
||||
private final String imageResource;
|
||||
private final Duration duration;
|
||||
|
||||
@@ -83,7 +81,7 @@ public enum GameTimer
|
||||
}
|
||||
catch (IOException ex)
|
||||
{
|
||||
logger.warn("unable to load image", ex);
|
||||
log.warn("unable to load image", ex);
|
||||
}
|
||||
|
||||
return image;
|
||||
|
||||
@@ -39,6 +39,7 @@ import java.time.Instant;
|
||||
import javax.annotation.Nullable;
|
||||
import javax.imageio.ImageIO;
|
||||
import javax.inject.Inject;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import net.runelite.api.Client;
|
||||
import net.runelite.api.GameObject;
|
||||
import net.runelite.api.GameState;
|
||||
@@ -51,13 +52,10 @@ import net.runelite.client.ui.FontManager;
|
||||
import net.runelite.client.ui.overlay.Overlay;
|
||||
import net.runelite.client.ui.overlay.OverlayPosition;
|
||||
import net.runelite.client.ui.overlay.OverlayUtil;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
@Slf4j
|
||||
public class VolcanicMineOverlay extends Overlay
|
||||
{
|
||||
private static final Logger logger = LoggerFactory.getLogger(VolcanicMinePlugin.class);
|
||||
|
||||
private static final int THRESH_LOW = 45;
|
||||
private static final int THRESH_MED = 5;
|
||||
|
||||
@@ -246,7 +244,7 @@ public class VolcanicMineOverlay extends Overlay
|
||||
}
|
||||
catch (IOException e)
|
||||
{
|
||||
logger.warn("Error loading image", e);
|
||||
log.warn("Error loading image", e);
|
||||
}
|
||||
return image;
|
||||
}
|
||||
|
||||
@@ -47,8 +47,6 @@ import net.runelite.client.plugins.Plugin;
|
||||
import net.runelite.client.plugins.PluginDescriptor;
|
||||
import net.runelite.client.task.Schedule;
|
||||
import net.runelite.client.ui.overlay.Overlay;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import javax.annotation.Nullable;
|
||||
import javax.inject.Inject;
|
||||
import java.time.Duration;
|
||||
@@ -60,6 +58,7 @@ import java.util.Map.Entry;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
import java.util.stream.Collectors;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import net.runelite.api.Prayer;
|
||||
import net.runelite.api.Query;
|
||||
import net.runelite.api.queries.NPCQuery;
|
||||
@@ -67,9 +66,9 @@ import net.runelite.api.queries.NPCQuery;
|
||||
@PluginDescriptor(
|
||||
name = "Volcanic mine helper"
|
||||
)
|
||||
@Slf4j
|
||||
public class VolcanicMinePlugin extends Plugin
|
||||
{
|
||||
private static final Logger logger = LoggerFactory.getLogger(VolcanicMinePlugin.class);
|
||||
private static final int REGION_SIZE = 104;
|
||||
private static final int MAX_DISTANCE = 2400;
|
||||
private static final int LAVA_ID = 30997;
|
||||
@@ -220,7 +219,7 @@ public class VolcanicMinePlugin extends Plugin
|
||||
}
|
||||
catch (NumberFormatException ex)
|
||||
{
|
||||
logger.debug("Failed to retrieve stability percentage", ex);
|
||||
log.debug("Failed to retrieve stability percentage", ex);
|
||||
}
|
||||
}
|
||||
return false;
|
||||
@@ -240,7 +239,7 @@ public class VolcanicMinePlugin extends Plugin
|
||||
}
|
||||
catch (NumberFormatException ex)
|
||||
{
|
||||
logger.debug("Failed to retrieve time left", ex);
|
||||
log.debug("Failed to retrieve time left", ex);
|
||||
}
|
||||
}
|
||||
return false;
|
||||
|
||||
@@ -38,6 +38,7 @@ import java.util.List;
|
||||
import javax.annotation.Nullable;
|
||||
import javax.imageio.ImageIO;
|
||||
import javax.inject.Inject;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import net.runelite.api.Client;
|
||||
import net.runelite.api.Experience;
|
||||
import net.runelite.api.GameState;
|
||||
@@ -45,13 +46,10 @@ import net.runelite.api.Point;
|
||||
import net.runelite.api.Skill;
|
||||
import net.runelite.client.ui.overlay.Overlay;
|
||||
import net.runelite.client.ui.overlay.OverlayPosition;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
@Slf4j
|
||||
public class XpGlobesOverlay extends Overlay
|
||||
{
|
||||
private static final Logger logger = LoggerFactory.getLogger(XpGlobesOverlay.class);
|
||||
|
||||
private final Client client;
|
||||
private final XpGlobesPlugin plugin;
|
||||
private final XpGlobesConfig config;
|
||||
@@ -198,13 +196,13 @@ public class XpGlobesOverlay extends Overlay
|
||||
try
|
||||
{
|
||||
String skillIconPath = "/skill_icons/" + xpGlobe.getSkillName().toLowerCase() + ".png";
|
||||
logger.debug("Loading skill icon from {}", skillIconPath);
|
||||
log.debug("Loading skill icon from {}", skillIconPath);
|
||||
skillImage = ImageIO.read(XpGlobesOverlay.class.getResourceAsStream(skillIconPath));
|
||||
imgCache[skillIdx] = skillImage;
|
||||
}
|
||||
catch (IOException e)
|
||||
{
|
||||
logger.debug("Error Loading skill icons {}", e);
|
||||
log.debug("Error Loading skill icons {}", e);
|
||||
}
|
||||
|
||||
return skillImage;
|
||||
|
||||
@@ -27,8 +27,6 @@ package net.runelite.client.plugins.xptracker;
|
||||
import net.runelite.api.Client;
|
||||
import net.runelite.api.Skill;
|
||||
import net.runelite.client.ui.PluginPanel;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import javax.imageio.ImageIO;
|
||||
import java.awt.BorderLayout;
|
||||
import java.awt.Dimension;
|
||||
@@ -45,10 +43,11 @@ import javax.swing.JButton;
|
||||
import javax.swing.JLabel;
|
||||
import javax.swing.JPanel;
|
||||
import javax.swing.JScrollPane;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
@Slf4j
|
||||
public class XpPanel extends PluginPanel
|
||||
{
|
||||
private static final Logger logger = LoggerFactory.getLogger(XpPanel.class);
|
||||
private Map<Skill, JPanel> labelMap = new HashMap<>();
|
||||
private final XpTrackerPlugin xpTracker;
|
||||
private JPanel statsPanel;
|
||||
@@ -87,7 +86,7 @@ public class XpPanel extends PluginPanel
|
||||
}
|
||||
catch (IOException e)
|
||||
{
|
||||
logger.warn(null, e);
|
||||
log.warn(null, e);
|
||||
}
|
||||
|
||||
JButton resetButton = new JButton("Reset All");
|
||||
@@ -118,7 +117,7 @@ public class XpPanel extends PluginPanel
|
||||
iconLevel.setPreferredSize(new Dimension(PANEL_WIDTH, 32));
|
||||
|
||||
String skillIcon = "/skill_icons/" + skill.getName().toLowerCase() + ".png";
|
||||
logger.debug("Loading skill icon from {}", skillIcon);
|
||||
log.debug("Loading skill icon from {}", skillIcon);
|
||||
JLabel icon = new JLabel(new ImageIcon(ImageIO.read(XpPanel.class.getResourceAsStream(skillIcon))));
|
||||
iconLevel.add(icon, BorderLayout.LINE_START);
|
||||
|
||||
|
||||
@@ -31,22 +31,20 @@ import java.util.Set;
|
||||
import java.util.concurrent.ScheduledExecutorService;
|
||||
import javax.annotation.Nullable;
|
||||
import javax.inject.Inject;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import net.runelite.api.Client;
|
||||
import net.runelite.client.events.MapRegionChanged;
|
||||
import net.runelite.client.plugins.Plugin;
|
||||
import net.runelite.client.plugins.PluginDescriptor;
|
||||
import net.runelite.http.api.xtea.XteaClient;
|
||||
import okhttp3.Response;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
@PluginDescriptor(
|
||||
name = "Xtea plugin"
|
||||
)
|
||||
@Slf4j
|
||||
public class XteaPlugin extends Plugin
|
||||
{
|
||||
private static final Logger logger = LoggerFactory.getLogger(XteaPlugin.class);
|
||||
|
||||
private final XteaClient xteaClient = new XteaClient();
|
||||
|
||||
private final Set<Integer> sentRegions = new HashSet<>();
|
||||
@@ -75,7 +73,7 @@ public class XteaPlugin extends Plugin
|
||||
int region = regions[idx];
|
||||
int[] keys = xteaKeys[idx];
|
||||
|
||||
logger.debug("Region {} keys {}, {}, {}, {}", region, keys[0], keys[1], keys[2], keys[3]);
|
||||
log.debug("Region {} keys {}, {}, {}, {}", region, keys[0], keys[1], keys[2], keys[3]);
|
||||
|
||||
// No need to ever send more than once
|
||||
if (sentRegions.contains(region))
|
||||
@@ -91,12 +89,12 @@ public class XteaPlugin extends Plugin
|
||||
{
|
||||
if (!response.isSuccessful())
|
||||
{
|
||||
logger.debug("unsuccessful xtea response");
|
||||
log.debug("unsuccessful xtea response");
|
||||
}
|
||||
}
|
||||
catch (IOException ex)
|
||||
{
|
||||
logger.debug("unable to submit xtea keys", ex);
|
||||
log.debug("unable to submit xtea keys", ex);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -39,6 +39,7 @@ import java.io.InputStream;
|
||||
import javax.annotation.Nullable;
|
||||
import javax.imageio.ImageIO;
|
||||
import javax.inject.Inject;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import net.runelite.api.Client;
|
||||
import net.runelite.api.GameState;
|
||||
import net.runelite.api.Perspective;
|
||||
@@ -50,13 +51,10 @@ import net.runelite.client.plugins.zulrah.phase.ZulrahPhase;
|
||||
import net.runelite.client.plugins.zulrah.phase.ZulrahType;
|
||||
import net.runelite.client.ui.overlay.Overlay;
|
||||
import net.runelite.client.ui.overlay.OverlayPosition;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
@Slf4j
|
||||
public class ZulrahOverlay extends Overlay
|
||||
{
|
||||
private static final Logger logger = LoggerFactory.getLogger(ZulrahOverlay.class);
|
||||
|
||||
private static final int CURRENT_PHASE_WIDTH = 86;
|
||||
private static final int NEXT_PHASE_WIDTH = 54;
|
||||
private static final int SPACER = 6;
|
||||
@@ -457,7 +455,7 @@ public class ZulrahOverlay extends Overlay
|
||||
}
|
||||
catch (IOException e)
|
||||
{
|
||||
logger.debug("Error loading image {}", e);
|
||||
log.debug("Error loading image {}", e);
|
||||
}
|
||||
return image;
|
||||
}
|
||||
|
||||
@@ -31,6 +31,7 @@ import com.google.inject.Provides;
|
||||
import java.time.temporal.ChronoUnit;
|
||||
import javax.annotation.Nullable;
|
||||
import javax.inject.Inject;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import net.runelite.api.Client;
|
||||
import net.runelite.api.GameState;
|
||||
import net.runelite.api.NPC;
|
||||
@@ -48,16 +49,13 @@ import net.runelite.client.plugins.zulrah.patterns.ZulrahPatternD;
|
||||
import net.runelite.client.plugins.zulrah.phase.ZulrahPhase;
|
||||
import net.runelite.client.task.Schedule;
|
||||
import net.runelite.client.ui.overlay.Overlay;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
@PluginDescriptor(
|
||||
name = "Zulrah plugin"
|
||||
)
|
||||
@Slf4j
|
||||
public class ZulrahPlugin extends Plugin
|
||||
{
|
||||
private static final Logger logger = LoggerFactory.getLogger(ZulrahPlugin.class);
|
||||
|
||||
@Inject
|
||||
RuneLite runelite;
|
||||
|
||||
@@ -115,7 +113,7 @@ public class ZulrahPlugin extends Plugin
|
||||
{
|
||||
if (instance != null)
|
||||
{
|
||||
logger.debug("Zulrah encounter has ended.");
|
||||
log.debug("Zulrah encounter has ended.");
|
||||
instance = null;
|
||||
}
|
||||
return;
|
||||
@@ -124,7 +122,7 @@ public class ZulrahPlugin extends Plugin
|
||||
if (instance == null)
|
||||
{
|
||||
instance = new ZulrahInstance(zulrah);
|
||||
logger.debug("Zulrah encounter has started.");
|
||||
log.debug("Zulrah encounter has started.");
|
||||
}
|
||||
|
||||
ZulrahPhase currentPhase = ZulrahPhase.valueOf(zulrah, instance.getStartLocation());
|
||||
@@ -138,7 +136,7 @@ public class ZulrahPlugin extends Plugin
|
||||
instance.setPhase(currentPhase);
|
||||
instance.nextStage();
|
||||
|
||||
logger.debug("Zulrah phase has moved from {} -> {}, stage: {}", previousPhase, currentPhase, instance.getStage());
|
||||
log.debug("Zulrah phase has moved from {} -> {}, stage: {}", previousPhase, currentPhase, instance.getStage());
|
||||
}
|
||||
|
||||
ZulrahPattern pattern = instance.getPattern();
|
||||
@@ -158,14 +156,14 @@ public class ZulrahPlugin extends Plugin
|
||||
|
||||
if (potential == 1)
|
||||
{
|
||||
logger.debug("Zulrah pattern identified: {}", potentialPattern);
|
||||
log.debug("Zulrah pattern identified: {}", potentialPattern);
|
||||
|
||||
instance.setPattern(potentialPattern);
|
||||
}
|
||||
}
|
||||
else if (pattern.canReset(instance.getStage()) && (instance.getPhase() == null || instance.getPhase().equals(pattern.get(0))))
|
||||
{
|
||||
logger.debug("Zulrah pattern has reset.");
|
||||
log.debug("Zulrah pattern has reset.");
|
||||
|
||||
instance.reset();
|
||||
}
|
||||
|
||||
@@ -25,16 +25,14 @@
|
||||
*/
|
||||
package net.runelite.client.plugins.zulrah.phase;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import net.runelite.api.Point;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
@Slf4j
|
||||
public enum ZulrahLocation
|
||||
{
|
||||
NORTH, SOUTH, EAST, WEST;
|
||||
|
||||
private static final Logger logger = LoggerFactory.getLogger(ZulrahLocation.class);
|
||||
|
||||
public static ZulrahLocation valueOf(Point start, Point current)
|
||||
{
|
||||
int dx = start.getX() - current.getX();
|
||||
@@ -57,7 +55,7 @@ public enum ZulrahLocation
|
||||
}
|
||||
else
|
||||
{
|
||||
logger.debug("Unknown Zulrah location dx: {}, dy: {}", dx, dy);
|
||||
log.debug("Unknown Zulrah location dx: {}, dy: {}", dx, dy);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,16 +25,14 @@
|
||||
*/
|
||||
package net.runelite.client.plugins.zulrah.phase;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import net.runelite.api.NpcID;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
@Slf4j
|
||||
public enum ZulrahType
|
||||
{
|
||||
RANGE, MAGIC, MELEE;
|
||||
|
||||
private static final Logger logger = LoggerFactory.getLogger(ZulrahType.class);
|
||||
|
||||
private static final int ZULRAH_RANGE = NpcID.ZULRAH;
|
||||
private static final int ZULRAH_MELEE = NpcID.ZULRAH_2043;
|
||||
private static final int ZULRAH_MAGIC = NpcID.ZULRAH_2044;
|
||||
@@ -50,7 +48,7 @@ public enum ZulrahType
|
||||
case ZULRAH_MAGIC:
|
||||
return ZulrahType.MAGIC;
|
||||
}
|
||||
logger.debug("Unknown Zulrah Id: {}", zulrahId);
|
||||
log.debug("Unknown Zulrah Id: {}", zulrahId);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -34,14 +34,12 @@ import java.util.List;
|
||||
import java.util.concurrent.ScheduledExecutorService;
|
||||
import javax.inject.Inject;
|
||||
import javax.inject.Singleton;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
@Singleton
|
||||
@Slf4j
|
||||
public class Scheduler
|
||||
{
|
||||
private static final Logger logger = LoggerFactory.getLogger(Scheduler.class);
|
||||
|
||||
private final List<ScheduledMethod> scheduledMethods = new ArrayList<>();
|
||||
|
||||
@Inject
|
||||
@@ -77,7 +75,7 @@ public class Scheduler
|
||||
|
||||
if (difference.compareTo(timeSinceRun) > 0)
|
||||
{
|
||||
logger.trace("Scheduled task triggered: {}", scheduledMethod);
|
||||
log.trace("Scheduled task triggered: {}", scheduledMethod);
|
||||
|
||||
scheduledMethod.setLast(now);
|
||||
|
||||
@@ -103,11 +101,11 @@ public class Scheduler
|
||||
}
|
||||
catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException ex)
|
||||
{
|
||||
logger.warn("error invoking scheduled task", ex);
|
||||
log.warn("error invoking scheduled task", ex);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
logger.warn("error during scheduled task", ex);
|
||||
log.warn("error during scheduled task", ex);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -30,16 +30,14 @@ import java.awt.Dimension;
|
||||
import java.awt.BorderLayout;
|
||||
import java.io.IOException;
|
||||
import javax.swing.JPanel;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import net.runelite.api.Client;
|
||||
import net.runelite.client.ClientLoader;
|
||||
import net.runelite.http.api.updatecheck.UpdateCheckClient;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
@Slf4j
|
||||
final class ClientPanel extends JPanel
|
||||
{
|
||||
private static final Logger logger = LoggerFactory.getLogger(ClientPanel.class);
|
||||
|
||||
public static final int PANEL_WIDTH = 765, PANEL_HEIGHT = 503;
|
||||
|
||||
private final ClientUI ui;
|
||||
@@ -63,12 +61,12 @@ final class ClientPanel extends JPanel
|
||||
boolean isOutdated = updateCheck.isOutdated();
|
||||
if (isOutdated)
|
||||
{
|
||||
logger.info("Runelite is outdated - fetching vanilla client");
|
||||
log.info("Runelite is outdated - fetching vanilla client");
|
||||
rs = loader.loadVanilla();
|
||||
}
|
||||
else
|
||||
{
|
||||
logger.debug("Runelite is up to date");
|
||||
log.debug("Runelite is up to date");
|
||||
|
||||
try
|
||||
{
|
||||
@@ -76,7 +74,7 @@ final class ClientPanel extends JPanel
|
||||
}
|
||||
catch (ClassNotFoundException ex)
|
||||
{
|
||||
logger.error("Unable to load client - class not found. This means you"
|
||||
log.error("Unable to load client - class not found. This means you"
|
||||
+ " are not running RuneLite with Maven as the injected client"
|
||||
+ " is not in your classpath.");
|
||||
throw new ClassNotFoundException("Unable to load injected client", ex);
|
||||
@@ -98,7 +96,7 @@ final class ClientPanel extends JPanel
|
||||
|
||||
if (!(rs instanceof Client))
|
||||
{
|
||||
logger.error("Injected client does not implement Client!");
|
||||
log.error("Injected client does not implement Client!");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -33,17 +33,15 @@ import javax.swing.JFrame;
|
||||
import javax.swing.JOptionPane;
|
||||
import javax.swing.JPanel;
|
||||
import javax.swing.SwingUtilities;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import net.runelite.api.Client;
|
||||
import net.runelite.api.GameState;
|
||||
import net.runelite.client.RuneLite;
|
||||
import org.pushingpixels.substance.internal.ui.SubstanceRootPaneUI;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
@Slf4j
|
||||
public class ClientUI extends JFrame
|
||||
{
|
||||
private static final Logger logger = LoggerFactory.getLogger(ClientUI.class);
|
||||
|
||||
private static final int PANEL_WIDTH = 809;
|
||||
private static final int PANEL_HEIGHT = 536;
|
||||
private static final int EXPANDED_WIDTH = PANEL_WIDTH + PluginPanel.PANEL_WIDTH;
|
||||
@@ -97,7 +95,7 @@ public class ClientUI extends JFrame
|
||||
}
|
||||
catch (IOException | ClassNotFoundException | InstantiationException | IllegalAccessException ex)
|
||||
{
|
||||
logger.error("Error loading RS!", ex);
|
||||
log.error("Error loading RS!", ex);
|
||||
System.exit(-1);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28,13 +28,9 @@ import java.awt.Font;
|
||||
import java.awt.FontFormatException;
|
||||
import java.awt.GraphicsEnvironment;
|
||||
import java.io.IOException;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
public class FontManager
|
||||
{
|
||||
private static final Logger logger = LoggerFactory.getLogger(FontManager.class);
|
||||
|
||||
private static final Font runescapeFont;
|
||||
private static final Font runescapeSmallFont;
|
||||
|
||||
|
||||
@@ -29,13 +29,9 @@ import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.function.Supplier;
|
||||
import javax.swing.JToolBar;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
public class PluginToolbar extends JToolBar
|
||||
{
|
||||
private static final Logger logger = LoggerFactory.getLogger(PluginToolbar.class);
|
||||
|
||||
public static final int TOOLBAR_WIDTH = 36, TOOLBAR_HEIGHT = 503;
|
||||
|
||||
private final ClientUI ui;
|
||||
|
||||
@@ -41,19 +41,14 @@ import javax.swing.JButton;
|
||||
import javax.swing.JComponent;
|
||||
import javax.swing.JFrame;
|
||||
import javax.swing.JRootPane;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.pushingpixels.substance.api.SubstanceLookAndFeel;
|
||||
import org.pushingpixels.substance.internal.ui.SubstanceRootPaneUI;
|
||||
import org.pushingpixels.substance.internal.utils.SubstanceTitlePane;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
/**
|
||||
* Created by X on 8/20/2017.
|
||||
*/
|
||||
@Slf4j
|
||||
public class TitleBarPane extends SubstanceTitlePane
|
||||
{
|
||||
private static final Logger logger = LoggerFactory.getLogger(TitleBarPane.class);
|
||||
|
||||
private static final String DISCORD_INVITE = "https://discord.gg/R4BQ8tU";
|
||||
|
||||
private BufferedImage discordIcon;
|
||||
@@ -70,7 +65,7 @@ public class TitleBarPane extends SubstanceTitlePane
|
||||
}
|
||||
catch (IOException ex)
|
||||
{
|
||||
logger.warn("unable to load discord icons", ex);
|
||||
log.warn("unable to load discord icons", ex);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -111,7 +106,7 @@ public class TitleBarPane extends SubstanceTitlePane
|
||||
}
|
||||
catch (IOException | URISyntaxException ex)
|
||||
{
|
||||
logger.warn("error opening browser", ex);
|
||||
log.warn("error opening browser", ex);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
@@ -30,31 +30,29 @@ import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.function.Predicate;
|
||||
import javax.inject.Singleton;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
@Singleton
|
||||
@Slf4j
|
||||
public class InfoBoxManager
|
||||
{
|
||||
private static final Logger logger = LoggerFactory.getLogger(InfoBoxManager.class);
|
||||
|
||||
private final List<InfoBox> infoBoxes = new ArrayList<>();
|
||||
|
||||
public void addInfoBox(InfoBox infoBox)
|
||||
{
|
||||
logger.debug("Adding InfoBox {}", infoBox);
|
||||
log.debug("Adding InfoBox {}", infoBox);
|
||||
infoBoxes.add(infoBox);
|
||||
}
|
||||
|
||||
public void removeInfoBox(InfoBox infoBox)
|
||||
{
|
||||
logger.debug("Removing InfoBox {}", infoBox);
|
||||
log.debug("Removing InfoBox {}", infoBox);
|
||||
infoBoxes.remove(infoBox);
|
||||
}
|
||||
|
||||
public void removeIf(Predicate<InfoBox> filter)
|
||||
{
|
||||
logger.debug("Removing InfoBoxs for filter {}", filter);
|
||||
log.debug("Removing InfoBoxs for filter {}", filter);
|
||||
infoBoxes.removeIf(filter);
|
||||
}
|
||||
|
||||
@@ -71,7 +69,7 @@ public class InfoBoxManager
|
||||
|
||||
if (box.cull())
|
||||
{
|
||||
logger.debug("Culling InfoBox {}", box);
|
||||
log.debug("Culling InfoBox {}", box);
|
||||
it.remove();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,13 +24,11 @@
|
||||
*/
|
||||
package net.runelite.client.util;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
@Slf4j
|
||||
public class RunnableExceptionLogger implements Runnable
|
||||
{
|
||||
private static final Logger logger = LoggerFactory.getLogger(RunnableExceptionLogger.class);
|
||||
|
||||
private final Runnable runnable;
|
||||
|
||||
private RunnableExceptionLogger(Runnable runnable)
|
||||
@@ -47,7 +45,7 @@ public class RunnableExceptionLogger implements Runnable
|
||||
}
|
||||
catch (Throwable ex)
|
||||
{
|
||||
logger.warn("Uncaught exception in runnable {}", runnable, ex);
|
||||
log.warn("Uncaught exception in runnable {}", runnable, ex);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user