9
0
mirror of https://github.com/Xiao-MoMi/Custom-Fishing.git synced 2025-12-26 18:39:11 +00:00

fix on ground

This commit is contained in:
XiaoMoMi
2024-02-13 12:17:15 +08:00
parent 381566e531
commit cd26609b68
8 changed files with 19 additions and 13 deletions

View File

@@ -30,7 +30,7 @@ dependencies {
compileOnly("com.willfp:libreforge:4.48.1")
// database
compileOnly("org.xerial:sqlite-jdbc:3.43.2.2")
compileOnly("org.xerial:sqlite-jdbc:3.45.1.0")
compileOnly("com.h2database:h2:2.2.224")
compileOnly("org.mongodb:mongodb-driver-sync:4.11.1")
compileOnly("com.zaxxer:HikariCP:5.0.1")
@@ -39,12 +39,12 @@ dependencies {
// others
compileOnly("com.github.LoneDev6:api-itemsadder:3.5.0c-r5")
compileOnly("io.th0rgal:oraxen:1.165.0")
compileOnly("pers.neige.neigeitems:NeigeItems:1.15.95")
compileOnly("pers.neige.neigeitems:NeigeItems:1.16.24")
compileOnly("com.github.Zrips:Jobs:4.17.2")
compileOnly("com.github.Archy-X:AureliumSkills:Beta1.3.21")
compileOnly("com.github.MilkBowl:VaultAPI:1.7")
compileOnly("org.betonquest:betonquest:2.0.0")
compileOnly("xyz.xenondevs.invui:invui:1.24")
compileOnly("xyz.xenondevs.invui:invui:1.25")
compileOnly("com.github.Xiao-MoMi:Custom-Crops:3.3.1.10")
// local jars

View File

@@ -210,15 +210,15 @@ public class CustomFishingPluginImpl extends CustomFishingPlugin {
"dev.dejvokep:boosted-yaml:1.3.1", mavenRepo,
"com.zaxxer:HikariCP:5.0.1", mavenRepo,
"net.objecthunter:exp4j:0.4.8", mavenRepo,
"org.mariadb.jdbc:mariadb-java-client:3.3.0", mavenRepo,
"com.mysql:mysql-connector-j:8.2.0", mavenRepo,
"org.mariadb.jdbc:mariadb-java-client:3.3.2", mavenRepo,
"com.mysql:mysql-connector-j:8.3.0", mavenRepo,
"commons-io:commons-io:2.14.0", mavenRepo,
"com.google.code.gson:gson:2.10.1", mavenRepo,
"com.h2database:h2:2.2.224", mavenRepo,
"org.mongodb:mongodb-driver-sync:4.11.1", mavenRepo,
"org.mongodb:mongodb-driver-core:4.11.1", mavenRepo,
"org.mongodb:bson:4.11.1", mavenRepo,
"org.xerial:sqlite-jdbc:3.43.2.2", mavenRepo,
"org.xerial:sqlite-jdbc:3.45.1.0", mavenRepo,
"dev.jorel:commandapi-bukkit-shade:9.3.0", mavenRepo
);
@@ -236,9 +236,9 @@ public class CustomFishingPluginImpl extends CustomFishingPlugin {
case "v1_20_R3" -> artifact = "r18";
}
LibraryLoader.loadDependencies(
"xyz.xenondevs.invui:invui-core:1.24", "https://repo.xenondevs.xyz/releases/",
"xyz.xenondevs.invui:inventory-access:1.24", "https://repo.xenondevs.xyz/releases/",
String.format("xyz.xenondevs.invui:inventory-access-%s:1.24", artifact), "https://repo.xenondevs.xyz/releases/"
"xyz.xenondevs.invui:invui-core:1.25", "https://repo.xenondevs.xyz/releases/",
"xyz.xenondevs.invui:inventory-access:1.25", "https://repo.xenondevs.xyz/releases/",
String.format("xyz.xenondevs.invui:inventory-access-%s:1.25", artifact), "https://repo.xenondevs.xyz/releases/"
);
}

View File

@@ -45,6 +45,8 @@ import org.bukkit.entity.Entity;
import org.bukkit.entity.ExperienceOrb;
import org.bukkit.entity.Player;
import org.bukkit.inventory.EquipmentSlot;
import org.bukkit.inventory.Inventory;
import org.bukkit.inventory.InventoryHolder;
import org.bukkit.inventory.ItemStack;
import org.bukkit.potion.PotionEffect;
import org.bukkit.potion.PotionEffectType;

View File

@@ -92,7 +92,6 @@ public class HookCheckTimerTask implements Runnable {
public void run() {
if (
!fishHook.isValid()
|| fishHook.isOnGround()
|| (fishHook.getHookedEntity() != null && fishHook.getHookedEntity().getType() != EntityType.ARMOR_STAND)
) {
// This task would be cancelled when hook is not at a proper place
@@ -100,6 +99,9 @@ public class HookCheckTimerTask implements Runnable {
this.destroy();
return;
}
if (fishHook.isOnGround()) {
return;
}
if (fishHook.getLocation().getBlock().getType() == Material.LAVA) {
// if player can fish in lava
if (firstTime) {

View File

@@ -19,6 +19,7 @@ package net.momirealms.customfishing.storage.method.database.sql;
import com.zaxxer.hikari.HikariConfig;
import com.zaxxer.hikari.HikariDataSource;
import me.clip.placeholderapi.PlaceholderAPI;
import net.momirealms.customfishing.api.CustomFishingPlugin;
import net.momirealms.customfishing.api.data.*;
import net.momirealms.customfishing.api.util.LogUtils;
@@ -54,7 +55,6 @@ public abstract class AbstractHikariDatabase extends AbstractSQLDatabase impleme
} else if (getStorageType() == StorageType.MySQL) {
try {
Class.forName("com.mysql.jdbc.Driver");
LogUtils.warn("It seems that you are not using MySQL 8.0+. It's recommended to update.");
} catch (ClassNotFoundException e2) {
LogUtils.warn("No MySQL driver is found");
}

View File

@@ -67,7 +67,7 @@ MongoDB:
Redis:
enable: false
host: localhost
#password: 123456
#password: "123456"
port: 6379
use-ssl: false
MaxTotal: 10

View File

@@ -1,3 +1,5 @@
# global group
global-group:
list: []