Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
<!-- Revision variable removes warning about dynamic version -->
<revision>${build.version}-SNAPSHOT</revision>
<!-- This allows to change between versions and snapshots. -->
<build.version>4.5.0</build.version>
<build.version>4.5.1</build.version>
<build.number>-LOCAL</build.number>
<!-- Sonar Cloud -->
<sonar.projectKey>BentoBoxWorld_Border</sonar.projectKey>
Expand Down
20 changes: 10 additions & 10 deletions src/main/java/world/bentobox/border/listeners/PlayerListener.java
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public PlayerListener(Border addon) {
this.show = addon.getBorderShower();
}

@EventHandler(priority = EventPriority.NORMAL)
@EventHandler(priority = EventPriority.NORMAL, ignoreCancelled = true)
public void onPlayerJoin(PlayerJoinEvent e) {
Player player = e.getPlayer();
if (isOn(player)) {
Expand Down Expand Up @@ -102,7 +102,7 @@ protected void processEvent(PlayerJoinEvent e) {
show.showBorder(e.getPlayer(), i)));
}

@EventHandler(priority = EventPriority.NORMAL)
@EventHandler(priority = EventPriority.NORMAL, ignoreCancelled = true)
public void onPlayerDamage(EntityDamageEvent e) {
// Only deal with fall damage in the right world if the barrier is on
if (e.getCause() != DamageCause.FALL || addon.getSettings().getType() != BorderType.BARRIER
Expand All @@ -116,12 +116,12 @@ public void onPlayerDamage(EntityDamageEvent e) {
}
}

@EventHandler(priority = EventPriority.NORMAL)
@EventHandler(priority = EventPriority.NORMAL, ignoreCancelled = true)
public void onPlayerQuit(PlayerQuitEvent e) {
show.clearUser(User.getInstance(e.getPlayer()));
}

@EventHandler(priority = EventPriority.NORMAL)
@EventHandler(priority = EventPriority.NORMAL, ignoreCancelled = true)
public void onPlayerRespawn(PlayerRespawnEvent e) {
Player player = e.getPlayer();
if (isOn(player)) {
Expand Down Expand Up @@ -187,7 +187,7 @@ public void onPlayerTeleport(PlayerTeleportEvent e) {
);
}

@EventHandler(priority = EventPriority.NORMAL)
@EventHandler(priority = EventPriority.NORMAL, ignoreCancelled = true)
public void onPlayerLeaveIsland(PlayerMoveEvent e) {
Player p = e.getPlayer();
if (!isOn(p)) {
Expand Down Expand Up @@ -267,10 +267,10 @@ private boolean outsideCheck(Player player, Location from, Location to) {
* if the entity went outside the protection range
* @param event - event
*/
@EventHandler
@EventHandler(priority = EventPriority.NORMAL, ignoreCancelled = true)
public void onEntityMount(EntityMountEvent event) {
Entity entity = event.getEntity();
if (!(entity instanceof Player player) || !isOn(player)) {
if (!(entity instanceof Player player) || !isOn(player) || !addon.getSettings().isReturnTeleport()) {
return;
}

Expand Down Expand Up @@ -318,7 +318,7 @@ public void onEntityDismount(EntityDismountEvent event) {
* Refreshes the barrier view when the player moves (more than just moving their head)
* @param e event
*/
@EventHandler(priority = EventPriority.NORMAL)
@EventHandler(priority = EventPriority.NORMAL, ignoreCancelled = true)
public void onPlayerMove(PlayerMoveEvent e) {
Player player = e.getPlayer();
// Remove head movement
Expand All @@ -333,7 +333,7 @@ public void onPlayerMove(PlayerMoveEvent e) {
* Refresh the view when riding in a vehicle
* @param e event
*/
@EventHandler(priority = EventPriority.NORMAL)
@EventHandler(priority = EventPriority.NORMAL, ignoreCancelled = true)
public void onVehicleMove(VehicleMoveEvent e) {
// Remove head movement
if (!e.getFrom().toVector().equals(e.getTo().toVector())) {
Expand All @@ -347,7 +347,7 @@ public void onVehicleMove(VehicleMoveEvent e) {
* Hide and then show the border to react to the change in protection area
* @param e
*/
@EventHandler(priority = EventPriority.NORMAL)
@EventHandler(priority = EventPriority.NORMAL, ignoreCancelled = true)
public void onProtectionRangeChange(IslandProtectionRangeChangeEvent e) {
// Hide and show again
e.getIsland().getPlayersOnIsland().forEach(player -> {
Expand Down