Skip to content

Commit

Permalink
Old Claim Commands Deprecation (Phase 2) (#1721)
Browse files Browse the repository at this point in the history
Made the old claim commands show the deprecation warning and not execute
anything.

closes #1646
  • Loading branch information
dmccoystephenson authored Jul 6, 2023
1 parent 43babd1 commit f78c17e
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -226,16 +226,16 @@ class MfFactionCommand(private val plugin: MedievalFactions) : CommandExecutor,
in devAliases -> factionDevCommand.onCommand(sender, command, label, args.drop(1).toTypedArray())
// Backwards compatibility:
in claimAutoAliases -> {
sender.sendMessage("${RED}Command deprecated, use \"/mf claim auto\" instead")
factionClaimAutoCommand.onCommand(sender, command, label, args.drop(1).toTypedArray())
sender.sendMessage("${RED}${plugin.language["DeprecationWarningAutoclaim"]}")
false
}
in claimFillAliases -> {
sender.sendMessage("${RED}Command deprecated, use \"/mf claim fill\" instead")
factionClaimFillCommand.onCommand(sender, command, label, args.drop(1).toTypedArray())
sender.sendMessage("${RED}${plugin.language["DeprecationWarningFillclaim"]}")
false
}
in claimCheckAliases -> {
sender.sendMessage("${RED}Command deprecated, use \"/mf claim check\" instead")
factionClaimCheckCommand.onCommand(sender, command, label, args.drop(1).toTypedArray())
sender.sendMessage("${RED}${plugin.language["DeprecationWarningCheckclaim"]}")
false
}
else -> {
sender.sendMessage("$AQUA${plugin.language["MedievalFactionsTitle", plugin.description.version]}")
Expand Down
3 changes: 3 additions & 0 deletions src/main/resources/lang/lang_de_DE.properties
Original file line number Diff line number Diff line change
Expand Up @@ -1066,6 +1066,9 @@ CommandFactionAddMemberUnknownNewPlayerFaction=Unbekanntes neues Mitglied
CommandFactionAddMemberSuccess=Dieser Spieler ist jetzt Mitglied der angegebenen Fraktion.
CommandFactionHelpAddMember=/faction addmember <player> <faction> - Fügt zwangsweise ein Mitglied zu einer Fraktion hinzu.
CommandFactionRoleSetPermissionCannotModifyRolePermissionToModifyOwnRolePermission=Du kannst die Berechtigung deiner Rolle nicht ändern, um die Berechtigungen deiner eigenen Rolle zu ändern.
DeprecationWarningAutoclaim=Befehl veraltet. Verwendest du stattdessen /f claim auto.
DeprecationWarningFillclaim=Befehl veraltet. Verwendest du stattdessen /f claim fill.
DeprecationWarningCheckclaim=Befehl veraltet. Verwendest du stattdessen /f claim check.
CommandFactionInviteFactionFull=Die Fraktion, zu der du diesen Spieler einladen möchtest, ist voll.
CommandFactionJoinFactionFull=Die Fraktion, der du beitreten möchtest, ist voll.
CommandFactionAddMemberTargetFactionFull=Die Fraktion, zu der du diesen Spieler hinzufügen möchtest, ist voll.
Expand Down
3 changes: 3 additions & 0 deletions src/main/resources/lang/lang_en_GB.properties
Original file line number Diff line number Diff line change
Expand Up @@ -1068,6 +1068,9 @@ CommandFactionInfoAlliesTitle=Allies:
CommandFactionInfoEnemiesTitle=Enemies:
BlockNotLocked=That block is not locked.
CommandFactionRoleSetPermissionCannotModifyRolePermissionToModifyOwnRolePermission=You cannot modify your role''s permission to modify your own role''s permissions.
DeprecationWarningAutoclaim=Command deprecated. Use /f claim auto instead.
DeprecationWarningFillclaim=Command deprecated. Use /f claim fill instead.
DeprecationWarningCheckclaim=Command deprecated. Use /f claim check instead.
CommandFactionInviteFactionFull=You cannot invite any more members to your faction.
CommandFactionJoinFactionFull=The faction you are trying to join is full.
CommandFactionAddMemberTargetFactionFull=The faction you are trying to add a member to is full.
Expand Down
6 changes: 4 additions & 2 deletions src/main/resources/lang/lang_en_US.properties
Original file line number Diff line number Diff line change
Expand Up @@ -1068,9 +1068,11 @@ CommandFactionInfoVassalsTitle=Vassals:
CommandFactionInfoAlliesTitle=Allies:
CommandFactionInfoEnemiesTitle=Enemies:
CommandFactionRoleSetPermissionCannotModifyRolePermissionToModifyOwnRolePermission=You cannot modify your role''s permission to modify your own role''s permissions.
DeprecationWarningAutoclaim=Command deprecated. Use /f claim auto instead.
DeprecationWarningFillclaim=Command deprecated. Use /f claim fill instead.
DeprecationWarningCheckclaim=Command deprecated. Use /f claim check instead.
CommandFactionInviteFactionFull=You cannot invite any more members to your faction.
CommandFactionJoinFactionFull=The faction you are trying to join is full.
CommandFactionAddMemberTargetFactionFull=The faction you are trying to add a member to is full.
PlayerInteractEntityFailedToSavePlayer=Failed to save player.
PlayerInteractEntityCannotTradeWithVillager=You cannot trade with this villager.
PlayerInteractEntityCannotTradeWithVillager=You cannot trade with this villager.
3 changes: 3 additions & 0 deletions src/main/resources/lang/lang_fr_FR.properties
Original file line number Diff line number Diff line change
Expand Up @@ -1068,6 +1068,9 @@ CommandFactionAddMemberSuccess=Ce joueur est maintenant membre de la faction sp
CommandFactionHelpAddMember=/faction addmember <joueur> <faction> - Ajoute de force un membre à une faction.
BlockNotLocked=Ce bloc n'est pas verrouillé.
CommandFactionRoleSetPermissionCannotModifyRolePermissionToModifyOwnRolePermission=Vous ne pouvez pas modifier les autorisations de votre r\u00e9le pour modifier les autorisations de votre propre r\u00e9le.
DeprecationWarningAutoclaim=La commande /f autoclaim est obsolète. Utilisez /f claim auto à la place.
DeprecationWarningFillclaim=La commande /f fillclaim est obsolète. Utilisez /f claim fill à la place.
DeprecationWarningCheckclaim=La commande /f checkclaim est obsolète. Utilisez /f claim check à la place.
CommandFactionInviteFactionFull=La faction est pleine.
CommandFactionJoinFactionFull=La faction est pleine.
CommandFactionAddMemberTargetFactionFull=La faction est pleine.
Expand Down

0 comments on commit f78c17e

Please sign in to comment.