mirror of
https://github.com/TotalFreedomMC/OpenInv.git
synced 2024-12-22 16:05:03 +00:00
Another small change
This commit is contained in:
parent
802e405c4e
commit
f7029e5ee2
1 changed files with 7 additions and 1 deletions
|
@ -131,9 +131,15 @@ public class OpenInv extends JavaPlugin {
|
|||
if (!mainPlugin.getConfig().isSet("items.open-inv")) {
|
||||
saveToConfig("items.open-inv", "STICK");
|
||||
}
|
||||
|
||||
String itemName = mainPlugin.getConfig().getString("items.open-inv", "STICK");
|
||||
Material material = Material.getMaterial(itemName);
|
||||
return material != null ? material : Material.STICK;
|
||||
if (material == null) {
|
||||
mainPlugin.getLogger().info("OpenInv item '" + itemName + "' does not match to a valid item. Defaulting to stick.");
|
||||
material = Material.STICK;
|
||||
}
|
||||
|
||||
return material;
|
||||
}
|
||||
|
||||
public static boolean notifySilentChest() {
|
||||
|
|
Loading…
Reference in a new issue