mirror of
https://github.com/Xiao-MoMi/Custom-Crops.git
synced 2025-12-27 02:49:11 +00:00
1.20.4
This commit is contained in:
@@ -26,6 +26,7 @@ allprojects {
|
||||
maven("https://betonquest.org/nexus/repository/betonquest/")
|
||||
maven("https://maven.enginehub.org/repo/")
|
||||
maven("https://oss.sonatype.org/content/groups/public/")
|
||||
maven("https://s01.oss.sonatype.org/content/repositories/snapshots/")
|
||||
maven("https://repo.codemc.org/repository/maven-public/")
|
||||
maven("https://jitpack.io")
|
||||
maven("https://repo.papermc.io/repository/maven-public/")
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
#systemProp.socks.proxyHost=127.0.0.1
|
||||
#systemProp.socks.proxyPort=7890
|
||||
#
|
||||
#systemProp.http.proxyHost=127.0.0.1
|
||||
#systemProp.http.proxyPort=7890
|
||||
#
|
||||
#systemProp.https.proxyHost=127.0.0.1
|
||||
#systemProp.https.proxyPort=7890
|
||||
systemProp.socks.proxyHost=127.0.0.1
|
||||
systemProp.socks.proxyPort=7890
|
||||
|
||||
systemProp.http.proxyHost=127.0.0.1
|
||||
systemProp.http.proxyPort=7890
|
||||
|
||||
systemProp.https.proxyHost=127.0.0.1
|
||||
systemProp.https.proxyPort=7890
|
||||
|
||||
@@ -16,7 +16,7 @@ dependencies {
|
||||
compileOnly("net.Indyuce:MMOItems-API:6.9.2-SNAPSHOT")
|
||||
compileOnly("pers.neige.neigeitems:NeigeItems:1.14.23")
|
||||
compileOnly("com.github.Archy-X:AureliumSkills:Beta1.3.21")
|
||||
compileOnly("com.willfp:EcoSkills:3.8.1")
|
||||
compileOnly("com.willfp:EcoSkills:3.36.1")
|
||||
compileOnly("com.github.Zrips:Jobs:4.17.2")
|
||||
compileOnly("com.github.MilkBowl:VaultAPI:1.7")
|
||||
compileOnly("com.comphenix.protocol:ProtocolLib:5.0.0")
|
||||
@@ -25,10 +25,10 @@ dependencies {
|
||||
|
||||
implementation(project(":api"))
|
||||
implementation("net.kyori:adventure-api:4.14.0")
|
||||
implementation("net.kyori:adventure-platform-bukkit:4.3.1")
|
||||
implementation("net.kyori:adventure-platform-bukkit:4.3.3-SNAPSHOT")
|
||||
implementation("net.kyori:adventure-text-minimessage:4.14.0")
|
||||
implementation("net.kyori:adventure-text-serializer-legacy:4.14.0")
|
||||
implementation("de.tr7zw:item-nbt-api:2.12.0")
|
||||
implementation("de.tr7zw:item-nbt-api:2.12.2")
|
||||
implementation("org.bstats:bstats-bukkit:3.0.1")
|
||||
implementation(files("libs/BiomeAPI.jar", "libs/ProtectionLib.jar"))
|
||||
}
|
||||
|
||||
Binary file not shown.
@@ -0,0 +1,39 @@
|
||||
/*
|
||||
* Copyright (C) <2022> <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.customcrops.api.object.action;
|
||||
|
||||
import net.momirealms.customcrops.api.object.ItemMode;
|
||||
import net.momirealms.customcrops.api.object.world.SimpleLocation;
|
||||
import net.momirealms.customcrops.util.AdventureUtils;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
public record ActionBarImpl(String message, double chance) implements Action {
|
||||
|
||||
@Override
|
||||
public void doOn(@Nullable Player player, @Nullable SimpleLocation cropLoc, ItemMode itemMode) {
|
||||
if (player == null || Math.random() > chance) return;
|
||||
AdventureUtils.playerActionbar(player,
|
||||
message.replace("{player}", player.getName())
|
||||
.replace("{world}", player.getWorld().getName())
|
||||
.replace("{x}", cropLoc == null ? "" : String.valueOf(cropLoc.getX()))
|
||||
.replace("{y}", cropLoc == null ? "" : String.valueOf(cropLoc.getY()))
|
||||
.replace("{z}", cropLoc == null ? "" : String.valueOf(cropLoc.getZ()))
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -18,6 +18,7 @@
|
||||
package net.momirealms.customcrops.integration.skill;
|
||||
|
||||
import com.willfp.ecoskills.api.EcoSkillsAPI;
|
||||
import com.willfp.ecoskills.skills.Skill;
|
||||
import com.willfp.ecoskills.skills.Skills;
|
||||
import net.momirealms.customcrops.integration.SkillInterface;
|
||||
import org.bukkit.entity.Player;
|
||||
@@ -26,7 +27,7 @@ public class EcoSkillsImpl implements SkillInterface {
|
||||
|
||||
@Override
|
||||
public void addXp(Player player, double amount) {
|
||||
EcoSkillsAPI.giveSkillXP(player, Skills.INSTANCE.getByID("farming"), amount);
|
||||
EcoSkillsAPI.gainSkillXP(player, Skills.INSTANCE.getByID("farming"), amount);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -252,6 +252,10 @@ public class ConfigUtils {
|
||||
actionSec.getStringList("value").toArray(new String[0]),
|
||||
actionSec.getDouble("chance", 1))
|
||||
);
|
||||
case "actionbar" -> actions.add(new ActionBarImpl(
|
||||
actionSec.getString("value"),
|
||||
actionSec.getDouble("chance", 1))
|
||||
);
|
||||
case "command" -> actions.add(new CommandActionImpl(
|
||||
actionSec.getStringList("value").toArray(new String[0]),
|
||||
actionSec.getDouble("chance", 1))
|
||||
|
||||
Reference in New Issue
Block a user