mirror of
https://github.com/ChestShop-authors/ChestShop-3.git
synced 2024-11-27 12:38:40 +01:00
Add an option to not remove LWC protections
This commit is contained in:
parent
9fa2f92ef8
commit
ddf32eda04
@ -129,6 +129,9 @@ public class Properties {
|
|||||||
@ConfigurationComment("Do you want to protect shop signs with LWC?")
|
@ConfigurationComment("Do you want to protect shop signs with LWC?")
|
||||||
public static boolean PROTECT_SIGN_WITH_LWC = false;
|
public static boolean PROTECT_SIGN_WITH_LWC = false;
|
||||||
|
|
||||||
|
@ConfigurationComment("Should the chest's LWC protection be removed once the shop sign is destroyed? ")
|
||||||
|
public static boolean REMOVE_LWC_PROTECTION_AUTOMATICALLY = true;
|
||||||
|
|
||||||
@PrecededBySpace
|
@PrecededBySpace
|
||||||
@ConfigurationComment("If true, plugin will generate shop statistics webpage.")
|
@ConfigurationComment("If true, plugin will generate shop statistics webpage.")
|
||||||
public static boolean GENERATE_STATISTICS_PAGE = false;
|
public static boolean GENERATE_STATISTICS_PAGE = false;
|
||||||
|
@ -7,11 +7,9 @@ import com.Acrobot.ChestShop.Events.Protection.ProtectionCheckEvent;
|
|||||||
import com.Acrobot.ChestShop.Events.ShopCreatedEvent;
|
import com.Acrobot.ChestShop.Events.ShopCreatedEvent;
|
||||||
import com.Acrobot.ChestShop.Events.ShopDestroyedEvent;
|
import com.Acrobot.ChestShop.Events.ShopDestroyedEvent;
|
||||||
import com.Acrobot.ChestShop.Security;
|
import com.Acrobot.ChestShop.Security;
|
||||||
import com.Acrobot.ChestShop.UUIDs.NameManager;
|
|
||||||
import com.griefcraft.lwc.LWC;
|
import com.griefcraft.lwc.LWC;
|
||||||
import com.griefcraft.model.Protection;
|
import com.griefcraft.model.Protection;
|
||||||
import com.griefcraft.scripting.event.LWCProtectionRegisterEvent;
|
import com.griefcraft.scripting.event.LWCProtectionRegisterEvent;
|
||||||
import org.bukkit.Bukkit;
|
|
||||||
import org.bukkit.block.Block;
|
import org.bukkit.block.Block;
|
||||||
import org.bukkit.block.Chest;
|
import org.bukkit.block.Chest;
|
||||||
import org.bukkit.block.Sign;
|
import org.bukkit.block.Sign;
|
||||||
@ -115,7 +113,7 @@ public class LightweightChestProtection implements Listener {
|
|||||||
signProtection.remove();
|
signProtection.remove();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (event.getChest() == null) {
|
if (event.getChest() == null || !Properties.REMOVE_LWC_PROTECTION_AUTOMATICALLY) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user