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:
Nick 2016-01-01 12:33:42 -08:00
parent ad68a89f15
commit e5a90c5e7f
2 changed files with 51 additions and 3 deletions

View file

@ -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