9
0
mirror of https://github.com/Xiao-MoMi/Custom-Fishing.git synced 2025-12-27 19:09:18 +00:00

Fix old fish-finder

This commit is contained in:
XiaoMoMi
2024-07-10 22:33:04 +08:00
parent d5eea4cdb7
commit 0ea172336c

View File

@@ -870,7 +870,12 @@ public class BukkitActionManager implements ActionManager<Player> {
private void registerFishFindAction() {
registerAction("fish-finder", (args, chance) -> {
String surrounding = (String) args;
String surrounding;
if (args instanceof Boolean b) {
surrounding = b ? "lava" : "water";
} else {
surrounding = (String) args;
}
return context -> {
if (Math.random() > chance) return;
String previous = context.arg(ContextKeys.SURROUNDING);