mirror of
https://github.com/sekwah41/Advanced-Portals.git
synced 2024-11-22 02:25:49 +01:00
Added filter for the end to the beacon code
This commit is contained in:
parent
24d0f4719d
commit
d75c5d710a
@ -1,6 +1,7 @@
|
||||
package com.sekwah.advancedportals.compat;
|
||||
|
||||
import com.sekwah.advancedportals.AdvancedPortalsPlugin;
|
||||
import org.bukkit.World;
|
||||
import org.bukkit.block.Block;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
@ -144,7 +145,8 @@ public class CraftBukkit {
|
||||
* @param block
|
||||
*/
|
||||
public void setGatewayAgeHigh(Block block) {
|
||||
if(this.endGatewayClass.isAssignableFrom(block.getState().getClass())) {
|
||||
if(block.getWorld().getEnvironment() != World.Environment.THE_END &&
|
||||
this.endGatewayClass.isAssignableFrom(block.getState().getClass())) {
|
||||
try {
|
||||
Object tileEntity = this.getTileEntityMethod.invoke(this.getWorldHandleMethod.invoke(block.getWorld()),
|
||||
this.blockPositionConstructor.newInstance(block.getX(), block.getY(), block.getZ()));
|
||||
|
Loading…
Reference in New Issue
Block a user