Fix /dxl break; resolves #1011

This commit is contained in:
Tim Daniel Saukel 2021-04-19 23:43:54 +02:00
parent d130190d41
commit 475abcc304
2 changed files with 2 additions and 4 deletions

View File

@ -294,7 +294,7 @@ public class DPortal extends GlobalProtection {
@Override
public void delete() {
protections.removeProtection(this);
plugin.getGlobalProtectionCache().removeProtection(this);
if (block1 == null || block2 == null) {
return;

View File

@ -32,7 +32,6 @@ import org.bukkit.configuration.ConfigurationSection;
public abstract class GlobalProtection {
protected DungeonsXL plugin;
protected GlobalProtectionCache protections;
public static final String SIGN_TAG = "[DXL]";
@ -41,7 +40,6 @@ public abstract class GlobalProtection {
protected GlobalProtection(DungeonsXL plugin, World world, int id) {
this.plugin = plugin;
protections = plugin.getGlobalProtectionCache();
this.world = world.getName();
this.id = id;
@ -66,7 +64,7 @@ public abstract class GlobalProtection {
* Delete this protection.
*/
public void delete() {
protections.removeProtection(this);
plugin.getGlobalProtectionCache().removeProtection(this);
}
public boolean onBreak(DGlobalPlayer dPlayer) {