Skip to content
This repository has been archived by the owner on Jul 7, 2021. It is now read-only.

Commit

Permalink
Downgrade 1.10 release to 1.13.2 version
Browse files Browse the repository at this point in the history
  • Loading branch information
BONNe committed Jan 3, 2020
1 parent 31eef39 commit 39a9540
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 28 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
<spigot.version>1.13.2-R0.1-SNAPSHOT</spigot.version>
<bstats.version>1.5</bstats.version>
<vault.version>1.7</vault.version>
<placeholderapi.version>2.10.4</placeholderapi.version>
<placeholderapi.version>2.10.3</placeholderapi.version>
<mvdwplaceholderapi.version>master-SNAPSHOT</mvdwplaceholderapi.version>
<githubapi.version>d5f5e0bbd8</githubapi.version>
<dynmap.version>3.0-SNAPSHOT</dynmap.version>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,8 @@
import org.bukkit.Material;
import org.bukkit.block.Block;
import org.bukkit.block.data.BlockData;
import org.bukkit.entity.AbstractArrow;
import org.bukkit.entity.ArmorStand;
import org.bukkit.entity.EnderCrystal;
import org.bukkit.entity.ItemFrame;
import org.bukkit.entity.Player;
import org.bukkit.entity.Projectile;
//import org.bukkit.entity.AbstractArrow;
import org.bukkit.entity.*;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
import org.bukkit.event.block.Action;
Expand Down Expand Up @@ -141,7 +137,7 @@ private boolean notAllowed(EntityDamageByEntityEvent e, Player player, Location
@EventHandler(priority = EventPriority.LOW, ignoreCancelled = true)
public void onProjectileHitBreakBlock(ProjectileHitEvent e) {
// We want to make sure this is an actual projectile (arrow or trident)
if (!(e.getEntity() instanceof AbstractArrow)) {
if (!(e.getEntity() instanceof Arrow)) {
return;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
import org.bukkit.event.block.BlockPlaceEvent;
import org.bukkit.event.player.PlayerTakeLecternBookEvent;
//import org.bukkit.event.player.PlayerTakeLecternBookEvent;
import world.bentobox.bentobox.api.flags.FlagListener;
import world.bentobox.bentobox.lists.Flags;

Expand All @@ -15,17 +15,18 @@
*/
public class LecternListener extends FlagListener {

@EventHandler(priority = EventPriority.LOW, ignoreCancelled = true)
public void onPlayerTakeBookFromLectern(PlayerTakeLecternBookEvent e) {
checkIsland(e, e.getPlayer(), e.getLectern().getLocation(), Flags.LECTERN);
}

@EventHandler(priority = EventPriority.LOW, ignoreCancelled = true)
public void onPlaceBooksOnLectern(BlockPlaceEvent e) {
if (e.getItemInHand().getType().equals(Material.WRITABLE_BOOK)
|| e.getItemInHand().getType().equals(Material.WRITTEN_BOOK)) {
// Books can only be placed on lecterns and as such are protected by the LECTERN flag.
checkIsland(e, e.getPlayer(), e.getBlock().getLocation(), Flags.LECTERN);
}
}
// Lecterns are not in 1.13
// @EventHandler(priority = EventPriority.LOW, ignoreCancelled = true)
// public void onPlayerTakeBookFromLectern(PlayerTakeLecternBookEvent e) {
// checkIsland(e, e.getPlayer(), e.getLectern().getLocation(), Flags.LECTERN);
// }
//
// @EventHandler(priority = EventPriority.LOW, ignoreCancelled = true)
// public void onPlaceBooksOnLectern(BlockPlaceEvent e) {
// if (e.getItemInHand().getType().equals(Material.WRITABLE_BOOK)
// || e.getItemInHand().getType().equals(Material.WRITTEN_BOOK)) {
// // Books can only be placed on lecterns and as such are protected by the LECTERN flag.
// checkIsland(e, e.getPlayer(), e.getBlock().getLocation(), Flags.LECTERN);
// }
// }
}
12 changes: 6 additions & 6 deletions src/main/java/world/bentobox/bentobox/lists/Flags.java
Original file line number Diff line number Diff line change
Expand Up @@ -118,12 +118,12 @@ private Flags() {}
* @see BreakBlocksListener
*/
public static final Flag DRAGON_EGG = new Flag.Builder("DRAGON_EGG", Material.DRAGON_EGG).build();
/**
* Prevents players from placing a book on a lectern or taking the book from it.
* @since 1.10.0
* @see LecternListener
*/
public static final Flag LECTERN = new Flag.Builder("LECTERN", Material.LECTERN).listener(new LecternListener()).build();
// /**
// * Prevents players from placing a book on a lectern or taking the book from it.
// * @since 1.10.0
// * @see LecternListener
// */
// public static final Flag LECTERN = new Flag.Builder("LECTERN", Material.LECTERN).listener(new LecternListener()).build();

// Entity interactions
public static final Flag ARMOR_STAND = new Flag.Builder("ARMOR_STAND", Material.ARMOR_STAND).listener(new EntityInteractListener()).mode(Flag.Mode.ADVANCED).build();
Expand Down

0 comments on commit 39a9540

Please sign in to comment.