From e3acb5384a5871ed986fb38fedd4b7de80f0a7c0 Mon Sep 17 00:00:00 2001 From: Jikoo Date: Mon, 5 Apr 2021 19:12:45 -0400 Subject: [PATCH] Deprecate API for removed notification configuration --- api/src/main/java/com/lishid/openinv/IOpenInv.java | 12 ++++++++++-- plugin/src/main/java/com/lishid/openinv/OpenInv.java | 10 ---------- 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/api/src/main/java/com/lishid/openinv/IOpenInv.java b/api/src/main/java/com/lishid/openinv/IOpenInv.java index b4f4e8f..2d18f65 100644 --- a/api/src/main/java/com/lishid/openinv/IOpenInv.java +++ b/api/src/main/java/com/lishid/openinv/IOpenInv.java @@ -232,16 +232,24 @@ public interface IOpenInv { * when a container is activated with AnyChest. * * @return true unless configured otherwise + * @deprecated OpenInv uses action bar chat for notifications. Whether or not they show is based on language settings. */ - boolean notifyAnyChest(); + @Deprecated + default boolean notifyAnyChest() { + return true; + } /** * Check the configuration value for whether or not OpenInv displays a notification to the user * when a container is activated with SilentChest. * * @return true unless configured otherwise + * @deprecated OpenInv uses action bar chat for notifications. Whether or not they show is based on language settings. */ - boolean notifySilentChest(); + @Deprecated + default boolean notifySilentChest() { + return true; + } /** * Mark a Player as no longer in use by a Plugin to allow OpenInv to remove it from the cache diff --git a/plugin/src/main/java/com/lishid/openinv/OpenInv.java b/plugin/src/main/java/com/lishid/openinv/OpenInv.java index 8137584..a8ac3a1 100644 --- a/plugin/src/main/java/com/lishid/openinv/OpenInv.java +++ b/plugin/src/main/java/com/lishid/openinv/OpenInv.java @@ -334,16 +334,6 @@ public class OpenInv extends JavaPlugin implements IOpenInv { } } - @Override - public boolean notifyAnyChest() { - return this.getConfig().getBoolean("notify.any-chest", true); - } - - @Override - public boolean notifySilentChest() { - return this.getConfig().getBoolean("notify.silent-chest", true); - } - @Override public void onDisable() {