mirror of
https://github.com/Xiao-MoMi/Custom-Fishing.git
synced 2025-12-19 15:09:24 +00:00
add ecoitems support
This commit is contained in:
@@ -52,10 +52,12 @@ dependencies {
|
|||||||
compileOnly(files("libs/SCore-5.24.9.29.jar"))
|
compileOnly(files("libs/SCore-5.24.9.29.jar"))
|
||||||
compileOnly(files("libs/SCore-5.24.9.29.jar"))
|
compileOnly(files("libs/SCore-5.24.9.29.jar"))
|
||||||
compileOnly(files("libs/CraftEngine-beta.jar"))
|
compileOnly(files("libs/CraftEngine-beta.jar"))
|
||||||
|
compileOnly(files("libs/libreforge-4.73.0.jar"))
|
||||||
compileOnly("com.github.LoneDev6:API-ItemsAdder:3.6.1")
|
compileOnly("com.github.LoneDev6:API-ItemsAdder:3.6.1")
|
||||||
compileOnly("net.Indyuce:MMOItems-API:6.10-SNAPSHOT")
|
compileOnly("net.Indyuce:MMOItems-API:6.10-SNAPSHOT")
|
||||||
compileOnly("io.lumine:MythicLib-dist:1.6.2-SNAPSHOT")
|
compileOnly("io.lumine:MythicLib-dist:1.6.2-SNAPSHOT")
|
||||||
compileOnly("pers.neige.neigeitems:NeigeItems:1.17.13")
|
compileOnly("pers.neige.neigeitems:NeigeItems:1.17.13")
|
||||||
|
compileOnly("com.willfp:EcoItems:5.61.0")
|
||||||
compileOnly("io.th0rgal:oraxen:1.168.0")
|
compileOnly("io.th0rgal:oraxen:1.168.0")
|
||||||
compileOnly("com.github.brcdev-minecraft:shopgui-api:3.0.0")
|
compileOnly("com.github.brcdev-minecraft:shopgui-api:3.0.0")
|
||||||
// entity
|
// entity
|
||||||
|
|||||||
BIN
compatibility/libs/libreforge-4.73.0.jar
Normal file
BIN
compatibility/libs/libreforge-4.73.0.jar
Normal file
Binary file not shown.
@@ -0,0 +1,52 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) <2024> <XiaoMoMi>
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package net.momirealms.customfishing.bukkit.integration.item;
|
||||||
|
import com.willfp.ecoitems.items.EcoItem;
|
||||||
|
import com.willfp.ecoitems.items.EcoItemFinder;
|
||||||
|
import com.willfp.ecoitems.items.EcoItems;
|
||||||
|
import net.momirealms.customfishing.api.integration.ItemProvider;
|
||||||
|
import org.bukkit.entity.Player;
|
||||||
|
import org.bukkit.inventory.ItemStack;
|
||||||
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import static java.util.Objects.requireNonNull;
|
||||||
|
|
||||||
|
public class EcoItemsProvider implements ItemProvider {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String identifier() {
|
||||||
|
return "EcoItems";
|
||||||
|
}
|
||||||
|
|
||||||
|
@NotNull
|
||||||
|
@Override
|
||||||
|
public ItemStack buildItem(@NotNull Player player, @NotNull String id) {
|
||||||
|
EcoItem item = EcoItems.INSTANCE.getByID(id);
|
||||||
|
requireNonNull(item, "EcoItems cannot find item with ID " + id);
|
||||||
|
return item.getItemStack();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String itemID(@NotNull ItemStack itemStack) {
|
||||||
|
List<EcoItem> list = EcoItemFinder.INSTANCE.find(itemStack);
|
||||||
|
if (list.isEmpty()) return null;
|
||||||
|
return list.get(0).getID();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -105,6 +105,9 @@ public class BukkitIntegrationManager implements IntegrationManager {
|
|||||||
if (isHooked("MMOItems")) {
|
if (isHooked("MMOItems")) {
|
||||||
registerItemProvider(new MMOItemsItemProvider());
|
registerItemProvider(new MMOItemsItemProvider());
|
||||||
}
|
}
|
||||||
|
if (isHooked("EcoItems")) {
|
||||||
|
registerItemProvider(new EcoItemsProvider());
|
||||||
|
}
|
||||||
if (isHooked("Oraxen", "1")) {
|
if (isHooked("Oraxen", "1")) {
|
||||||
registerItemProvider(new OraxenItemProvider());
|
registerItemProvider(new OraxenItemProvider());
|
||||||
registerBlockProvider(new OraxenBlockProvider());
|
registerBlockProvider(new OraxenBlockProvider());
|
||||||
|
|||||||
@@ -15,7 +15,6 @@ softdepend:
|
|||||||
- mcMMO
|
- mcMMO
|
||||||
- AureliumSkills
|
- AureliumSkills
|
||||||
- AuraSkills
|
- AuraSkills
|
||||||
- CustomCrops
|
|
||||||
- MMOCore
|
- MMOCore
|
||||||
- EcoSkills
|
- EcoSkills
|
||||||
- BattlePass
|
- BattlePass
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
# Project settings
|
# Project settings
|
||||||
# Rule: [major update].[feature update].[bug fix]
|
# Rule: [major update].[feature update].[bug fix]
|
||||||
project_version=2.3.3
|
project_version=2.3.4
|
||||||
config_version=38
|
config_version=38
|
||||||
project_group=net.momirealms
|
project_group=net.momirealms
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user