Skip to content

Commit

Permalink
Merge pull request #125 from BentoBoxWorld/develop
Browse files Browse the repository at this point in the history
Version 1.14.1
  • Loading branch information
tastybento authored Jan 1, 2025
2 parents 669e968 + f262f2e commit bf22fba
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
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>1.14.0</build.version>
<build.version>1.14.1</build.version>
<build.number>-LOCAL</build.number>
<sonar.projectKey>BentoBoxWorld_Boxed</sonar.projectKey>
<sonar.organization>bentobox-world</sonar.organization>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
package world.bentobox.islandfly.listeners;

import java.util.HashMap;
import java.util.Map;

import org.bukkit.Bukkit;
import org.bukkit.GameMode;
import org.bukkit.entity.Player;
Expand All @@ -12,6 +9,7 @@
import org.bukkit.event.player.PlayerToggleFlightEvent;
import org.eclipse.jdt.annotation.NonNull;

import world.bentobox.bentobox.BentoBox;
import world.bentobox.bentobox.api.events.island.IslandEnterEvent;
import world.bentobox.bentobox.api.events.island.IslandExitEvent;
import world.bentobox.bentobox.api.localization.TextVariables;
Expand Down Expand Up @@ -47,11 +45,11 @@ public void onToggleFlight(final PlayerToggleFlightEvent event) {
user.sendMessage("islandfly.not-allowed");
} else {
addon.getIslands().getIslandAt(user.getLocation())
.filter(i -> i.getMemberSet().contains(user.getUniqueId())).ifPresent(is -> {
Map<String, MetaDataValue> metaData = new HashMap<>();
metaData.put("IslandFly-" + is.getUniqueId(), new MetaDataValue(event.isFlying()));
user.setMetaData(metaData); // Record the fly state for this island
});
.filter(i -> i.getMemberSet().contains(user.getUniqueId())).ifPresent(
is -> {
user.putMetaData(ISLANDFLY + is.getUniqueId(), new MetaDataValue(event.isFlying()));
addon.getPlayers().savePlayer(user.getUniqueId());
});

}
}
Expand Down

0 comments on commit bf22fba

Please sign in to comment.