mirror of
https://github.com/TotalFreedomMC/TF-WorldGuardExtraFlagsPlugin.git
synced 2024-12-29 02:25:23 +00:00
Fixed build flag & block-place and block-break incompatiblity
This commit is contained in:
parent
a3b551a512
commit
368f96c51e
1 changed files with 22 additions and 24 deletions
|
@ -91,8 +91,7 @@ public class BlockListener implements Listener
|
|||
@EventHandler(priority = EventPriority.LOWEST, ignoreCancelled = false)
|
||||
public void onBlockBreakEvent(BreakBlockEvent event)
|
||||
{
|
||||
if (event.getResult() == Result.DEFAULT)
|
||||
{
|
||||
Result originalResult = event.getResult();
|
||||
Object cause = event.getCause().getRootCause();
|
||||
|
||||
if (cause instanceof Player)
|
||||
|
@ -120,7 +119,7 @@ public class BlockListener implements Listener
|
|||
}
|
||||
else
|
||||
{
|
||||
event.setResult(Result.DEFAULT);
|
||||
event.setResult(originalResult);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -128,5 +127,4 @@ public class BlockListener implements Listener
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue