Updated portal create event method.

This commit is contained in:
Brianna 2019-07-08 17:00:02 -04:00
parent 8bf55a3a0f
commit 170b014f52
2 changed files with 3 additions and 3 deletions

View File

@ -4,7 +4,7 @@ stages:
variables:
name: "EpicAnchors"
path: "/builds/$CI_PROJECT_PATH"
version: "1.3.1"
version: "1.3.2"
build:
stage: build

View File

@ -7,7 +7,7 @@ import org.bukkit.Material;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.block.BlockPlaceEvent;
import org.bukkit.event.entity.EntityCreatePortalEvent;
import org.bukkit.event.world.PortalCreateEvent;
import org.bukkit.inventory.ItemStack;
public class BlockListeners implements Listener {
@ -37,7 +37,7 @@ public class BlockListeners implements Listener {
}
@EventHandler
public void onPortalCreation(EntityCreatePortalEvent e) {
public void onPortalCreation(PortalCreateEvent e) {
if (e.getBlocks().size() < 1) return;
if (plugin.getAnchorManager().isAnchor(e.getBlocks().get(0).getLocation())) e.setCancelled(true);
}