Oops, I broke portal material

This commit is contained in:
Steven Scott
2013-02-12 20:15:10 -08:00
parent 37243b569e
commit cf5c4849b9
3 changed files with 14 additions and 2 deletions

View File

@ -1101,7 +1101,17 @@ public class Stargate extends JavaPlugin {
portal.unregister(true);
Stargate.sendMessage(player, Stargate.getString("destroyMsg"), false);
}
@EventHandler
public void onBlockPhysics(BlockPhysicsEvent event) {
// Only check for gates if it's a portal block
Block block = event.getBlock();
if (block.getTypeId() != 90) return;
Portal portal = Portal.getByEntrance(block);
if (portal != null) event.setCancelled(true);
}
@EventHandler
public void onBlockFromTo(BlockFromToEvent event) {
Portal portal = Portal.getByEntrance(event.getBlock());

View File

@ -1,6 +1,6 @@
name: Stargate
main: net.TheDgtl.Stargate.Stargate
version: 0.7.9.4
version: 0.7.9.5
description: Stargate mod for Bukkit
author: Drakia
website: http://www.thedgtl.net