Skip to content

Commit

Permalink
- Fix nether portals being created in areas the portal-creator cannot
Browse files Browse the repository at this point in the history
build, courtesy of Siris with PR #3745.
    - Stops 'portal griefing'.
    - Closes #3412.
  - Fix flagwar not transferring TownBlocks correctly, courtesy of Siris
with PR #3744.
  - Add automatic labelling of PRs, automatic labelling of 'stale' to
older PRs and Issues, courtesy of Siris with PR #3738.
  - Language files bumped to 0.74.
  • Loading branch information
TheFlagCourier committed Mar 12, 2020
1 parent c247019 commit f11de34
Show file tree
Hide file tree
Showing 15 changed files with 68 additions and 35 deletions.
6 changes: 6 additions & 0 deletions resources/ChangeLog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4225,6 +4225,12 @@ v0.92.0.11:
- Further optimize Trie used in tab completion, courtesy of stzups with PR #3739.
0.95.2.22:
- Fix /ta set capital {townname} {nationname} not working.
- Fix nether portals being created in areas the portal-creator cannot build, courtesy of Siris with PR #3745.
- Stops 'portal griefing'.
- Closes #3412.
- Fix flagwar not transferring TownBlocks correctly, courtesy of Siris with PR #3744.
- Add automatic labelling of PRs, automatic labelling of 'stale' to older PRs and Issues, courtesy of Siris with PR #3738.
- Language files bumped to 0.74.
0.96.0.0:
- Special 'Testing' Release for 1.13.2 Servers preceding 0.96.0.0
- Some "Required Config Changes" will not be necessary for this release.
Expand Down
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.73
version: 0.74
language: Chinese
author: ElgarL
website: 'http://townyadvanced.github.io/'
Expand Down Expand Up @@ -1082,4 +1082,7 @@ msg_err_plot_belongs_to_group_plot_nfs: '土地: %s 属于土地组, 请使用 /
msg_err_admin_controlled_pvp_prevents_you_from_changing_pvp: 'The Admin-controlled %s setting prevents you from toggling pvp to %s.'

# Added in 0.73
msg_err_you_aren't currently jailed: 'You are not currently jailed.'
msg_err_you_aren't currently jailed: 'You are not currently jailed.'

# Added in 0.74
msg_err_you_are_not_allowed_to_create_the_other_side_of_this_portal: 'You are not allowed to create the other side of this portal in this location.'
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.73
version: 0.74
language: english
author: ElgarL
website: 'http://townyadvanced.github.io/'
Expand Down Expand Up @@ -1081,4 +1081,7 @@ msg_err_plot_belongs_to_group_plot_nfs: 'Plot: %s belongs to a group, use /plot
msg_err_admin_controlled_pvp_prevents_you_from_changing_pvp: 'The Admin-controlled %s setting prevents you from toggling pvp to %s.'

# Added in 0.73
msg_err_you_aren't currently jailed: 'You are not currently jailed.'
msg_err_you_aren't currently jailed: 'You are not currently jailed.'

# Added in 0.74
msg_err_you_are_not_allowed_to_create_the_other_side_of_this_portal: 'You are not allowed to create the other side of this portal in this location.'
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.73
version: 0.74
language: español
author: VreyaViress
website: 'http://townyadvanced.github.io/'
Expand Down Expand Up @@ -1069,4 +1069,7 @@ msg_err_plot_belongs_to_group_plot_nfs: 'Plot: %s belongs to a group, use /plot
msg_err_admin_controlled_pvp_prevents_you_from_changing_pvp: 'The Admin-controlled %s setting prevents you from toggling pvp to %s.'

# Added in 0.73
msg_err_you_aren't currently jailed: 'You are not currently jailed.'
msg_err_you_aren't currently jailed: 'You are not currently jailed.'

# Added in 0.74
msg_err_you_are_not_allowed_to_create_the_other_side_of_this_portal: 'You are not allowed to create the other side of this portal in this location.'
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.73
version: 0.74
language: french
author: Noiknez,TheCalypso,Cidalex,Mitsu,ARNPIK
website: 'http://townyadvanced.github.io/'
Expand Down Expand Up @@ -1082,4 +1082,7 @@ msg_err_plot_belongs_to_group_plot_nfs: 'La parcelle: %s appartient à un groupe
msg_err_admin_controlled_pvp_prevents_you_from_changing_pvp: 'The Admin-controlled %s setting prevents you from toggling pvp to %s.'

# Added in 0.73
msg_err_you_aren't currently jailed: 'You are not currently jailed.'
msg_err_you_aren't currently jailed: 'You are not currently jailed.'

