1
0
mirror of https://github.com/Zrips/Jobs.git synced 2024-12-03 07:54:07 +01:00
Jobs/com/gamingmesh/jobs/nmsUtil/v1_9.java

31 lines
725 B
Java
Raw Normal View History

2016-03-01 16:06:03 +01:00
package com.gamingmesh.jobs.nmsUtil;
import java.util.ArrayList;
import java.util.List;
import org.bukkit.block.Block;
import org.bukkit.entity.Entity;
import org.bukkit.entity.Guardian;
import org.bukkit.event.block.BlockPistonRetractEvent;
import com.gamingmesh.jobs.NMS;
public class v1_9 implements NMS {
@Override
public List<Block> getPistonRetractBlocks(BlockPistonRetractEvent event) {
List<Block> blocks = new ArrayList<Block>();
blocks.addAll(event.getBlocks());
return blocks;
}
@Override
public boolean isElderGuardian(Entity entity) {
if (entity instanceof Guardian) {
Guardian guardian = (Guardian) entity;
if (guardian.isElder())
return true;
}
return false;
}
}