Add an option to disable hopper protection

Former-commit-id: b8bda361b6ad29c7b111e039eb0c5d757bc955f2
This commit is contained in:
sandtechnology committed 2020-03-21 01:29:11 +08:00
1 parent 8e51f87e58
commit 916ae2e121
3 files changed
+10 -1

No files matched your search

@@ -176,7 +176,9 @@ public class ShopProtectionListener implements Listener {
@EventHandler(ignoreCancelled = true, priority = EventPriority.HIGH)
public void onInventoryMove(InventoryMoveItemEvent event) {
if(!plugin.getConfig().getBoolean("protect.hopper")){
return;
}
final Location loc = event.getSource().getLocation();
if (loc == null) {
@@ -1532,6 +1532,11 @@ public class QuickShop extends JavaPlugin {
getConfig().set("config-version", 90);
selectedVersion = 90;
}
if(selectedVersion==90){
getConfig().set("protect.hopper",true);
getConfig().set("config-version", 91);
selectedVersion=91;
}
saveConfig();
reloadConfig();
File file = new File(getDataFolder(), "example.config.yml");
+2
View File
@@ -472,8 +472,10 @@ integration:
warzone: false
#Player must have flags in the faction:
flags: []
#the protection that shop should check
protect:
explode: true
hopper: true