use of com.skelril.skree.content.itemrestriction.ItemCraftBlockingListener in project Skree by Skelril.
the class ItemRestrictionSystem method init.
@NModuleTrigger(trigger = "SERVER_STARTED")
public void init() {
try {
ItemRestrictionConfig config = ConfigLoader.loadConfig("item_restriction.json", ItemRestrictionConfig.class);
Set<String> blockedItems = config.getBlockedItems();
Sponge.getEventManager().registerListeners(SkreePlugin.inst(), new ItemCraftBlockingListener(blockedItems));
Sponge.getEventManager().registerListeners(SkreePlugin.inst(), new ItemInteractBlockingListener(blockedItems));
} catch (IOException e) {
e.printStackTrace();
}
}
Aggregations