mirror of
https://github.com/Xiao-MoMi/Custom-Crops.git
synced 2025-12-23 00:49:33 +00:00
3.3.1.5
This commit is contained in:
@@ -8,7 +8,7 @@ plugins {
|
||||
allprojects {
|
||||
|
||||
project.group = "net.momirealms"
|
||||
project.version = "3.3.1.4"
|
||||
project.version = "3.3.1.5"
|
||||
|
||||
apply<JavaPlugin>()
|
||||
apply(plugin = "java")
|
||||
@@ -71,12 +71,5 @@ subprojects {
|
||||
tasks.javadoc.configure {
|
||||
options.quiet()
|
||||
}
|
||||
|
||||
if ("api" == project.name) {
|
||||
java {
|
||||
withSourcesJar()
|
||||
withJavadocJar()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
systemProp.socks.proxyHost=127.0.0.1
|
||||
systemProp.socks.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.http.proxyHost=127.0.0.1
|
||||
#systemProp.http.proxyPort=7890
|
||||
|
||||
systemProp.https.proxyHost=127.0.0.1
|
||||
systemProp.https.proxyPort=7890
|
||||
#systemProp.https.proxyHost=127.0.0.1
|
||||
#systemProp.https.proxyPort=7890
|
||||
@@ -28,7 +28,7 @@ dependencies {
|
||||
implementation("net.kyori:adventure-platform-bukkit:4.3.0")
|
||||
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.11.3")
|
||||
implementation("de.tr7zw:item-nbt-api:2.12.0")
|
||||
implementation("org.bstats:bstats-bukkit:3.0.1")
|
||||
implementation(files("libs/BiomeAPI.jar", "libs/ProtectionLib.jar"))
|
||||
}
|
||||
|
||||
BIN
plugin/libs/BattlePass-4.0.6-api.jar
Normal file
BIN
plugin/libs/BattlePass-4.0.6-api.jar
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -22,9 +22,11 @@ import com.comphenix.protocol.ProtocolManager;
|
||||
import net.kyori.adventure.platform.bukkit.BukkitAudiences;
|
||||
import net.momirealms.customcrops.api.CustomCropsAPIImpl;
|
||||
import net.momirealms.customcrops.api.CustomCropsPlugin;
|
||||
import net.momirealms.customcrops.api.event.CropBreakEvent;
|
||||
import net.momirealms.customcrops.api.object.basic.ConfigManager;
|
||||
import net.momirealms.customcrops.api.object.basic.MessageManager;
|
||||
import net.momirealms.customcrops.api.object.crop.CropManager;
|
||||
import net.momirealms.customcrops.api.object.crop.GrowingCrop;
|
||||
import net.momirealms.customcrops.api.object.fertilizer.FertilizerManager;
|
||||
import net.momirealms.customcrops.api.object.hologram.HologramManager;
|
||||
import net.momirealms.customcrops.api.object.pot.PotManager;
|
||||
@@ -32,6 +34,7 @@ import net.momirealms.customcrops.api.object.scheduler.Scheduler;
|
||||
import net.momirealms.customcrops.api.object.season.SeasonManager;
|
||||
import net.momirealms.customcrops.api.object.sprinkler.SprinklerManager;
|
||||
import net.momirealms.customcrops.api.object.wateringcan.WateringCanManager;
|
||||
import net.momirealms.customcrops.api.object.world.SimpleLocation;
|
||||
import net.momirealms.customcrops.api.object.world.WorldDataManager;
|
||||
import net.momirealms.customcrops.command.CustomCropsCommand;
|
||||
import net.momirealms.customcrops.customplugin.Platform;
|
||||
|
||||
@@ -0,0 +1,44 @@
|
||||
/*
|
||||
* 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.requirement;
|
||||
|
||||
import net.momirealms.biomeapi.BiomeAPI;
|
||||
import net.momirealms.customcrops.api.object.action.Action;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import java.util.HashSet;
|
||||
|
||||
public class BlackBiomeImpl extends AbstractRequirement implements Requirement {
|
||||
|
||||
private final HashSet<String> biomes;
|
||||
|
||||
public BlackBiomeImpl(@Nullable String[] msg, @Nullable Action[] actions, HashSet<String> biomes) {
|
||||
super(msg, actions);
|
||||
this.biomes = biomes;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isConditionMet(CurrentState currentState) {
|
||||
String currentBiome = BiomeAPI.getBiome(currentState.getLocation());
|
||||
if (!biomes.contains(currentBiome)) {
|
||||
return true;
|
||||
}
|
||||
notMetActions(currentState);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -19,19 +19,20 @@ package net.momirealms.customcrops.integration.quest;
|
||||
|
||||
import io.github.battlepass.BattlePlugin;
|
||||
import io.github.battlepass.api.events.server.PluginReloadEvent;
|
||||
import io.github.battlepass.quests.service.base.ExternalQuestContainer;
|
||||
import io.github.battlepass.registry.quest.QuestRegistry;
|
||||
import net.advancedplugins.bp.impl.actions.ActionRegistry;
|
||||
import net.advancedplugins.bp.impl.actions.external.executor.ActionQuestExecutor;
|
||||
import net.momirealms.customcrops.api.event.CropBreakEvent;
|
||||
import net.momirealms.customcrops.api.event.CropPlantEvent;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.Listener;
|
||||
import org.bukkit.plugin.java.JavaPlugin;
|
||||
|
||||
public class BattlePassCCQuest implements Listener {
|
||||
|
||||
public static void register() {
|
||||
QuestRegistry questRegistry = BattlePlugin.getApi().getQuestRegistry();
|
||||
questRegistry.hook("customcrops", CropQuest::new);
|
||||
ActionRegistry actionRegistry = BattlePlugin.getPlugin().getActionRegistry();
|
||||
actionRegistry.hook("customcrops", CropQuest::new);
|
||||
}
|
||||
|
||||
@EventHandler(ignoreCancelled = true)
|
||||
@@ -39,9 +40,9 @@ public class BattlePassCCQuest implements Listener {
|
||||
register();
|
||||
}
|
||||
|
||||
private static class CropQuest extends ExternalQuestContainer {
|
||||
private static class CropQuest extends ActionQuestExecutor {
|
||||
|
||||
public CropQuest(BattlePlugin battlePlugin) {
|
||||
public CropQuest(JavaPlugin battlePlugin) {
|
||||
super(battlePlugin, "customcrops");
|
||||
}
|
||||
|
||||
|
||||
@@ -208,6 +208,7 @@ public class ConfigUtils {
|
||||
ConfigurationSection actionSec = innerSec.getConfigurationSection("actions");
|
||||
switch (type) {
|
||||
case "biome" -> requirements.add(new BiomeImpl(msg, getActions(actionSec), new HashSet<>(innerSec.getStringList("value"))));
|
||||
case "!biome" -> requirements.add(new BlackBiomeImpl(msg, getActions(actionSec), new HashSet<>(innerSec.getStringList("value"))));
|
||||
case "weather" -> requirements.add(new WeatherImpl(msg, getActions(actionSec), innerSec.getStringList("value").toArray(new String[0])));
|
||||
case "ypos" -> requirements.add(new YPosImpl(msg, getActions(actionSec), innerSec.getStringList("value")));
|
||||
case "season" -> {
|
||||
|
||||
Reference in New Issue
Block a user