mirror of
https://github.com/sekwah41/Advanced-Portals.git
synced 2024-11-22 10:36:17 +01:00
Possibly fixed more errors
This commit is contained in:
parent
9adfc2e58b
commit
54a3f8215f
@ -39,7 +39,11 @@ public class PortalProtect implements Listener {
|
||||
@SuppressWarnings("unused")
|
||||
@EventHandler(priority = EventPriority.HIGH)
|
||||
public void onBlockBreak(BlockBreakEvent event){
|
||||
|
||||
|
||||
if(!Portal.portalsActive){
|
||||
return;
|
||||
}
|
||||
|
||||
if(!event.getPlayer().hasPermission("advancedportals.build")){
|
||||
Block block = event.getBlock();
|
||||
|
||||
@ -63,6 +67,10 @@ public class PortalProtect implements Listener {
|
||||
@SuppressWarnings("unused")
|
||||
@EventHandler(priority = EventPriority.HIGH)
|
||||
public void onBlockPlace(BlockPlaceEvent event){
|
||||
|
||||
if(!Portal.portalsActive){
|
||||
return;
|
||||
}
|
||||
|
||||
if(!event.getPlayer().hasPermission("advancedportals.build")){
|
||||
Block block = event.getBlock();
|
||||
@ -86,6 +94,11 @@ public class PortalProtect implements Listener {
|
||||
|
||||
@EventHandler(priority = EventPriority.HIGH)
|
||||
public void onExplosion(EntityExplodeEvent event){
|
||||
|
||||
if(!Portal.portalsActive){
|
||||
return;
|
||||
}
|
||||
|
||||
List<Block> blockList = event.blockList();
|
||||
for (int i = 0; i < blockList.size(); i++) {
|
||||
Block block = blockList.get(i);
|
||||
|
Loading…
Reference in New Issue
Block a user