Java 类net.minecraft.command.CommandResultStats.Type 实例源码

项目:UniversalRemote    文件:EntityPlayerMPProxy.java   
@Override
public void setCommandStat(Type type, int amount) {
    if (m_realPlayer == null) {
        super.setCommandStat(type, amount);
    } else {
        syncToRealPlayer();
        m_realPlayer.setCommandStat(type, amount);
        syncPublicFieldsFromReal();
    }
}
项目:UniversalRemote    文件:EntityPlayerProxy.java   
@Override
public void setCommandStat(Type type, int amount) {
    if (m_realPlayer == null) {
        super.setCommandStat(type, amount);
    } else {
        m_realPlayer.setCommandStat(type, amount);
    }
}
项目:blockbuster    文件:CommandAction.java   
@Override
public void setCommandStat(Type type, int amount)
{}
项目:TaleCraft    文件:TaleCraftEventHandler.java   
@SubscribeEvent
public void playerUseItem(final PlayerInteractEvent.RightClickItem event) {
    if(event.getSide() == Side.CLIENT) return;
    ItemStack stack = event.getItemStack();
    final EntityPlayer player = event.getEntityPlayer();
    boolean hasCommandTag = stack.hasTagCompound() ? stack.getTagCompound().hasKey("command") : false;
    if(hasCommandTag){
        String command = stack.getTagCompound().getString("command");
        FMLCommonHandler.instance().getMinecraftServerInstance().getCommandManager().executeCommand(new ICommandSender() {
            @Override
            public void setCommandStat(Type type, int amount) {
                player.setCommandStat(type, amount);
            }
            @Override
            public boolean sendCommandFeedback() {
                return false;
            }
            @Override
            public MinecraftServer getServer() {
                return FMLCommonHandler.instance().getMinecraftServerInstance();
            }
            @Override
            public Vec3d getPositionVector() {
                return player.getPositionVector();
            }

            @Override
            public BlockPos getPosition() {
                return player.getPosition();
            }

            @Override
            public String getName() {
                return player.getName();
            }

            @Override
            public World getEntityWorld() {
                return player.getEntityWorld();
            }

            @Override
            public ITextComponent getDisplayName() {
                return player.getDisplayName();
            }
            @Override
            public Entity getCommandSenderEntity() {
                return player;
            }
            @Override
            public boolean canUseCommand(int permLevel, String commandName) {
                return true;
            }
            @Override
            public void sendMessage(ITextComponent component) {
                event.getEntityPlayer().sendMessage(component);
            }
        }, command);
    }
}
项目:TaleCraft    文件:TCTileEntity.java   
@Override
public void setCommandStat(Type type, int amount) {
    // nope
}
项目:TaleCraft    文件:WorldCommandSender.java   
@Override
public void setCommandStat(Type type, int amount) {
    // no
}
项目:TaleCraft    文件:JavascriptDecoration.java   
@Override
public void setCommandStat(Type type, int amount) {
}
项目:TaleCraft    文件:ScriptItem.java   
@Override
public void setCommandStat(Type type, int amount) {
    if(holder != null)
        holder.setCommandStat(type, amount);
}