mirror of
https://github.com/BentoBoxWorld/BentoBox.git
synced 2024-11-24 19:55:17 +01:00
Fixed some redundant Flag-related calls
This commit is contained in:
parent
f828f23c2f
commit
a735bfdf5c
@ -17,9 +17,6 @@ public class PortalListener extends FlagListener {
|
|||||||
|
|
||||||
@EventHandler(priority = EventPriority.LOW, ignoreCancelled = true)
|
@EventHandler(priority = EventPriority.LOW, ignoreCancelled = true)
|
||||||
public void onPlayerPortal(PlayerPortalEvent e) {
|
public void onPlayerPortal(PlayerPortalEvent e) {
|
||||||
if (e.getPlayer().isOp()) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (e.getCause().equals(TeleportCause.NETHER_PORTAL)) {
|
if (e.getCause().equals(TeleportCause.NETHER_PORTAL)) {
|
||||||
checkIsland(e, e.getFrom(), Flags.PORTAL);
|
checkIsland(e, e.getFrom(), Flags.PORTAL);
|
||||||
} else if (e.getCause().equals(TeleportCause.END_PORTAL)) {
|
} else if (e.getCause().equals(TeleportCause.END_PORTAL)) {
|
||||||
|
@ -22,7 +22,6 @@ public class TeleportationListener extends FlagListener {
|
|||||||
*/
|
*/
|
||||||
@EventHandler(priority = EventPriority.HIGH, ignoreCancelled = true)
|
@EventHandler(priority = EventPriority.HIGH, ignoreCancelled = true)
|
||||||
public void onPlayerTeleport(final PlayerTeleportEvent e) {
|
public void onPlayerTeleport(final PlayerTeleportEvent e) {
|
||||||
|
|
||||||
if (e.getCause() != null) {
|
if (e.getCause() != null) {
|
||||||
if (e.getCause().equals(TeleportCause.ENDER_PEARL)) {
|
if (e.getCause().equals(TeleportCause.ENDER_PEARL)) {
|
||||||
checkIsland(e, e.getTo(), Flags.ENDER_PEARL);
|
checkIsland(e, e.getTo(), Flags.ENDER_PEARL);
|
||||||
|
@ -140,7 +140,7 @@ public class Flags {
|
|||||||
public static final Flag ITEM_PICKUP = new FlagBuilder().id("ITEM_PICKUP").icon(Material.BEETROOT_SEEDS).build();
|
public static final Flag ITEM_PICKUP = new FlagBuilder().id("ITEM_PICKUP").icon(Material.BEETROOT_SEEDS).build();
|
||||||
|
|
||||||
// TNT
|
// TNT
|
||||||
public static final Flag TNT = new FlagBuilder().id("TNT").icon(Material.TNT).listener(new TNTListener()).allowedByDefault(false).type(Type.PROTECTION).build();
|
public static final Flag TNT = new FlagBuilder().id("TNT").icon(Material.TNT).listener(new TNTListener()).allowedByDefault(false).build();
|
||||||
|
|
||||||
// Island lock
|
// Island lock
|
||||||
public static final Flag LOCK = new FlagBuilder().id("LOCK")
|
public static final Flag LOCK = new FlagBuilder().id("LOCK")
|
||||||
|
Loading…
Reference in New Issue
Block a user