Skip to content

Commit

Permalink
Added informative message for bypass island restrictions for players …
Browse files Browse the repository at this point in the history
…that has the permission to use the bypass command
  • Loading branch information
OmerBenGera committed May 4, 2022
1 parent afba5e5 commit 4c7a062
Show file tree
Hide file tree
Showing 10 changed files with 16 additions and 0 deletions.
Expand Up @@ -2,6 +2,7 @@

import com.bgsoftware.common.config.CommentedConfiguration;
import com.bgsoftware.superiorskyblock.SuperiorSkyblockPlugin;
import com.bgsoftware.superiorskyblock.api.commands.SuperiorCommand;
import com.bgsoftware.superiorskyblock.api.wrappers.SuperiorPlayer;
import com.bgsoftware.superiorskyblock.formatting.Formatters;
import com.bgsoftware.superiorskyblock.lang.component.IMessageComponent;
Expand Down Expand Up @@ -470,6 +471,7 @@ public enum Message {
ISLAND_PREVIEW_CONFIRM_TEXT,
ISLAND_PREVIEW_START,
ISLAND_PROTECTED,
ISLAND_PROTECTED_OPPED,
ISLAND_TEAM_STATUS_FOOTER,
ISLAND_TEAM_STATUS_HEADER,
ISLAND_TEAM_STATUS_OFFLINE,
Expand Down Expand Up @@ -741,6 +743,11 @@ public void send(CommandSender sender, Locale locale, Object... args) {

if (noInteractMessages.add(playerUUID)) {
Message.ISLAND_PROTECTED.send(sender, locale, args);

SuperiorCommand bypassCommand = plugin.getCommands().getAdminCommand("bypass");

if (bypassCommand != null && sender.hasPermission(bypassCommand.getPermission()))
Message.ISLAND_PROTECTED_OPPED.send(sender, locale, args);
}
}
},
Expand Down
1 change: 1 addition & 0 deletions src/main/resources/lang/de-DE.yml
Expand Up @@ -605,6 +605,7 @@ ISLAND_PREVIEW_START: |
&e&lVorschau | &7Gebe &a&lCONFIRM &7 ein, um eine neue Insel zu erstellen, oder &c&lCANCEL &7, um den Vorschaumodus abzubrechen.
&e&lVorschau | &7Du kannst das Inselgebiet nicht verlassen, sonst wird der Vorschaumodus automatisch abgebrochen.
ISLAND_PROTECTED: '&c&lError | &7Diese Insel ist geschützt.'
ISLAND_PROTECTED_OPPED: '&7&oYou can bypass this restriction by using "/is admin bypass".'
ISLAND_TEAM_STATUS_FOOTER: ''
ISLAND_TEAM_STATUS_HEADER: '&e&lInsel | &7Mitglieder von {0}´s Insel &8[&e{1}&8/&e{2}&8]&7:'
ISLAND_TEAM_STATUS_OFFLINE: '&c(Offline)'
Expand Down
1 change: 1 addition & 0 deletions src/main/resources/lang/en-US.yml
Expand Up @@ -485,6 +485,7 @@ ISLAND_PREVIEW_START: |
&e&lPreview | &7Type &a&lCONFIRM &7to create a new island, or &c&lCANCEL &7to cancel the preview mode.
&e&lPreview | &7You cannot leave the area of the island, otherwise the preview mode will be cancelled automatically.
ISLAND_PROTECTED: '&c&lError | &7This island is protected.'
ISLAND_PROTECTED_OPPED: '&7&oYou can bypass this restriction by using "/is admin bypass".'
ISLAND_TEAM_STATUS_FOOTER: ''
ISLAND_TEAM_STATUS_HEADER: '&e&lIsland | &7Members of {0}''s Island &8[&e{1}&8/&e{2}&8]&7:'
ISLAND_TEAM_STATUS_OFFLINE: '&c(Offline)'
Expand Down
1 change: 1 addition & 0 deletions src/main/resources/lang/es-ES.yml
Expand Up @@ -485,6 +485,7 @@ ISLAND_PREVIEW_START: |
&e&lVista Previa | &7Type &a&lCONFIRM &7para crear una nueva isla, o &c&lCANCELAR &7para cancelar el modo de vista previa.
&e&lVista Previa | &7No puede salir del área de la isla, de lo contrario el modo de vista previa se cancelará automáticamente.
ISLAND_PROTECTED: '&c&lError | &7Esta isla está protegida.'
ISLAND_PROTECTED_OPPED: '&7&oYou can bypass this restriction by using "/is admin bypass".'
ISLAND_TEAM_STATUS_FOOTER: ''
ISLAND_TEAM_STATUS_HEADER: '&e&lIsla | &7Miembros de la isla de {0} &8[&e{1}&8/&e{2}&8]&7:'
ISLAND_TEAM_STATUS_OFFLINE: '&c(Desconectado)'
Expand Down
1 change: 1 addition & 0 deletions src/main/resources/lang/fr-FR.yml
Expand Up @@ -487,6 +487,7 @@ ISLAND_PREVIEW_START: |
&e&lPrévisualisation | &7Tapez &a&lCONFIRMER &7pour séléctionner cette île, ou &c&lANNULER &7pour annuler la prévisualisation.
&e&lPrévisualisation | &7Si vous quittez la zone de l'île, la prévisualisation sera désactivée.
ISLAND_PROTECTED: '&c&lErreur | &7Cette île est protégée.'
ISLAND_PROTECTED_OPPED: '&7&oYou can bypass this restriction by using "/is admin bypass".'
ISLAND_TEAM_STATUS_FOOTER: ''
ISLAND_TEAM_STATUS_HEADER: '&e&lIle | &7Membres de l''île de {0} &8[&e{1}&8/&e{2}&8]&7:'
ISLAND_TEAM_STATUS_OFFLINE: '&c(Hors Ligne)'
Expand Down
1 change: 1 addition & 0 deletions src/main/resources/lang/it-IT.yml
Expand Up @@ -490,6 +490,7 @@ ISLAND_PREVIEW_START: |
&e&lAnteprima | &7Scrivi &a&lCONFIRM &7per creare una nuova isola, oppure &c&lCANCEL &7per annullare la modalità di anteprima.
&e&lAnteprima | &7Non è possibile lasciare l'area dell'isola, altrimenti la modalità anteprima verrà annullata automaticamente.
ISLAND_PROTECTED: '&c&lErrore | &7Quest''isola è protetta.'
ISLAND_PROTECTED_OPPED: '&7&oYou can bypass this restriction by using "/is admin bypass".'
ISLAND_TEAM_STATUS_FOOTER: ''
ISLAND_TEAM_STATUS_HEADER: '&e&lIsola | &7Membri dell''isola di {0} &8[&e{1}&8/&e{2}&8]&7:'
ISLAND_TEAM_STATUS_OFFLINE: '&c(Disconnesso)'
Expand Down
1 change: 1 addition & 0 deletions src/main/resources/lang/iw-IL.yml
Expand Up @@ -503,6 +503,7 @@ ISLAND_PREVIEW_START: |
&e&lPreview | &7Type &a&lCONFIRM &7to create a new island, or &c&lCANCEL &7to cancel the preview mode.
&e&lPreview | &7You cannot leave the area of the island, otherwise the preview mode will be cancelled automatically.
ISLAND_PROTECTED: '&c&lהאיגש | &7ןגומ הזה יאה.'
ISLAND_PROTECTED_OPPED: '&7&oYou can bypass this restriction by using "/is admin bypass".'
ISLAND_TEAM_STATUS_FOOTER: ''
ISLAND_TEAM_STATUS_HEADER: '&e&lיא | &7 לש יאה לש םינקחשה {0} &8[&e{1}&8/&e{2}&8]&7:'
ISLAND_TEAM_STATUS_OFFLINE: '&c(קתונמ)'
Expand Down
1 change: 1 addition & 0 deletions src/main/resources/lang/pl-PL.yml
Expand Up @@ -487,6 +487,7 @@ ISLAND_PREVIEW_START: |
&e&lPodglad | &7Wpisz &a&lCONFIRM &7by stworzyc nowa wyspe, lub &c&lCANCEL &7by wylaczyc tryb podladu.
&e&lPodglad | &7Nie mozesz opuscic terenu wyspy, w przeciwnym razie tryb podgladowy zostanie anulowany.
ISLAND_PROTECTED: '&c&lBlad | &7Ta wyspa jest zabezpieczona.'
ISLAND_PROTECTED_OPPED: '&7&oYou can bypass this restriction by using "/is admin bypass".'
ISLAND_TEAM_STATUS_FOOTER: ''
ISLAND_TEAM_STATUS_HEADER: '&e&lWyspa | &7Czlonkowie {0}''s Wyspy &8[&e{1}&8/&e{2}&8]&7:'
ISLAND_TEAM_STATUS_OFFLINE: '&c(Offline)'
Expand Down
1 change: 1 addition & 0 deletions src/main/resources/lang/vi-VN.yml
Expand Up @@ -541,6 +541,7 @@ ISLAND_PREVIEW_START: |
&e&lXem Trước | &7Nhập &a&lDONG-Y &7để tạo đảo mới, hoặc &c&lHUY-BO &7để dừng chế độ xem trước.
&e&lXem Trước | &7Bạn không thể rời khỏi khu vực của hòn đảo, nếu không chế độ xem trước sẽ tự động bị hủy.
ISLAND_PROTECTED: '&c&lLỗi | &7Hòn đảo này được bảo vệ.'
ISLAND_PROTECTED_OPPED: '&7&oYou can bypass this restriction by using "/is admin bypass".'
ISLAND_TEAM_STATUS_FOOTER: ''
ISLAND_TEAM_STATUS_HEADER: '&e&lĐảo | &7Thành viên đảo của {0} &8[&e{1}&8/&e{2}&8]&7:'
ISLAND_TEAM_STATUS_OFFLINE: '&c(Ngoại tuyến)'
Expand Down
1 change: 1 addition & 0 deletions src/main/resources/lang/zh-CN.yml
Expand Up @@ -485,6 +485,7 @@ ISLAND_PREVIEW_START: |
&e&lPreview | &7Type &a&lCONFIRM &7to create a new island, or &c&lCANCEL &7to cancel the preview mode.
&e&lPreview | &7You cannot leave the area of the island, otherwise the preview mode will be cancelled automatically.
ISLAND_PROTECTED: '&c&l错误 | &7岛屿保护.'
ISLAND_PROTECTED_OPPED: '&7&oYou can bypass this restriction by using "/is admin bypass".'
ISLAND_TEAM_STATUS_FOOTER: ''
ISLAND_TEAM_STATUS_HEADER: '&e&l岛屿 | &b{0} &7的岛屿成员 &8[&e{1}&8/&e{2}&8]&7:'
ISLAND_TEAM_STATUS_OFFLINE: '&c(离线)'
Expand Down

0 comments on commit 4c7a062

Please sign in to comment.