9
0
mirror of https://github.com/Xiao-MoMi/Custom-Fishing.git synced 2025-12-29 03:49:07 +00:00
This commit is contained in:
Xiao-MoMi
2022-12-06 17:05:39 +08:00
parent f4c3f42cf0
commit b54295fcca
4 changed files with 10 additions and 10 deletions

View File

@@ -69,7 +69,7 @@ public final class CustomFishing extends JavaPlugin {
@Override
public void onLoad() {
plugin = this;
LibraryLoader.load("redis.clients","jedis","4.3.0","https://repo.maven.apache.org/maven2/");
LibraryLoader.load("redis.clients","jedis","4.3.1","https://repo.maven.apache.org/maven2/");
LibraryLoader.load("org.apache.commons","commons-pool2","2.11.1","https://repo.maven.apache.org/maven2/");
LibraryLoader.load("dev.dejvokep","boosted-yaml","1.3","https://repo.maven.apache.org/maven2/");
LibraryLoader.load("com.zaxxer","HikariCP","5.0.1","https://repo.maven.apache.org/maven2/");

View File

@@ -887,7 +887,7 @@ public class FishingManager extends Function {
Location bottomLoc = coreLoc.clone().subtract(0, totem.getOriginalModel().getCorePos().getY(), 0);
ActivatedTotem activatedTotem = new ActivatedTotem(bottomLoc, totem, this);
activatedTotem.runTaskTimer(CustomFishing.plugin, 10, 20);
totemCache.put(coreLoc, activatedTotem);
totemCache.put(bottomLoc, activatedTotem);
}
private void useFinder(Player player) {
@@ -1004,8 +1004,8 @@ public class FishingManager extends Function {
else return GsonComponentSerializer.gson().deserialize("{\"translate\":\"item.minecraft." + type + "\"}");
}
public void removeTotem(ActivatedTotem activatedTotem) {
totemCache.remove(activatedTotem);
public void removeTotem(Location location) {
totemCache.remove(location);
}
public void addPlayerToLavaFishing(Player player, BobberCheckTask task) {

View File

@@ -132,7 +132,7 @@ public class ActivatedTotem extends BukkitRunnable {
public void stop() {
this.particleTimerTask.cancel();
cancel();
fishingManager.removeTotem(this);
fishingManager.removeTotem(location);
if (hasHolo) {
for (Player player : nearbyPlayerSet) {