Java 类org.bukkit.block.PistonMoveReaction 实例源码

项目:Abyss    文件:BlockListener.java   
@EventHandler(priority = EventPriority.LOW, ignoreCancelled = true)
public void onBlockPistonRetract(BlockPistonRetractEvent event) {
    final Block block = event.getBlock();
    if ( block == null )
        return;

    // Get the location and target block.
    final Location loc = event.getRetractLocation();
    if ( loc == null )
        return;

    final Block target = loc.getBlock();
    if ( target == null || target.getType() == Material.AIR )
        return;

    final Material mat = target.getType();
    final PistonMoveReaction reaction = target.getPistonMoveReaction();

    // Determine if the piston is sticky.
    final boolean sticky = event.isSticky();

    // Figure out if we should even care about this.
    if ( (sticky && reaction == PistonMoveReaction.BLOCK) || (!sticky && (target.getFace(block) != BlockFace.DOWN || (mat != Material.SAND && mat != Material.GRAVEL))) )
        return;

    // Check to see if the block is protected.
    final ArrayList<ABPortal> portals = plugin.protectBlock(target);
    if ( portals == null ) {
        event.setCancelled(true);
        return;
    }

    // After the block is gone, update all our portals.
    if ( portals.size() > 0 )
        plugin.getServer().getScheduler().scheduleSyncDelayedTask(plugin, new UpdatePortals(event, portals), 10L);
}
项目:Uranium    文件:CraftBlock.java   
public PistonMoveReaction getPistonMoveReaction() {
    return PistonMoveReaction.getById(getNMSBlock().getMaterial().getMaterialMobility());
}
项目:MockBukkit    文件:PlayerMock.java   
@Override
public PistonMoveReaction getPistonMoveReaction()
{
    // TODO Auto-generated method stub
    throw new UnimplementedOperationException();
}
项目:MockBukkit    文件:BlockMock.java   
@Override
public PistonMoveReaction getPistonMoveReaction()
{
    // TODO Auto-generated method stub
    throw new UnimplementedOperationException();
}
项目:FlexMC    文件:FlexEntity.java   
@Override
public PistonMoveReaction getPistonMoveReaction() {
    return PistonMoveReaction.IGNORE;
}
项目:FlexMC    文件:TempPlayer.java   
@Override
public PistonMoveReaction getPistonMoveReaction() {
    return null;
}
项目:Minecordbot    文件:DiscordPlayerCommandSender.java   
@Override
public PistonMoveReaction getPistonMoveReaction() {
    return player.getPistonMoveReaction();
}
项目:Bukkit2Sponge    文件:LinkedEntity.java   
@Override
public PistonMoveReaction getPistonMoveReaction() {
    return null;
}
项目:Bukkit2Sponge    文件:LinkedPlayer.java   
@Override
public PistonMoveReaction getPistonMoveReaction() {
    return null;
}
项目:Skript    文件:DelayedChangeBlock.java   
@Override
public PistonMoveReaction getPistonMoveReaction() {
    return b.getPistonMoveReaction();
}
项目:Skript    文件:BlockStateBlock.java   
@Override
public PistonMoveReaction getPistonMoveReaction() {
    throw new UnsupportedOperationException();
}
项目:HiddenOre    文件:FakePlayer.java   
@Override
public PistonMoveReaction getPistonMoveReaction() {
    return null;
}
项目:ThermosRebased    文件:CraftBlock.java   
public PistonMoveReaction getPistonMoveReaction() {
    return PistonMoveReaction.getById(getNMSBlock().getMaterial().getMaterialMobility());
}
项目:Pokkit    文件:PokkitBlock.java   
@Override
public PistonMoveReaction getPistonMoveReaction() {
    throw Pokkit.unsupported();

}
项目:Pokkit    文件:PokkitFakeEntity.java   
@Override
public PistonMoveReaction getPistonMoveReaction() {
    return PistonMoveReaction.MOVE;
}
项目:Pokkit    文件:PokkitItemFrameEntity.java   
@Override
public PistonMoveReaction getPistonMoveReaction() {
    return PistonMoveReaction.BREAK;
}
项目:Pokkit    文件:PokkitEntity.java   
@Override
public PistonMoveReaction getPistonMoveReaction() {
    return PistonMoveReaction.MOVE;
}
项目:Skellett    文件:ExprPistonReaction.java   
public Class<? extends PistonMoveReaction> getReturnType() {
    return PistonMoveReaction.class;
}
项目:Skellett    文件:ExprPistonReaction.java   
@Nullable
protected PistonMoveReaction[] get(Event e) {
    return new PistonMoveReaction[]{block.getSingle(e).getPistonMoveReaction()};
}
项目:Thermos    文件:CraftBlock.java   
public PistonMoveReaction getPistonMoveReaction() {
    return PistonMoveReaction.getById(getNMSBlock().getMaterial().getMaterialMobility());
}
项目:KCauldron    文件:CraftBlock.java   
public PistonMoveReaction getPistonMoveReaction() {
    return PistonMoveReaction.getById(getNMSBlock().getMaterial().getMaterialMobility());
}
项目:CauldronGit    文件:CraftBlock.java   
public PistonMoveReaction getPistonMoveReaction() {
    return PistonMoveReaction.getById(getNMSBlock().getMaterial().getMaterialMobility());
}
项目:CanaryBukkit    文件:CanaryBlock.java   
@Override
public PistonMoveReaction getPistonMoveReaction() {
    throw new NotImplementedException("getPistonMoveReaction()");
}
项目:Cauldron-Old    文件:CraftBlock.java   
public PistonMoveReaction getPistonMoveReaction() {
    return PistonMoveReaction.getById(getNMSBlock().getMaterial().getMaterialMobility());
}
项目:Cauldron-Reloaded    文件:CraftBlock.java   
public PistonMoveReaction getPistonMoveReaction() {
    return PistonMoveReaction.getById(getNMSBlock().getMaterial().getMaterialMobility());
}
项目:FastAsyncWorldedit    文件:AsyncBlock.java   
@Override
public PistonMoveReaction getPistonMoveReaction() {
    return null;
}
项目:FFoKC    文件:CraftBlock.java   
public PistonMoveReaction getPistonMoveReaction() {
    return PistonMoveReaction.getById(getNMSBlock().getMaterial().getMaterialMobility());
}
项目:CraftBukkit    文件:CraftBlock.java   
public PistonMoveReaction getPistonMoveReaction() {
    return PistonMoveReaction.getById(getNMSBlock().getMaterial().getPushReaction());
}
项目:Craftbukkit    文件:CraftBlock.java   
public PistonMoveReaction getPistonMoveReaction() {
    return PistonMoveReaction.getById(getNMSBlock().getMaterial().getPushReaction());
}
项目:Almura-Server    文件:CraftBlock.java   
public PistonMoveReaction getPistonMoveReaction() {
    return PistonMoveReaction.getById(net.minecraft.server.Block.byId[this.getTypeId()].material.getPushReaction());
}
项目:BlockLocker    文件:TestPlayer.java   
@Override
public PistonMoveReaction getPistonMoveReaction() {
    throw new UnsupportedOperationException();

}
项目:Tweakkit-Server    文件:CraftBlock.java   
public PistonMoveReaction getPistonMoveReaction() {
    return PistonMoveReaction.getById(getNMSBlock().getMaterial().getPushReaction());
}
项目:RegularBlocksAPI    文件:SBlock.java   
@Override
   public PistonMoveReaction getPistonMoveReaction() {
return getBlock().getPistonMoveReaction();
   }
