Skip to content

Commit b4448cf

Browse files
tastybentoemmanuelvladhuguytgitlocalize-app[bot]mt-gitlocalize
authored
Version 4.4.2 (#140)
* Version 4.2.2 * Added protection against console error spam if island size is zero. If the protection range is 0 then the caluclations to teleport players back into the border will result in infinite values and other strangeness so this prevents that. This is an edge case and only really happens when the island size has been set wrongly. * Update README.md * Fix perm issue #120 (#121) * feat: detect mounted players on entity (#88) * Version 4.3.0 * Changes to work with 1.20.6. Has backwards compatibility. (#125) * Fix imports * Update zh-CN.yml (#127) * Latvian translationa (#128) * Translate lv.yml via GitLocalize * Translate lv.yml via GitLocalize --------- Co-authored-by: mt-gitlocalize <mt@gitlocalize.com> Co-authored-by: tastybento <tastybento@wasteofplastic.com> * Add explicit bordertype command (#130) * Add explicit bordertype command * Add perm to addon.yml and make it default to off * Remove unused method. * 131 null to location (#132) * Version 4.3.1 * Add defensive code for null to's #131 * If border is off, then don't move player back. * Update to MC 1.21.3 and codemc updates (#134) * Version 4.4.1 * Improved operation when border is off (#136) * Fix merge issue * Remove duplicate BlockListener class * Save meta data after setting (#138) * Save meta data (#139) * Save meta data after setting * Remove debug * Remove unused imports * Version 4.4.2 --------- Co-authored-by: evlad <emmanuelvlad@gmail.com> Co-authored-by: Minecraft_15 <147026380+huguyt@users.noreply.github.com> Co-authored-by: gitlocalize-app[bot] <55277160+gitlocalize-app[bot]@users.noreply.github.com> Co-authored-by: mt-gitlocalize <mt@gitlocalize.com>
1 parent f56e1fc commit b4448cf

File tree

3 files changed

+6
-1
lines changed

3 files changed

+6
-1
lines changed

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
<!-- Revision variable removes warning about dynamic version -->
5151
<revision>${build.version}-SNAPSHOT</revision>
5252
<!-- This allows to change between versions and snapshots. -->
53-
<build.version>4.4.1</build.version>
53+
<build.version>4.4.2</build.version>
5454
<build.number>-LOCAL</build.number>
5555
<!-- Sonar Cloud -->
5656
<sonar.projectKey>BentoBoxWorld_Border</sonar.projectKey>

src/main/java/world/bentobox/border/commands/IslandBorderCommand.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,12 @@ public boolean execute(User user, String label, List<String> args) {
4848
if (on) {
4949
user.sendMessage("border.toggle.border-off");
5050
user.putMetaData(BorderShower.BORDER_STATE_META_DATA, new MetaDataValue(false));
51+
addon.getPlayers().savePlayer(user.getUniqueId());
5152
addon.getBorderShower().hideBorder(user);
5253
} else {
5354
user.sendMessage("border.toggle.border-on");
5455
user.putMetaData(BorderShower.BORDER_STATE_META_DATA, new MetaDataValue(true));
56+
addon.getPlayers().savePlayer(user.getUniqueId());
5557
if (island != null) {
5658
addon.getBorderShower().showBorder(user.getPlayer(), island);
5759
}

src/main/java/world/bentobox/border/listeners/PlayerListener.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
import org.bukkit.util.RayTraceResult;
3333
import org.bukkit.util.Vector;
3434

35+
import world.bentobox.bentobox.BentoBox;
3536
import world.bentobox.bentobox.api.events.island.IslandProtectionRangeChangeEvent;
3637
import world.bentobox.bentobox.api.flags.Flag;
3738
import world.bentobox.bentobox.api.metadata.MetaDataValue;
@@ -121,6 +122,8 @@ public void onPlayerRespawn(PlayerRespawnEvent e) {
121122
private boolean isOn(Player player) {
122123
// Check if border is off
123124
User user = User.getInstance(player);
125+
BentoBox.getInstance().logDebug("Border state meta data = "
126+
+ user.getMetaData(BorderShower.BORDER_STATE_META_DATA).map(mtv -> mtv.asBoolean()).orElse(null));
124127
return user.getMetaData(BorderShower.BORDER_STATE_META_DATA).map(MetaDataValue::asBoolean)
125128
.orElse(addon.getSettings().isShowByDefault());
126129

0 commit comments

Comments
 (0)