Added configuration, save toggle states, can change stickopeninv to

anyother item.
This commit is contained in:
lishd
2011-09-18 20:44:57 -04:00
parent b0aeef46d8
commit 616ea0fad8
6 changed files with 37 additions and 26 deletions

View File

@@ -82,6 +82,22 @@ public class OpenInv extends JavaPlugin {
}
}
public static boolean GetPlayerItemOpenInvStatus(String name)
{
return config.getBoolean("ItemOpenInv." + name.toLowerCase() + ".toggle", false);
}
public static void SetPlayerItemOpenInvStatus(String name, boolean status)
{
config.setProperty("ItemOpenInv." + name.toLowerCase() + ".toggle", status);
config.save();
}
public static int GetItemOpenInvItem()
{
return config.getInt("ItemOpenInvItemID", 280);
}
public static Object GetFromConfig(String data, Object defaultValue)
{
Object val = config.getProperty(data);