Hotfixed Nether Portals being active

This commit is contained in:
alisolarflare 2016-12-19 00:21:11 -05:00
parent 2dc1497640
commit 18e210785a
3 changed files with 29 additions and 0 deletions

View file

@ -12,6 +12,7 @@ import buttondevteam.alipresents.components.creativeboundaries.CreativeBoundarie
import buttondevteam.alipresents.components.flaircolour.FlairColourComponent;
import buttondevteam.alipresents.components.fruit.FruitComponent;
import buttondevteam.alipresents.components.gpower.GPowerComponent;
import buttondevteam.alipresents.components.hotfix.HotfixComponent;
import buttondevteam.alipresents.components.insurance.InsuranceComponent;
import buttondevteam.alipresents.components.magic.MagicComponent;
import buttondevteam.alipresents.components.spawn.SpawnComponent;
@ -30,6 +31,7 @@ public class AliPresents extends JavaPlugin{
new FlairColourComponent().register(this);
new FruitComponent().register(this);
new GPowerComponent().register(this);
new HotfixComponent().register(this);
new InsuranceComponent().register(this);
new MagicComponent().register(this);
//new MetricsComponent().register(this);

View file

@ -0,0 +1,15 @@
package buttondevteam.alipresents.components.hotfix;
import org.bukkit.plugin.java.JavaPlugin;
import buttondevteam.alipresents.architecture.Component;
public class HotfixComponent extends Component {
@Override
public void register(JavaPlugin plugin) {
registerListener(plugin, new NetherDisableListener());
}
}

View file

@ -0,0 +1,12 @@
package buttondevteam.alipresents.components.hotfix;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.player.PlayerPortalEvent;
public class NetherDisableListener implements Listener{
@EventHandler
public void onPortalEnter(PlayerPortalEvent event){
event.setCancelled(true);
}
}