diff --git a/docs/changelog_v3.3.x.md b/docs/changelog_v3.3.x.md index a5c73f805..ec162b514 100644 --- a/docs/changelog_v3.3.x.md +++ b/docs/changelog_v3.3.x.md @@ -14,7 +14,12 @@ These change logs represent the work that has been going on within prison. -# 3.3.0-alpha.17 2024-04-28 +# 3.3.0-alpha.17 2024-04-29 + + +* **Initial setup of the GUI tools messages that are at the bottom of a page.** +Setup the handling of the messages and added the messages to all of the language files. +Support for prior, current, and next page. Also close. * **Update the plugin.yml and removed the permissions configs since they were generating errors (lack of a schema) and the perms and handled through the prison command handler.** diff --git a/prison-core/src/main/java/tech/mcprison/prison/gui/PrisonCoreGuiMessages.java b/prison-core/src/main/java/tech/mcprison/prison/gui/PrisonCoreGuiMessages.java index 35904f79d..6f4406150 100644 --- a/prison-core/src/main/java/tech/mcprison/prison/gui/PrisonCoreGuiMessages.java +++ b/prison-core/src/main/java/tech/mcprison/prison/gui/PrisonCoreGuiMessages.java @@ -138,6 +138,58 @@ protected String guiPagePriorMsg() { .getLocalizable( "core_gui__page_prior" ) .localize(); } + + protected String guiPageToolsCloseMsg() { + + return Prison.get().getLocaleManager() + .getLocalizable( "core_gui__page_tools_close" ) + .localize(); + } + private String formmatPageToolsPlaceholders( String msg, int currentPage, int maxPage ) { + + int priorPage = currentPage == 1 ? 1 : currentPage - 1; + int nextPage = currentPage == maxPage ? maxPage : currentPage + 1; + + msg = msg.replace("{prior_page}", Integer.toString(priorPage) ) + .replace("{current_page}", Integer.toString(currentPage)) + .replace("{next_page}", Integer.toString(nextPage)) + .replace("{max_page}", Integer.toString(maxPage)) + ; + + return msg; + } + protected String guiPageToolsCloseMsg( int currentPage, int maxPage ) { + + String msg = Prison.get().getLocaleManager() + .getLocalizable( "core_gui__page_tools_close" ) + .localize(); + + return formmatPageToolsPlaceholders( msg, currentPage, maxPage ); + } + protected String guiPageToolsPriorPageMsg( int currentPage, int maxPage ) { + + String msg = Prison.get().getLocaleManager() + .getLocalizable( "core_gui__page_tools_prior_page" ) + .localize(); + + return formmatPageToolsPlaceholders( msg, currentPage, maxPage ); + } + protected String guiPageToolsCurrentPageMsg( int currentPage, int maxPage ) { + + String msg = Prison.get().getLocaleManager() + .getLocalizable( "core_gui__page_tools_current_page" ) + .localize(); + + return formmatPageToolsPlaceholders( msg, currentPage, maxPage ); + } + protected String guiPageToolsNextPageMsg( int currentPage, int maxPage ) { + + String msg = Prison.get().getLocaleManager() + .getLocalizable( "core_gui__page_tools_next_page" ) + .localize(); + + return formmatPageToolsPlaceholders( msg, currentPage, maxPage ); + } protected String guiPriceMsg( Double price ) { diff --git a/prison-core/src/main/resources/lang/core/de_DE.properties b/prison-core/src/main/resources/lang/core/de_DE.properties index 6697897e9..1b6528f90 100644 --- a/prison-core/src/main/resources/lang/core/de_DE.properties +++ b/prison-core/src/main/resources/lang/core/de_DE.properties @@ -79,7 +79,7 @@ # like to share, please contact a staff member on our Discord server. #Thanks for your contributions! # -messages__version=9 +messages__version=10 messages__auto_refresh=true @@ -182,6 +182,15 @@ core_gui__right_click_and_shift_to_toggle=&3Right-Click and shift to toggle. core_gui__page_next=&3Next page. core_gui__page_prior=&3Prior page. +# Note: The core_gui__page_tools_ messages all use the following placeholders +# so you can structure them any way you need to. You not no have to use +# any of them, but you can also use all of them. +# {prior_page} {current_page} {next_page} {max_page} +core_gui__page_tools_close=&3Close +core_gui__page_tools_prior_page=&3Prior page: {prior_page} of {max_page} +core_gui__page_tools_current_page=&3Current page: {current_page} of {max_page} +core_gui__page_tools_next_page=&3Next page: {next_page} of {max_page} + core_gui__money_earned=&3You earned &a$%1 core_gui__price=&3Price: %1 diff --git a/prison-core/src/main/resources/lang/core/en_GB.properties b/prison-core/src/main/resources/lang/core/en_GB.properties index c464867c9..0b45c3642 100644 --- a/prison-core/src/main/resources/lang/core/en_GB.properties +++ b/prison-core/src/main/resources/lang/core/en_GB.properties @@ -76,7 +76,7 @@ # like to share, please contact a staff member on our Discord server. #Thanks for your contributions! # -messages__version=9 +messages__version=10 messages__auto_refresh=true @@ -182,6 +182,15 @@ core_gui__right_click_and_shift_to_toggle=&3Right-Click and shift to toggle. core_gui__page_next=&3Next page. core_gui__page_prior=&3Prior page. +# Note: The core_gui__page_tools_ messages all use the following placeholders +# so you can structure them any way you need to. You not no have to use +# any of them, but you can also use all of them. +# {prior_page} {current_page} {next_page} {max_page} +core_gui__page_tools_close=&3Close +core_gui__page_tools_prior_page=&3Prior page: {prior_page} of {max_page} +core_gui__page_tools_current_page=&3Current page: {current_page} of {max_page} +core_gui__page_tools_next_page=&3Next page: {next_page} of {max_page} + core_gui__money_earned=&3You earned &a$%1 core_gui__price=&3Price: %1 diff --git a/prison-core/src/main/resources/lang/core/en_US.properties b/prison-core/src/main/resources/lang/core/en_US.properties index 6d0e97f29..597163676 100644 --- a/prison-core/src/main/resources/lang/core/en_US.properties +++ b/prison-core/src/main/resources/lang/core/en_US.properties @@ -76,7 +76,7 @@ # like to share, please contact a staff member on our Discord server. #Thanks for your contributions! # -messages__version=10 +messages__version=11 messages__auto_refresh=true @@ -182,6 +182,15 @@ core_gui__right_click_and_shift_to_toggle=&3Right-Click and shift to toggle. core_gui__page_next=&3Next page. core_gui__page_prior=&3Prior page. +# Note: The core_gui__page_tools_ messages all use the following placeholders +# so you can structure them any way you need to. You not no have to use +# any of them, but you can also use all of them. +# {prior_page} {current_page} {next_page} {max_page} +core_gui__page_tools_close=&3Close +core_gui__page_tools_prior_page=&3Prior page: {prior_page} of {max_page} +core_gui__page_tools_current_page=&3Current page: {current_page} of {max_page} +core_gui__page_tools_next_page=&3Next page: {next_page} of {max_page} + core_gui__money_earned=&3You earned &a$%1 core_gui__price=&3Price: %1 diff --git a/prison-core/src/main/resources/lang/core/es_ES.properties b/prison-core/src/main/resources/lang/core/es_ES.properties index 68f1693de..d0adba4eb 100644 --- a/prison-core/src/main/resources/lang/core/es_ES.properties +++ b/prison-core/src/main/resources/lang/core/es_ES.properties @@ -76,7 +76,7 @@ # like to share, please contact a staff member on our Discord server. #Thanks for your contributions! # -messages__version=9 +messages__version=10 messages__auto_refresh=true @@ -182,6 +182,15 @@ core_gui__right_click_and_shift_to_toggle=&3Right-Click and shift to toggle. core_gui__page_next=&3Next page. core_gui__page_prior=&3Prior page. +# Note: The core_gui__page_tools_ messages all use the following placeholders +# so you can structure them any way you need to. You not no have to use +# any of them, but you can also use all of them. +# {prior_page} {current_page} {next_page} {max_page} +core_gui__page_tools_close=&3Close +core_gui__page_tools_prior_page=&3Prior page: {prior_page} of {max_page} +core_gui__page_tools_current_page=&3Current page: {current_page} of {max_page} +core_gui__page_tools_next_page=&3Next page: {next_page} of {max_page} + core_gui__money_earned=&3You earned &a$%1 core_gui__price=&3Price: %1 diff --git a/prison-core/src/main/resources/lang/core/fi_FI.properties b/prison-core/src/main/resources/lang/core/fi_FI.properties index 724ddc12d..0674ff645 100644 --- a/prison-core/src/main/resources/lang/core/fi_FI.properties +++ b/prison-core/src/main/resources/lang/core/fi_FI.properties @@ -76,7 +76,7 @@ # like to share, please contact a staff member on our Discord server. #Thanks for your contributions! # -messages__version=10 +messages__version=11 messages__auto_refresh=true @@ -182,6 +182,15 @@ core_gui__right_click_and_shift_to_toggle=&3Right-Click and shift to toggle. core_gui__page_next=&3Next page. core_gui__page_prior=&3Prior page. +# Note: The core_gui__page_tools_ messages all use the following placeholders +# so you can structure them any way you need to. You not no have to use +# any of them, but you can also use all of them. +# {prior_page} {current_page} {next_page} {max_page} +core_gui__page_tools_close=&3Close +core_gui__page_tools_prior_page=&3Prior page: {prior_page} of {max_page} +core_gui__page_tools_current_page=&3Current page: {current_page} of {max_page} +core_gui__page_tools_next_page=&3Next page: {next_page} of {max_page} + core_gui__money_earned=&3You earned &a$%1 core_gui__price=&3Price: %1 diff --git a/prison-core/src/main/resources/lang/core/fr_FR.properties b/prison-core/src/main/resources/lang/core/fr_FR.properties index cfa59876b..073fe9206 100644 --- a/prison-core/src/main/resources/lang/core/fr_FR.properties +++ b/prison-core/src/main/resources/lang/core/fr_FR.properties @@ -76,7 +76,7 @@ # like to share, please contact a staff member on our Discord server. #Thanks for your contributions! # -messages__version=10 +messages__version=11 messages__auto_refresh=true @@ -182,6 +182,15 @@ core_gui__right_click_and_shift_to_toggle=&3Clique-droit et maj pour basculer. core_gui__page_next=&3Page suivante. core_gui__page_prior=&3Page précedente. +# Note: The core_gui__page_tools_ messages all use the following placeholders +# so you can structure them any way you need to. You not no have to use +# any of them, but you can also use all of them. +# {prior_page} {current_page} {next_page} {max_page} +core_gui__page_tools_close=&3Close +core_gui__page_tools_prior_page=&3Prior page: {prior_page} of {max_page} +core_gui__page_tools_current_page=&3Current page: {current_page} of {max_page} +core_gui__page_tools_next_page=&3Next page: {next_page} of {max_page} + core_gui__money_earned=&3Vous avez gagné &a$%1 core_gui__price=&3Prix: %1 diff --git a/prison-core/src/main/resources/lang/core/hu_HU.properties b/prison-core/src/main/resources/lang/core/hu_HU.properties index 2d5d92351..b4073a609 100644 --- a/prison-core/src/main/resources/lang/core/hu_HU.properties +++ b/prison-core/src/main/resources/lang/core/hu_HU.properties @@ -76,7 +76,7 @@ # like to share, please contact a staff member on our Discord server. #Thanks for your contributions! # -messages__version=9 +messages__version=10 messages__auto_refresh=true @@ -182,6 +182,15 @@ core_gui__right_click_and_shift_to_toggle=&3Right-Click and shift to toggle. core_gui__page_next=&3Next page. core_gui__page_prior=&3Prior page. +# Note: The core_gui__page_tools_ messages all use the following placeholders +# so you can structure them any way you need to. You not no have to use +# any of them, but you can also use all of them. +# {prior_page} {current_page} {next_page} {max_page} +core_gui__page_tools_close=&3Close +core_gui__page_tools_prior_page=&3Prior page: {prior_page} of {max_page} +core_gui__page_tools_current_page=&3Current page: {current_page} of {max_page} +core_gui__page_tools_next_page=&3Next page: {next_page} of {max_page} + core_gui__money_earned=&3You earned &a$%1 core_gui__price=&3Price: %1 diff --git a/prison-core/src/main/resources/lang/core/it_IT.properties b/prison-core/src/main/resources/lang/core/it_IT.properties index 3ad654dc4..e71de8c6a 100644 --- a/prison-core/src/main/resources/lang/core/it_IT.properties +++ b/prison-core/src/main/resources/lang/core/it_IT.properties @@ -76,7 +76,7 @@ # like to share, please contact a staff member on our Discord server. #Thanks for your contributions! # -messages__version=9 +messages__version=10 messages__auto_refresh=true @@ -182,6 +182,15 @@ core_gui__right_click_and_shift_to_toggle=&3Right-Click and shift to toggle. core_gui__page_next=&3Next page. core_gui__page_prior=&3Prior page. +# Note: The core_gui__page_tools_ messages all use the following placeholders +# so you can structure them any way you need to. You not no have to use +# any of them, but you can also use all of them. +# {prior_page} {current_page} {next_page} {max_page} +core_gui__page_tools_close=&3Close +core_gui__page_tools_prior_page=&3Prior page: {prior_page} of {max_page} +core_gui__page_tools_current_page=&3Current page: {current_page} of {max_page} +core_gui__page_tools_next_page=&3Next page: {next_page} of {max_page} + core_gui__money_earned=&3You earned &a$%1 core_gui__price=&3Price: %1 diff --git a/prison-core/src/main/resources/lang/core/nl_BE.properties b/prison-core/src/main/resources/lang/core/nl_BE.properties index 8a5e13c54..d7bc76f04 100644 --- a/prison-core/src/main/resources/lang/core/nl_BE.properties +++ b/prison-core/src/main/resources/lang/core/nl_BE.properties @@ -76,7 +76,7 @@ # like to share, please contact a staff member on our Discord server. #Thanks for your contributions! # -messages__version=9 +messages__version=10 messages__auto_refresh=true @@ -182,6 +182,15 @@ core_gui__right_click_and_shift_to_toggle=&3Right-Click and shift to toggle. core_gui__page_next=&3Next page. core_gui__page_prior=&3Prior page. +# Note: The core_gui__page_tools_ messages all use the following placeholders +# so you can structure them any way you need to. You not no have to use +# any of them, but you can also use all of them. +# {prior_page} {current_page} {next_page} {max_page} +core_gui__page_tools_close=&3Close +core_gui__page_tools_prior_page=&3Prior page: {prior_page} of {max_page} +core_gui__page_tools_current_page=&3Current page: {current_page} of {max_page} +core_gui__page_tools_next_page=&3Next page: {next_page} of {max_page} + core_gui__money_earned=&3You earned &a$%1 core_gui__price=&3Price: %1 diff --git a/prison-core/src/main/resources/lang/core/nl_NL.properties b/prison-core/src/main/resources/lang/core/nl_NL.properties index 9560116bf..1eba1da5a 100644 --- a/prison-core/src/main/resources/lang/core/nl_NL.properties +++ b/prison-core/src/main/resources/lang/core/nl_NL.properties @@ -76,7 +76,7 @@ # like to share, please contact a staff member on our Discord server. #Thanks for your contributions! # -messages__version=9 +messages__version=10 messages__auto_refresh=true @@ -182,6 +182,15 @@ core_gui__right_click_and_shift_to_toggle=&3Right-Click and shift to toggle. core_gui__page_next=&3Next page. core_gui__page_prior=&3Prior page. +# Note: The core_gui__page_tools_ messages all use the following placeholders +# so you can structure them any way you need to. You not no have to use +# any of them, but you can also use all of them. +# {prior_page} {current_page} {next_page} {max_page} +core_gui__page_tools_close=&3Close +core_gui__page_tools_prior_page=&3Prior page: {prior_page} of {max_page} +core_gui__page_tools_current_page=&3Current page: {current_page} of {max_page} +core_gui__page_tools_next_page=&3Next page: {next_page} of {max_page} + core_gui__money_earned=&3You earned &a$%1 core_gui__price=&3Price: %1 diff --git a/prison-core/src/main/resources/lang/core/pt_PT.properties b/prison-core/src/main/resources/lang/core/pt_PT.properties index c3776f21d..813a39b0e 100644 --- a/prison-core/src/main/resources/lang/core/pt_PT.properties +++ b/prison-core/src/main/resources/lang/core/pt_PT.properties @@ -76,7 +76,7 @@ # like to share, please contact a staff member on our Discord server. #Thanks for your contributions! # -messages__version=5 +messages__version=6 messages__auto_refresh=true @@ -182,6 +182,15 @@ core_gui__right_click_and_shift_to_toggle=&3Clique-Direito e shift para ativar/d core_gui__page_next=&3Pagina seguinte. core_gui__page_prior=&3Pagina anterior. +# Note: The core_gui__page_tools_ messages all use the following placeholders +# so you can structure them any way you need to. You not no have to use +# any of them, but you can also use all of them. +# {prior_page} {current_page} {next_page} {max_page} +core_gui__page_tools_close=&3Close +core_gui__page_tools_prior_page=&3Prior page: {prior_page} of {max_page} +core_gui__page_tools_current_page=&3Current page: {current_page} of {max_page} +core_gui__page_tools_next_page=&3Next page: {next_page} of {max_page} + core_gui__money_earned=&3You earned &a$%1 core_gui__price=&3Preco: %1 diff --git a/prison-core/src/main/resources/lang/core/ro_RO.properties b/prison-core/src/main/resources/lang/core/ro_RO.properties index 1c7170fa5..4322a22fc 100644 --- a/prison-core/src/main/resources/lang/core/ro_RO.properties +++ b/prison-core/src/main/resources/lang/core/ro_RO.properties @@ -76,7 +76,7 @@ # -messages__version=4 +messages__version=5 messages__auto_refresh=true @@ -182,6 +182,15 @@ core_gui__right_click_and_shift_to_toggle=&3Right-Click and shift to toggle. core_gui__page_next=&3Next page. core_gui__page_prior=&3Prior page. +# Note: The core_gui__page_tools_ messages all use the following placeholders +# so you can structure them any way you need to. You not no have to use +# any of them, but you can also use all of them. +# {prior_page} {current_page} {next_page} {max_page} +core_gui__page_tools_close=&3Close +core_gui__page_tools_prior_page=&3Prior page: {prior_page} of {max_page} +core_gui__page_tools_current_page=&3Current page: {current_page} of {max_page} +core_gui__page_tools_next_page=&3Next page: {next_page} of {max_page} + core_gui__money_earned=&3You earned &a$%1 core_gui__price=&3Price: %1 diff --git a/prison-core/src/main/resources/lang/core/zh-CN.properties b/prison-core/src/main/resources/lang/core/zh-CN.properties index 86f6b9a6a..45dea7d4a 100644 --- a/prison-core/src/main/resources/lang/core/zh-CN.properties +++ b/prison-core/src/main/resources/lang/core/zh-CN.properties @@ -76,7 +76,7 @@ # like to share, please contact a staff member on our Discord server. #Thanks for your contributions! # -messages__version=8 +messages__version=9 messages__auto_refresh=true @@ -182,6 +182,15 @@ core_gui__right_click_and_shift_to_toggle=&3右键单击并按住shift键切换 core_gui__page_next=&3下一页 core_gui__page_prior=&3上一页 +# Note: The core_gui__page_tools_ messages all use the following placeholders +# so you can structure them any way you need to. You not no have to use +# any of them, but you can also use all of them. +# {prior_page} {current_page} {next_page} {max_page} +core_gui__page_tools_close=&3Close +core_gui__page_tools_prior_page=&3Prior page: {prior_page} of {max_page} +core_gui__page_tools_current_page=&3Current page: {current_page} of {max_page} +core_gui__page_tools_next_page=&3Next page: {next_page} of {max_page} + core_gui__money_earned=&3You earned &a$%1 core_gui__price=&3价格:%1 diff --git a/prison-core/src/main/resources/lang/core/zh_TW.properties b/prison-core/src/main/resources/lang/core/zh_TW.properties index 0d605c9e4..754f827cb 100644 --- a/prison-core/src/main/resources/lang/core/zh_TW.properties +++ b/prison-core/src/main/resources/lang/core/zh_TW.properties @@ -76,7 +76,7 @@ # like to share, please contact a staff member on our Discord server. #Thanks for your contributions! # -messages__version=9 +messages__version=10 messages__auto_refresh=true @@ -182,6 +182,15 @@ core_gui__right_click_and_shift_to_toggle=&3Right-Click and shift to toggle. core_gui__page_next=&3Next page. core_gui__page_prior=&3Prior page. +# Note: The core_gui__page_tools_ messages all use the following placeholders +# so you can structure them any way you need to. You not no have to use +# any of them, but you can also use all of them. +# {prior_page} {current_page} {next_page} {max_page} +core_gui__page_tools_close=&3Close +core_gui__page_tools_prior_page=&3Prior page: {prior_page} of {max_page} +core_gui__page_tools_current_page=&3Current page: {current_page} of {max_page} +core_gui__page_tools_next_page=&3Next page: {next_page} of {max_page} + core_gui__money_earned=&3You earned &a$%1 core_gui__price=&3Price: %1