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 {
|
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.
|
* Set placeholders in a text string for a player.
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ plugins {
|
|||||||
|
|
||||||
allprojects {
|
allprojects {
|
||||||
|
|
||||||
version = "2.1.3.1"
|
version = "2.1.3.2"
|
||||||
|
|
||||||
apply<JavaPlugin>()
|
apply<JavaPlugin>()
|
||||||
apply(plugin = "java")
|
apply(plugin = "java")
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ dependencies {
|
|||||||
compileOnly("dev.aurelium:auraskills-api-bukkit:2.0.0-SNAPSHOT")
|
compileOnly("dev.aurelium:auraskills-api-bukkit:2.0.0-SNAPSHOT")
|
||||||
compileOnly("com.github.MilkBowl:VaultAPI:1.7")
|
compileOnly("com.github.MilkBowl:VaultAPI:1.7")
|
||||||
compileOnly("org.betonquest:betonquest:2.0.0")
|
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")
|
compileOnly("com.github.Xiao-MoMi:Custom-Crops:3.4-BETA-1")
|
||||||
implementation("com.github.Xiao-MoMi:BiomeAPI:0.3")
|
implementation("com.github.Xiao-MoMi:BiomeAPI:0.3")
|
||||||
|
|
||||||
|
|||||||
@@ -63,17 +63,17 @@ public class IntegrationManagerImpl implements IntegrationManager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void load() {
|
public void load() {
|
||||||
if (plugin.isHookedPluginEnabled("ItemsAdder")) {
|
if (Bukkit.getPluginManager().getPlugin("ItemsAdder") != null) {
|
||||||
plugin.getItemManager().registerItemLibrary(new ItemsAdderItemImpl());
|
plugin.getItemManager().registerItemLibrary(new ItemsAdderItemImpl());
|
||||||
plugin.getBlockManager().registerBlockLibrary(new ItemsAdderBlockImpl());
|
plugin.getBlockManager().registerBlockLibrary(new ItemsAdderBlockImpl());
|
||||||
plugin.getEntityManager().registerEntityLibrary(new ItemsAdderEntityImpl());
|
plugin.getEntityManager().registerEntityLibrary(new ItemsAdderEntityImpl());
|
||||||
hookMessage("ItemsAdder");
|
hookMessage("ItemsAdder");
|
||||||
}
|
}
|
||||||
if (plugin.isHookedPluginEnabled("MMOItems")) {
|
if (Bukkit.getPluginManager().getPlugin("MMOItems") != null) {
|
||||||
plugin.getItemManager().registerItemLibrary(new MMOItemsItemImpl());
|
plugin.getItemManager().registerItemLibrary(new MMOItemsItemImpl());
|
||||||
hookMessage("MMOItems");
|
hookMessage("MMOItems");
|
||||||
}
|
}
|
||||||
if (plugin.isHookedPluginEnabled("Oraxen")) {
|
if (Bukkit.getPluginManager().getPlugin("Oraxen") != null) {
|
||||||
plugin.getItemManager().registerItemLibrary(new OraxenItemImpl());
|
plugin.getItemManager().registerItemLibrary(new OraxenItemImpl());
|
||||||
hookMessage("Oraxen");
|
hookMessage("Oraxen");
|
||||||
}
|
}
|
||||||
@@ -85,7 +85,7 @@ public class IntegrationManagerImpl implements IntegrationManager {
|
|||||||
plugin.getItemManager().registerItemLibrary(new NeigeItemsItemImpl());
|
plugin.getItemManager().registerItemLibrary(new NeigeItemsItemImpl());
|
||||||
hookMessage("NeigeItems");
|
hookMessage("NeigeItems");
|
||||||
}
|
}
|
||||||
if (plugin.isHookedPluginEnabled("MythicMobs")) {
|
if (Bukkit.getPluginManager().getPlugin("MythicMobs") != null) {
|
||||||
plugin.getItemManager().registerItemLibrary(new MythicMobsItemImpl());
|
plugin.getItemManager().registerItemLibrary(new MythicMobsItemImpl());
|
||||||
plugin.getEntityManager().registerEntityLibrary(new MythicEntityImpl());
|
plugin.getEntityManager().registerEntityLibrary(new MythicEntityImpl());
|
||||||
hookMessage("MythicMobs");
|
hookMessage("MythicMobs");
|
||||||
|
|||||||
@@ -82,11 +82,20 @@ public class PlaceholderManagerImpl implements PlaceholderManager {
|
|||||||
ConfigurationSection section = config.getConfigurationSection("other-settings.placeholder-register");
|
ConfigurationSection section = config.getConfigurationSection("other-settings.placeholder-register");
|
||||||
if (section != null) {
|
if (section != null) {
|
||||||
for (Map.Entry<String, Object> entry : section.getValues(false).entrySet()) {
|
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.
|
* Set placeholders in a text string for a player.
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -304,21 +304,21 @@ public enum Dependency {
|
|||||||
INV_UI(
|
INV_UI(
|
||||||
"xyz{}xenondevs{}invui",
|
"xyz{}xenondevs{}invui",
|
||||||
"invui-core",
|
"invui-core",
|
||||||
"1.26",
|
"1.27",
|
||||||
"xenondevs",
|
"xenondevs",
|
||||||
"invui-core"
|
"invui-core"
|
||||||
),
|
),
|
||||||
INV_UI_ACCESS(
|
INV_UI_ACCESS(
|
||||||
"xyz{}xenondevs{}invui",
|
"xyz{}xenondevs{}invui",
|
||||||
"inventory-access",
|
"inventory-access",
|
||||||
"1.26",
|
"1.27",
|
||||||
"xenondevs",
|
"xenondevs",
|
||||||
"inventory-access"
|
"inventory-access"
|
||||||
),
|
),
|
||||||
INV_UI_NMS(
|
INV_UI_NMS(
|
||||||
"xyz{}xenondevs{}invui",
|
"xyz{}xenondevs{}invui",
|
||||||
getInvUINms(),
|
getInvUINms(),
|
||||||
"1.26",
|
"1.27",
|
||||||
"xenondevs",
|
"xenondevs",
|
||||||
getInvUINms()
|
getInvUINms()
|
||||||
),
|
),
|
||||||
|
|||||||
Reference in New Issue
Block a user