9
0
mirror of https://github.com/Xiao-MoMi/Custom-Fishing.git synced 2026-01-02 05:47:06 +00:00

checkpoint - 13

This commit is contained in:
XiaoMoMi
2024-06-12 02:24:09 +08:00
parent 388fbbc341
commit ccbfa68e04
29 changed files with 545 additions and 362 deletions

View File

@@ -15,11 +15,12 @@ public interface MessageConstants {
TranslatableComponent.Builder COMMAND_FISH_FINDER_SPLIT_CHAR = Component.translatable().key("command.fish_finder.split_char");
TranslatableComponent.Builder COMMAND_COMPETITION_FAILURE_NOT_EXIST = Component.translatable().key("command.competition.failure.not_exist");
TranslatableComponent.Builder COMMAND_COMPETITION_FAILURE_NO_COMPETITION = Component.translatable().key("command.competition.failure.no_competition");
TranslatableComponent.Builder COMMAND_COMPETITION_FAILURE_STOP_SUCCESS = Component.translatable().key("command.competition.failure.stop.success");
TranslatableComponent.Builder COMMAND_COMPETITION_FAILURE_END_SUCCESS = Component.translatable().key("command.competition.failure.end.success");
TranslatableComponent.Builder COMMAND_COMPETITION_START_SUCCESS = Component.translatable().key("command.competition.start.success");
TranslatableComponent.Builder COMMAND_COMPETITION_STOP_SUCCESS = Component.translatable().key("command.competition.stop.success");
TranslatableComponent.Builder COMMAND_COMPETITION_END_SUCCESS = Component.translatable().key("command.competition.end.success");
TranslatableComponent.Builder COMMAND_BAG_EDIT_FAILURE_UNSAFE = Component.translatable().key("command.bag.edit.failure.unsafe");
TranslatableComponent.Builder COMMAND_BAG_EDIT_FAILURE_NEVER_PLAYED = Component.translatable().key("command.bag.edit.failure.never_played");
TranslatableComponent.Builder COMMAND_BAG_OPEN_SUCCESS = Component.translatable().key("command.bag.edit.open.success");
TranslatableComponent.Builder COMMAND_BAG_OPEN_SUCCESS = Component.translatable().key("command.bag.open.success");
TranslatableComponent.Builder COMMAND_DATA_FAILURE_NOT_LOAD = Component.translatable().key("command.data.failure.not_load");
TranslatableComponent.Builder COMMAND_MARKET_OPEN_SUCCESS = Component.translatable().key("command.market.open.success");
TranslatableComponent.Builder GUI_SELECT_FILE = Component.translatable().key("gui.select_file");

View File

@@ -98,6 +98,11 @@ public class TranslationManager {
}
}
});
Locale localLocale = Locale.getDefault();
if (!this.installed.contains(localLocale)) {
plugin.getPluginLogger().warn(localLocale.toString().toLowerCase(Locale.ENGLISH) + ".yml not exists, using en.yml as default locale. Consider contributing if you have time for that. We appreciate your work!");
}
}
public static boolean isTranslationFile(Path path) {

View File

@@ -1,77 +0,0 @@
# file:
# JSON
# YAML
#
# local database
# SQLite
# H2 (preferred over SQLite)
#
# remote database
# MySQL
# MariaDB (preferred over MySQL)
# MongoDB
#
data-storage-method: H2
SQLite:
file: 'sqlite'
table-prefix: customfishing
H2:
file: 'h2'
table-prefix: customfishing
MySQL:
host: 'localhost'
port: '3306'
user: 'root'
password: 'password'
database: 'minecraft'
connection-parameters: '?autoReconnect=true&useSSL=false&useUnicode=true&characterEncoding=UTF-8'
Pool-Settings:
max-pool-size: 10
min-idle: 10
max-lifetime: 180000
keep-alive-time: 60000
time-out: 20000
table-prefix: customfishing
MariaDB:
host: 'localhost'
port: '3306'
user: 'root'
password: 'password'
database: 'minecraft'
connection-parameters: '?autoReconnect=true&useSSL=false&useUnicode=true&characterEncoding=UTF-8'
Pool-Settings:
max-pool-size: 10
min-idle: 10
max-lifetime: 180000
keep-alive-time: 60000
time-out: 20000
table-prefix: customfishing
MongoDB:
host: 'localhost'
port: '27017'
#user: 'root'
#password: 'password'
database: 'minecraft'
# If this section is not empty, it would override the configs above
# https://www.mongodb.com/docs/manual/reference/connection-string/
connection-uri: ''
collection-prefix: customfishing
# Redis is optional if you are using remote database
# If you do not know how to use Redis, please do not enable it
Redis:
enable: false
host: localhost
#password: "123456"
port: 6379
use-ssl: false
MaxTotal: 10
MaxIdle: 10
MinIdle: 1
MaxWaitMillis: 30000
MinEvictableIdleTimeMillis: 1800000

View File

@@ -1,55 +0,0 @@
#
# Don't change this
#
config-version: "${config_version}"
#
# Text format: https://docs.advntr.dev/minimessage/format
#
# You can disable the message by setting the value to "" (empty) for example
# commands.player.anvil.success: ""
#
# Methods for multiple lines:
# 1. "First line<newline>Second line"
# 2. key:
# - First line
# - Second line
#
exception.invalid_syntax: "<red>Invalid syntax. Correct syntax: <white><arg:0></white></red>"
exception.invalid_argument: "<red>Invalid argument. Reason: <white><arg:0></white></red>"
exception.invalid_sender: "<red><arg:0> is not allowed to execute that command. Must be of type <arg:1></red>"
exception.unexpected: "<red>An internal error occurred while attempting to perform this command</red>"
exception.no_permission: "<red>I'm sorry, but you do not have permission to perform this command</red>"
exception.no_such_command: "Unknown command."
argument.entity.notfound.player: "<red><lang:argument.entity.notfound.player></red>"
argument.entity.notfound.entity: "<red><lang:argument.entity.notfound.entity></red>"
argument.parse.failure.time: "<red>'<arg:0>' is not a valid time format</red>"
argument.parse.failure.material: "<red>'<arg:0>' is not a valid material name</red>"
argument.parse.failure.enchantment: "<red>'<arg:0>' is not a valid enchantment</red>"
argument.parse.failure.offlineplayer: "<red>No player found for input '<arg:0>'</red>"
argument.parse.failure.player: "<red>No player found for input '<arg:0>'</red>"
argument.parse.failure.world: "<red>'<arg:0>' is not a valid Minecraft world</red>"
argument.parse.failure.location.invalid_format: "<red>'<arg:0>' is not a valid location. Required format is '<arg:1> <arg:2> <arg:3></red>"
argument.parse.failure.location.mixed_local_absolute: "<red>Cannot mix local and absolute coordinates. (either all coordinates use '^' or none do)</red>"
argument.parse.failure.namespacedkey.namespace: "<red>Invalid namespace '<arg:0>'. Must be [a-z0-9._-]</red>"
argument.parse.failure.namespacedkey.key: "<red>Invalid key '<arg:0>'. Must be [a-z0-9/._-]</red>"
argument.parse.failure.namespacedkey.need_namespace: "<red>Invalid input '<arg:0>', requires an explicit namespace</red>"
argument.parse.failure.boolean: "<red>Could not parse boolean from '<arg:0>'</red>"
argument.parse.failure.number: "<red>'<arg:0>' is not a valid number in the range <arg:1> to <arg:2></red>"
argument.parse.failure.char: "<red>'<arg:0>' is not a valid character</red>"
argument.parse.failure.string: "<red>'<arg:0>' is not a valid string of type <arg:1></red>"
argument.parse.failure.uuid: "<red>'<arg:0>' is not a valid UUID</red>"
argument.parse.failure.enum: "<red>'<arg:0>' is not one of the following: <arg:1></red>"
argument.parse.failure.regex: "<red>'<arg:0>' does not match '<arg:1>'</red>"
argument.parse.failure.flag.unknown: "<red>Unknown flag '<arg:0>'</red>"
argument.parse.failure.flag.duplicate_flag: "<red>Duplicate flag '<arg:0>'</red>"
argument.parse.failure.flag.no_flag_started: "<red>No flag started. Don't know what to do with '<arg:0>'</red>"
argument.parse.failure.flag.missing_argument: "<red>Missing argument for '<arg:0>'</red>"
argument.parse.failure.flag.no_permission: "<red>You don't have permission to use '<arg:0>'</red>"
argument.parse.failure.color: "<red>'<arg:0>' is not a valid color</red>"
argument.parse.failure.duration: "<red>'<arg:0>' is not a duration format</red>"
argument.parse.failure.aggregate.missing: "<red>Missing component '<arg:0>'</red>"
argument.parse.failure.aggregate.failure: "<red>Invalid component '<arg:0>': <arg:1></red>"
argument.parse.failure.either: "<red>Could not resolve <arg:1> or <arg:2> from '<arg:0>'</red>"
argument.parse.failure.url: "<red>'<arg:0>' is not a valid URL</red>"
argument.parse.failure.namedtextcolor: "<red>'<arg:0>' is not a named text color</red>"