9
0
mirror of https://github.com/Xiao-MoMi/Custom-Fishing.git synced 2025-12-19 15:09:24 +00:00
This commit is contained in:
Xiao-MoMi
2022-08-18 14:21:46 +08:00
parent eca046e0e3
commit 811034b518
21 changed files with 171 additions and 1093 deletions

View File

@@ -4,7 +4,7 @@ plugins {
} }
group = 'net.momirealms' group = 'net.momirealms'
version = '1.0.4' version = '1.0.6'
repositories { repositories {
mavenCentral() mavenCentral()

View File

@@ -18,6 +18,7 @@
package net.momirealms.customfishing; package net.momirealms.customfishing;
import net.kyori.adventure.bossbar.BossBar; import net.kyori.adventure.bossbar.BossBar;
import net.momirealms.customcrops.helper.Log;
import net.momirealms.customfishing.competition.CompetitionConfig; import net.momirealms.customfishing.competition.CompetitionConfig;
import net.momirealms.customfishing.competition.Goal; import net.momirealms.customfishing.competition.Goal;
import net.momirealms.customfishing.competition.bossbar.BossBarConfig; import net.momirealms.customfishing.competition.bossbar.BossBarConfig;
@@ -92,12 +93,15 @@ public class ConfigReader{
public static boolean needSpecialRod; public static boolean needSpecialRod;
public static boolean competition; public static boolean competition;
public static boolean convertMMOItems; public static boolean convertMMOItems;
public static boolean loseDurability;
public static boolean rsSeason;
public static boolean ccSeason;
public static String season_papi; public static String season_papi;
public static String lang; public static String lang;
public static int fishFinderCoolDown; public static int fishFinderCoolDown;
public static double timeMultiply; public static double timeMultiply;
public static SkillXP skillXP; public static SkillXP skillXP;
public static int version; public static String version;
public static void loadConfig() { public static void loadConfig() {
@@ -169,20 +173,38 @@ public class ConfigReader{
season = config.getBoolean("config.season.enable"); season = config.getBoolean("config.season.enable");
if (!papi && season) { if (!papi && season) {
season = false; season = false;
}
if (season) {
season_papi = config.getString("config.season.papi");
}else { }else {
season_papi = null; season_papi = config.getString("config.season.papi");
} }
vanillaDrop = config.getBoolean("config.vanilla-loot-when-no-custom-fish"); rsSeason = false;
convertMMOItems = config.getBoolean("config.convert-MMOITEMS"); if (config.getBoolean("config.integrations.RealisticSeasons",false)){
needOpenWater = config.getBoolean("config.need-open-water"); if (Bukkit.getPluginManager().getPlugin("RealisticSeasons") == null) Log.warn("Failed to initialize RealisticSeasons!");
needSpecialRod = config.getBoolean("config.need-special-rod"); else {
rsSeason = true;
AdventureManager.consoleMessage("<gradient:#0070B3:#A0EACF>[CustomFishing] </gradient><color:#00BFFF>RealisticSeasons <color:#E1FFFF>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("<gradient:#0070B3:#A0EACF>[CustomFishing] </gradient><color:#00BFFF>CustomCrops <color:#E1FFFF>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"); fishFinderCoolDown = config.getInt("config.fishfinder-cooldown");
timeMultiply = config.getDouble("config.time-multiply"); timeMultiply = config.getDouble("config.time-multiply");
lang = config.getString("config.lang","cn"); lang = config.getString("config.lang","cn");

View File

@@ -76,7 +76,7 @@ public final class CustomFishing extends JavaPlugin {
Bukkit.getPluginManager().registerEvents(new PapiReload(), this); Bukkit.getPluginManager().registerEvents(new PapiReload(), this);
} }
ConfigReader.tryEnableJedis(); ConfigReader.tryEnableJedis();
if (ConfigReader.Config.version != 2){ if (!Objects.equals(ConfigReader.Config.version, "3")){
UpdateConfig.update(); UpdateConfig.update();
} }
AdventureManager.consoleMessage("<gradient:#0070B3:#A0EACF>[CustomFishing] </gradient><color:#E1FFFF>Plugin Enabled!"); AdventureManager.consoleMessage("<gradient:#0070B3:#A0EACF>[CustomFishing] </gradient><color:#E1FFFF>Plugin Enabled!");

View File

@@ -154,6 +154,9 @@ public class TabComplete implements TabCompleter {
} }
return arrayList; return arrayList;
} }
if (args[2].equalsIgnoreCase("get")){
return Arrays.asList("1","16","64");
}
}else if (args[1].equalsIgnoreCase("util")){ }else if (args[1].equalsIgnoreCase("util")){
if (args[2].equalsIgnoreCase("give")){ if (args[2].equalsIgnoreCase("give")){
List<String> arrayList = new ArrayList<>(); List<String> arrayList = new ArrayList<>();
@@ -163,6 +166,9 @@ public class TabComplete implements TabCompleter {
} }
return arrayList; return arrayList;
} }
if (args[2].equalsIgnoreCase("get")){
return Arrays.asList("1","16","64");
}
}else if (args[1].equalsIgnoreCase("rod")){ }else if (args[1].equalsIgnoreCase("rod")){
if (args[2].equalsIgnoreCase("give")){ if (args[2].equalsIgnoreCase("give")){
List<String> arrayList = new ArrayList<>(); List<String> arrayList = new ArrayList<>();
@@ -172,6 +178,9 @@ public class TabComplete implements TabCompleter {
} }
return arrayList; return arrayList;
} }
if (args[2].equalsIgnoreCase("get")){
return Arrays.asList("1","16","64");
}
} }
else if (args[1].equalsIgnoreCase("bait")){ else if (args[1].equalsIgnoreCase("bait")){
if (args[2].equalsIgnoreCase("give")){ if (args[2].equalsIgnoreCase("give")){
@@ -182,6 +191,31 @@ public class TabComplete implements TabCompleter {
} }
return arrayList; 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");
}
} }
} }
} }

