mirror of
https://github.com/songoda/EpicAnchors.git
synced 2024-10-31 23:59:35 +01:00
Updated portal create event method.
This commit is contained in:
parent
8bf55a3a0f
commit
170b014f52
@ -4,7 +4,7 @@ stages:
|
||||
variables:
|
||||
name: "EpicAnchors"
|
||||
path: "/builds/$CI_PROJECT_PATH"
|
||||
version: "1.3.1"
|
||||
version: "1.3.2"
|
||||
|
||||
build:
|
||||
stage: build
|
||||
|
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user