An importable library that allows you to make chests that only you can open! Very useful for protecting your hard-earned goods from grubby thieves. Instruction on how to use are inside the mod.
Check it out in action: https://youtu.be/m6N6YJjyGZA
importableevents.when(("inventory.InventoryOpenEvent"),(lockChest), me, false);events.when(("block.BlockBreakEvent"),(breakChest), me, false);dummyChestEnable these if you want to test the library.1dummyChestHerp DerpdummyChestmakeChestsMake sure to import this and importable into your mod, or the library wont work!importableMake sure to import this and makeChests into your mod, or the library wont work!makeChestsOnce this function is imported, use it with a Player to give them a chest only they can open!chest1sign1chestpPlayerdisplayNamechestpPlayersignpPlayerbreakChestThe function that prevents your chest from being broken!OREQinfoblock().getTypeOREQinfoblock().getTypeEQinfoblock().getTypeinfoCancelledTRUEYou came to the wrong shop for anarchy, brother.infoplayerlockChestThis is the function that actually prevents other players from opening your chest!invNameinfoinventory().getNamechestOpenerinfoplayer().getDisplayNameANDANDNEQchestOpenerinvNameNEQinvNameMy ModsNEQinvNamemob.villagerinfoCancelledTRUEHey! Thats not your chest, its invNames! Dont be greedy...infoplayerupdateNameListnListnameList2