项目:Cauldron    文件:CraftBlock.java   
public PistonMoveReaction getPistonMoveReaction() {
    return PistonMoveReaction.getById(getNMSBlock().getMaterial().getMaterialMobility());
}
项目:Pore    文件:PoreBlock.java   
@Override
public PistonMoveReaction getPistonMoveReaction() {
    throw new NotImplementedException("TODO");
}
项目:SpigotSource    文件:CraftBlock.java   
public PistonMoveReaction getPistonMoveReaction() {
    return PistonMoveReaction.getById(getNMSBlock().getBlockData().getMaterial().getPushReaction().ordinal());
}
项目:Craft-city    文件:CraftBlock.java   
public PistonMoveReaction getPistonMoveReaction() {
    return PistonMoveReaction.getById(net.minecraft.server.Block.byId[this.getTypeId()].material.getPushReaction());
}
项目:MCPBukkit    文件:CraftBlock.java   
public PistonMoveReaction getPistonMoveReaction() {
    return PistonMoveReaction.getById(net.minecraft.block.Block.field_71973_m[this.getTypeId()].field_72018_cp.func_76227_m());
}
项目:sensibletoolbox    文件:BaseSTBBlock.java   
/**
 * Define whether this STB block can be pushed or pulled by a piston, and if
 * doing so would break it.  The default behaviour is to allow movement;
 * override this in subclasses to modify the behaviour.
 *
 * @return the move reaction: one of MOVE, BLOCK, or BREAK
 */
public PistonMoveReaction getPistonMoveReaction() {
    return PistonMoveReaction.MOVE;
}
项目:BedrockAPI    文件:Block.java   
PistonMoveReaction getPistonMoveReaction();