mirror of
https://github.com/Xiao-MoMi/Custom-Fishing.git
synced 2025-12-26 18:39:11 +00:00
minor changes
This commit is contained in:
@@ -39,6 +39,7 @@ import net.momirealms.customfishing.mechanic.game.GameManagerImpl;
|
||||
import net.momirealms.customfishing.mechanic.item.ItemManagerImpl;
|
||||
import net.momirealms.customfishing.mechanic.loot.LootManagerImpl;
|
||||
import net.momirealms.customfishing.mechanic.market.MarketManagerImpl;
|
||||
import net.momirealms.customfishing.mechanic.misc.CoolDownManager;
|
||||
import net.momirealms.customfishing.mechanic.mob.MobManagerImpl;
|
||||
import net.momirealms.customfishing.mechanic.requirement.RequirementManagerImpl;
|
||||
import net.momirealms.customfishing.mechanic.statistic.StatisticsManagerImpl;
|
||||
@@ -46,7 +47,6 @@ import net.momirealms.customfishing.scheduler.SchedulerImpl;
|
||||
import net.momirealms.customfishing.setting.CFConfig;
|
||||
import net.momirealms.customfishing.setting.CFLocale;
|
||||
import net.momirealms.customfishing.storage.StorageManagerImpl;
|
||||
import net.momirealms.customfishing.mechanic.misc.CoolDownManager;
|
||||
import net.momirealms.customfishing.version.VersionManagerImpl;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.configuration.file.YamlConfiguration;
|
||||
|
||||
@@ -17,7 +17,10 @@
|
||||
|
||||
package net.momirealms.customfishing.command;
|
||||
|
||||
import dev.jorel.commandapi.*;
|
||||
import dev.jorel.commandapi.CommandAPI;
|
||||
import dev.jorel.commandapi.CommandAPIBukkitConfig;
|
||||
import dev.jorel.commandapi.CommandAPICommand;
|
||||
import dev.jorel.commandapi.CommandPermission;
|
||||
import dev.jorel.commandapi.arguments.EntitySelectorArgument;
|
||||
import net.momirealms.customfishing.CustomFishingPluginImpl;
|
||||
import net.momirealms.customfishing.adventure.AdventureManagerImpl;
|
||||
|
||||
@@ -5,6 +5,7 @@ import dev.jorel.commandapi.IStringTooltip;
|
||||
import dev.jorel.commandapi.StringTooltip;
|
||||
import dev.jorel.commandapi.arguments.ArgumentSuggestions;
|
||||
import dev.jorel.commandapi.arguments.BooleanArgument;
|
||||
import dev.jorel.commandapi.arguments.StringArgument;
|
||||
import net.momirealms.biomeapi.BiomeAPI;
|
||||
import net.momirealms.customfishing.adventure.AdventureManagerImpl;
|
||||
import net.momirealms.customfishing.api.CustomFishingPlugin;
|
||||
@@ -13,9 +14,7 @@ import net.momirealms.customfishing.api.manager.AdventureManager;
|
||||
import net.momirealms.customfishing.api.mechanic.condition.FishingPreparation;
|
||||
import net.momirealms.customfishing.api.mechanic.effect.FishingEffect;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.*;
|
||||
|
||||
public class DebugCommand {
|
||||
|
||||
@@ -26,7 +25,9 @@ public class DebugCommand {
|
||||
.withSubcommands(
|
||||
getLootChanceCommand(),
|
||||
getBiomeCommand(),
|
||||
getSeasonCommand()
|
||||
getSeasonCommand(),
|
||||
getGroupCommand(),
|
||||
getCategoryCommand()
|
||||
);
|
||||
}
|
||||
|
||||
@@ -49,6 +50,36 @@ public class DebugCommand {
|
||||
});
|
||||
}
|
||||
|
||||
public CommandAPICommand getGroupCommand() {
|
||||
return new CommandAPICommand("group")
|
||||
.withArguments(new StringArgument("group"))
|
||||
.executes((sender, arg) -> {
|
||||
String group = (String) arg.get("group");
|
||||
StringJoiner stringJoiner = new StringJoiner("<white>, </white>");
|
||||
List<String> groups = CustomFishingPlugin.get().getLootManager().getLootGroup(group);
|
||||
if (groups != null)
|
||||
for (String key : groups) {
|
||||
stringJoiner.add(key);
|
||||
}
|
||||
AdventureManagerImpl.getInstance().sendMessageWithPrefix(sender, "<white>Group<gold>{" + group + "}<yellow>[" + stringJoiner + "]");
|
||||
});
|
||||
}
|
||||
|
||||
public CommandAPICommand getCategoryCommand() {
|
||||
return new CommandAPICommand("category")
|
||||
.withArguments(new StringArgument("category"))
|
||||
.executes((sender, arg) -> {
|
||||
String c = (String) arg.get("category");
|
||||
StringJoiner stringJoiner = new StringJoiner("<white>, </white>");
|
||||
List<String> cs = CustomFishingPlugin.get().getStatisticsManager().getCategory(c);
|
||||
if (cs != null)
|
||||
for (String key : cs) {
|
||||
stringJoiner.add(key);
|
||||
}
|
||||
AdventureManagerImpl.getInstance().sendMessageWithPrefix(sender, "<white>Category<gold>{" + c + "}<yellow>[" + stringJoiner + "]");
|
||||
});
|
||||
}
|
||||
|
||||
public CommandAPICommand getLootChanceCommand() {
|
||||
return new CommandAPICommand("loot-chance")
|
||||
.withArguments(new BooleanArgument("lava fishing").replaceSuggestions(ArgumentSuggestions.stringsWithTooltips(info ->
|
||||
|
||||
@@ -133,6 +133,7 @@ public class BlockManagerImpl implements BlockManager, Listener {
|
||||
public void load() {
|
||||
this.loadConfig();
|
||||
Bukkit.getPluginManager().registerEvents(this, plugin);
|
||||
LogUtils.info("Loaded " + blockConfigMap.size() + " blocks.");
|
||||
}
|
||||
|
||||
private void registerInbuiltProperties() {
|
||||
|
||||
@@ -25,8 +25,8 @@ import net.momirealms.customfishing.api.mechanic.competition.*;
|
||||
import net.momirealms.customfishing.api.mechanic.condition.Condition;
|
||||
import net.momirealms.customfishing.api.scheduler.CancellableTask;
|
||||
import net.momirealms.customfishing.api.util.LogUtils;
|
||||
import net.momirealms.customfishing.setting.CFLocale;
|
||||
import net.momirealms.customfishing.setting.CFConfig;
|
||||
import net.momirealms.customfishing.setting.CFLocale;
|
||||
import net.momirealms.customfishing.storage.method.database.nosql.RedisManager;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.boss.BarColor;
|
||||
@@ -64,6 +64,7 @@ public class CompetitionManagerImpl implements CompetitionManager {
|
||||
1,
|
||||
TimeUnit.SECONDS
|
||||
);
|
||||
LogUtils.info("Loaded " + commandConfigMap.size() + " competitions.");
|
||||
}
|
||||
|
||||
public void unload() {
|
||||
|
||||
@@ -35,12 +35,12 @@ import net.momirealms.customfishing.compatibility.papi.PlaceholderManagerImpl;
|
||||
import net.momirealms.customfishing.setting.CFConfig;
|
||||
import net.momirealms.customfishing.util.NBTUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.configuration.ConfigurationSection;
|
||||
import org.bukkit.configuration.file.YamlConfiguration;
|
||||
import org.bukkit.entity.Entity;
|
||||
import org.bukkit.entity.ItemFrame;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.inventory.ItemFlag;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
@@ -71,7 +71,7 @@ public class ItemManagerImpl implements ItemManager {
|
||||
|
||||
public void load() {
|
||||
this.loadItemsFromPluginFolder();
|
||||
AdventureManagerImpl.getInstance().sendMessageWithPrefix(Bukkit.getConsoleSender(), "<white>Loaded <green>" + buildableItemMap.size() + " <white>items.");
|
||||
LogUtils.info("Loaded " + buildableItemMap.size() + " items.");
|
||||
}
|
||||
|
||||
public void unload() {
|
||||
|
||||
@@ -137,6 +137,7 @@ public class LootManagerImpl implements LootManager {
|
||||
.instantGame(section.getBoolean("instant-game", false))
|
||||
.showInFinder(section.getBoolean("show-in-fishfinder", true))
|
||||
.gameConfig(section.getString("game"))
|
||||
.score(section.getDouble("score"))
|
||||
.lootGroup(ConfigUtils.stringListArgs(section.get("group")).toArray(new String[0]))
|
||||
.nick(section.getString("nick", section.getString("display.name", key)))
|
||||
.addActions(plugin.getActionManager().getActionMap(section.getConfigurationSection("events")))
|
||||
|
||||
@@ -48,6 +48,7 @@ public class MobManagerImpl implements MobManager {
|
||||
|
||||
public void load() {
|
||||
this.loadConfig();
|
||||
LogUtils.info("Loaded " + mobConfigMap.size() + " mobs.");
|
||||
}
|
||||
|
||||
public void unload() {
|
||||
|
||||
@@ -21,6 +21,7 @@ import net.momirealms.customfishing.api.CustomFishingPlugin;
|
||||
import net.momirealms.customfishing.api.data.user.OnlineUser;
|
||||
import net.momirealms.customfishing.api.manager.StatisticsManager;
|
||||
import net.momirealms.customfishing.api.mechanic.statistic.Statistics;
|
||||
import net.momirealms.customfishing.api.util.LogUtils;
|
||||
import org.bukkit.configuration.file.YamlConfiguration;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
@@ -39,6 +40,7 @@ public class StatisticsManagerImpl implements StatisticsManager {
|
||||
|
||||
public void load() {
|
||||
this.loadCategoriesFromPluginFolder();
|
||||
LogUtils.info("Loaded " + categoryMap.size() + " categories.");
|
||||
}
|
||||
|
||||
public void unload() {
|
||||
|
||||
@@ -8,20 +8,22 @@ metrics: true
|
||||
# Check updates
|
||||
update-checker: true
|
||||
|
||||
# Available locales: chinese/english/spanish/turkish
|
||||
# Available locales: english
|
||||
lang: english
|
||||
|
||||
# Mechanic settings
|
||||
mechanics:
|
||||
|
||||
# The requirements for the plugin to work
|
||||
# Specifies the conditions required for the plugin mechanics to work.
|
||||
# Here, the type is !world, which implies the plugin won't work in
|
||||
# the world named 'blacklist_world'.
|
||||
mechanic-requirements:
|
||||
world_requirement:
|
||||
type: '!world'
|
||||
value:
|
||||
- blacklist_world
|
||||
|
||||
# global event settings
|
||||
# Configures how events related to bait, loot, and rods behave
|
||||
global-events:
|
||||
bait: {}
|
||||
loot:
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
fishfinder:
|
||||
material: PAPER
|
||||
display:
|
||||
name: '<gray>Fish Finder'
|
||||
name: '<#1E90FF>Fish Finder'
|
||||
lore:
|
||||
- ''
|
||||
- '<#7FFFD4>Desciption:'
|
||||
@@ -29,7 +29,7 @@ fishfinder:
|
||||
type: cooldown
|
||||
value:
|
||||
key: fishfinder
|
||||
time: 3000 #ms
|
||||
time: 3000
|
||||
not-met-actions:
|
||||
action_1:
|
||||
type: message
|
||||
|
||||
@@ -1,39 +0,0 @@
|
||||
#MiniMessage Format
|
||||
#https://docs.adventure.kyori.net/minimessage/format.html
|
||||
messages:
|
||||
prefix: '<gradient:#0070B3:#A0EACF>[CustomFishing] </gradient>'
|
||||
reload: '重载成功.'
|
||||
no-perm: '你没有权限!'
|
||||
not-online: '玩家 {Player} 不在线!'
|
||||
item-not-exist: '此物品不存在!'
|
||||
player-not-exist: '此玩家不存在!'
|
||||
escape: '太久没拉钩鱼儿跑走啦!'
|
||||
give-item: '成功给予玩家 {Player} {Amount}x {Item}.'
|
||||
get-item: '成功获得 {Amount}x {Item}.'
|
||||
no-console: '这个指令不能由控制台执行!'
|
||||
wrong-amount: '不能给玩家数量为负数的物品!'
|
||||
lack-args: '参数不足.'
|
||||
none-args: '非空参数!'
|
||||
invalid-args: '无效参数!'
|
||||
possible-loots: '此处可能钓到: '
|
||||
reach-sell-limit: '你今天已经卖了很多鱼了!明天再来吧~'
|
||||
split-char: ','
|
||||
no-loot: '这个地方什么鱼都没有!'
|
||||
players-not-enough: '玩家数量不足,钓鱼比赛无法如期举行!'
|
||||
no-rank: '未上榜'
|
||||
force-competition-success: '成功强制进行钓鱼比赛!'
|
||||
force-competition-failure: '此比赛不存在!'
|
||||
force-competition-end: '已强制结束当前正在进行的比赛!'
|
||||
force-competition-cancel: '已强制取消当前正在进行的比赛!'
|
||||
hook-other-entity: '你的鱼钩被其他生物钩走了!'
|
||||
no-rod: '你必须使用特殊鱼竿才能获得战利品!'
|
||||
no-player: '虚位以待'
|
||||
no-score: '无分数'
|
||||
set-statistics: '成功将玩家 {Player} 的 {Loot} 捕获次数设置为 {Amount}'
|
||||
reset-statistics: '成功重置玩家 {Player} 的统计数据'
|
||||
negative-statistics: '不能设置此数据为负数'
|
||||
statistics-not-exist: '此统计数据不存在'
|
||||
total_score: '总分数'
|
||||
catch_amount: '捕鱼总数'
|
||||
max_size: '最大尺寸'
|
||||
total_size: '总尺寸'
|
||||
@@ -1,33 +1,32 @@
|
||||
#MiniMessage Format
|
||||
#https://docs.adventure.kyori.net/minimessage/format.html
|
||||
# Don't change this
|
||||
config-version: '26'
|
||||
|
||||
messages:
|
||||
prefix: '<gradient:#0070B3:#A0EACF>[CustomFishing] </gradient>'
|
||||
reload: '<white>Reloaded. Took <green>{time}ms.'
|
||||
item-not-exist: 'That item does not exist.'
|
||||
escape: 'The fish managed to get rid of the hook and escaped.'
|
||||
item-not-exist: 'Item not found.'
|
||||
escape: 'The fish slipped off the hook and escaped.'
|
||||
give-item: 'Successfully given player {player} {amount}x {item}.'
|
||||
get-item: 'Successfully got {amount}x {item}.'
|
||||
possible-loots: 'Possible loots here: '
|
||||
split-char: ', '
|
||||
competition-not-exist: 'Competition {id} does not exist.'
|
||||
no-competition-ongoing: 'There''s no competition ongoing.'
|
||||
stop-competition: 'Successfully stopped the current competition.'
|
||||
end-competition: 'Successfully ended the current competition.'
|
||||
no-competition-ongoing: "There's no competition ongoing."
|
||||
stop-competition: 'Stopped the current competition.'
|
||||
end-competition: 'Ended the current competition.'
|
||||
no-score: 'No Score'
|
||||
no-player: 'No Player'
|
||||
no-rank: 'No Rank'
|
||||
goal-catch-amount: 'Amount of fish caught'
|
||||
goal-max-size: 'Max size of the fish caught'
|
||||
goal-total-size: 'Total size of the fish caught'
|
||||
goal-total-score: 'Total score of the fish caught'
|
||||
unsafe-modification: 'You can''t edit a player''s fishing bag when the player is playing on another server that connected to the database'
|
||||
never-played: 'That player has never played the server. You can''t edit a non existent player''s fishing bag.'
|
||||
data-not-loaded: '<red>Your data has not been loaded yet. Try rejoining the server. If the problem still occurs, contact the server administrator.'
|
||||
open-market-gui: 'Successfully opened the market gui for {player}'
|
||||
open-fishing-bag: 'Successfully opened the fishing bag for {player}'
|
||||
goal-catch-amount: 'Fish count caught'
|
||||
goal-max-size: 'Largest fish caught'
|
||||
goal-total-size: 'Total length of fish caught'
|
||||
goal-total-score: 'Cumulative score of fish caught'
|
||||
unsafe-modification: "Cannot modify a player's fishing bag if they're active on another linked server."
|
||||
never-played: "The player hasn't joined the server before. Can't modify a nonexistent player's fishing bag."
|
||||
data-not-loaded: "<red>Data hasn't loaded. Please re-enter the server. If issues persist, reach out to the server admin."
|
||||
open-market-gui: "Successfully opened the market gui for {player}"
|
||||
open-fishing-bag: "Successfully opened the fishing bag for {player}"
|
||||
format-day: 'd'
|
||||
format-hour: 'h'
|
||||
format-minute: 'm'
|
||||
format-second: 's'
|
||||
format-second: 's'
|
||||
@@ -1,39 +0,0 @@
|
||||
#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.'
|
||||
item-not-exist: 'Ese itemartículo no existe!'
|
||||
player-not-exist: 'Ese jugador 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.'
|
||||
none-args: '¡Ningún argumento!'
|
||||
invalid-args: 'Argumentos no válidos'
|
||||
possible-loots: 'Posible pesca aquí: '
|
||||
reach-sell-limit: '¡Ganaste mucho dinero vendiendo pescado! Ven mañana.'
|
||||
split-char: ', '
|
||||
no-loot: '¡No hay peces en este lugar!'
|
||||
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!'
|
||||
hook-other-entity: '¡El bobber está enganchado a otra entidad!'
|
||||
no-rod: 'Hay que obtener una vara especial para conseguir botines'
|
||||
no-player: 'Ningún jugador'
|
||||
no-score: 'Sin puntuación'
|
||||
set-statistics: 'Correctamente establecido {Player} {Loot} estadísticas a {Amount}'
|
||||
reset-statistics: 'Reseteado con exito {Player} estadisticas'
|
||||
negative-statistics: 'El tiempo no puede ser inferior a 0'
|
||||
statistics-not-exist: 'Esta estadistica no existe'
|
||||
total_score: 'Total score'
|
||||
catch_amount: 'Catch amount'
|
||||
max_size: 'Max size'
|
||||
total_size: 'Total size'
|
||||
@@ -1,40 +0,0 @@
|
||||
#MiniMessage Format
|
||||
#https://docs.adventure.kyori.net/minimessage/format.html
|
||||
#(ler) / (lar) meeans -s in English, which makes words plural -translator
|
||||
messages:
|
||||
prefix: '<gradient:#0070B3:#A0EACF>[CustomFishing] </gradient>'
|
||||
reload: '<white>Yenilendi. <green>{time}ms <white>sürdü.'
|
||||
no-perm: 'Yeterli yetkin yok.'
|
||||
not-online: 'Bu oyuncu aktif değil.'
|
||||
item-not-exist: 'Böyle bir eşya bulunamadı.'
|
||||
player-not-exist: 'Böyle bir oyuncu bulunamadı.'
|
||||
escape: 'Balık çoktan tutuldu. Aman tanrım, o kaçtı.'
|
||||
give-item: '{Player} adlı oyuncuya {Amount}x {Item} verildi.'
|
||||
get-item: 'Başarıyla {Amount}x {Item} aldın.'
|
||||
no-console: 'Bu komut konsoldan çalıştırılamaz.'
|
||||
wrong-amount: 'Eşya miktarını negatif olarak belirleyemezsin.'
|
||||
lack-args: 'Yetersiz argüman(lar). (argüman örneği: /komut <argüman>)'
|
||||
none-args: 'Bir argüman girmelisin. (argüman örneği: /komut <argüman>)'
|
||||
invalid-args: 'Geçersiz argüman(lar). (argüman örneği: /komut <argüman>)'
|
||||
possible-loots: 'Şurada hazine olabilir: '
|
||||
split-char: ', '
|
||||
hook-other-entity: 'Olta başka bir canlıya bağlı.'
|
||||
reach-sell-limit: 'Balık satmaktan çok fazla para kazandın! Yarın gel.'
|
||||
no-loot: 'Burada balık yok.'
|
||||
players-not-enough: 'Balık tutma yarışmasının planlandığı gibi başlaması için yeterli oyuncu yok.'
|
||||
force-competition-success: 'Zorla bir balık tutma yarışması başlatıldı.'
|
||||
force-competition-failure: 'Böyle bir yarışma bulunamadı.'
|
||||
force-competition-end: 'Zorla mevcut yarışma sona erdirildi.'
|
||||
force-competition-cancel: 'Zorla yarışma iptal ettirildi.'
|
||||
no-rod: 'Hazineleri elde etmek için özel bir olta ile balık tutman lazım.'
|
||||
no-rank: 'Rütbe Yok'
|
||||
no-player: 'Oyuncu yok'
|
||||
no-score: 'Puan yok' #score is being translated to point here -translator
|
||||
set-statistics: '{Player} adlı oyuncunun {Loot} istatistikleri {Amount} ile başarıyla değiştirildi.'
|
||||
reset-statistics: '{Player} adlı oyuncunun istatistikleri başarıyla sıfırlandı.'
|
||||
negative-statistics: 'Miktar sıfırdan düşük olmayan bir şey olmalı.'
|
||||
statistics-not-exist: 'Böyle bir istatistik(ler) bulunamadı.'
|
||||
total_score: 'Total score'
|
||||
catch_amount: 'Catch amount'
|
||||
max_size: 'Max size'
|
||||
total_size: 'Total size'
|
||||
Reference in New Issue
Block a user