Skip to content

Commit 1a7b7cd

Browse files
tastybentoBONNeFredthedoggyjstnfgecko10000
authored
1.17.2 Release (#1812)
* Version 1.17.2 * Add alternative Addon#getIslandManager method (#1797) We have already done this to the main BentoBox class. But add-ons missed it, and it still has this weird structure: Addon#getIslands().getIslands(). This will just add the same method as it is already in BentoBox class. * Fix bucket dupe (#1806) Fix https://discord.com/channels/272499714048524288/310623455462686720/867790395442462760 * Removes unneeded exploit protection code for skulls (#1810) This no longer seems to be required with 1.17.1 https://github.com/BentoBoxWorld/BSkyBlock/issues/430 * Quote filename of addon that cannot be loaded. Provides a better understanding of which addon failed. * Remove update when pasting chest. Co-authored-by: BONNe <bonne@bonne.id.lv> Co-authored-by: Fredthedoggy <45927799+Fredthedoggy@users.noreply.github.com> Co-authored-by: Justin <jstnf@users.noreply.github.com> Co-authored-by: gecko10000 <60494179+levtey@users.noreply.github.com>
1 parent 376ac16 commit 1a7b7cd

File tree

6 files changed

+13
-20
lines changed

6 files changed

+13
-20
lines changed

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@
8383
<!-- Do not change unless you want different name for local builds. -->
8484
<build.number>-LOCAL</build.number>
8585
<!-- This allows to change between versions. -->
86-
<build.version>1.17.1</build.version>
86+
<build.version>1.17.2</build.version>
8787
</properties>
8888

8989
<!-- Profiles will allow to automatically change build version. -->

src/main/java/world/bentobox/bentobox/api/addons/Addon.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -393,6 +393,16 @@ public PlayersManager getPlayers() {
393393
public IslandsManager getIslands() {
394394
return getPlugin().getIslands();
395395
}
396+
397+
/**
398+
* Get Islands Manager
399+
* @return Islands manager
400+
* @see #getIslands()
401+
* @since 1.17.1
402+
*/
403+
public IslandsManager getIslandsManager() {
404+
return getPlugin().getIslandsManager();
405+
}
396406

397407
/**
398408
* Get the Addon By Name

src/main/java/world/bentobox/bentobox/blueprints/BlueprintPaster.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,6 @@ private void setBlockState(Block block, BlueprintBlock bpBlock) {
296296
}
297297
// Chests, in general
298298
if (bs instanceof InventoryHolder) {
299-
bs.update(true, false);
300299
Inventory ih = ((InventoryHolder)bs).getInventory();
301300
// Double chests are pasted as two blocks so inventory is filled twice. This code stops over filling for the first block.
302301
bpBlock.getInventory().forEach(ih::setItem);

src/main/java/world/bentobox/bentobox/listeners/flags/protection/BreakBlocksListener.java

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
import org.bukkit.Location;
44
import org.bukkit.Material;
5-
import org.bukkit.block.Block;
65
import org.bukkit.block.data.BlockData;
76
import org.bukkit.entity.AbstractArrow;
87
import org.bukkit.entity.ArmorStand;
@@ -20,7 +19,6 @@
2019
import org.bukkit.event.hanging.HangingBreakByEntityEvent;
2120
import org.bukkit.event.player.PlayerInteractEvent;
2221
import org.bukkit.event.vehicle.VehicleDamageEvent;
23-
import org.bukkit.util.BlockIterator;
2422

2523
import world.bentobox.bentobox.api.flags.FlagListener;
2624
import world.bentobox.bentobox.lists.Flags;
@@ -68,21 +66,6 @@ public void onPlayerInteract(final PlayerInteractEvent e) {
6866
if (!e.getAction().equals(Action.LEFT_CLICK_BLOCK)) {
6967
return;
7068
}
71-
72-
// Look along player's sight line to see if any blocks are skulls
73-
try {
74-
BlockIterator iterator = new BlockIterator(e.getPlayer(), 10);
75-
while (iterator.hasNext()) {
76-
Block lastBlock = iterator.next();
77-
if (lastBlock.getType().toString().endsWith("_SKULL") || (lastBlock.getType().toString().endsWith("_HEAD") && !lastBlock.getType().equals(Material.PISTON_HEAD))) {
78-
checkIsland(e, e.getPlayer(), lastBlock.getLocation(), Flags.BREAK_BLOCKS);
79-
return;
80-
}
81-
}
82-
} catch (Exception ignored) {
83-
// We can ignore this exception
84-
}
85-
8669
switch (e.getClickedBlock().getType()) {
8770
case CAKE:
8871
checkIsland(e, e.getPlayer(), e.getClickedBlock().getLocation(), Flags.BREAK_BLOCKS);

src/main/java/world/bentobox/bentobox/listeners/flags/worldsettings/ObsidianScoopingListener.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ private boolean lookForLava(PlayerInteractEvent e) {
6262
user.sendMessage("protection.flags.OBSIDIAN_SCOOPING.scooping");
6363
player.getWorld().playSound(player.getLocation(), Sound.ITEM_BUCKET_FILL_LAVA, 1F, 1F);
6464
b.setType(Material.AIR);
65+
e.setCancelled(true);
6566
Bukkit.getScheduler().runTask(BentoBox.getInstance(), () -> givePlayerLava(player, bucket));
6667
return true;
6768
}

src/main/java/world/bentobox/bentobox/managers/AddonsManager.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ private void loadAddon(@NonNull File f) {
173173
}
174174
} catch (Exception e) {
175175
// We couldn't load the addon, aborting.
176-
plugin.logError("Could not load addon! " + e.getMessage());
176+
plugin.logError("Could not load addon '" + f.getName() + "'. Error is: " + e.getMessage());
177177
plugin.logStacktrace(e);
178178
return;
179179
}

0 commit comments

Comments
 (0)