Skip to content

Commit

Permalink
Fix npe thrown from /plot group add when group name is not specified. (
Browse files Browse the repository at this point in the history
…#3630)

* Fix npe thrown from /plot group add when group name is not specified.

* Fix verion number on lang files

* Changed lang file version numbers
  • Loading branch information
Suneet Tipirneni (Siris) authored and TheFlagCourier committed Jan 8, 2020
1 parent 43dd869 commit e696fa1
Show file tree
Hide file tree
Showing 12 changed files with 60 additions and 24 deletions.
7 changes: 5 additions & 2 deletions resources/chinese.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: Towny
version: 0.69
version: 0.70
language: Chinese
author: ElgarL
website: 'http://townyadvanced.github.io/'
Expand Down Expand Up @@ -1063,4 +1063,7 @@ status_plot_group_name_and_size: '&2Townblock is part of group: %s. Group has %s
msg_player_made_group_not_for_sale: '%s made group %s not for sale.'

# Added in 0.69
msg_err_cannot_set_group_to_jail: 'Plot groups cannot be set to jail types.'
msg_err_cannot_set_group_to_jail: 'Plot groups cannot be set to jail types.'

# Added in 0.70
msg_err_plot_group_name_required: 'You must specify plot group name ie, /plot group add {name}'
7 changes: 5 additions & 2 deletions resources/english.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: Towny
version: 0.69
version: 0.70
language: english
author: ElgarL
website: 'http://townyadvanced.github.io/'
Expand Down Expand Up @@ -1062,4 +1062,7 @@ status_plot_group_name_and_size: '&2Townblock is part of group: %s. Group has %s
msg_player_made_group_not_for_sale: '%s made group %s not for sale.'

# Added in 0.69
msg_err_cannot_set_group_to_jail: 'Plot groups cannot be set to jail types.'
msg_err_cannot_set_group_to_jail: 'Plot groups cannot be set to jail types.'

# Added in 0.70
msg_err_plot_group_name_required: 'You must specify plot group name ie, /plot group add {name}'
7 changes: 5 additions & 2 deletions resources/es-mx.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: Towny
version: 0.69
version: 0.70
language: español
author: VreyaViress
website: 'http://townyadvanced.github.io/'
Expand Down Expand Up @@ -1050,4 +1050,7 @@ status_plot_group_name_and_size: '&2Townblock is part of group: %s. Group has %s
msg_player_made_group_not_for_sale: '%s made group %s not for sale.'

# Added in 0.69
msg_err_cannot_set_group_to_jail: 'Plot groups cannot be set to jail types.'
msg_err_cannot_set_group_to_jail: 'Plot groups cannot be set to jail types.'

# Added in 0.70
msg_err_plot_group_name_required: 'You must specify plot group name ie, /plot group add {name}'
7 changes: 5 additions & 2 deletions resources/french.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: Towny
version: 0.69
version: 0.70
language: french
author: Noiknez,TheCalypso,Cidalex,Mitsu
website: 'http://townyadvanced.github.io/'
Expand Down Expand Up @@ -1063,4 +1063,7 @@ status_plot_group_name_and_size: '&2Townblock is part of group: %s. Group has %s
msg_player_made_group_not_for_sale: '%s made group %s n''est pas a vendre.'

# Added in 0.69
msg_err_cannot_set_group_to_jail: 'Plot groups cannot be set to jail types.'
msg_err_cannot_set_group_to_jail: 'Plot groups cannot be set to jail types.'

# Added in 0.70
msg_err_plot_group_name_required: 'You must specify plot group name ie, /plot group add {name}'
7 changes: 5 additions & 2 deletions resources/german.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: Towny
version: 0.69
version: 0.70
language: german
author: 'ElgarL, translated by Articdive, Wolf2323, BlocK, Yasu-San and enterih'
website: 'http://townyadvanced.github.io/'
Expand Down Expand Up @@ -1065,4 +1065,7 @@ status_plot_group_name_and_size: '&2Townblock is part of group: %s. Group has %s
msg_player_made_group_not_for_sale: '%s made group %s not for sale.'

# Added in 0.69
msg_err_cannot_set_group_to_jail: 'Plot groups cannot be set to jail types.'
msg_err_cannot_set_group_to_jail: 'Plot groups cannot be set to jail types.'

# Added in 0.70
msg_err_plot_group_name_required: 'You must specify plot group name ie, /plot group add {name}'
7 changes: 5 additions & 2 deletions resources/italian.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: Towny
version: 0.69
version: 0.70
language: italian
author: Leomixer17
website: 'http://townyadvanced.github.io/'
Expand Down Expand Up @@ -1064,4 +1064,7 @@ status_plot_group_name_and_size: '&2Townblock is part of group: %s. Group has %s
msg_player_made_group_not_for_sale: '%s made group %s not for sale.'

# Added in 0.69
msg_err_cannot_set_group_to_jail: 'Plot groups cannot be set to jail types.'
msg_err_cannot_set_group_to_jail: 'Plot groups cannot be set to jail types.'

# Added in 0.70
msg_err_plot_group_name_required: 'You must specify plot group name ie, /plot group add {name}'
7 changes: 5 additions & 2 deletions resources/korean.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: Towny
version: 0.69
version: 0.70
language: 한국어
author: 'Daybreak 새벽'
website: 'http://townyadvanced.github.io/'
Expand Down Expand Up @@ -975,4 +975,7 @@ status_plot_group_name_and_size: '&2Townblock is part of group: %s. Group has %s
msg_player_made_group_not_for_sale: '%s made group %s not for sale.'

# Added in 0.69
msg_err_cannot_set_group_to_jail: 'Plot groups cannot be set to jail types.'
msg_err_cannot_set_group_to_jail: 'Plot groups cannot be set to jail types.'

# Added in 0.70
msg_err_plot_group_name_required: 'You must specify plot group name ie, /plot group add {name}'
7 changes: 5 additions & 2 deletions resources/norwegian.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: Towny
version: 0.69
version: 0.70
language: norwegian
author: Nectuz, Walbern
website: 'http://townyadvanced.github.io/'
Expand Down Expand Up @@ -1062,4 +1062,7 @@ status_plot_group_name_and_size: '&2Townblock is part of group: %s. Group has %s
msg_player_made_group_not_for_sale: '%s made group %s not for sale.'

# Added in 0.69
msg_err_cannot_set_group_to_jail: 'Plot groups cannot be set to jail types.'
msg_err_cannot_set_group_to_jail: 'Plot groups cannot be set to jail types.'

# Added in 0.70
msg_err_plot_group_name_required: 'You must specify plot group name ie, /plot group add {name}'
11 changes: 7 additions & 4 deletions resources/pt-br.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
name: Towny
version: 0.69
version: 0.70
language: português (Brasil)
author: BannerGames
website: 'http://townyadvanced.github.io/'
description: >
Arquivo de língua para todas as mensagens do jogo. Não altere este arquivo.
Se desejar modificar alguma das entradas, faça uma cópia com outro nome.
Arquivos de linguagem alternativos podem ser ativados ao alterar a
Arquivos de linguagem alternativos podem ser ativados ao alterar a
entrada [language] na config.yml
#
Expand All @@ -22,7 +22,7 @@ description: >
# Preto = &0 Azul Escuro = &1
# Verde Escuro = &2 Aqua Escuro = &3
# Vermelho Escuro = &4 Roxo Escuro = &5
# Dourado = &6 Cinza = &7
# Dourado = &6 Cinza = &7
# Cinza Escuro = &8 Azul = &9
# Verde = &a Aqua = &b
# Vermelho = &c Roxo Claro = &d
Expand Down Expand Up @@ -1066,4 +1066,7 @@ status_plot_group_name_and_size: '&2O terreno da cidade faz parte de um grupo: %
msg_player_made_group_not_for_sale: '%s tirou o grupo %s do estado de venda.'

# Added in 0.69
msg_err_cannot_set_group_to_jail: 'Plot groups cannot be set to jail types.'
msg_err_cannot_set_group_to_jail: 'Plot groups cannot be set to jail types.'

# Added in 0.70
msg_err_plot_group_name_required: 'You must specify plot group name ie, /plot group add {name}'
7 changes: 5 additions & 2 deletions resources/russian.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: Towny
version: 0.69
version: 0.70
language: russian
author: ElgarL (Plugin developer), Communar (Russian Translation)
website: 'http://townyadvanced.github.io/'
Expand Down Expand Up @@ -1062,4 +1062,7 @@ status_plot_group_name_and_size: '&2Townblock is part of group: %s. Group has %s
msg_player_made_group_not_for_sale: '%s made group %s not for sale.'

# Added in 0.69
msg_err_cannot_set_group_to_jail: 'Plot groups cannot be set to jail types.'
msg_err_cannot_set_group_to_jail: 'Plot groups cannot be set to jail types.'

# Added in 0.70
msg_err_plot_group_name_required: 'You must specify plot group name ie, /plot group add {name}'
7 changes: 5 additions & 2 deletions resources/spanish.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: Towny
version: 0.69
version: 0.70
language: spanish
author: Seruhio, Alvarote1998, Beelzebu
website: 'http://townyadvanced.github.io/'
Expand Down Expand Up @@ -1062,4 +1062,7 @@ status_plot_group_name_and_size: '&2Townblock is part of group: %s. Group has %s
msg_player_made_group_not_for_sale: '%s made group %s not for sale.'

# Added in 0.69
msg_err_cannot_set_group_to_jail: 'Plot groups cannot be set to jail types.'
msg_err_cannot_set_group_to_jail: 'Plot groups cannot be set to jail types.'

# Added in 0.70
msg_err_plot_group_name_required: 'You must specify plot group name ie, /plot group add {name}'
3 changes: 3 additions & 0 deletions src/com/palmergames/bukkit/towny/command/PlotCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -1301,6 +1301,9 @@ private boolean handlePlotGroupCommand(String[] split, Player player) throws Tow

// Add the plot group to the town set.
town.addPlotGroup(newGroup);
} else {
TownyMessaging.sendErrorMsg(player, TownySettings.getLangString("msg_err_plot_group_name_required"));
return false;
}

townyUniverse.getDataSource().savePlotGroupList();
Expand Down

0 comments on commit e696fa1

Please sign in to comment.