Re-implement the Teleposer Blacklist
This commit is contained in:
parent
0bb6e1eb36
commit
1ea5de0ed1
|
@ -1,5 +1,8 @@
|
|||
package WayofTime.bloodmagic.util.handler;
|
||||
|
||||
import WayofTime.bloodmagic.ConfigHandler;
|
||||
import WayofTime.bloodmagic.api.BlockStack;
|
||||
import WayofTime.bloodmagic.api.event.TeleposeEvent;
|
||||
import WayofTime.bloodmagic.api.util.helper.PlayerHelper;
|
||||
import WayofTime.bloodmagic.block.BlockAltar;
|
||||
import WayofTime.bloodmagic.item.ItemAltarMaker;
|
||||
|
@ -77,4 +80,13 @@ public class EventHandler
|
|||
ChatUtil.sendNoSpam(event.entityPlayer, TextHelper.localizeEffect("chat.BloodMagic.altarMaker.destroy", altarMaker.destroyAltar(event.entityPlayer)));
|
||||
}
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
public void onTelepose(TeleposeEvent event) {
|
||||
BlockStack initialBlock = new BlockStack(event.initialBlock, event.initialMetadata);
|
||||
BlockStack finalBlock = new BlockStack(event.finalBlock, event.finalMetadata);
|
||||
|
||||
if (ConfigHandler.teleposerBlacklist.contains(initialBlock) || ConfigHandler.teleposerBlacklist.contains(finalBlock))
|
||||
event.setCanceled(true);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue