Add a way to hard blacklist Blocks from the Teleposer
The blocks in this list cannot be changed via config file. The two lists are kept (instead just one) so that the config one can be refreshed at any point with ConfigChangedEvent.
This commit is contained in:
parent
ad68a89f15
commit
e5a90c5e7f
2 changed files with 51 additions and 3 deletions
|
@ -2,6 +2,7 @@ package WayofTime.bloodmagic.util.handler;
|
|||
|
||||
import WayofTime.bloodmagic.ConfigHandler;
|
||||
import WayofTime.bloodmagic.api.BlockStack;
|
||||
import WayofTime.bloodmagic.api.BloodMagicAPI;
|
||||
import WayofTime.bloodmagic.api.Constants;
|
||||
import WayofTime.bloodmagic.api.event.TeleposeEvent;
|
||||
import WayofTime.bloodmagic.api.util.helper.PlayerHelper;
|
||||
|
@ -89,6 +90,9 @@ public class EventHandler
|
|||
|
||||
if (ConfigHandler.teleposerBlacklist.contains(initialBlock) || ConfigHandler.teleposerBlacklist.contains(finalBlock))
|
||||
event.setCanceled(true);
|
||||
|
||||
if (BloodMagicAPI.getTeleposerBlacklist().contains(initialBlock) || BloodMagicAPI.getTeleposerBlacklist().contains(finalBlock))
|
||||
event.setCanceled(true);
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue