当前位置: 首页>>代码示例>>Java>>正文


Java PistonMoveReaction类代码示例

本文整理汇总了Java中org.bukkit.block.PistonMoveReaction的典型用法代码示例。如果您正苦于以下问题:Java PistonMoveReaction类的具体用法?Java PistonMoveReaction怎么用?Java PistonMoveReaction使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


PistonMoveReaction类属于org.bukkit.block包,在下文中一共展示了PistonMoveReaction类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: onBlockPistonRetract

import org.bukkit.block.PistonMoveReaction; //导入依赖的package包/类
@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);
}
 
开发者ID:stendec,项目名称:Abyss,代码行数:37,代码来源:BlockListener.java

示例2: getPistonMoveReaction

import org.bukkit.block.PistonMoveReaction; //导入依赖的package包/类
public PistonMoveReaction getPistonMoveReaction() {
    return PistonMoveReaction.getById(getNMSBlock().getMaterial().getMaterialMobility());
}
 
开发者ID:UraniumMC,项目名称:Uranium,代码行数:4,代码来源:CraftBlock.java

示例3: getPistonMoveReaction

import org.bukkit.block.PistonMoveReaction; //导入依赖的package包/类
@Override
public PistonMoveReaction getPistonMoveReaction()
{
	// TODO Auto-generated method stub
	throw new UnimplementedOperationException();
}
 
开发者ID:seeseemelk,项目名称:MockBukkit,代码行数:7,代码来源:PlayerMock.java

示例4: getPistonMoveReaction

import org.bukkit.block.PistonMoveReaction; //导入依赖的package包/类
@Override
public PistonMoveReaction getPistonMoveReaction() {
    return PistonMoveReaction.IGNORE;
}
 
开发者ID:lukas81298,项目名称:FlexMC,代码行数:5,代码来源:FlexEntity.java

示例5: getPistonMoveReaction

import org.bukkit.block.PistonMoveReaction; //导入依赖的package包/类
@Override
public PistonMoveReaction getPistonMoveReaction() {
    return null;
}
 
开发者ID:lukas81298,项目名称:FlexMC,代码行数:5,代码来源:TempPlayer.java

示例6: getPistonMoveReaction

import org.bukkit.block.PistonMoveReaction; //导入依赖的package包/类
@Override
public PistonMoveReaction getPistonMoveReaction() {
    return player.getPistonMoveReaction();
}
 
开发者ID:CyR1en,项目名称:Minecordbot,代码行数:5,代码来源:DiscordPlayerCommandSender.java

示例7: getPistonMoveReaction

import org.bukkit.block.PistonMoveReaction; //导入依赖的package包/类
@Override
public PistonMoveReaction getPistonMoveReaction() {
	return b.getPistonMoveReaction();
}
 
开发者ID:nfell2009,项目名称:Skript,代码行数:5,代码来源:DelayedChangeBlock.java

示例8: getPistonMoveReaction

import org.bukkit.block.PistonMoveReaction; //导入依赖的package包/类
@Override
public PistonMoveReaction getPistonMoveReaction() {
	throw new UnsupportedOperationException();
}
 
开发者ID:nfell2009,项目名称:Skript,代码行数:5,代码来源:BlockStateBlock.java

示例9: getPistonMoveReaction

import org.bukkit.block.PistonMoveReaction; //导入依赖的package包/类
@Override
public PistonMoveReaction getPistonMoveReaction() {
	return null;
}
 
开发者ID:DevotedMC,项目名称:HiddenOre,代码行数:5,代码来源:FakePlayer.java

示例10: getPistonMoveReaction

import org.bukkit.block.PistonMoveReaction; //导入依赖的package包/类
@Override
public PistonMoveReaction getPistonMoveReaction() {
	throw Pokkit.unsupported();

}
 
开发者ID:rutgerkok,项目名称:Pokkit,代码行数:6,代码来源:PokkitBlock.java

示例11: getPistonMoveReaction

import org.bukkit.block.PistonMoveReaction; //导入依赖的package包/类
@Override
public PistonMoveReaction getPistonMoveReaction() {
	return PistonMoveReaction.MOVE;
}
 
开发者ID:rutgerkok,项目名称:Pokkit,代码行数:5,代码来源:PokkitFakeEntity.java

示例12: getPistonMoveReaction

import org.bukkit.block.PistonMoveReaction; //导入依赖的package包/类
@Override
public PistonMoveReaction getPistonMoveReaction() {
	return PistonMoveReaction.BREAK;
}
 
开发者ID:rutgerkok,项目名称:Pokkit,代码行数:5,代码来源:PokkitItemFrameEntity.java

示例13: getReturnType

import org.bukkit.block.PistonMoveReaction; //导入依赖的package包/类
public Class<? extends PistonMoveReaction> getReturnType() {
	return PistonMoveReaction.class;
}
 
开发者ID:TheLimeGlass,项目名称:Skellett,代码行数:4,代码来源:ExprPistonReaction.java

示例14: get

import org.bukkit.block.PistonMoveReaction; //导入依赖的package包/类
@Nullable
protected PistonMoveReaction[] get(Event e) {
	return new PistonMoveReaction[]{block.getSingle(e).getPistonMoveReaction()};
}
 
开发者ID:TheLimeGlass,项目名称:Skellett,代码行数:5,代码来源:ExprPistonReaction.java

示例15: getPistonMoveReaction

import org.bukkit.block.PistonMoveReaction; //导入依赖的package包/类
@Override
public PistonMoveReaction getPistonMoveReaction() {
    throw new NotImplementedException("getPistonMoveReaction()");
}
 
开发者ID:CanaryBukkitTeam,项目名称:CanaryBukkit,代码行数:5,代码来源:CanaryBlock.java


注:本文中的org.bukkit.block.PistonMoveReaction类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。