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-10 09:49:55 +08:00
parent 187796e1b5
commit 6d44100b93
34 changed files with 2121 additions and 237 deletions

View File

@@ -4,7 +4,7 @@ plugins {
}
group = 'net.momirealms'
version = '1.0-SNAPSHOT'
version = '1.0'
repositories {
mavenCentral()
@@ -16,10 +16,6 @@ repositories {
name = 'sonatype'
url = 'https://oss.sonatype.org/content/groups/public/'
}
maven {
name = "sonatype-oss-snapshots1"
url = "https://s01.oss.sonatype.org/content/repositories/snapshots/"
}
maven {
name = "dmulloy2-repo"
url = "https://repo.dmulloy2.net/repository/public/"
@@ -36,6 +32,10 @@ repositories {
name = "sk89q-repo"
url = "https://maven.enginehub.org/repo/"
}
maven {
name = "jitpack-repo"
url = "https://jitpack.io"
}
maven {
name = "Lumine Releases"
url = "https://mvn.lumine.io/repository/maven-public"
@@ -43,15 +43,19 @@ repositories {
}
dependencies {
compileOnly 'com.destroystokyo.paper:paper-api:1.16.5-R0.1-SNAPSHOT'
compileOnly group: "com.comphenix.protocol", name: "ProtocolLib", version: "4.8.0"
compileOnly 'me.clip:placeholderapi:2.11.1'
compileOnly 'com.sk89q.worldguard:worldguard-bukkit:7.0.7'
compileOnly 'io.lumine:Mythic-Dist:5.0.3-SNAPSHOT'
implementation("net.kyori:adventure-api:4.11.0")
implementation("net.kyori:adventure-platform-bukkit:4.1.1")
implementation("net.kyori:adventure-text-minimessage:4.11.0")
implementation 'de.tr7zw:item-nbt-api:2.10.0'
compileOnly fileTree(dir:'libs',includes:['*.jar'])
compileOnly('com.github.Archy-X:AureliumSkills:Beta1.3.6')
compileOnly('redis.clients:jedis:4.2.3')
compileOnly('com.destroystokyo.paper:paper-api:1.16.5-R0.1-SNAPSHOT')
compileOnly('me.clip:placeholderapi:2.11.1')
compileOnly('com.sk89q.worldguard:worldguard-bukkit:7.0.7')
compileOnly('io.lumine:Mythic-Dist:5.0.3-SNAPSHOT')
compileOnly('dev.dejvokep:boosted-yaml:1.3')
implementation('net.kyori:adventure-api:4.11.0')
implementation('net.kyori:adventure-platform-bukkit:4.1.1')
implementation('net.kyori:adventure-text-minimessage:4.11.0')
implementation('net.kyori:adventure-text-serializer-legacy:4.11.0')
implementation('de.tr7zw:item-nbt-api:2.10.0')
}
def targetJavaVersion = 16
@@ -84,6 +88,6 @@ tasks.withType(JavaCompile) {
}
shadowJar {
relocate 'net.kyori', 'libs.kyori'
relocate 'de.tr7zw', 'libs.tr7zw'
relocate 'de.tr7zw', 'net.momirealms.customfishing.libs'
relocate 'net.kyori', 'net.momirealms.customfishing.libs'
}

View File

@@ -17,6 +17,12 @@
package net.momirealms.customfishing;
import dev.dejvokep.boostedyaml.YamlDocument;
import dev.dejvokep.boostedyaml.dvs.versioning.BasicVersioning;
import dev.dejvokep.boostedyaml.settings.dumper.DumperSettings;
import dev.dejvokep.boostedyaml.settings.general.GeneralSettings;
import dev.dejvokep.boostedyaml.settings.loader.LoaderSettings;
import dev.dejvokep.boostedyaml.settings.updater.UpdaterSettings;
import net.kyori.adventure.bossbar.BossBar;
import net.momirealms.customfishing.competition.CompetitionConfig;
import net.momirealms.customfishing.competition.Goal;
@@ -24,6 +30,7 @@ import net.momirealms.customfishing.competition.bossbar.BossBarConfig;
import net.momirealms.customfishing.competition.reward.CommandImpl;
import net.momirealms.customfishing.competition.reward.MessageImpl;
import net.momirealms.customfishing.competition.reward.Reward;
import net.momirealms.customfishing.helper.Log;
import net.momirealms.customfishing.titlebar.Difficulty;
import net.momirealms.customfishing.titlebar.Layout;
import net.momirealms.customfishing.hook.skill.Aurelium;
@@ -46,6 +53,7 @@ import org.bukkit.inventory.ItemFlag;
import org.bukkit.inventory.ItemStack;
import java.io.File;
import java.io.IOException;
import java.util.*;
public class ConfigReader{
@@ -74,6 +82,7 @@ public class ConfigReader{
Config.loadConfig();
Message.loadMessage();
Title.loadTitle();
loadBars();
loadLoot();
loadUtil();
loadRod();
@@ -91,6 +100,7 @@ public class ConfigReader{
public static boolean needOpenWater;
public static boolean needSpecialRod;
public static boolean competition;
public static boolean convertMMOItems;
public static String season_papi;
public static String lang;
public static int fishFinderCoolDown;
@@ -99,6 +109,12 @@ public class ConfigReader{
public static void loadConfig() {
try {
YamlDocument.create(new File(CustomFishing.instance.getDataFolder(), "config.yml"), CustomFishing.instance.getResource("config.yml"), GeneralSettings.DEFAULT, LoaderSettings.builder().setAutoUpdate(true).build(), DumperSettings.DEFAULT, UpdaterSettings.builder().setVersioning(new BasicVersioning("config-version")).build());
}catch (IOException e){
Log.warn(e.getMessage());
}
CustomFishing.instance.saveDefaultConfig();
CustomFishing.instance.reloadConfig();
FileConfiguration config = CustomFishing.instance.getConfig();
@@ -170,36 +186,13 @@ public class ConfigReader{
}
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");
fishFinderCoolDown = config.getInt("config.fishfinder-cooldown");
timeMultiply = config.getDouble("config.time-multiply");
lang = config.getString("config.lang","cn");
competition = config.getBoolean("config.fishing-competition",true);
/*
计算获取布局
*/
LAYOUT.clear();
Set<String> keys = Objects.requireNonNull(config.getConfigurationSection("config.success-rate")).getKeys(false);
keys.forEach(key -> {
int range = config.getInt("config.success-rate." + key + ".range");
Set<String> rates = Objects.requireNonNull(config.getConfigurationSection("config.success-rate." + key + ".layout")).getKeys(false);
double[] successRate = new double[rates.size()];
for(int i = 0; i < rates.size(); i++){
successRate[i] = config.getDouble("config.success-rate." + key + ".layout." +(i + 1));
}
int size = rates.size()*range -1;
Layout layout = new Layout(key, range, successRate, size);
layout.setTitle(config.getString("config.success-rate." + key + ".title"," "));
layout.setBar(config.getString("config.success-rate." + key + ".subtitle.bar",""));
layout.setEnd(config.getString("config.success-rate." + key + ".subtitle.end","</font>"));
layout.setStart(config.getString("config.success-rate." + key + ".subtitle.start","<font:customfishing:default>"));
layout.setPointer(config.getString("config.success-rate." + key + ".subtitle.pointer",""));
layout.setPointerOffset(config.getString("config.success-rate." + key + ".subtitle.pointer_offset",""));
layout.setOffset(config.getString("config.success-rate." + key + ".subtitle.offset",""));
LAYOUT.put(key, layout);
});
}
}
@@ -423,7 +416,7 @@ public class ConfigReader{
if (loot.getMaterial().equalsIgnoreCase("AIR")){
LOOTITEM.put(key, new ItemStack(Material.AIR));
}else {
LOOTITEM.put(key, NBTUtil.addIdentifier(ItemStackGenerator.fromItem(loot), "loot", key));
LOOTITEM.put(key, ItemStackGenerator.fromItem(loot));
}
});
@@ -796,6 +789,9 @@ public class ConfigReader{
if (config.contains(key + ".broadcast.end")){
competitionConfig.setEndMessage(config.getStringList(key + ".broadcast.end"));
}
if (config.contains(key + ".min-players")){
competitionConfig.setMinPlayers(config.getInt(key + ".min-players"));
}
if (config.contains(key + ".prize")){
HashMap<String, List<Reward>> rewardsMap = new HashMap<>();
config.getConfigurationSection(key + ".prize").getKeys(false).forEach(rank -> {
@@ -826,4 +822,28 @@ public class ConfigReader{
JedisUtil.useRedis = false;
}
}
}
public static void loadBars(){
LAYOUT.clear();
YamlConfiguration config = ConfigReader.getConfig("bars.yml");
Set<String> keys = Objects.requireNonNull(config.getConfigurationSection("")).getKeys(false);
keys.forEach(key -> {
int range = config.getInt(key + ".range");
Set<String> rates = Objects.requireNonNull(config.getConfigurationSection(key + ".layout")).getKeys(false);
double[] successRate = new double[rates.size()];
for(int i = 0; i < rates.size(); i++){
successRate[i] = config.getDouble(key + ".layout." +(i + 1));
}
int size = rates.size()*range -1;
Layout layout = new Layout(key, range, successRate, size);
layout.setTitle(config.getString(key + ".title"," "));
layout.setBar(config.getString(key + ".subtitle.bar",""));
layout.setEnd(config.getString(key + ".subtitle.end","</font>"));
layout.setStart(config.getString(key + ".subtitle.start","<font:customfishing:default>"));
layout.setPointer(config.getString(key + ".subtitle.pointer",""));
layout.setPointerOffset(config.getString(key + ".subtitle.pointer_offset",""));
layout.setOffset(config.getString(key + ".subtitle.offset",""));
LAYOUT.put(key, layout);
});
}
}

View File

@@ -23,6 +23,7 @@ import net.momirealms.customfishing.command.TabComplete;
import net.momirealms.customfishing.competition.CompetitionSchedule;
import net.momirealms.customfishing.competition.bossbar.BossBarManager;
import net.momirealms.customfishing.helper.LibraryLoader;
import net.momirealms.customfishing.listener.MMOItemsConverter;
import net.momirealms.customfishing.listener.PlayerListener;
import net.momirealms.customfishing.utils.AdventureManager;
import org.bukkit.Bukkit;
@@ -41,6 +42,7 @@ public final class CustomFishing extends JavaPlugin {
instance = this;
LibraryLoader.load("redis.clients","jedis","4.2.3","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/");
}
@Override
@@ -56,6 +58,9 @@ public final class CustomFishing extends JavaPlugin {
competitionSchedule.checkTime();
Bukkit.getPluginManager().registerEvents(new BossBarManager(), this);
}
if (ConfigReader.Config.convertMMOItems){
Bukkit.getPluginManager().registerEvents(new MMOItemsConverter(), this);
}
ConfigReader.tryEnableJedis();
AdventureManager.consoleMessage("<gradient:#0070B3:#A0EACF>[CustomFishing] </gradient><color:#E1FFFF>Plugin Enabled!");
}

View File

@@ -41,6 +41,7 @@ public class CompetitionConfig {
public void setGoal(Goal goal) {this.goal = goal;}
public void setEndMessage(List<String> endMessage) {this.endMessage = endMessage;}
public void setStartMessage(List<String> startMessage) {this.startMessage = startMessage;}
public void setMinPlayers(int minPlayers) {this.minPlayers = minPlayers;}
public HashMap<String, List<Reward>> getRewards() {return rewards;}
public Goal getGoal() {return goal;}

View File

@@ -1,3 +1,20 @@
/*
* Copyright (C) <2022> <XiaoMoMi>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package net.momirealms.customfishing.competition.ranking;
import net.momirealms.customfishing.competition.CompetitionPlayer;

View File

@@ -1,3 +1,20 @@
/*
* Copyright (C) <2022> <XiaoMoMi>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package net.momirealms.customfishing.competition.ranking;
import net.momirealms.customfishing.competition.CompetitionPlayer;

View File

@@ -1,3 +1,20 @@
/*
* Copyright (C) <2022> <XiaoMoMi>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package net.momirealms.customfishing.hook;
import me.clip.placeholderapi.PlaceholderAPI;

View File

@@ -1,3 +1,20 @@
/*
* Copyright (C) <2022> <XiaoMoMi>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package net.momirealms.customfishing.hook.skill;
import com.archyx.aureliumskills.api.AureliumAPI;

View File

@@ -1,3 +1,20 @@
/*
* Copyright (C) <2022> <XiaoMoMi>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package net.momirealms.customfishing.hook.skill;
import net.Indyuce.mmocore.experience.EXPSource;

View File

@@ -1,3 +1,20 @@
/*
* Copyright (C) <2022> <XiaoMoMi>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package net.momirealms.customfishing.hook.skill;
import org.bukkit.entity.Player;

View File

@@ -1,3 +1,20 @@
/*
* Copyright (C) <2022> <XiaoMoMi>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package net.momirealms.customfishing.hook.skill;
import com.gmail.nossr50.api.ExperienceAPI;

View File

@@ -0,0 +1,78 @@
/*
* Copyright (C) <2022> <XiaoMoMi>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package net.momirealms.customfishing.listener;
import de.tr7zw.changeme.nbtapi.NBTCompound;
import de.tr7zw.changeme.nbtapi.NBTItem;
import org.bukkit.Material;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.player.PlayerFishEvent;
import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.PlayerInventory;
import java.util.HashMap;
public class MMOItemsConverter implements Listener {
private final HashMap<Player, Long> coolDown = new HashMap<>();
@EventHandler
public void onFish(PlayerFishEvent event){
if (event.getState() == PlayerFishEvent.State.FISHING){
Player player = event.getPlayer();
long time = System.currentTimeMillis();
if (time - (coolDown.getOrDefault(player, time - 5000)) < 5000) {
return;
}
coolDown.put(player, time);
PlayerInventory inventory = player.getInventory();
ItemStack mainHand = inventory.getItemInMainHand();
if(mainHand.getType() == Material.FISHING_ROD){
NBTItem nbtItem = new NBTItem(mainHand);
if (nbtItem.getCompound("CustomFishing") == null) {
if (nbtItem.getString("MMOITEMS_ITEM_ID") != null){
NBTCompound nbtCompound = nbtItem.addCompound("CustomFishing");
nbtCompound.setString("type","rod");
nbtCompound.setString("id",nbtItem.getString("MMOITEMS_ITEM_ID"));
mainHand.setItemMeta(nbtItem.getItem().getItemMeta());
}
}
}
ItemStack offHand = inventory.getItemInOffHand();
if(offHand.getType() == Material.FISHING_ROD){
NBTItem nbtItem = new NBTItem(offHand);
if (nbtItem.getCompound("CustomFishing") == null) {
if (nbtItem.getString("MMOITEMS_ITEM_ID") != null){
NBTCompound nbtCompound = nbtItem.addCompound("CustomFishing");
nbtCompound.setString("type", "rod");
nbtCompound.setString("id", nbtItem.getString("MMOITEMS_ITEM_ID"));
offHand.setItemMeta(nbtItem.getItem().getItemMeta());
}
}
}
}
}
}

View File

@@ -1,3 +1,20 @@
/*
* Copyright (C) <2022> <XiaoMoMi>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package net.momirealms.customfishing.utils;
import net.momirealms.customfishing.helper.Log;

View File

@@ -1,3 +1,20 @@
/*
* Copyright (C) <2022> <XiaoMoMi>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package net.momirealms.customfishing.utils;
public class Modifier {

View File

@@ -2,27 +2,49 @@ baits:
simple_bait:
material: paper
display:
name: '普通的钓饵'
name: '<gray>Common fishing lures'
lore:
- '<white>减少捕鱼的时间'
- '<white>但是加大捕鱼的难度'
custom-model-data: 1
#钓饵增益
- '<white>Reduce the time spent fishing'
- '<white>But make it more difficult to catch fish'
custom-model-data: 646
#Bait Gain
modifier:
#改变指定组的loot权重
#加减权重
#Change the loot weight of the specified group
#Add or subtract weights
weight-PM:
normal: 20
creature: -10
#乘除权重
silver: 5
gold: 3
#Multiply and divide weights
weight-MQ:
normal: 1.8
creature: 0.8
#改变上鱼的时间(>1为延长,<1为缩短)
time: 0.95
#更改难度,例如原来难度为(1-6),现在变成(1-5)
silver: 1.1
gold: 1.1
#Change the time to fish (>1 for longer, <1 for shorter)
time: 0.85
#Change the difficulty, for example, if the original difficulty is (1-6), now it becomes (1-9)
difficulty: 3
#双倍掉落概率
double-loot: 0.05
#比赛分数加成
score: 1.2
#Double drop probability
double-loot: 0.06
#Multiply the score got in competition
score: 1.2
wild_bait:
material: paper
display:
name: 'Wild Bait'
lore:
- '<white>Decreases fishing time by 30%.'
custom-model-data: 696
modifier:
time: 0.7
magnet_bait:
material: paper
display:
name: '<gray>Magnet Bait'
lore:
- '<white>Increases the probability of better loot by 15%.'
custom-model-data: 695
modifier:
weight-MQ:
silver: 1.15
gold: 1.15

121
src/main/resources/bars.yml Normal file
View File

@@ -0,0 +1,121 @@
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

@@ -2,7 +2,7 @@ example:
#TOTAL_SCORE
#CATCH_AMOUNT
goal: TOTAL_SCORE
goal: CATCH_AMOUNT
start-time:
- '5:30'
@@ -10,21 +10,35 @@ example:
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}'
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:
- 'The competition has started. Start Fishing to join!'
- '<red> <red>⚠<aqua><bold>Fishing competition<red>⚠'
- '<red>'
- '<blue>----------------------------------------'
- ''
- '<gray>The competition has started. Start <gold>Fishing<gray> to join!'
- ''
- '<blue>----------------------------------------'
end:
- 'The competition has ended!'
- ' ① {1st} {1st_points}points'
- ' ② {2nd} {2nd_points}points'
- ' ③ {3rd} {3rd_points}points'
- '<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:

View File

@@ -1,6 +1,9 @@
config:
# don't change
config-version: 1
lang: cn
config:
#en/es/cn
lang: en
integrations:
WorldGuard: false
@@ -10,92 +13,29 @@ config:
MMOCore: false
AureliumSkills: false
#季节特性
season:
#是否启用
enable: false
#需要解析的季节变量
# Season Papi
papi: '%customcrops_season%'
#假如某个地方不存在特殊鱼,是否能让玩家获得原版的钓鱼战利品
#如果设置为false那么玩家无法在不满足条件的地方钓起任何物品
#你也可以根据原版钓鱼战利品写入本插件内以接近原版
# If there's no custom fish in this place
# Should players get vanilla loots?
vanilla-loot-when-no-custom-fish: false
#只有在开放水域才能钓到特殊鱼
# The same to vanilla
need-open-water: true
#是否只有本插件的鱼竿能钓到鱼
# Players must use rods with CustomFishing's NBT Tags
need-special-rod: false
#使用找鱼器的冷却时间(ms)
# Cool down time of fish finder
fishfinder-cooldown: 3000
#修改捕鱼所需的时间
#在paper.yml中可以修改默认最少最长上钩时间
# Change the time bobber needs to be hooked
time-multiply: 2
#是否启用钓鱼比赛(修改此项需要重启)
# Enable Competition(Requires a restart)
fishing-competition: true
#成功率
#你可以自定义区域数量这为自定义UI提供了可能
success-rate:
bar1:
#每个判定区间的像素个数
#默认配置为16个像素每区间
#如果你对自定义UI很感兴趣建议联系作者提供相关帮助
range: 16
title: '鱼上钩了,集中注意!'
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: '鱼上钩了,集中注意!'
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
# Convert MMOItems' rod into CustomFishing's rod (Requires a restart)
convert-MMOITEMS: true

View File

@@ -1,33 +1,21 @@
#物品支持MiniMessage Format
#MiniMessage Format is available in item name & lore
#https://docs.adventure.kyori.net/minimessage/format.html
items:
rubbish:
material: paper
display:
name: '垃圾'
weight: 50
time: 100000
show-in-fishfinder: false
difficulty: 1-1
score: 10.5
#物品内部ID
# EXAMPLE
rainbow_fish:
#物品的原型
material: cod
#物品的昵称,若不填写则默认为物品名
nick: '彩虹鱼'
#物品的显示样式
nick: 'Example Fish'
display:
name: '<rainbow>✖七✖色✖彩✖虹✖鱼✖</rainbow>'
lore:
- '<gray>This is a <font:uniform>rainbow fish!'
- '<gray> 这是一条七色彩虹鱼'
custom-model-data: 1
#自定义NBT
#可类型(Int) (Byte) (String) (Float) (String) (Double) (Short) (Long) (UUID) (Boolean)
# 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'
@@ -36,29 +24,30 @@ items:
NBTS:
byte: '(Byte) 127'
float: '(Float) 3.14159'
#钓到鱼后发生的动作
# Action to be triggered when fishing successfully
action:
#钓到鱼后的提示信息
message: '恭喜你钓到了一条 {loot}'
#钓到鱼后执行的指令
message: 'You got a {loot} lol'
command:
- 'say 玩家{player}{world},{x},{y},{z}钓到了一条{loot}!'
- 'say 玩家 {player}{world}, {x},{y},{z} 钓到了一条 {loot}!'
exp: 10
#钓到此鱼的权重
# The weight(relative chance) of getting this fish
weight: 10
#此鱼所在的组名
# Optional
group: normal
# The score to get when in competition
score: 10
# 钓此鱼的难度
# 难度设置左侧为每多少tick移动一个单位右侧为一个单位的像素距离
# 1-1指每1tick移动1像素 2-3指每2tick移动3像素
difficulty: 1-25
# Fishing Skill xp add to skill plugin
#skill-xp: 100
#指定钓此鱼的UI布局
#若不设置则每次都随机
# 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
@@ -72,59 +61,508 @@ items:
# - HIDE_UNBREAKABLE
# - HIDE_POTION_EFFECTS
# 玩家有多少时间捕鱼
# 超过指定时间鱼会跑(单位:毫秒)
# How long can a player fish on each bitems
time: 5000
#钓到此鱼的条件
# Optional
requirements:
#能够钓到此鱼的群系
#支持自定义生物群系
biome:
- minecraft:plains
- minecraft:taiga
#Y轴范围条件
ypos:
- 50~100
- 150~200
#钓到此鱼的天气需求
weather:
- rain
- clear
- thunder
#钓到此鱼所需的权限
permission: 'customfishing.rainbowfish'
#指定此鱼出现的世界
world:
- world
#指定此鱼出现的时间
time:
- 0~12000
#Requires WorldGuard
#region:
# - fishingpool
#适合钓到此鱼的季节
#删除此设置则可在任何季节捕获
#Requires PlaceholderAPI
#season:
# -
# -
# - Spring
# - Autumn
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
custom-model-data: 641
tuna_fish_silver_star:
material: paper
display:
name: 'Tuna Fish Silver Star'
weight: 50
time: 100000
difficulty: 1-1
group: silver
custom-model-data: 666
tuna_fish_golden_star:
material: paper
display:
name: 'Tuna Fish Golden Star'
weight: 50
time: 100000
difficulty: 1-1
group: gold
custom-model-data: 667
pike:
material: paper
display:
name: 'Pike Fish'
weight: 50
time: 100000
difficulty: 1-2
custom-model-data: 642
pike_fish_silver_star:
material: paper
display:
name: 'Pike Fish Silver Star'
weight: 50
time: 100000
difficulty: 1-2
group: silver
custom-model-data: 664
pike_fish_golden_star:
material: paper
display:
name: 'Pike Fish Golden Star'
weight: 50
time: 100000
difficulty: 1-2
group: gold
custom-model-data: 665
golden:
material: paper
display:
name: 'Golden Fish'
weight: 50
time: 100000
difficulty: 1-2
custom-model-data: 643
golden_fish_silver_star:
material: paper
display:
name: 'Golden Fish Silver Star'
weight: 50
time: 100000
difficulty: 1-2
group: silver
custom-model-data: 658
golden_fish_golden_star:
material: paper
display:
name: 'Golden Fish Golden Star'
weight: 50
time: 100000
group: gold
difficulty: 1-2
custom-model-data: 659
perch_fish:
material: paper
display:
name: 'Perch Fish'
weight: 50
time: 100000
difficulty: 1-2
custom-model-data: 644
perch_fish_silver_star:
material: paper
display:
name: 'Perch Fish Silver Star'
weight: 50
time: 100000
group: silver
difficulty: 1-2
custom-model-data: 660
perch_fish_golden_star:
material: paper
display:
name: 'Perch Fish Golden Star'
weight: 50
group: gold
time: 100000
difficulty: 1-2
custom-model-data: 661
mullet_fish:
material: paper
display:
name: 'Mullet Fish'
weight: 50
time: 100000
difficulty: 1-2
custom-model-data: 645
mullet_fish_silver_star:
material: paper
display:
name: 'Mullet Fish Silver Star'
weight: 50
group: silver
time: 100000
difficulty: 1-2
custom-model-data: 662
mullet_fish_golden_star:
material: paper
display:
name: 'Mullet Fish Golden Star'
weight: 50
time: 100000
group: gold
difficulty: 1-2
custom-model-data: 663
sardine_fish:
material: paper
display:
name: 'Sardine Fish'
weight: 50
time: 100000
difficulty: 1-2
custom-model-data: 668
sardine_fish_silver_star:
material: paper
display:
name: 'Sardine Fish Silver Star'
weight: 50
time: 100000
group: silver
difficulty: 1-2
custom-model-data: 669
sardine_fish_golden_star:
material: paper
display:
name: 'Sardine Fish Golden Star'
weight: 50
time: 100000
group: gold
difficulty: 1-2
custom-model-data: 670
carp_fish:
material: paper
display:
name: 'Carp Fish'
weight: 50
time: 100000
difficulty: 1-2
custom-model-data: 671
carp_fish_silver_star:
material: paper
display:
name: 'Carp Fish Silver Star'
weight: 50
time: 100000
group: silver
difficulty: 1-2
custom-model-data: 672
carp_fish_golden_star:
material: paper
display:
name: 'Carp Fish Golden Star'
weight: 50
time: 100000
group: gold
difficulty: 1-2
custom-model-data: 673
cat_fish:
material: paper
display:
name: 'Cat Fish'
weight: 50
time: 100000
difficulty: 1-2
custom-model-data: 674
cat_fish_silver_star:
material: paper
display:
name: 'Cat Fish Silver Star'
weight: 50
group: silver
time: 100000
difficulty: 1-2
custom-model-data: 675
cat_fish_golden_star:
material: paper
display:
name: 'Cat Fish Golden Star'
weight: 50
time: 100000
group: gold
difficulty: 1-2
custom-model-data: 676
octopus_fish:
material: paper
display:
name: 'Octopus Fish'
weight: 50
time: 100000
difficulty: 1-2
custom-model-data: 677
octopus_fish_silver_star:
material: paper
display:
name: 'Octopus Fish Silver Star'
weight: 50
group: silver
time: 100000
difficulty: 1-2
custom-model-data: 678
octopus_fish_golden_star:
material: paper
display:
name: 'Octopus Fish Golden Star'
weight: 50
time: 100000
group: gold
difficulty: 1-2
custom-model-data: 679
sunfish_fish:
material: paper
display:
name: 'Sunfish Fish'
weight: 50
time: 100000
difficulty: 1-2
custom-model-data: 680
sunfish_fish_silver_star:
material: paper
display:
name: 'Sunfish Fish Silver Star'
weight: 50
group: silver
time: 100000
difficulty: 1-2
custom-model-data: 681
sunfish_fish_golden_star:
material: paper
display:
name: 'Sunfish Fish Golden Star'
weight: 50
time: 100000
group: gold
difficulty: 1-2
custom-model-data: 682
red_spnapper_fish:
material: paper
display:
name: 'Red Snapper Fish'
weight: 50
time: 100000
difficulty: 1-2
custom-model-data: 683
red_spnapper_fish_silver_star:
material: paper
display:
name: 'Red Snapper Fish Silver Star'
weight: 50
time: 100000
group: silver
difficulty: 1-2
custom-model-data: 684
red_spnapper_fish_golden_star:
material: paper
display:
name: 'Red Snapper Golden Star'
weight: 50
time: 100000
group: gold
difficulty: 1-2
custom-model-data: 685
salmon_void_fish:
material: paper
display:
name: 'Salmon Void Fish'
weight: 50
time: 100000
difficulty: 1-2
custom-model-data: 686
salmon_void_fish_silver_star:
material: paper
display:
name: 'Salmon Void Fish Silver Star'
weight: 50
time: 100000
group: silver
difficulty: 1-2
custom-model-data: 687
salmon_void_fish_golden_star:
material: paper
display:
name: 'Salmon Void Fish Golden Star'
weight: 50
time: 100000
group: gold
difficulty: 1-2
custom-model-data: 688
woodskip_fish:
material: paper
display:
name: 'Woodskip Fish'
weight: 50
time: 100000
difficulty: 1-2
custom-model-data: 689
woodskip_fish_silver_star:
material: paper
display:
name: 'Woodskip Fish Silver Star'
weight: 50
group: silver
time: 100000
difficulty: 1-2
custom-model-data: 690
woodskip_fish_golden_star:
material: paper
display:
name: 'Woodskip Fish Golden Star'
weight: 50
group: gold
time: 100000
difficulty: 1-2
custom-model-data: 691
sturgeon_fish:
material: paper
display:
name: 'Sturgeon Fish'
weight: 50
time: 100000
difficulty: 1-2
custom-model-data: 692
sturgeon_fish_silver_star:
material: paper
display:
name: 'Sturgeon Fish Silver Star'
weight: 50
group: silver
time: 100000
difficulty: 1-2
custom-model-data: 693
sturgeon_fish_golden_star:
material: paper
display:
name: 'Sturgeon Fish Golden Star'
weight: 50
time: 100000
group: gold
difficulty: 1-2
custom-model-data: 694
mobs:
skeletalknight:
#MM怪的ID
mythicmobsID: SkeletalKnight
#MM怪等级如果有则设置无则忽略
level: 0
#这个怪物的名字,用于在消息中提示
name: '骷髅骑士'
name: 'skeletalknight'
group: creature
#决定了MM怪的出场方式
# This decides how mythicmobs appears
vector:
#水平位移乘数
horizontal: 1.1
#竖直位移乘数
vertical: 1.2
action:
message: '{loot} 登场'
message: '{loot} is coming'
command:
- 'say 玩家{player}在{world},{x},{y},{z}被{loot}追杀!'
exp: 10
@@ -133,7 +571,18 @@ mobs:
time: 5000
requirements:
weather:
- rain
- thunder
world:
- 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,4 +1,4 @@
#所有位置均可使用MiniMessage Format
#MiniMessage Format
#https://docs.adventure.kyori.net/minimessage/format.html
messages:
prefix: '<gradient:#0070B3:#A0EACF>[CustomFishing] </gradient>'

View File

@@ -0,0 +1,28 @@
#MiniMessage Format
#https://docs.adventure.kyori.net/minimessage/format.html
messages:
prefix: '<gradient:#0070B3:#A0EACF>[CustomFishing] </gradient>'
reload: 'Reload successfully.'
no-perm: 'You dont have permission!'
not-online: 'Players are not online!'
not-exist: 'This item does not exist!'
escape: 'Its been too long since I pulled the hook and the fish ran away!'
give-item: 'Successfully giving players {Player} {Amount}x {Item}.'
get-item: 'Successfully obtained {Amount}x {Item}.'
no-console: 'This command cannot be executed by the console!'
wrong-amount: 'You cannot give a player an item with a negative quantity!'
lack-args: 'Insufficient parameters.'
cooldown: 'You''re using the fish finder too fast!'
possible-loots: 'Possible fishing here: '
split-char: ', '
no-loot: 'There are no fish in this place!'
not-open-water: 'This is not open water and you will not be able to get any rewards!'
competition-ongoing: 'There is currently a fishing tournament in progress! Start fishing to join the contest for a prize!'
players-not-enough: 'The number of players is not enough for the fishing tournament to be held as scheduled!'
no-rank: 'Not on the list'
force-competition-success: 'Successfully force a fishing contest!'
force-competition-failure: 'This contest does not exist!'
force-competition-end: 'Forced to end the current match in progress!'
force-competition-cancel: 'Forced cancellation of the current match in progress!'
no-player: 'No player'
no-score: 'No score'

View File

@@ -0,0 +1,28 @@
#MiniMessage Format
#https://docs.adventure.kyori.net/minimessage/format.html
messages:
prefix: '<gradient:#0070B3:#A0EACF>[CustomFishing] </gradient>'
reload: 'Recarga con éxito.'
no-perm: 'No tienes permiso.'
not-online: 'Los jugadores no están en línea.'
not-exist: 'Este artículo no existe.'
escape: 'Ha pasado demasiado tiempo desde que tiré del anzuelo y el pez huyó.'
give-item: 'Se dio con éxito a los jugadores {Player} {Amount}x {Item}.'
get-item: 'Obtenido con éxito {Amount}x {Item}.'
no-console: '¡Este comando no puede ser ejecutado por la consola!'
wrong-amount: 'No puedes dar a un jugador un artículo con una cantidad negativa.'
lack-args: 'Parámetros insuficientes.'
cooldown: '¡Estás usando el buscador de peces demasiado rápido!'
possible-loots: 'Posible pesca aquí: '
split-char: ', '
no-loot: '¡No hay peces en este lugar!'
not-open-water: 'Esto no son aguas abiertas y no podrás obtener ninguna recompensa.'
competition-ongoing: '¡Actualmente hay un torneo de pesca en curso! Empieza a pescar para participar en el concurso y ganar un premio.'
players-not-enough: 'El número de jugadores no es suficiente para que el torneo de pesca se celebre como estaba previsto.'
no-rank: 'No está en la lista'
force-competition-success: '¡Forzar con éxito un concurso de pesca!'
force-competition-failure: '¡Este concurso no existe!'
force-competition-end: '¡Obligado a terminar el partido en curso!'
force-competition-cancel: '¡Cancelación forzosa del partido en curso!'
no-player: 'Ningún jugador'
no-score: 'Sin puntuación'

View File

@@ -1,26 +1,43 @@
rods:
wooden_rod:
display:
name: '普通的木鱼竿'
name: 'Ordinary wooden fishing rod'
lore:
- '就是一把普通的鱼竿而已啦'
custom-model-data: 1
#鱼竿增益
- 'Its just an ordinary fishing rod'
# The same to baits.yml
modifier:
difficulty: 1
nature_fishing_cane:
display:
name: 'Nature Fishing Cane'
custom-model-data: 2
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
silver: 5
silver_fishing_rod:
display:
name: 'Silver Fishing Rod'
custom-model-data: 3
modifier:
weight-PM:
silver: 20
gold: -10
golden_fishing_rod:
display:
name: 'Golden Fishing Rod'
custom-model-data: 4
modifier:
weight-PM:
silver: -20
gold: 20
star_fishing_rod:
display:
name: 'Star Fishing Rod'
custom-model-data: 5
modifier:
weight-PM:
silver: 20
gold: 10

View File

@@ -1,26 +1,25 @@
#对于不想启用的title设置title和subtitle为空即可
#所有位置均可使用MiniMessage Format
#MiniMessage Format
#https://docs.adventure.kyori.net/minimessage/format.html
titles:
failure:
title:
- '<red>真菜!</red>'
- '<red>失败!</red>'
- '<red>Real food!</red>'
- '<red>Failure!</red>'
subtitle:
- '鱼已经逃跑了'
- '下次再努力吧'
#单位 tick
- 'The fish have escaped'
- 'Lets try again next time'
#tick
fade:
in: 10
stay: 30
out: 10
success:
title:
- '<green>成功!</green>'
- '<green>漂亮!</green>'
- '<green>Success!</green>'
- '<green>Beautiful!</green>'
subtitle:
- '你捕捉到了一条 {loot}'
- '嗨害嗨 {loot} 来咯!'
- 'You have captured a {loot}'
- 'Hi Harm Hi {loot} Here we go!'
fade:
in: 10
stay: 30

View File

@@ -1,8 +1,9 @@
utils:
fishfinder:
material: compass
material: PAPER
display:
name: '找鱼器'
name: '<gray>Fish Finder'
lore:
- '右键查看这个地方能钓到什么鱼吧!'
custom-model-data: 1
- '<white>Right click to see what fish can be caught in this place!'
nbt:
- CustomModelData: '(Int) 647'

View File

@@ -0,0 +1,28 @@
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

@@ -0,0 +1,57 @@
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

@@ -0,0 +1,105 @@
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
#成功率
#你可以自定义区域数量这为自定义UI提供了可能
success-rate:
bar1:
#每个判定区间的像素个数
#默认配置为16个像素每区间
#如果你对自定义UI很感兴趣建议联系作者提供相关帮助
range: 16
title: '鱼上钩了,集中注意!'
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: '鱼上钩了,集中注意!'
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

View File

@@ -0,0 +1,725 @@
#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

@@ -0,0 +1,19 @@
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

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

View File

@@ -0,0 +1,26 @@
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

@@ -0,0 +1,27 @@
#对于不想启用的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

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