View File

@@ -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());
}
}

View File

@@ -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";
}
}

View File

@@ -24,6 +24,6 @@ public class mcMMO implements SkillXP{
@Override @Override
public void addXp(Player player, double amount) { public void addXp(Player player, double amount) {
ExperienceAPI.addXP(player, "Fishing", (int) amount, "UNKNOWN"); ExperienceAPI.addRawXP(player, "FISHING", (float) amount, "UNKNOWN");
} }
} }

View File

@@ -50,6 +50,8 @@ import org.bukkit.event.player.PlayerInteractEvent;
import org.bukkit.event.player.PlayerQuitEvent; import org.bukkit.event.player.PlayerQuitEvent;
import org.bukkit.inventory.ItemStack; import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.PlayerInventory; 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.PotionEffect;
import org.bukkit.potion.PotionEffectType; import org.bukkit.potion.PotionEffectType;
import org.bukkit.util.Vector; import org.bukkit.util.Vector;
@@ -62,6 +64,7 @@ public class PlayerListener implements Listener {
private final HashMap<Player, Long> coolDown = new HashMap<>(); private final HashMap<Player, Long> coolDown = new HashMap<>();
private final HashMap<Player, Loot> nextLoot = new HashMap<>(); private final HashMap<Player, Loot> nextLoot = new HashMap<>();
private final HashMap<Player, Modifier> modifiers = new HashMap<>(); private final HashMap<Player, Modifier> modifiers = new HashMap<>();
private final HashMap<Player, FishHook> hooks = new HashMap<>();
public static ConcurrentHashMap<Player, FishingPlayer> fishingPlayers = new ConcurrentHashMap<>(); public static ConcurrentHashMap<Player, FishingPlayer> fishingPlayers = new ConcurrentHashMap<>();
@EventHandler @EventHandler
@@ -80,6 +83,8 @@ public class PlayerListener implements Listener {
} }
coolDown.put(player, time); coolDown.put(player, time);
hooks.put(player, event.getHook());
Bukkit.getScheduler().runTaskAsynchronously(CustomFishing.instance, ()->{ Bukkit.getScheduler().runTaskAsynchronously(CustomFishing.instance, ()->{
PlayerInventory inventory = player.getInventory(); PlayerInventory inventory = player.getInventory();
@@ -271,17 +276,17 @@ public class PlayerListener implements Listener {
new Timer(player, difficult, layout) 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){ if (lootInstance.getHookMsg() != null){
lootInstance.getHookMsg().forEach(msg -> { lootInstance.getHookMsg().forEach(msg -> {
AdventureManager.playerMessage(player, msg.replace("{loot}",lootInstance.getNick()).replace("{player}", player.getName())); AdventureManager.playerMessage(player, msg.replace("{loot}",lootInstance.getNick()).replace("{player}", player.getName()));
}); });
} }
Bukkit.getScheduler().runTask(CustomFishing.instance, ()->{ 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)); player.addPotionEffect(new PotionEffect(PotionEffectType.SLOW, lootInstance.getTime()/50,3));
}); });
}); });
@@ -330,7 +335,6 @@ public class PlayerListener implements Listener {
}); });
} }
if (lootInstance.getCommands() != null){ if (lootInstance.getCommands() != null){
//执行指令
lootInstance.getCommands().forEach(command ->{ lootInstance.getCommands().forEach(command ->{
String finalCommand = command. String finalCommand = command.
replaceAll("\\{x}", String.valueOf(Math.round(location.getX()))). replaceAll("\\{x}", String.valueOf(Math.round(location.getX()))).
@@ -349,6 +353,27 @@ public class PlayerListener implements Listener {
if (lootInstance.getSkillXP() != 0){ if (lootInstance.getSkillXP() != 0){
ConfigReader.Config.skillXP.addXp(player, lootInstance.getSkillXP()); 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()){ if (CompetitionSchedule.competition != null && CompetitionSchedule.competition.isGoingOn()){
float score = (float) (lootInstance.getScore() * modifiers.get(player).getScoreModifier()); float score = (float) (lootInstance.getScore() * modifiers.get(player).getScoreModifier());
CompetitionSchedule.competition.refreshRanking(player.getName(), score); CompetitionSchedule.competition.refreshRanking(player.getName(), score);
@@ -380,6 +405,10 @@ public class PlayerListener implements Listener {
public void onQUit(PlayerQuitEvent event){ public void onQUit(PlayerQuitEvent event){
Player player = event.getPlayer(); Player player = event.getPlayer();
player.removePotionEffect(PotionEffectType.SLOW); player.removePotionEffect(PotionEffectType.SLOW);
if (hooks.get(player) != null){
hooks.get(player).remove();
}
hooks.remove(player);
coolDown.remove(player); coolDown.remove(player);
nextLoot.remove(player); nextLoot.remove(player);
modifiers.remove(player); modifiers.remove(player);

View File

@@ -19,6 +19,8 @@ package net.momirealms.customfishing.requirements;
import me.clip.placeholderapi.PlaceholderAPI; import me.clip.placeholderapi.PlaceholderAPI;
import net.momirealms.customfishing.ConfigReader; import net.momirealms.customfishing.ConfigReader;
import net.momirealms.customfishing.hook.CustomCropsSeason;
import net.momirealms.customfishing.hook.RealisticSeason;
import org.bukkit.ChatColor; import org.bukkit.ChatColor;
import java.util.List; import java.util.List;
@@ -31,7 +33,14 @@ public record Season(List<String> seasons) implements Requirement {
@Override @Override
public boolean isConditionMet(FishingCondition fishingCondition) { 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) { for (String season : seasons) {
if (season.equalsIgnoreCase(currentSeason)) { if (season.equalsIgnoreCase(currentSeason)) {
return true; return true;

View File

@@ -1,22 +1,34 @@
# don't change # don't change
config-version: 2 config-version: '3'
config: config:
#en/es/cn #en/es/cn
lang: en lang: en
integrations: integrations:
# fishing region hook
WorldGuard: false WorldGuard: false
# mobs hook
MythicMobs: false MythicMobs: false
# Papi hook
PlaceholderAPI: true PlaceholderAPI: true
# Skill xp hook
mcMMO: false mcMMO: false
MMOCore: false MMOCore: false
AureliumSkills: false AureliumSkills: false
EcoSkills: false EcoSkills: false
# Season hook
CustomCrops: false
RealisticSeasons: false
season: season:
enable: false
# Season Papi # Season Papi
# If you enabled CustomCrops or RealisticSeasons season hook, this option will not take effect
enable: false
papi: '%customcrops_season%' papi: '%customcrops_season%'
# The same to vanilla # The same to vanilla
@@ -25,10 +37,13 @@ config:
# Players must use rods with CustomFishing's NBT Tags # Players must use rods with CustomFishing's NBT Tags
need-special-rod: false 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 # If there's no custom fish in this place or players don't have a special rod
# Should players get loots in vanilla way? # Should players get loots in vanilla way?
# This should be compatible with other fishing plugin's loot system # 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 # Cool down time of fish finder
fishfinder-cooldown: 3000 fishfinder-cooldown: 3000

View File

@@ -11,6 +11,8 @@ softdepend:
- AureliumSkills - AureliumSkills
- MMOCore - MMOCore
- EcoSkills - EcoSkills
- RealisticSeasons
- CustomCrops
commands: commands:
customfishing: customfishing:
usage: /customfishing usage: /customfishing

View File

@@ -1,28 +0,0 @@
baits:
simple_bait:
material: paper
display:
name: '普通的钓饵'
lore:
- '<white>减少捕鱼的时间'
- '<white>但是加大捕鱼的难度'
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

View File

@@ -1,121 +0,0 @@
bar1:
range: 16
title: 'The fish is hooked, focus on it!'
subtitle:
start: '<font:customfishing:default>'
bar: '뀄'
pointer_offset: '뀂'
pointer: '뀃'
offset: '뀁'
end: '</font>'
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: '<font:customfishing:default>'
bar: '뀅'
pointer_offset: '뀂'
pointer: '뀃'
offset: '뀁'
end: '</font>'
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: '<font:customfishing:default>'
bar: '뀆' #bar unicode
pointer_offset: '뀂'
pointer: '뀃'
offset: '뀁'
end: '</font>'
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: '<font:customfishing:default>'
bar: '뀇'
pointer_offset: '뀂'
pointer: '뀃'
offset: '뀁'
end: '</font>'
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

View File

@@ -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: '<gray>Time Left: <gold>{time}s <gray>Rank: <gold>{rank} <gray>Time Left: <gold>{minute}m{second}s <gray>Points: <gold>{point}'
refresh-rate: 10
broadcast:
start:
- '<red> <red>⚠<aqua><bold>Fishing competition<red>⚠'
- '<red>'
- '<blue>----------------------------------------'
- ''
- '<gray>The competition has started. Start <gold>Fishing<gray> to join!'
- ''
- '<blue>----------------------------------------'
end:
- '<red> <red>⚠<aqua><bold>Fishing competition<red>⚠'
- '<red>'
- '<blue>----------------------------------------'
- ''
- '<gray>The competition has ended!'
- ' <gold>① <gray>{1st} {1st_points}points'
- ' <gray>② <gray>{2nd} {2nd_points}points'
- ' <white>③ <gray>{3rd} {3rd_points}points'
- ''
- '<blue>----------------------------------------'
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'

View File

@@ -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

View File

@@ -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: '<rainbow>✖七✖色✖彩✖虹✖鱼✖</rainbow>'
lore:
- '<gray>This is a <font:uniform>rainbow fish!'
- '<gray> 这是一条七色彩虹鱼'
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 bitems
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

View File

@@ -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

View File

@@ -1,9 +0,0 @@
redis:
enable: false
host: localhost
port: 6379
MaxTotal: 10
MaxIdle: 10
MinIdle: 1
MaxWaitMillis: 30000
MinEvictableIdleTimeMillis: 1800000

View File

@@ -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

View File

@@ -1,27 +0,0 @@
#对于不想启用的title设置title和subtitle为空即可
#所有位置均可使用MiniMessage Format
#https://docs.adventure.kyori.net/minimessage/format.html
titles:
failure:
title:
- '<red>真菜!</red>'
- '<red>失败!</red>'
subtitle:
- '鱼已经逃跑了'
- '下次再努力吧'
#单位 tick
fade:
in: 10
stay: 30
out: 10
success:
title:
- '<green>成功!</green>'
- '<green>漂亮!</green>'
subtitle:
- '你捕捉到了一条 {loot}'
- '嗨害嗨 {loot} 来咯!'
fade:
in: 10
stay: 30
out: 10

View File

@@ -1,8 +0,0 @@
utils:
fishfinder:
material: compass
display:
name: '找鱼器'
lore:
- '右键查看这个地方能钓到什么鱼吧!'
custom-model-data: 1