# Added in 0.74
msg_err_you_are_not_allowed_to_create_the_other_side_of_this_portal: 'You are not allowed to create the other side of this portal in this location.'
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.73
version: 0.74
language: german
author: 'ElgarL, translated by Articdive, Wolf2323, BlocK, Yasu-San and enterih'
website: 'http://townyadvanced.github.io/'
Expand Down Expand Up @@ -1084,4 +1084,7 @@ msg_err_plot_belongs_to_group_plot_nfs: 'Plot: %s belongs to a group, use /plot
msg_err_admin_controlled_pvp_prevents_you_from_changing_pvp: 'The Admin-controlled %s setting prevents you from toggling pvp to %s.'

# Added in 0.73
msg_err_you_aren't currently jailed: 'You are not currently jailed.'
msg_err_you_aren't currently jailed: 'You are not currently jailed.'

# Added in 0.74
msg_err_you_are_not_allowed_to_create_the_other_side_of_this_portal: 'You are not allowed to create the other side of this portal in this location.'
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.73
version: 0.74
language: italian
author: Leomixer17
website: 'http://townyadvanced.github.io/'
Expand Down Expand Up @@ -1083,4 +1083,7 @@ msg_err_plot_belongs_to_group_plot_nfs: 'Plot: %s belongs to a group, use /plot
msg_err_admin_controlled_pvp_prevents_you_from_changing_pvp: 'The Admin-controlled %s setting prevents you from toggling pvp to %s.'

# Added in 0.73
msg_err_you_aren't currently jailed: 'You are not currently jailed.'
msg_err_you_aren't currently jailed: 'You are not currently jailed.'

# Added in 0.74
msg_err_you_are_not_allowed_to_create_the_other_side_of_this_portal: 'You are not allowed to create the other side of this portal in this location.'
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.73
version: 0.74
language: 한국어
author: 'Daybreak 새벽'
website: 'http://townyadvanced.github.io/'
Expand Down Expand Up @@ -994,4 +994,7 @@ msg_err_plot_belongs_to_group_plot_nfs: 'Plot: %s belongs to a group, use /plot
msg_err_admin_controlled_pvp_prevents_you_from_changing_pvp: 'The Admin-controlled %s setting prevents you from toggling pvp to %s.'

# Added in 0.73
msg_err_you_aren't currently jailed: 'You are not currently jailed.'
msg_err_you_aren't currently jailed: 'You are not currently jailed.'

# Added in 0.74
msg_err_you_are_not_allowed_to_create_the_other_side_of_this_portal: 'You are not allowed to create the other side of this portal in this location.'
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.73
version: 0.74
language: norwegian
author: Nectuz, Walbern
website: 'http://townyadvanced.github.io/'
Expand Down Expand Up @@ -1081,4 +1081,7 @@ msg_err_plot_belongs_to_group_plot_nfs: 'Plot: %s belongs to a group, use /plot
msg_err_admin_controlled_pvp_prevents_you_from_changing_pvp: 'The Admin-controlled %s setting prevents you from toggling pvp to %s.'

# Added in 0.73
msg_err_you_aren't currently jailed: 'You are not currently jailed.'
msg_err_you_aren't currently jailed: 'You are not currently jailed.'

# Added in 0.74
msg_err_you_are_not_allowed_to_create_the_other_side_of_this_portal: 'You are not allowed to create the other side of this portal in this location.'
7 changes: 5 additions & 2 deletions resources/pt-br.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: Towny
version: 0.73
version: 0.74
language: português (Brasil)
author: BannerGames
website: 'http://townyadvanced.github.io/'
Expand Down Expand Up @@ -1085,4 +1085,7 @@ msg_err_plot_belongs_to_group_plot_nfs: 'Terreno: %s pertence a um grupo, use /p
msg_err_admin_controlled_pvp_prevents_you_from_changing_pvp: 'The Admin-controlled %s setting prevents you from toggling pvp to %s.'

# Added in 0.73
msg_err_you_aren't currently jailed: 'You are not currently jailed.'
msg_err_you_aren't currently jailed: 'You are not currently jailed.'

# Added in 0.74
msg_err_you_are_not_allowed_to_create_the_other_side_of_this_portal: 'You are not allowed to create the other side of this portal in this location.'
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.73
version: 0.74
language: russian
author: ElgarL (Plugin developer), Communar (Russian Translation)
website: 'http://townyadvanced.github.io/'
Expand Down Expand Up @@ -1081,4 +1081,7 @@ msg_err_plot_belongs_to_group_plot_nfs: 'Plot: %s belongs to a group, use /plot
msg_err_admin_controlled_pvp_prevents_you_from_changing_pvp: 'The Admin-controlled %s setting prevents you from toggling pvp to %s.'

# Added in 0.73
msg_err_you_aren't currently jailed: 'You are not currently jailed.'
msg_err_you_aren't currently jailed: 'You are not currently jailed.'

