mirror of
https://github.com/sekwah41/Advanced-Portals.git
synced 2025-01-29 19:41:31 +01:00
tried fixing some stuff in listeners
This commit is contained in:
parent
e12a65bf69
commit
07f3e8e2f6
@ -261,7 +261,7 @@ public class Listeners implements Listener {
|
||||
|
||||
if(player.hasMetadata("selectingPortal") && (event.getAction() == Action.LEFT_CLICK_BLOCK || event.getAction() == Action.RIGHT_CLICK_BLOCK)){
|
||||
if(!Portal.portalsActive){
|
||||
player.sendMessage("\u00A7a[§7AdvancedPortals§c] There are no portals that exist to select. Portal sselection canceled.");
|
||||
player.sendMessage("\u00A7a[\u00A77AdvancedPortals\u00A7c] There are no portals that exist to select. Portal selection canceled.");
|
||||
event.setCancelled(true);
|
||||
player.removeMetadata("selectingPortal", plugin);
|
||||
return;
|
||||
@ -294,7 +294,7 @@ public class Listeners implements Listener {
|
||||
// UseOnlyServerMadeAxe being set to true makes is so only the axe generated by the server can be used so other iron axes can be used normally,
|
||||
// by default its false but it is a nice feature in case the user wants to use the axe normally too, such as a admin playing survival or it being used
|
||||
// as a weapon.
|
||||
if((!UseOnlyServerAxe || event.getItem().getItemMeta().getDisplayName().equals("\u00A7ePortal Region Selector")) && event.getPlayer().getItemInHand().getTypeId() == WandMaterial.getId()) {
|
||||
if((!UseOnlyServerAxe || (event.getItem() != null && event.getItem().getItemMeta().getDisplayName().equals("\u00A7ePortal Region Selector")) && event.getPlayer().getItemInHand().getTypeId() == WandMaterial.getId())) {
|
||||
|
||||
// This checks if the action was a left or right click and if it was directly effecting a block.
|
||||
if(event.getAction() == Action.LEFT_CLICK_BLOCK) {
|
||||
|
@ -18,7 +18,7 @@ public class Portal {
|
||||
|
||||
private static AdvancedPortalsPlugin plugin;
|
||||
|
||||
public static boolean portalsActive = true;
|
||||
public static boolean portalsActive = false;
|
||||
|
||||
public static AdvancedPortal[] Portals;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user