mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-08-04 05:25:28 +02:00
Add custom_item_support config file to optionally disable repair/salvage on items with custom models
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
package com.gmail.nossr50.config;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
public class CustomItemSupportConfig extends BukkitConfig {
|
||||
public CustomItemSupportConfig(File dataFolder) {
|
||||
super("custom_item_support.yml", dataFolder);
|
||||
validate();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void loadKeys() {
|
||||
|
||||
}
|
||||
|
||||
public boolean isCustomRepairAllowed() {
|
||||
return config.getBoolean("Custom_Item_Support.Repair.Allow_Repair_On_Items_With_Custom_Model_Data", true);
|
||||
}
|
||||
|
||||
public boolean isCustomSalvageAllowed() {
|
||||
return config.getBoolean("Custom_Item_Support.Salvage.Allow_Salvage_On_Items_With_Custom_Model_Data", true);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user