mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-22 21:26:45 +01:00
Check if WORLDEDIT_RESTRICTIONS is enabled
Unregister if disabled.
This commit is contained in:
parent
10e5760ba8
commit
55d6217c32
@ -23,8 +23,7 @@ import java.util.Set;
|
|||||||
public class WESubscriber {
|
public class WESubscriber {
|
||||||
|
|
||||||
@Subscribe(priority = Priority.VERY_EARLY) public void onEditSession(EditSessionEvent event) {
|
@Subscribe(priority = Priority.VERY_EARLY) public void onEditSession(EditSessionEvent event) {
|
||||||
WorldEdit worldedit = PlotSquared.get().worldedit;
|
if (!Settings.Enabled_Components.WORLDEDIT_RESTRICTIONS) {
|
||||||
if (worldedit == null) {
|
|
||||||
WorldEdit.getInstance().getEventBus().unregister(this);
|
WorldEdit.getInstance().getEventBus().unregister(this);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user