Skip to content

Commit

Permalink
Always protect visitors from VOID damage if they are invicible.
Browse files Browse the repository at this point in the history
If VOID was in the config, then actually, visitors were not teleported.

tastybento/ASkyBlock-Bugs-N-Features#718
  • Loading branch information
tastybento committed May 5, 2018
1 parent 45a114d commit 5513465
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/com/wasteofplastic/askyblock/listeners/PlayerEvents.java
Original file line number Diff line number Diff line change
Expand Up @@ -616,11 +616,7 @@ public void onPlayerTeleport(final PlayerTeleportEvent e) {
if (DEBUG)
plugin.getLogger().info("DEBUG: getting islands for to from");
Island islandFrom = plugin.getGrid().getProtectedIslandAt(e.getFrom());
if (DEBUG && islandFrom != null)
plugin.getLogger().info("DEBUG: islandFrom is not null");
Island islandTo = plugin.getGrid().getProtectedIslandAt(e.getTo());
if (DEBUG && islandTo != null)
plugin.getLogger().info("DEBUG: islandTo is not null");

// Ender pearl and chorus fruit teleport checks
if (e.getCause() != null) {
Expand Down Expand Up @@ -939,7 +935,7 @@ public void onVisitorGetDamage(EntityDamageEvent e){

if (Settings.visitorDamagePrevention.contains(e.getCause())) e.setCancelled(true);

else if(e.getCause().equals(DamageCause.VOID)) {
if(e.getCause().equals(DamageCause.VOID)) {
if(plugin.getPlayers().hasIsland(p.getUniqueId())) {
Location safePlace = plugin.getGrid().getSafeHomeLocation(p.getUniqueId(), 1);
if (safePlace != null) {
Expand Down

0 comments on commit 5513465

Please sign in to comment.