mirror of
https://github.com/Xiao-MoMi/Custom-Fishing.git
synced 2025-12-19 15:09:24 +00:00
removed isEnabled check for some plugins
This commit is contained in:
@@ -26,6 +26,15 @@ import java.util.Map;
|
||||
|
||||
public interface PlaceholderManager {
|
||||
|
||||
/**
|
||||
* Register a custom placeholder
|
||||
*
|
||||
* @param placeholder for instance {level}
|
||||
* @param original for instance %player_level%
|
||||
* @return success or not, it would fail if the placeholder has been registered
|
||||
*/
|
||||
boolean registerCustomPlaceholder(String placeholder, String original);
|
||||
|
||||
/**
|
||||
* Set placeholders in a text string for a player.
|
||||
*
|
||||
|
||||
@@ -7,7 +7,7 @@ plugins {
|
||||
|
||||
allprojects {
|
||||
|
||||
version = "2.1.3.1"
|
||||
version = "2.1.3.2"
|
||||
|
||||
apply<JavaPlugin>()
|
||||
apply(plugin = "java")
|
||||
|
||||
@@ -51,7 +51,7 @@ dependencies {
|
||||
compileOnly("dev.aurelium:auraskills-api-bukkit:2.0.0-SNAPSHOT")
|
||||
compileOnly("com.github.MilkBowl:VaultAPI:1.7")
|
||||
compileOnly("org.betonquest:betonquest:2.0.0")
|
||||
compileOnly("xyz.xenondevs.invui:invui:1.26")
|
||||
compileOnly("xyz.xenondevs.invui:invui:1.27")
|
||||
compileOnly("com.github.Xiao-MoMi:Custom-Crops:3.4-BETA-1")
|
||||
implementation("com.github.Xiao-MoMi:BiomeAPI:0.3")
|
||||
|
||||
|
||||
@@ -63,17 +63,17 @@ public class IntegrationManagerImpl implements IntegrationManager {
|
||||
}
|
||||
|
||||
public void load() {
|
||||
if (plugin.isHookedPluginEnabled("ItemsAdder")) {
|
||||
if (Bukkit.getPluginManager().getPlugin("ItemsAdder") != null) {
|
||||
plugin.getItemManager().registerItemLibrary(new ItemsAdderItemImpl());
|
||||
plugin.getBlockManager().registerBlockLibrary(new ItemsAdderBlockImpl());
|
||||
plugin.getEntityManager().registerEntityLibrary(new ItemsAdderEntityImpl());
|
||||
hookMessage("ItemsAdder");
|
||||
}
|
||||
if (plugin.isHookedPluginEnabled("MMOItems")) {
|
||||
if (Bukkit.getPluginManager().getPlugin("MMOItems") != null) {
|
||||
plugin.getItemManager().registerItemLibrary(new MMOItemsItemImpl());
|
||||
hookMessage("MMOItems");
|
||||
}
|
||||
if (plugin.isHookedPluginEnabled("Oraxen")) {
|
||||
if (Bukkit.getPluginManager().getPlugin("Oraxen") != null) {
|
||||
plugin.getItemManager().registerItemLibrary(new OraxenItemImpl());
|
||||
hookMessage("Oraxen");
|
||||
}
|
||||
@@ -85,7 +85,7 @@ public class IntegrationManagerImpl implements IntegrationManager {
|
||||
plugin.getItemManager().registerItemLibrary(new NeigeItemsItemImpl());
|
||||
hookMessage("NeigeItems");
|
||||
}
|
||||
if (plugin.isHookedPluginEnabled("MythicMobs")) {
|
||||
if (Bukkit.getPluginManager().getPlugin("MythicMobs") != null) {
|
||||
plugin.getItemManager().registerItemLibrary(new MythicMobsItemImpl());
|
||||
plugin.getEntityManager().registerEntityLibrary(new MythicEntityImpl());
|
||||
hookMessage("MythicMobs");
|
||||
|
||||
@@ -82,11 +82,20 @@ public class PlaceholderManagerImpl implements PlaceholderManager {
|
||||
ConfigurationSection section = config.getConfigurationSection("other-settings.placeholder-register");
|
||||
if (section != null) {
|
||||
for (Map.Entry<String, Object> entry : section.getValues(false).entrySet()) {
|
||||
this.customPlaceholderMap.put(entry.getKey(), (String) entry.getValue());
|
||||
registerCustomPlaceholder(entry.getKey(), (String) entry.getValue());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean registerCustomPlaceholder(String placeholder, String original) {
|
||||
if (this.customPlaceholderMap.containsKey(placeholder)) {
|
||||
return false;
|
||||
}
|
||||
this.customPlaceholderMap.put(placeholder, original);
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set placeholders in a text string for a player.
|
||||
*
|
||||
|
||||
@@ -304,21 +304,21 @@ public enum Dependency {
|
||||
INV_UI(
|
||||
"xyz{}xenondevs{}invui",
|
||||
"invui-core",
|
||||
"1.26",
|
||||
"1.27",
|
||||
"xenondevs",
|
||||
"invui-core"
|
||||
),
|
||||
INV_UI_ACCESS(
|
||||
"xyz{}xenondevs{}invui",
|
||||
"inventory-access",
|
||||
"1.26",
|
||||
"1.27",
|
||||
"xenondevs",
|
||||
"inventory-access"
|
||||
),
|
||||
INV_UI_NMS(
|
||||
"xyz{}xenondevs{}invui",
|
||||
getInvUINms(),
|
||||
"1.26",
|
||||
"1.27",
|
||||
"xenondevs",
|
||||
getInvUINms()
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user