mirror of
https://github.com/dmulloy2/ProtocolLib.git
synced 2025-02-03 14:11:30 +01:00
Don't update hooks if we don't need to.
This commit is contained in:
parent
651581d677
commit
429ca5d447
@ -142,9 +142,9 @@ public class ProtocolLibrary extends JavaPlugin {
|
||||
PlayerInjectHooks hook = config.getInjectionMethod();
|
||||
|
||||
// Only update the hook if it's different
|
||||
if (protocolManager.getPlayerHook().equals(hook)) {
|
||||
if (!protocolManager.getPlayerHook().equals(hook)) {
|
||||
logger.info("Changing player hook from " + protocolManager.getPlayerHook() + " to " + hook);
|
||||
protocolManager.setPlayerHook(hook);
|
||||
logger.info("Changing player hook to " + hook);
|
||||
}
|
||||
} catch (IllegalArgumentException e) {
|
||||
detailedReporter.reportWarning(config, "Cannot parse injection method. Using default.", e);
|
||||
|
Loading…
Reference in New Issue
Block a user