# Added in 0.74
msg_err_you_are_not_allowed_to_create_the_other_side_of_this_portal: 'You are not allowed to create the other side of this portal in this location.'
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.73
version: 0.74
language: spanish
author: Seruhio, Alvarote1998, Beelzebu
website: 'http://townyadvanced.github.io/'
Expand Down Expand Up @@ -1081,4 +1081,7 @@ msg_err_plot_belongs_to_group_plot_nfs: 'Plot: %s belongs to a group, use /plot
msg_err_admin_controlled_pvp_prevents_you_from_changing_pvp: 'The Admin-controlled %s setting prevents you from toggling pvp to %s.'

# Added in 0.73
msg_err_you_aren't currently jailed: 'You are not currently jailed.'
msg_err_you_aren't currently jailed: 'You are not currently jailed.'

# Added in 0.74
msg_err_you_are_not_allowed_to_create_the_other_side_of_this_portal: 'You are not allowed to create the other side of this portal in this location.'
7 changes: 5 additions & 2 deletions resources/zh-TW.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: Towny
version: 0.73
version: 0.74
language: zh-TW
author: ElgarL
website: 'http://townyadvanced.github.io/'
Expand Down Expand Up @@ -1086,4 +1086,7 @@ msg_err_plot_belongs_to_group_plot_nfs: '領地%s屬於一個組,使用/plot g
msg_err_admin_controlled_pvp_prevents_you_from_changing_pvp: 'The Admin-controlled %s setting prevents you from toggling pvp to %s.'

# Added in 0.73
msg_err_you_aren't currently jailed: 'You are not currently jailed.'
msg_err_you_aren't currently jailed: 'You are not currently jailed.'

# Added in 0.74
msg_err_you_are_not_allowed_to_create_the_other_side_of_this_portal: 'You are not allowed to create the other side of this portal in this location.'
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import com.palmergames.bukkit.towny.Towny;
import com.palmergames.bukkit.towny.TownyAPI;
import com.palmergames.bukkit.towny.TownyMessaging;
import com.palmergames.bukkit.towny.TownySettings;
import com.palmergames.bukkit.towny.TownyUniverse;
import com.palmergames.bukkit.towny.exceptions.AlreadyRegisteredException;
import com.palmergames.bukkit.towny.exceptions.NotRegisteredException;
Expand All @@ -15,20 +16,15 @@
import java.util.ArrayList;
import java.util.List;

import com.palmergames.bukkit.towny.object.WorldCoord;
import com.palmergames.bukkit.towny.utils.PlayerCacheUtil;
import org.bukkit.Bukkit;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.block.Block;
import org.bukkit.block.BlockState;
import org.bukkit.entity.EntityType;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
import org.bukkit.event.Listener;
import org.bukkit.event.player.PlayerPortalEvent;
import org.bukkit.event.player.PlayerTeleportEvent;
import org.bukkit.event.world.PortalCreateEvent;
import org.bukkit.event.world.StructureGrowEvent;
import org.bukkit.event.world.WorldInitEvent;
Expand Down Expand Up @@ -215,7 +211,7 @@ public void onPortalCreate(PortalCreateEvent event) {

// If not reject the creation of the portal. No need to cancel event, bukkit does that automatically.
if (!bBuild) {
TownyMessaging.sendErrorMsg(event.getEntity(), "You're not allowed to create the other side of this portal in this location.");
TownyMessaging.sendErrorMsg(event.getEntity(), TownySettings.getLangString("msg_err_you_are_not_allowed_to_create_the_other_side_of_this_portal"));
event.setCancelled(true);
break;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import com.palmergames.bukkit.towny.TownyMessaging;
import com.palmergames.bukkit.towny.TownySettings;
import com.palmergames.bukkit.towny.TownyUniverse;
import com.palmergames.bukkit.towny.command.TownCommand;
import com.palmergames.bukkit.towny.exceptions.EconomyException;
import com.palmergames.bukkit.towny.exceptions.NotRegisteredException;
import com.palmergames.bukkit.towny.exceptions.TownyException;
Expand All @@ -14,7 +13,6 @@
import com.palmergames.bukkit.towny.object.Town;
import com.palmergames.bukkit.towny.object.TownBlock;
import com.palmergames.bukkit.towny.object.WorldCoord;
import com.palmergames.bukkit.towny.tasks.TownClaim;
import com.palmergames.bukkit.towny.war.flagwar.CellUnderAttack;
import com.palmergames.bukkit.towny.war.flagwar.TownyWar;
import com.palmergames.bukkit.towny.war.flagwar.TownyWarConfig;
Expand All @@ -27,9 +25,6 @@
import org.bukkit.event.EventPriority;
import org.bukkit.event.Listener;

import java.util.ArrayList;
import java.util.List;

public class TownyWarCustomListener implements Listener {

private final Towny plugin;
Expand Down

0 comments on commit f11de34

Please sign in to comment.