mirror of
https://github.com/BentoBoxWorld/BentoBox.git
synced 2024-11-23 19:25:12 +01:00
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>
This commit is contained in:
parent
376ac167e8
commit
1a7b7cdeb7
2
pom.xml
2
pom.xml
@ -83,7 +83,7 @@
|
|||||||
<!-- Do not change unless you want different name for local builds. -->
|
<!-- Do not change unless you want different name for local builds. -->
|
||||||
<build.number>-LOCAL</build.number>
|
<build.number>-LOCAL</build.number>
|
||||||
<!-- This allows to change between versions. -->
|
<!-- This allows to change between versions. -->
|
||||||
<build.version>1.17.1</build.version>
|
<build.version>1.17.2</build.version>
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
<!-- Profiles will allow to automatically change build version. -->
|
<!-- Profiles will allow to automatically change build version. -->
|
||||||
|
@ -393,6 +393,16 @@ public abstract class Addon {
|
|||||||
public IslandsManager getIslands() {
|
public IslandsManager getIslands() {
|
||||||
return getPlugin().getIslands();
|
return getPlugin().getIslands();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get Islands Manager
|
||||||
|
* @return Islands manager
|
||||||
|
* @see #getIslands()
|
||||||
|
* @since 1.17.1
|
||||||
|
*/
|
||||||
|
public IslandsManager getIslandsManager() {
|
||||||
|
return getPlugin().getIslandsManager();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the Addon By Name
|
* Get the Addon By Name
|
||||||
|
@ -296,7 +296,6 @@ public class BlueprintPaster {
|
|||||||
}
|
}
|
||||||
// Chests, in general
|
// Chests, in general
|
||||||
if (bs instanceof InventoryHolder) {
|
if (bs instanceof InventoryHolder) {
|
||||||
bs.update(true, false);
|
|
||||||
Inventory ih = ((InventoryHolder)bs).getInventory();
|
Inventory ih = ((InventoryHolder)bs).getInventory();
|
||||||
// Double chests are pasted as two blocks so inventory is filled twice. This code stops over filling for the first block.
|
// Double chests are pasted as two blocks so inventory is filled twice. This code stops over filling for the first block.
|
||||||
bpBlock.getInventory().forEach(ih::setItem);
|
bpBlock.getInventory().forEach(ih::setItem);
|
||||||
|
@ -2,7 +2,6 @@ package world.bentobox.bentobox.listeners.flags.protection;
|
|||||||
|
|
||||||
import org.bukkit.Location;
|
import org.bukkit.Location;
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
import org.bukkit.block.Block;
|
|
||||||
import org.bukkit.block.data.BlockData;
|
import org.bukkit.block.data.BlockData;
|
||||||
import org.bukkit.entity.AbstractArrow;
|
import org.bukkit.entity.AbstractArrow;
|
||||||
import org.bukkit.entity.ArmorStand;
|
import org.bukkit.entity.ArmorStand;
|
||||||
@ -20,7 +19,6 @@ import org.bukkit.event.entity.ProjectileHitEvent;
|
|||||||
import org.bukkit.event.hanging.HangingBreakByEntityEvent;
|
import org.bukkit.event.hanging.HangingBreakByEntityEvent;
|
||||||
import org.bukkit.event.player.PlayerInteractEvent;
|
import org.bukkit.event.player.PlayerInteractEvent;
|
||||||
import org.bukkit.event.vehicle.VehicleDamageEvent;
|
import org.bukkit.event.vehicle.VehicleDamageEvent;
|
||||||
import org.bukkit.util.BlockIterator;
|
|
||||||
|
|
||||||
import world.bentobox.bentobox.api.flags.FlagListener;
|
import world.bentobox.bentobox.api.flags.FlagListener;
|
||||||
import world.bentobox.bentobox.lists.Flags;
|
import world.bentobox.bentobox.lists.Flags;
|
||||||
@ -68,21 +66,6 @@ public class BreakBlocksListener extends FlagListener {
|
|||||||
if (!e.getAction().equals(Action.LEFT_CLICK_BLOCK)) {
|
if (!e.getAction().equals(Action.LEFT_CLICK_BLOCK)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Look along player's sight line to see if any blocks are skulls
|
|
||||||
try {
|
|
||||||
BlockIterator iterator = new BlockIterator(e.getPlayer(), 10);
|
|
||||||
while (iterator.hasNext()) {
|
|
||||||
Block lastBlock = iterator.next();
|
|
||||||
if (lastBlock.getType().toString().endsWith("_SKULL") || (lastBlock.getType().toString().endsWith("_HEAD") && !lastBlock.getType().equals(Material.PISTON_HEAD))) {
|
|
||||||
checkIsland(e, e.getPlayer(), lastBlock.getLocation(), Flags.BREAK_BLOCKS);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} catch (Exception ignored) {
|
|
||||||
// We can ignore this exception
|
|
||||||
}
|
|
||||||
|
|
||||||
switch (e.getClickedBlock().getType()) {
|
switch (e.getClickedBlock().getType()) {
|
||||||
case CAKE:
|
case CAKE:
|
||||||
checkIsland(e, e.getPlayer(), e.getClickedBlock().getLocation(), Flags.BREAK_BLOCKS);
|
checkIsland(e, e.getPlayer(), e.getClickedBlock().getLocation(), Flags.BREAK_BLOCKS);
|
||||||
|
@ -62,6 +62,7 @@ public class ObsidianScoopingListener extends FlagListener {
|
|||||||
user.sendMessage("protection.flags.OBSIDIAN_SCOOPING.scooping");
|
user.sendMessage("protection.flags.OBSIDIAN_SCOOPING.scooping");
|
||||||
player.getWorld().playSound(player.getLocation(), Sound.ITEM_BUCKET_FILL_LAVA, 1F, 1F);
|
player.getWorld().playSound(player.getLocation(), Sound.ITEM_BUCKET_FILL_LAVA, 1F, 1F);
|
||||||
b.setType(Material.AIR);
|
b.setType(Material.AIR);
|
||||||
|
e.setCancelled(true);
|
||||||
Bukkit.getScheduler().runTask(BentoBox.getInstance(), () -> givePlayerLava(player, bucket));
|
Bukkit.getScheduler().runTask(BentoBox.getInstance(), () -> givePlayerLava(player, bucket));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -173,7 +173,7 @@ public class AddonsManager {
|
|||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
// We couldn't load the addon, aborting.
|
// We couldn't load the addon, aborting.
|
||||||
plugin.logError("Could not load addon! " + e.getMessage());
|
plugin.logError("Could not load addon '" + f.getName() + "'. Error is: " + e.getMessage());
|
||||||
plugin.logStacktrace(e);
|
plugin.logStacktrace(e);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user