mirror of
https://github.com/sekwah41/Advanced-Portals.git
synced 2025-01-15 20:51:26 +01:00
Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
f7df4bff24
@ -39,7 +39,11 @@ public class PortalProtect implements Listener {
|
|||||||
@SuppressWarnings("unused")
|
@SuppressWarnings("unused")
|
||||||
@EventHandler(priority = EventPriority.HIGH)
|
@EventHandler(priority = EventPriority.HIGH)
|
||||||
public void onBlockBreak(BlockBreakEvent event){
|
public void onBlockBreak(BlockBreakEvent event){
|
||||||
|
|
||||||
|
if(!Portal.portalsActive){
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if(!event.getPlayer().hasPermission("advancedportals.build")){
|
if(!event.getPlayer().hasPermission("advancedportals.build")){
|
||||||
Block block = event.getBlock();
|
Block block = event.getBlock();
|
||||||
|
|
||||||
@ -63,6 +67,10 @@ public class PortalProtect implements Listener {
|
|||||||
@SuppressWarnings("unused")
|
@SuppressWarnings("unused")
|
||||||
@EventHandler(priority = EventPriority.HIGH)
|
@EventHandler(priority = EventPriority.HIGH)
|
||||||
public void onBlockPlace(BlockPlaceEvent event){
|
public void onBlockPlace(BlockPlaceEvent event){
|
||||||
|
|
||||||
|
if(!Portal.portalsActive){
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if(!event.getPlayer().hasPermission("advancedportals.build")){
|
if(!event.getPlayer().hasPermission("advancedportals.build")){
|
||||||
Block block = event.getBlock();
|
Block block = event.getBlock();
|
||||||
@ -86,6 +94,11 @@ public class PortalProtect implements Listener {
|
|||||||
|
|
||||||
@EventHandler(priority = EventPriority.HIGH)
|
@EventHandler(priority = EventPriority.HIGH)
|
||||||
public void onExplosion(EntityExplodeEvent event){
|
public void onExplosion(EntityExplodeEvent event){
|
||||||
|
|
||||||
|
if(!Portal.portalsActive){
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
List<Block> blockList = event.blockList();
|
List<Block> blockList = event.blockList();
|
||||||
for (int i = 0; i < blockList.size(); i++) {
|
for (int i = 0; i < blockList.size(); i++) {
|
||||||
Block block = blockList.get(i);
|
Block block = blockList.get(i);
|
||||||
|
Loading…
Reference in New Issue
Block a user