Buggy code:
public class ResidencePlayerListener implements Listener { protected Map < String , String > currentRes ; protected Map < String , Long > lastUpdate ; protected Map < String , Location > lastOutsideLoc ; protected int minUpdateTime ; protected boolean chatenabled ; protected List < String > playerToggleChat ; public ResidencePlayerListener ( ) { } public void reload ( ) { } @ EventHandler ( priority = EventPriority . MONITOR ) public void onPlayerQuit ( PlayerQuitEvent event ) { } @ EventHandler ( priority = EventPriority . MONITOR , ignoreCancelled = true ) public void onPlayerJoin ( PlayerJoinEvent event ) { } @ EventHandler ( priority = EventPriority . LOWEST , ignoreCancelled = true ) public void onPlayerSpawn ( PlayerRespawnEvent event ) { } private boolean isContainer ( Material mat , Block block ) { } private boolean isCanUseEntity_BothClick ( Material mat , Block block ) { } private boolean isCanUseEntity_RClickOnly ( Material mat , Block block ) { } private boolean isCanUseEntity ( Material mat , Block block ) { } @ EventHandler ( priority = EventPriority . LOWEST , ignoreCancelled = true ) public void onPlayerInteract ( PlayerInteractEvent event ) { } @ EventHandler ( priority = EventPriority . LOWEST , ignoreCancelled = true ) public void onPlayerInteractEntity ( PlayerInteractEntityEvent event ) { } @ EventHandler ( priority = EventPriority . LOWEST , ignoreCancelled = true ) public void onPlayerInteractAtEntity ( PlayerInteractAtEntityEvent event ) { } @ EventHandler ( priority = EventPriority . LOWEST , ignoreCancelled = true ) public void onPlayerBucketEmpty ( PlayerBucketEmptyEvent event ) { } @ EventHandler ( priority = EventPriority . LOWEST , ignoreCancelled = true ) public void onPlayerBucketFill ( PlayerBucketFillEvent event ) { } @ EventHandler ( priority = EventPriority . LOWEST , ignoreCancelled = true ) public void onPlayerTeleport ( PlayerTeleportEvent event ) { Location loc = event . getTo ( ) ; Player player = event . getPlayer ( ) ; if ( Residence . isResAdminOn ( player ) ) { handleNewLocation ( player , loc , false ) ; return ; } ClaimedResidence res = Residence . getResidenceManager ( ) . getByLoc ( loc ) ; <START_BUG> if ( ( event . getCause ( ) ) == ( TeleportCause . ENDER_PEARL ) ) { <END_BUG> if ( res != null ) { String areaname = Residence . getResidenceManager ( ) . getNameByLoc ( loc ) ; if ( ! ( res . getPermissions ( ) . playerHas ( player . getName ( ) , "move" , true ) ) ) { event . setCancelled ( true ) ; player . sendMessage ( ( ( ChatColor . RED ) + ( Residence . getLanguage ( ) . getPhrase ( "ResidenceMoveDeny" , areaname ) ) ) ) ; return ; } } } if ( ( event . getCause ( ) ) == ( TeleportCause . PLUGIN ) ) { if ( res != null ) { String areaname = Residence . getResidenceManager ( ) . getNameByLoc ( loc ) ; if ( ( ! ( res . getPermissions ( ) . playerHas ( player . getName ( ) , "tp" , true ) ) ) && ( ! ( player . hasPermission ( "residence.admin.tp" ) ) ) ) { event . setCancelled ( true ) ; player . sendMessage ( ( ( ChatColor . RED ) + ( Residence . getLanguage ( ) . getPhrase ( "TeleportDeny" , areaname ) ) ) ) ; return ; } } } handleNewLocation ( player , loc , false ) ; } @ EventHandler ( priority = EventPriority . LOWEST , ignoreCancelled = true ) public void onPlayerMove ( PlayerMoveEvent event ) { } public void handleNewLocation ( Player player , Location loc , boolean move ) { } public String insertMessages ( Player player , String areaname , ClaimedResidence res , String message ) { } public void doHeals ( ) { } @ EventHandler ( priority = EventPriority . LOWEST , ignoreCancelled = true ) public void onPlayerChat ( AsyncPlayerChatEvent event ) { } public void tooglePlayerResidenceChat ( Player player ) { } public String getCurrentResidenceName ( String player ) { } }

Fix:
if ( ( ( ( event . getCause ( ) ) == ( TeleportCause . ENDER_PEARL ) ) || ( ( event . getCause ( ) ) == ( TeleportCause . COMMAND ) ) ) || ( ( event . getCause ( ) ) == ( TeleportCause . NETHER_PORTAL ) ) ) {