diff --git a/build.gradle b/build.gradle index e6670a4d..bf8ac625 100644 --- a/build.gradle +++ b/build.gradle @@ -4,7 +4,7 @@ plugins { } group = 'net.momirealms' -version = '1.0.4' +version = '1.0.6' repositories { mavenCentral() diff --git a/src/main/java/net/momirealms/customfishing/ConfigReader.java b/src/main/java/net/momirealms/customfishing/ConfigReader.java index c87990e1..869bdd9a 100644 --- a/src/main/java/net/momirealms/customfishing/ConfigReader.java +++ b/src/main/java/net/momirealms/customfishing/ConfigReader.java @@ -18,6 +18,7 @@ package net.momirealms.customfishing; import net.kyori.adventure.bossbar.BossBar; +import net.momirealms.customcrops.helper.Log; import net.momirealms.customfishing.competition.CompetitionConfig; import net.momirealms.customfishing.competition.Goal; import net.momirealms.customfishing.competition.bossbar.BossBarConfig; @@ -92,12 +93,15 @@ public class ConfigReader{ public static boolean needSpecialRod; public static boolean competition; public static boolean convertMMOItems; + public static boolean loseDurability; + public static boolean rsSeason; + public static boolean ccSeason; public static String season_papi; public static String lang; public static int fishFinderCoolDown; public static double timeMultiply; public static SkillXP skillXP; - public static int version; + public static String version; public static void loadConfig() { @@ -169,20 +173,38 @@ public class ConfigReader{ season = config.getBoolean("config.season.enable"); if (!papi && season) { season = false; - } - - if (season) { - season_papi = config.getString("config.season.papi"); }else { - season_papi = null; + season_papi = config.getString("config.season.papi"); } - vanillaDrop = config.getBoolean("config.vanilla-loot-when-no-custom-fish"); - convertMMOItems = config.getBoolean("config.convert-MMOITEMS"); - needOpenWater = config.getBoolean("config.need-open-water"); - needSpecialRod = config.getBoolean("config.need-special-rod"); + rsSeason = false; + if (config.getBoolean("config.integrations.RealisticSeasons",false)){ + if (Bukkit.getPluginManager().getPlugin("RealisticSeasons") == null) Log.warn("Failed to initialize RealisticSeasons!"); + else { + rsSeason = true; + AdventureManager.consoleMessage("[CustomFishing] RealisticSeasons Hooked!"); + } + } + ccSeason = false; + if (config.getBoolean("config.integrations.CustomCrops",false)){ + if (Bukkit.getPluginManager().getPlugin("CustomCrops") == null) Log.warn("Failed to initialize CustomCrops!"); + else { + ccSeason = true; + AdventureManager.consoleMessage("[CustomFishing] CustomCrops Hooked!"); + } + } - version = config.getInt("config-version"); + if (rsSeason || ccSeason){ + season = true; + } + + vanillaDrop = config.getBoolean("config.vanilla-loot-when-no-custom-fish", true); + convertMMOItems = config.getBoolean("config.convert-MMOITEMS", false); + needOpenWater = config.getBoolean("config.need-open-water", false); + needSpecialRod = config.getBoolean("config.need-special-rod", false); + loseDurability = config.getBoolean("config.rod-lose-durability", true); + + version = config.getString("config-version"); fishFinderCoolDown = config.getInt("config.fishfinder-cooldown"); timeMultiply = config.getDouble("config.time-multiply"); lang = config.getString("config.lang","cn"); diff --git a/src/main/java/net/momirealms/customfishing/CustomFishing.java b/src/main/java/net/momirealms/customfishing/CustomFishing.java index 28933c54..5b6e9494 100644 --- a/src/main/java/net/momirealms/customfishing/CustomFishing.java +++ b/src/main/java/net/momirealms/customfishing/CustomFishing.java @@ -76,7 +76,7 @@ public final class CustomFishing extends JavaPlugin { Bukkit.getPluginManager().registerEvents(new PapiReload(), this); } ConfigReader.tryEnableJedis(); - if (ConfigReader.Config.version != 2){ + if (!Objects.equals(ConfigReader.Config.version, "3")){ UpdateConfig.update(); } AdventureManager.consoleMessage("[CustomFishing] Plugin Enabled!"); diff --git a/src/main/java/net/momirealms/customfishing/command/TabComplete.java b/src/main/java/net/momirealms/customfishing/command/TabComplete.java index 0a81ec5c..08680fe6 100644 --- a/src/main/java/net/momirealms/customfishing/command/TabComplete.java +++ b/src/main/java/net/momirealms/customfishing/command/TabComplete.java @@ -154,6 +154,9 @@ public class TabComplete implements TabCompleter { } return arrayList; } + if (args[2].equalsIgnoreCase("get")){ + return Arrays.asList("1","16","64"); + } }else if (args[1].equalsIgnoreCase("util")){ if (args[2].equalsIgnoreCase("give")){ List arrayList = new ArrayList<>(); @@ -163,6 +166,9 @@ public class TabComplete implements TabCompleter { } return arrayList; } + if (args[2].equalsIgnoreCase("get")){ + return Arrays.asList("1","16","64"); + } }else if (args[1].equalsIgnoreCase("rod")){ if (args[2].equalsIgnoreCase("give")){ List arrayList = new ArrayList<>(); @@ -172,6 +178,9 @@ public class TabComplete implements TabCompleter { } return arrayList; } + if (args[2].equalsIgnoreCase("get")){ + return Arrays.asList("1","16","64"); + } } else if (args[1].equalsIgnoreCase("bait")){ if (args[2].equalsIgnoreCase("give")){ @@ -182,6 +191,31 @@ public class TabComplete implements TabCompleter { } return arrayList; } + if (args[2].equalsIgnoreCase("get")){ + return Arrays.asList("1","16","64"); + } + } + } + } + if (args.length == 6){ + if (args[0].equalsIgnoreCase("items")){ + if (args[1].equalsIgnoreCase("loot")){ + if (args[2].equalsIgnoreCase("give")){ + return Arrays.asList("1","16","64"); + } + }else if (args[1].equalsIgnoreCase("util")){ + if (args[2].equalsIgnoreCase("give")){ + return Arrays.asList("1","16","64"); + } + }else if (args[1].equalsIgnoreCase("rod")){ + if (args[2].equalsIgnoreCase("give")){ + return List.of("1"); + } + } + else if (args[1].equalsIgnoreCase("bait")){ + if (args[2].equalsIgnoreCase("give")){ + return Arrays.asList("1","16","64"); + } } } } diff --git a/src/main/java/net/momirealms/customfishing/hook/CustomCropsSeason.java b/src/main/java/net/momirealms/customfishing/hook/CustomCropsSeason.java new file mode 100644 index 00000000..a33e2dc2 --- /dev/null +++ b/src/main/java/net/momirealms/customfishing/hook/CustomCropsSeason.java @@ -0,0 +1,11 @@ +package net.momirealms.customfishing.hook; + +import net.momirealms.customcrops.api.CustomCropsAPI; +import org.bukkit.World; + +public class CustomCropsSeason { + + public static String getSeason(World world){ + return CustomCropsAPI.getSeason(world.getName()); + } +} diff --git a/src/main/java/net/momirealms/customfishing/hook/RealisticSeason.java b/src/main/java/net/momirealms/customfishing/hook/RealisticSeason.java new file mode 100644 index 00000000..988e6b9d --- /dev/null +++ b/src/main/java/net/momirealms/customfishing/hook/RealisticSeason.java @@ -0,0 +1,25 @@ +package net.momirealms.customfishing.hook; + +import me.casperge.realisticseasons.api.SeasonsAPI; +import org.bukkit.World; + +public class RealisticSeason { + public static String getSeason(World world){ + SeasonsAPI seasonsapi = SeasonsAPI.getInstance(); + switch (seasonsapi.getSeason(world)){ + case SPRING -> { + return "spring"; + } + case SUMMER -> { + return "summer"; + } + case WINTER -> { + return "winter"; + } + case FALL -> { + return "autumn"; + } + } + return "null"; + } +} diff --git a/src/main/java/net/momirealms/customfishing/hook/skill/mcMMO.java b/src/main/java/net/momirealms/customfishing/hook/skill/mcMMO.java index 93274cc1..b7eab9d9 100644 --- a/src/main/java/net/momirealms/customfishing/hook/skill/mcMMO.java +++ b/src/main/java/net/momirealms/customfishing/hook/skill/mcMMO.java @@ -24,6 +24,6 @@ public class mcMMO implements SkillXP{ @Override public void addXp(Player player, double amount) { - ExperienceAPI.addXP(player, "Fishing", (int) amount, "UNKNOWN"); + ExperienceAPI.addRawXP(player, "FISHING", (float) amount, "UNKNOWN"); } } diff --git a/src/main/java/net/momirealms/customfishing/listener/PlayerListener.java b/src/main/java/net/momirealms/customfishing/listener/PlayerListener.java index 3219d8ef..7dd0db64 100644 --- a/src/main/java/net/momirealms/customfishing/listener/PlayerListener.java +++ b/src/main/java/net/momirealms/customfishing/listener/PlayerListener.java @@ -50,6 +50,8 @@ import org.bukkit.event.player.PlayerInteractEvent; import org.bukkit.event.player.PlayerQuitEvent; import org.bukkit.inventory.ItemStack; import org.bukkit.inventory.PlayerInventory; +import org.bukkit.inventory.meta.Damageable; +import org.bukkit.inventory.meta.ItemMeta; import org.bukkit.potion.PotionEffect; import org.bukkit.potion.PotionEffectType; import org.bukkit.util.Vector; @@ -62,6 +64,7 @@ public class PlayerListener implements Listener { private final HashMap coolDown = new HashMap<>(); private final HashMap nextLoot = new HashMap<>(); private final HashMap modifiers = new HashMap<>(); + private final HashMap hooks = new HashMap<>(); public static ConcurrentHashMap fishingPlayers = new ConcurrentHashMap<>(); @EventHandler @@ -80,6 +83,8 @@ public class PlayerListener implements Listener { } coolDown.put(player, time); + hooks.put(player, event.getHook()); + Bukkit.getScheduler().runTaskAsynchronously(CustomFishing.instance, ()->{ PlayerInventory inventory = player.getInventory(); @@ -271,17 +276,17 @@ public class PlayerListener implements Listener { new Timer(player, difficult, layout) ) ); - if (lootInstance.getHookCommands() != null){ - lootInstance.getHookCommands().forEach(command ->{ - Bukkit.dispatchCommand(Bukkit.getConsoleSender(), command.replace("{player}", player.getName())); - }); - } if (lootInstance.getHookMsg() != null){ lootInstance.getHookMsg().forEach(msg -> { AdventureManager.playerMessage(player, msg.replace("{loot}",lootInstance.getNick()).replace("{player}", player.getName())); }); } Bukkit.getScheduler().runTask(CustomFishing.instance, ()->{ + if (lootInstance.getHookCommands() != null){ + lootInstance.getHookCommands().forEach(command ->{ + Bukkit.dispatchCommand(Bukkit.getConsoleSender(), command.replace("{player}", player.getName())); + }); + } player.addPotionEffect(new PotionEffect(PotionEffectType.SLOW, lootInstance.getTime()/50,3)); }); }); @@ -330,7 +335,6 @@ public class PlayerListener implements Listener { }); } if (lootInstance.getCommands() != null){ - //执行指令 lootInstance.getCommands().forEach(command ->{ String finalCommand = command. replaceAll("\\{x}", String.valueOf(Math.round(location.getX()))). @@ -349,6 +353,27 @@ public class PlayerListener implements Listener { if (lootInstance.getSkillXP() != 0){ ConfigReader.Config.skillXP.addXp(player, lootInstance.getSkillXP()); } + if (ConfigReader.Config.loseDurability){ + PlayerInventory inventory = player.getInventory(); + ItemStack mainHand = inventory.getItemInMainHand(); + if (mainHand.getType() == Material.FISHING_ROD){ + Damageable damageable = (Damageable) mainHand.getItemMeta(); + if (damageable.hasDamage()) System.out.println(1); + damageable.setDamage(damageable.getDamage() + 1); + Bukkit.getScheduler().runTaskLater(CustomFishing.instance, ()->{ + mainHand.setItemMeta((ItemMeta) damageable); + },1); + }else { + ItemStack offHand = inventory.getItemInOffHand(); + if (offHand.getType() == Material.FISHING_ROD){ + Damageable damageable = (Damageable) offHand.getItemMeta(); + damageable.setDamage(damageable.getDamage() + 1); + Bukkit.getScheduler().runTaskLater(CustomFishing.instance, ()->{ + offHand.setItemMeta((ItemMeta) damageable); + },1); + } + } + } if (CompetitionSchedule.competition != null && CompetitionSchedule.competition.isGoingOn()){ float score = (float) (lootInstance.getScore() * modifiers.get(player).getScoreModifier()); CompetitionSchedule.competition.refreshRanking(player.getName(), score); @@ -380,6 +405,10 @@ public class PlayerListener implements Listener { public void onQUit(PlayerQuitEvent event){ Player player = event.getPlayer(); player.removePotionEffect(PotionEffectType.SLOW); + if (hooks.get(player) != null){ + hooks.get(player).remove(); + } + hooks.remove(player); coolDown.remove(player); nextLoot.remove(player); modifiers.remove(player); diff --git a/src/main/java/net/momirealms/customfishing/requirements/Season.java b/src/main/java/net/momirealms/customfishing/requirements/Season.java index 270cf143..51a07e5c 100644 --- a/src/main/java/net/momirealms/customfishing/requirements/Season.java +++ b/src/main/java/net/momirealms/customfishing/requirements/Season.java @@ -19,6 +19,8 @@ package net.momirealms.customfishing.requirements; import me.clip.placeholderapi.PlaceholderAPI; import net.momirealms.customfishing.ConfigReader; +import net.momirealms.customfishing.hook.CustomCropsSeason; +import net.momirealms.customfishing.hook.RealisticSeason; import org.bukkit.ChatColor; import java.util.List; @@ -31,7 +33,14 @@ public record Season(List seasons) implements Requirement { @Override public boolean isConditionMet(FishingCondition fishingCondition) { - String currentSeason = ChatColor.stripColor(PlaceholderAPI.setPlaceholders(fishingCondition.getPlayer(), ConfigReader.Config.season_papi)); + String currentSeason; + if (ConfigReader.Config.rsSeason){ + currentSeason = RealisticSeason.getSeason(fishingCondition.getLocation().getWorld()); + }else if(ConfigReader.Config.ccSeason){ + currentSeason = CustomCropsSeason.getSeason(fishingCondition.getLocation().getWorld()); + }else { + currentSeason = ChatColor.stripColor(PlaceholderAPI.setPlaceholders(fishingCondition.getPlayer(), ConfigReader.Config.season_papi)); + } for (String season : seasons) { if (season.equalsIgnoreCase(currentSeason)) { return true; diff --git a/src/main/resources/config.yml b/src/main/resources/config.yml index d762611b..cff7022e 100644 --- a/src/main/resources/config.yml +++ b/src/main/resources/config.yml @@ -1,22 +1,34 @@ # don't change -config-version: 2 +config-version: '3' config: #en/es/cn lang: en integrations: + # fishing region hook WorldGuard: false + + # mobs hook MythicMobs: false + + # Papi hook PlaceholderAPI: true + + # Skill xp hook mcMMO: false MMOCore: false AureliumSkills: false EcoSkills: false + # Season hook + CustomCrops: false + RealisticSeasons: false + season: - enable: false # Season Papi + # If you enabled CustomCrops or RealisticSeasons season hook, this option will not take effect + enable: false papi: '%customcrops_season%' # The same to vanilla @@ -25,10 +37,13 @@ config: # Players must use rods with CustomFishing's NBT Tags need-special-rod: false + # does rod lose durability when player successfully fish + rod-lose-durability: true + # If there's no custom fish in this place or players don't have a special rod # Should players get loots in vanilla way? # This should be compatible with other fishing plugin's loot system - vanilla-loot-when-no-custom-fish: false + vanilla-loot-when-no-custom-fish: true # Cool down time of fish finder fishfinder-cooldown: 3000 diff --git a/src/main/resources/plugin.yml b/src/main/resources/plugin.yml index d5102ad5..9fe20932 100644 --- a/src/main/resources/plugin.yml +++ b/src/main/resources/plugin.yml @@ -11,6 +11,8 @@ softdepend: - AureliumSkills - MMOCore - EcoSkills + - RealisticSeasons + - CustomCrops commands: customfishing: usage: /customfishing diff --git a/src/main/resources/zh-cn/baits.yml b/src/main/resources/zh-cn/baits.yml deleted file mode 100644 index 433db4d8..00000000 --- a/src/main/resources/zh-cn/baits.yml +++ /dev/null @@ -1,28 +0,0 @@ -baits: - simple_bait: - material: paper - display: - name: '普通的钓饵' - lore: - - '减少捕鱼的时间' - - '但是加大捕鱼的难度' - custom-model-data: 1 - #钓饵增益 - modifier: - #改变指定组的loot权重 - #加减权重 - weight-PM: - normal: 20 - creature: -10 - #乘除权重 - weight-MQ: - normal: 1.8 - creature: 0.8 - #改变上鱼的时间(>1为延长,<1为缩短) - time: 0.95 - #更改难度,例如原来难度为(1-6),现在变成(1-9) - difficulty: 3 - #双倍掉落概率 - double-loot: 0.05 - #比赛分数加成 - score: 1.2 \ No newline at end of file diff --git a/src/main/resources/zh-cn/bars.yml b/src/main/resources/zh-cn/bars.yml deleted file mode 100644 index f6dedb2a..00000000 --- a/src/main/resources/zh-cn/bars.yml +++ /dev/null @@ -1,121 +0,0 @@ -bar1: - range: 16 - title: 'The fish is hooked, focus on it!' - subtitle: - start: '' - bar: '뀄' - pointer_offset: '뀂' - pointer: '뀃' - offset: '뀁' - end: '' - layout: - 1: 0 - 2: 0 - 3: 0 - 4: 0.1 - 5: 0.5 - 6: 1 - 7: 0.5 - 8: 0.1 - 9: 0 - 10: 0 - 11: 0 -bar2: - range: 8 - title: 'The fish is hooked, focus on it!' - subtitle: - start: '' - bar: '뀅' - pointer_offset: '뀂' - pointer: '뀃' - offset: '뀁' - end: '' - layout: - 1: 0 - 2: 0 - 3: 0 - 4: 0 - 5: 0 - 6: 0 - 7: 0.1 - 8: 0.1 - 9: 0.3 - 10: 0.3 - 11: 1 - 12: 0.3 - 13: 0.1 - 14: 0 - 15: 0.1 - 16: 0.3 - 17: 1 - 18: 0.3 - 19: 0.1 - 20: 0 - 21: 0 - 22: 0 -bar3: - range: 8 #frame pixels, all must be the same - title: 'The fish is hooked, focus on it!' - subtitle: - start: '' - bar: '뀆' #bar unicode - pointer_offset: '뀂' - pointer: '뀃' - offset: '뀁' - end: '' - layout: - 1: 1 #green - 2: 0.3 #yellow - 3: 0.1 #orange - 4: 0 #red - 5: 0 #red - 6: 0.1 #orange - 7: 0.3 #yellow - 8: 0 #red - 9: 0.3 #yellow - 10: 0.1 #orange - 11: 0 #red - 12: 0.1 #orange - 13: 0.3 #yellow - 14: 1 #green - 15: 0.3 #yellow - 16: 1 #green - 17: 0.1 - 18: 0 #red - 19: 0.1 #orange - 20: 0.3 #yellow - 21: 0.1 #orange - 22: 0 #red -bar4: - range: 8 - title: 'The fish is hooked, focus on it!' - subtitle: - start: '' - bar: '뀇' - pointer_offset: '뀂' - pointer: '뀃' - offset: '뀁' - end: '' - layout: - 1: 0 - 2: 0.3 - 3: 0.1 - 4: 0.3 - 5: 1 - 6: 0.3 - 7: 0 - 8: 1 - 9: 0.1 - 10: 0 - 11: 1 - 12: 0.1 - 13: 0.3 - 14: 1 - 15: 0 - 16: 1 - 17: 0 - 18: 0.3 - 19: 0.1 - 20: 0 - 21: 1 - 22: 0 \ No newline at end of file diff --git a/src/main/resources/zh-cn/competition.yml b/src/main/resources/zh-cn/competition.yml deleted file mode 100644 index 26bf7b48..00000000 --- a/src/main/resources/zh-cn/competition.yml +++ /dev/null @@ -1,57 +0,0 @@ -example: - - #TOTAL_SCORE - #CATCH_AMOUNT - goal: CATCH_AMOUNT - - start-time: - - '5:30' - - '17:30' - - duration: 300 #seconds - - min-players: 2 - - bossbar: - enable: true - color: YELLOW - overlay: PROGRESS - text: 'Time Left: {time}s Rank: {rank} Time Left: {minute}m{second}s Points: {point}' - refresh-rate: 10 - - broadcast: - start: - - ' Fishing competition⚠' - - '' - - '----------------------------------------' - - '' - - 'The competition has started. Start Fishing to join!' - - '' - - '----------------------------------------' - end: - - ' Fishing competition⚠' - - '' - - '----------------------------------------' - - '' - - 'The competition has ended!' - - ' {1st} {1st_points}points' - - ' {2nd} {2nd_points}points' - - ' {3rd} {3rd_points}points' - - '' - - '----------------------------------------' - - prize: - 1: - commands: - - 'say {player} got the 1st place' - messages: - - 'You got the first prize lol!' - 2: - commands: - - 'money give {player} 100' - 3: - commands: - - 'money give {player} 50' - participation: - commands: - - 'money give {player} 10' \ No newline at end of file diff --git a/src/main/resources/zh-cn/config.yml b/src/main/resources/zh-cn/config.yml deleted file mode 100644 index 4886f6cb..00000000 --- a/src/main/resources/zh-cn/config.yml +++ /dev/null @@ -1,49 +0,0 @@ -# don't change -config-version: 1 - -config: - - #en/es/cn - lang: cn - - integrations: - WorldGuard: false - MythicMobs: false - PlaceholderAPI: true - mcMMO: false - MMOCore: false - AureliumSkills: false - - #季节特性 - season: - #是否启用 - enable: false - #需要解析的季节变量 - papi: '%customcrops_season%' - - #假如某个地方不存在特殊鱼,是否能让玩家获得原版的钓鱼战利品 - #如果设置为false,那么玩家无法在不满足条件的地方钓起任何物品 - #你也可以根据原版钓鱼战利品写入本插件内以接近原版 - vanilla-loot-when-no-custom-fish: false - - #只有在开放水域才能钓到特殊鱼 - need-open-water: true - - #是否只有本插件的鱼竿能钓到鱼 - need-special-rod: false - - #使用找鱼器的冷却时间(ms) - fishfinder-cooldown: 3000 - - #修改捕鱼所需的时间 - #在paper.yml中可以修改默认最少最长上钩时间 - time-multiply: 2 - - #是否启用钓鱼比赛(修改此项需要重启) - fishing-competition: true - - #转换MMOItems鱼竿为插件物品鱼竿(修改此项需要重启) - convert-MMOITEMS: false - - # ProtocolLib 模式 (修改此项需要重启) - protocollib-bossbar: false \ No newline at end of file diff --git a/src/main/resources/zh-cn/loots.yml b/src/main/resources/zh-cn/loots.yml deleted file mode 100644 index 9cd5ff52..00000000 --- a/src/main/resources/zh-cn/loots.yml +++ /dev/null @@ -1,725 +0,0 @@ -#MiniMessage Format is available in item name & lore -#https://docs.adventure.kyori.net/minimessage/format.html - -items: - # EXAMPLE - rainbow_fish: - material: cod - nick: 'Example Fish' - display: - name: '✖七✖色✖彩✖虹✖鱼✖' - lore: - - 'This is a rainbow fish!' - - ' 这是一条七色彩虹鱼' - custom-model-data: 1 - # Should it be displayed in fish finder? - show-in-fishfinder: false - # If you are not sure about NBT tag. You can use command '/customfishing export xxx' and get them in 'CustomFishing/export' folder - # (Int) (Byte) (String) (Float) (String) (Double) (Short) (Long) (UUID) (Boolean) (IntArray) (ByteArray) - nbt: - - itemsadder: - namespace: '(String) momirealms' - id: '(String) rainbow_fish' - SomeNBT: - NBTS: - byte: '(Byte) 127' - float: '(Float) 3.14159' - # Action to be triggered when fishing successfully - action: - message: 'You got a {loot} lol!' - command: - - 'say 玩家 {player} 在 {world}, {x},{y},{z} 钓到了一条 {loot}!' - exp: 10 - # The weight(relative chance) of getting this fish - weight: 10 - # Optional - group: normal - - # Difficulty - # '1' represents the pointer moves every 1 tick - # '7' represents the pointer moves 7 pixels each time - difficulty: 1-7 - - # Specify the bar. If not specified, it will be random - layout: bar1 - - enchantments: - - minecraft:sharpness/1 - - minecraft:flame/1 - - item_flags: - - HIDE_ENCHANTS - # - HIDE_ATTRIBUTES - # - HIDE_DESTROYS - # - HIDE_DYE - # - HIDE_PLACED_ON - # - HIDE_UNBREAKABLE - # - HIDE_POTION_EFFECTS - - # How long can a player fish on each bite(ms) - time: 5000 - # Optional - requirements: - biome: - - minecraft:plains - - minecraft:taiga - ypos: - - 50~100 - - 150~200 - weather: - - rain - - clear - - thunder - permission: 'customfishing.rainbowfish' - world: - - world - time: - - 0~12000 - #Requires WorldGuard - #region: - # - fishingpool - #Requires PlaceholderAPI - #season: - # - 春 - # - 秋 - - rubbish: - material: paper - show-in-fishfinder: false - display: - name: 'Garbage' - weight: 50 - time: 100000 - difficulty: 1-1 - custom-model-data: 640 - - Pufferfish: - material: pufferfish - display: - name: 'Pufferfish' - weight: 50 - time: 100000 - difficulty: 1-5 - requirements: - weather: - - clear - - cod: - material: cod - display: - name: 'Cod' - weight: 50 - time: 100000 - difficulty: 1-5 - requirements: - weather: - - clear - - salmon: - material: salmon - display: - name: 'Salmon' - weight: 50 - time: 100000 - difficulty: 1-5 - requirements: - weather: - - clear - - tropical_fish: - material: tropical_fish - display: - name: 'Tropical Fish' - weight: 50 - time: 100000 - difficulty: 1-5 - requirements: - weather: - - clear - biome: - - minecraft:jungle - - minecraft:bamboo_jungle - - tuna: - material: paper - display: - name: 'Tuna Fish' - weight: 50 - time: 100000 - difficulty: 1-1 - nbt: - - CustomModelData: '(Int) 641' - requirements: - season: - - Summer - - Winter - - tuna_fish_silver_star: - material: paper - display: - name: 'Tuna Fish Silver Star' - weight: 50 - time: 100000 - difficulty: 1-1 - nbt: - - CustomModelData: '(Int) 666' - requirements: - season: - - Summer - - Winter - - tuna_fish_golden_star: - material: paper - display: - name: 'Tuna Fish Golden Star' - weight: 50 - time: 100000 - difficulty: 1-1 - nbt: - - CustomModelData: '(Int) 667' - requirements: - season: - - Summer - - Winter - - pike: - material: paper - display: - name: 'Pike Fish' - weight: 50 - time: 100000 - difficulty: 1-2 - nbt: - - CustomModelData: '(Int) 642' - requirements: - season: - - Summer - - Winter - - pike_fish_silver_star: - material: paper - display: - name: 'Pike Fish Silver Star' - weight: 50 - time: 100000 - difficulty: 1-2 - nbt: - - CustomModelData: '(Int) 664' - requirements: - season: - - Summer - - Winter - - pike_fish_golden_star: - material: paper - display: - name: 'Pike Fish Golden Star' - weight: 50 - time: 100000 - difficulty: 1-2 - nbt: - - CustomModelData: '(Int) 665' - requirements: - season: - - Summer - - Winter - - golden: - material: paper - display: - name: 'Golden Fish' - weight: 50 - time: 100000 - difficulty: 1-2 - nbt: - - CustomModelData: '(Int) 643' - requirements: - season: - - Summer - - golden_fish_silver_star: - material: paper - display: - name: 'Golden Fish Silver Star' - weight: 50 - time: 100000 - difficulty: 1-2 - nbt: - - CustomModelData: '(Int) 658' - requirements: - season: - - Summer - - golden_fish_golden_star: - material: paper - display: - name: 'Golden Fish Golden Star' - weight: 50 - time: 100000 - difficulty: 1-2 - nbt: - - CustomModelData: '(Int) 659' - requirements: - season: - - Summer - - perch_fish: - material: paper - display: - name: 'Perch Fish' - weight: 50 - time: 100000 - difficulty: 1-2 - nbt: - - CustomModelData: '(Int) 644' - requirements: - season: - - Winter - perch_fish_silver_star: - material: paper - display: - name: 'Perch Fish Silver Star' - weight: 50 - time: 100000 - difficulty: 1-2 - nbt: - - CustomModelData: '(Int) 660' - requirements: - season: - - Winter - - perch_fish_golden_star: - material: paper - display: - name: 'Perch Fish Golden Star' - weight: 50 - time: 100000 - difficulty: 1-2 - nbt: - - CustomModelData: '(Int) 661' - requirements: - season: - - Winter - - mullet_fish: - material: paper - display: - name: 'Mullet Fish' - weight: 50 - time: 100000 - difficulty: 1-2 - nbt: - - CustomModelData: '(Int) 645' - requirements: - season: - - Summer - - Winter - - mullet_fish_silver_star: - material: paper - display: - name: 'Mullet Fish Silver Star' - weight: 50 - time: 100000 - difficulty: 1-2 - nbt: - - CustomModelData: '(Int) 662' - requirements: - season: - - Summer - - Winter - - mullet_fish_golden_star: - material: paper - display: - name: 'Mullet Fish Golden Star' - weight: 50 - time: 100000 - difficulty: 1-2 - nbt: - - CustomModelData: '(Int) 663' - requirements: - season: - - Summer - - Winter - - sardine_fish: - material: paper - display: - name: 'Sardine Fish' - weight: 50 - time: 100000 - difficulty: 1-2 - nbt: - - CustomModelData: '(Int) 668' - requirements: - season: - - Summer - - Winter - - sardine_fish_silver_star: - material: paper - display: - name: 'Sardine Fish Silver Star' - weight: 50 - time: 100000 - difficulty: 1-2 - nbt: - - CustomModelData: '(Int) 669' - requirements: - season: - - Summer - - Winter - - sardine_fish_golden_star: - material: paper - display: - name: 'Sardine Fish Golden Star' - weight: 50 - time: 100000 - difficulty: 1-2 - nbt: - - CustomModelData: '(Int) 670' - requirements: - season: - - Summer - - Winter - - carp_fish: - material: paper - display: - name: 'Carp Fish' - weight: 50 - time: 100000 - difficulty: 1-2 - nbt: - - CustomModelData: '(Int) 671' - - carp_fish_silver_star: - material: paper - display: - name: 'Carp Fish Silver Star' - weight: 50 - time: 100000 - difficulty: 1-2 - nbt: - - CustomModelData: '(Int) 672' - - carp_fish_golden_star: - material: paper - display: - name: 'Carp Fish Golden Star' - weight: 50 - time: 100000 - difficulty: 1-2 - nbt: - - CustomModelData: '(Int) 673' - - cat_fish: - material: paper - display: - name: 'Cat Fish' - weight: 50 - time: 100000 - difficulty: 1-2 - nbt: - - CustomModelData: '(Int) 674' - requirements: - season: - - Summer - - Spring - - cat_fish_silver_star: - material: paper - display: - name: 'Cat Fish Silver Star' - weight: 50 - time: 100000 - difficulty: 1-2 - nbt: - - CustomModelData: '(Int) 675' - requirements: - season: - - Summer - - Spring - - cat_fish_golden_star: - material: paper - display: - name: 'Cat Fish Golden Star' - weight: 50 - time: 100000 - difficulty: 1-2 - nbt: - - CustomModelData: '(Int) 676' - requirements: - season: - - Summer - - Spring - - octopus_fish: - material: paper - display: - name: 'Octopus Fish' - weight: 50 - time: 100000 - difficulty: 1-2 - nbt: - - CustomModelData: '(Int) 677' - requirements: - season: - - Summer - - octopus_fish_silver_star: - material: paper - display: - name: 'Octopus Fish Silver Star' - weight: 50 - time: 100000 - difficulty: 1-2 - nbt: - - CustomModelData: '(Int) 678' - requirements: - season: - - Summer - - octopus_fish_golden_star: - material: paper - display: - name: 'Octopus Fish Golden Star' - weight: 50 - time: 100000 - difficulty: 1-2 - nbt: - - CustomModelData: '(Int) 679' - requirements: - season: - - Summer - - sunfish_fish: - material: paper - display: - name: 'Sunfish Fish' - weight: 50 - time: 100000 - difficulty: 1-2 - nbt: - - CustomModelData: '(Int) 680' - requirements: - season: - - Summer - - Spring - - sunfish_fish_silver_star: - material: paper - display: - name: 'Sunfish Fish Silver Star' - weight: 50 - time: 100000 - difficulty: 1-2 - nbt: - - CustomModelData: '(Int) 681' - requirements: - season: - - Summer - - Spring - - sunfish_fish_golden_star: - material: paper - display: - name: 'Sunfish Fish Golden Star' - weight: 50 - time: 100000 - difficulty: 1-2 - nbt: - - CustomModelData: '(Int) 682' - requirements: - season: - - Summer - - Spring - - red_spnapper_fish: - material: paper - display: - name: 'Red Snapper Fish' - weight: 50 - time: 100000 - difficulty: 1-2 - nbt: - - CustomModelData: '(Int) 683' - requirements: - season: - - Summer - - Winter - weather: - - rain - - red_spnapper_fish_silver_star: - material: paper - display: - name: 'Red Snapper Fish Silver Star' - weight: 50 - time: 100000 - difficulty: 1-2 - nbt: - - CustomModelData: '(Int) 684' - requirements: - season: - - Summer - - Winter - weather: - - rain - - red_spnapper_fish_golden_star: - material: paper - display: - name: 'Red Snapper Golden Star' - weight: 50 - time: 100000 - difficulty: 1-2 - nbt: - - CustomModelData: '(Int) 685' - requirements: - season: - - Summer - - Winter - weather: - - rain - - salmon_void_fish: - material: paper - display: - name: 'Salmon Void Fish' - weight: 50 - time: 100000 - difficulty: 1-2 - nbt: - - CustomModelData: '(Int) 686' - - salmon_void_fish_silver_star: - material: paper - display: - name: 'Salmon Void Fish Silver Star' - weight: 50 - time: 100000 - difficulty: 1-2 - nbt: - - CustomModelData: '(Int) 687' - - salmon_void_fish_golden_star: - material: paper - display: - name: 'Salmon Void Fish Golden Star' - weight: 50 - time: 100000 - difficulty: 1-2 - nbt: - - CustomModelData: '(Int) 688' - - woodskip_fish: - material: paper - display: - name: 'Woodskip Fish' - weight: 50 - time: 100000 - difficulty: 1-2 - nbt: - - CustomModelData: '(Int) 689' - - woodskip_fish_silver_star: - material: paper - display: - name: 'Woodskip Fish Silver Star' - weight: 50 - time: 100000 - difficulty: 1-2 - nbt: - - CustomModelData: '(Int) 690' - - woodskip_fish_golden_star: - material: paper - display: - name: 'Woodskip Fish Golden Star' - weight: 50 - time: 100000 - difficulty: 1-2 - nbt: - - CustomModelData: '(Int) 691' - - sturgeon_fish: - material: paper - display: - name: 'Sturgeon Fish' - weight: 50 - time: 100000 - difficulty: 1-2 - nbt: - - CustomModelData: '(Int) 692' - requirements: - season: - - Summer - - Winter - - sturgeon_fish_silver_star: - material: paper - display: - name: 'Sturgeon Fish Silver Star' - weight: 50 - time: 100000 - difficulty: 1-2 - nbt: - - CustomModelData: '(Int) 693' - requirements: - season: - - Summer - - Winter - - sturgeon_fish_golden_star: - material: paper - display: - name: 'Sturgeon Fish Golden Star' - weight: 50 - time: 100000 - difficulty: 1-2 - nbt: - - CustomModelData: '(Int) 694' - requirements: - season: - - Summer - - Winter - -mobs: - skeletalknight: - mythicmobsID: SkeletalKnight - level: 0 - name: 'skeletalknight' - group: creature - # This decides how mythicmobs appears - vector: - horizontal: 1.1 - vertical: 1.2 - action: - message: '{loot} is coming!' - command: - - 'say 玩家{player}在{world},{x},{y},{z}被{loot}追杀!' - exp: 10 - weight: 10 - difficulty: 1-6 - time: 5000 - requirements: - weather: - - rain - - thunder - world: - - world - piranha: - mythicmobsID: piranha - name: 'Piranha' - weight: 50 - time: 1000000 - difficulty: 1-1 - action: - command: 'say {player}Caught a piranha!' - vector: - #Vertical displacement multiplier - vertical: 2 \ No newline at end of file diff --git a/src/main/resources/zh-cn/plugin.yml b/src/main/resources/zh-cn/plugin.yml deleted file mode 100644 index 4a8f3fa4..00000000 --- a/src/main/resources/zh-cn/plugin.yml +++ /dev/null @@ -1,19 +0,0 @@ -name: CustomFishing -version: '${version}' -main: net.momirealms.customfishing.CustomFishing -api-version: 1.16 -authors: [ XiaoMoMi ] -softdepend: - - MythicMobs - - PlaceholderAPI - - WorldGuard - - mcMMO - - AureliumSkills - - MMOCore -commands: - customfishing: - usage: /customfishing - description: main command - permission: customfishing.admin - aliases: - - cfishing \ No newline at end of file diff --git a/src/main/resources/zh-cn/redis.yml b/src/main/resources/zh-cn/redis.yml deleted file mode 100644 index 619483e2..00000000 --- a/src/main/resources/zh-cn/redis.yml +++ /dev/null @@ -1,9 +0,0 @@ -redis: - enable: false - host: localhost - port: 6379 - MaxTotal: 10 - MaxIdle: 10 - MinIdle: 1 - MaxWaitMillis: 30000 - MinEvictableIdleTimeMillis: 1800000 \ No newline at end of file diff --git a/src/main/resources/zh-cn/rods.yml b/src/main/resources/zh-cn/rods.yml deleted file mode 100644 index a5f82c6a..00000000 --- a/src/main/resources/zh-cn/rods.yml +++ /dev/null @@ -1,26 +0,0 @@ -rods: - wooden_rod: - display: - name: '普通的木鱼竿' - lore: - - '就是一把普通的鱼竿而已啦' - custom-model-data: 1 - #鱼竿增益 - modifier: - #改变指定组的loot权重 - #加减权重 - weight-PM: - normal: 20 - creature: -10 - #乘除权重 - weight-MQ: - normal: 1.8 - creature: 0.8 - #改变上鱼的时间(>1为延长,<1为缩短) - time: 1.5 - #更改难度,例如原来难度为(1-6),现在变成(1-5) - difficulty: -1 - #双倍掉落概率 - double-loot: 0.05 - #比赛分数加成 - score: 1.2 \ No newline at end of file diff --git a/src/main/resources/zh-cn/titles.yml b/src/main/resources/zh-cn/titles.yml deleted file mode 100644 index d8a78215..00000000 --- a/src/main/resources/zh-cn/titles.yml +++ /dev/null @@ -1,27 +0,0 @@ -#对于不想启用的title设置title和subtitle为空即可 -#所有位置均可使用MiniMessage Format -#https://docs.adventure.kyori.net/minimessage/format.html -titles: - failure: - title: - - '真菜!' - - '失败!' - subtitle: - - '鱼已经逃跑了' - - '下次再努力吧' - #单位 tick - fade: - in: 10 - stay: 30 - out: 10 - success: - title: - - '成功!' - - '漂亮!' - subtitle: - - '你捕捉到了一条 {loot}' - - '嗨害嗨 {loot} 来咯!' - fade: - in: 10 - stay: 30 - out: 10 \ No newline at end of file diff --git a/src/main/resources/zh-cn/utils.yml b/src/main/resources/zh-cn/utils.yml deleted file mode 100644 index 13250053..00000000 --- a/src/main/resources/zh-cn/utils.yml +++ /dev/null @@ -1,8 +0,0 @@ -utils: - fishfinder: - material: compass - display: - name: '找鱼器' - lore: - - '右键查看这个地方能钓到什么鱼吧!' - custom-model-data: 1 \ No newline at end of file