Search in sources :

Example 1 with ItemType

use of net.glowstone.block.itemtype.ItemType in project Dragonet-Legacy by DragonetMC.

the class TestItemTypes method hasAllMaterials.

@Test
public void hasAllMaterials() {
    ItemType type = table.getItem(material);
    // special cases
    if (material == Material.AIR) {
        assertNull("ItemType exists for air: " + type, type);
        return;
    }
    // check that it exists
    assertNotNull("ItemType does not exist for " + material, type);
    // check that its block status is correct
    assertTrue("Block status mismatch between " + material + "(" + material.isBlock() + ") and " + type, (type instanceof BlockType) == material.isBlock());
    // check that material returned matches
    assertEquals("ItemType returned wrong material", material, type.getMaterial());
    // check that max stack size matches
    assertEquals("Maximum stack size was incorrect", material.getMaxStackSize(), type.getMaxStackSize());
}
Also used : BlockType(net.glowstone.block.blocktype.BlockType) ItemType(net.glowstone.block.itemtype.ItemType) Test(org.junit.Test)

Example 2 with ItemType

use of net.glowstone.block.itemtype.ItemType in project Glowstone by GlowstoneMC.

the class FlintAndSteelDispenseBehavior method dispenseStack.

@Override
protected ItemStack dispenseStack(GlowBlock block, ItemStack stack) {
    GlowBlock target = block.getRelative(BlockDispenser.getFacing(block));
    successful = true;
    if (target.getType() == Material.AIR) {
        target.setType(Material.FIRE);
        stack.setDurability((short) (stack.getDurability() + 1));
        ItemType type = ItemTable.instance().getItem(stack.getType());
        if (!(type instanceof ItemTool)) {
            return stack;
        }
        ItemTool toolType = (ItemTool) type;
        if (stack.getDurability() > toolType.getMaxDurability()) {
            stack.setAmount(0);
        }
    } else if (target.getType() == Material.TNT) {
        BlockTNT.igniteBlock(target, false);
    } else {
        successful = false;
    }
    return stack.getAmount() > 0 ? stack : null;
}
Also used : GlowBlock(net.glowstone.block.GlowBlock) ItemTool(net.glowstone.block.itemtype.ItemTool) ItemType(net.glowstone.block.itemtype.ItemType)

Example 3 with ItemType

use of net.glowstone.block.itemtype.ItemType in project Glowstone by GlowstoneMC.

the class GlowPlayer method pulse.

@Override
public void pulse() {
    super.pulse();
    if (usageItem != null) {
        if (usageItem == getItemInHand()) {
            if (--usageTime == 0) {
                ItemType item = ItemTable.instance().getItem(usageItem.getType());
                if (item instanceof ItemFood) {
                    ((ItemFood) item).eat(this, usageItem);
                }
            }
        } else {
            usageItem = null;
            usageTime = 0;
        }
    }
    if (digging != null) {
        pulseDigging();
    }
    if (exhaustion > 4.0f) {
        exhaustion -= 4.0f;
        if (saturation > 0f) {
            saturation = Math.max(saturation - 1f, 0f);
            sendHealth();
        } else if (world.getDifficulty() != Difficulty.PEACEFUL) {
            FoodLevelChangeEvent event = EventFactory.callEvent(new FoodLevelChangeEvent(this, Math.max(food - 1, 0)));
            if (!event.isCancelled()) {
                food = event.getFoodLevel();
            }
            sendHealth();
        }
    }
    if (getHealth() < getMaxHealth() && !isDead()) {
        if (food > 18 && ticksLived % 80 == 0 || world.getDifficulty() == Difficulty.PEACEFUL) {
            EntityRegainHealthEvent event1 = new EntityRegainHealthEvent(this, 1f, RegainReason.SATIATED);
            EventFactory.callEvent(event1);
            if (!event1.isCancelled()) {
                setHealth(getHealth() + 1);
            }
            exhaustion = Math.min(exhaustion + 3.0f, 40.0f);
            saturation -= 3;
        }
    }
    if (food == 0 && getHealth() > 1 && ticksLived % 80 == 0) {
        damage(1, DamageCause.STARVATION);
    }
    // stream world
    streamBlocks();
    processBlockChanges();
    // add to playtime
    incrementStatistic(Statistic.PLAY_ONE_TICK);
    if (isSneaking()) {
        incrementStatistic(Statistic.SNEAK_TIME);
    }
    // update inventory
    for (InventoryMonitor.Entry entry : invMonitor.getChanges()) {
        sendItemChange(entry.slot, entry.item);
    }
    // send changed metadata
    List<MetadataMap.Entry> changes = metadata.getChanges();
    if (!changes.isEmpty()) {
        session.send(new EntityMetadataMessage(SELF_ID, changes));
    }
    // update or remove entities
    List<Integer> destroyIds = new LinkedList<>();
    for (Iterator<GlowEntity> it = knownEntities.iterator(); it.hasNext(); ) {
        GlowEntity entity = it.next();
        if (!isWithinDistance(entity) || entity.isRemoved()) {
            destroyIds.add(entity.getEntityId());
            it.remove();
        } else {
            entity.createUpdateMessage().forEach(session::send);
        }
    }
    if (!destroyIds.isEmpty()) {
        session.send(new DestroyEntitiesMessage(destroyIds));
    }
    // add entities
    knownChunks.parallelStream().forEach(key -> {
        GlowChunk chunk = world.getChunkAt(key.getX(), key.getZ());
        chunk.getRawEntities().stream().filter(entity -> this != entity).filter(this::isWithinDistance).filter(entity -> !entity.isDead()).filter(entity -> !knownEntities.contains(entity)).filter(entity -> !hiddenEntities.contains(entity.getUniqueId())).forEach((entity) -> {
            knownEntities.add(entity);
            entity.createSpawnMessage().forEach(session::send);
        });
    });
    if (passengerChanged) {
        session.send(new SetPassengerMessage(SELF_ID, getPassengers().stream().mapToInt(Entity::getEntityId).toArray()));
    }
    getAttributeManager().sendMessages(session);
}
Also used : Plugin(org.bukkit.plugin.Plugin) GlowBlock(net.glowstone.block.GlowBlock) StatusFlags(net.glowstone.entity.meta.MetadataIndex.StatusFlags) ItemTable(net.glowstone.block.ItemTable) GlowTeam(net.glowstone.scoreboard.GlowTeam) AttributeInstance(org.bukkit.attribute.AttributeInstance) Entry(net.glowstone.net.message.play.game.UserListItemMessage.Entry) BlockFace(org.bukkit.block.BlockFace) Player(org.bukkit.entity.Player) net.glowstone.net.message.play.entity(net.glowstone.net.message.play.entity) MaterialData(org.bukkit.material.MaterialData) Unpooled(io.netty.buffer.Unpooled) org.bukkit(org.bukkit) Conversation(org.bukkit.conversations.Conversation) org.bukkit.inventory(org.bukkit.inventory) Scoreboard(org.bukkit.scoreboard.Scoreboard) StatisticMap(net.glowstone.util.StatisticMap) Preconditions.checkArgument(com.google.common.base.Preconditions.checkArgument) Block(org.bukkit.block.Block) net.glowstone.net.message.play.game(net.glowstone.net.message.play.game) PlayerReader(net.glowstone.io.PlayerDataService.PlayerReader) SignEntity(net.glowstone.block.entity.SignEntity) GlowInventory(net.glowstone.inventory.GlowInventory) Position(net.glowstone.util.Position) DamageCause(org.bukkit.event.entity.EntityDamageEvent.DamageCause) org.bukkit.event.player(org.bukkit.event.player) Entity(org.bukkit.entity.Entity) ByteBufUtils(com.flowpowered.network.util.ByteBufUtils) GlowChunk(net.glowstone.chunk.GlowChunk) GlowEffect(net.glowstone.constants.GlowEffect) Property(org.bukkit.inventory.InventoryView.Property) Reason(net.glowstone.net.message.play.game.StateChangeMessage.Reason) ChatMessageType(net.md_5.bungee.api.ChatMessageType) DelegateDeserialization(org.bukkit.configuration.serialization.DelegateDeserialization) BlockVector(org.bukkit.util.BlockVector) EntityType(org.bukkit.entity.EntityType) InetSocketAddress(java.net.InetSocketAddress) Collectors(java.util.stream.Collectors) StandardCharsets(java.nio.charset.StandardCharsets) Villager(org.bukkit.entity.Villager) ComponentSerializer(net.md_5.bungee.chat.ComponentSerializer) MetadataIndex(net.glowstone.entity.meta.MetadataIndex) JSONObject(org.json.simple.JSONObject) Action(net.glowstone.net.message.play.game.TitleMessage.Action) UseBedMessage(net.glowstone.net.message.play.player.UseBedMessage) RegainReason(org.bukkit.event.entity.EntityRegainHealthEvent.RegainReason) ChunkLock(net.glowstone.chunk.ChunkManager.ChunkLock) Key(net.glowstone.chunk.GlowChunk.Key) InventoryMonitor(net.glowstone.inventory.InventoryMonitor) GlowAchievement(net.glowstone.constants.GlowAchievement) CompoundTag(net.glowstone.util.nbt.CompoundTag) ConversationAbandonedEvent(org.bukkit.conversations.ConversationAbandonedEvent) Setter(lombok.Setter) BlockBed(net.glowstone.block.blocktype.BlockBed) java.util(java.util) Title(com.destroystokyo.paper.Title) GlowBlockEntity(net.glowstone.constants.GlowBlockEntity) Convert(net.glowstone.util.Convert) Getter(lombok.Getter) MetadataMap(net.glowstone.entity.meta.MetadataMap) Message(com.flowpowered.network.Message) net.glowstone(net.glowstone) Level(java.util.logging.Level) BaseComponent(net.md_5.bungee.api.chat.BaseComponent) Environment(org.bukkit.World.Environment) ByteBuf(io.netty.buffer.ByteBuf) net.glowstone.net.message.play.inv(net.glowstone.net.message.play.inv) ThreadLocalRandom(java.util.concurrent.ThreadLocalRandom) GlowSession(net.glowstone.net.GlowSession) ClientSettings(net.glowstone.entity.meta.ClientSettings) GlowItem(net.glowstone.entity.objects.GlowItem) PlayerAbilitiesMessage(net.glowstone.net.message.play.player.PlayerAbilitiesMessage) MapView(org.bukkit.map.MapView) GlowScoreboard(net.glowstone.scoreboard.GlowScoreboard) TextMessage(net.glowstone.util.TextMessage) Type(org.bukkit.Effect.Type) ResourcePackSendMessage(net.glowstone.net.message.play.player.ResourcePackSendMessage) Attribute(org.bukkit.attribute.Attribute) StandardMessenger(org.bukkit.plugin.messaging.StandardMessenger) TeleportCause(org.bukkit.event.player.PlayerTeleportEvent.TeleportCause) ItemType(net.glowstone.block.itemtype.ItemType) EntityRegainHealthEvent(org.bukkit.event.entity.EntityRegainHealthEvent) Preconditions.checkNotNull(com.google.common.base.Preconditions.checkNotNull) IOException(java.io.IOException) GlowParticle(net.glowstone.constants.GlowParticle) Vector(org.bukkit.util.Vector) FoodLevelChangeEvent(org.bukkit.event.entity.FoodLevelChangeEvent) ItemFood(net.glowstone.block.itemtype.ItemFood) Preconditions(com.google.common.base.Preconditions) BlockEntity(net.glowstone.block.entity.BlockEntity) PlayerProfile(net.glowstone.entity.meta.profile.PlayerProfile) EntityRegainHealthEvent(org.bukkit.event.entity.EntityRegainHealthEvent) ItemType(net.glowstone.block.itemtype.ItemType) ItemFood(net.glowstone.block.itemtype.ItemFood) Entry(net.glowstone.net.message.play.game.UserListItemMessage.Entry) InventoryMonitor(net.glowstone.inventory.InventoryMonitor) FoodLevelChangeEvent(org.bukkit.event.entity.FoodLevelChangeEvent) GlowChunk(net.glowstone.chunk.GlowChunk)

Example 4 with ItemType

use of net.glowstone.block.itemtype.ItemType in project Glowstone by GlowstoneMC.

the class BlockPlacementHandler method handle.

@Override
public void handle(GlowSession session, BlockPlacementMessage message) {
    //TODO: Hand handling instead of .getHeldItem()
    GlowPlayer player = session.getPlayer();
    if (player == null)
        return;
    //GlowServer.logger.info(session + ": " + message);
    /*
         * The client sends this packet for the following cases:
         * Right click air:
         * - Send direction=-1 packet for any non-null item
         * Right click block:
         * - Send packet with all values filled
         * - If client DOES NOT expect a block placement to result:
         *   - Send direction=-1 packet (unless item is null)
         *
         * Client will expect a block placement to result from blocks and from
         * certain items (e.g. sugarcane, sign). We *could* opt to trust the
         * client on this, but the server's view of events (particularly under
         * the Bukkit API, or custom ItemTypes) may differ from the client's.
         *
         * In order to avoid firing two events for one interact, the two
         * packet case must be handled here. Care must also be taken that a
         * right-click air of an expected-place item immediately after is
         * not considered part of the same action.
         */
    Action action = Action.RIGHT_CLICK_BLOCK;
    GlowBlock clicked = player.getWorld().getBlockAt(message.getX(), message.getY(), message.getZ());
    /*
         * Check if the message is a -1. If we *just* got a message with the
         * values filled, discard it, otherwise perform right-click-air.
         */
    if (message.getDirection() == -1) {
        BlockPlacementMessage previous = session.getPreviousPlacement();
        //   session.setPreviousPlacement(null);
        return;
    // }
    }
    // Set previous placement message
    session.setPreviousPlacement(message);
    // Get values from the message
    Vector clickedLoc = new Vector(message.getCursorX(), message.getCursorY(), message.getCursorZ());
    BlockFace face = convertFace(message.getDirection());
    ItemStack holding = player.getItemInHand();
    boolean rightClickedAir = false;
    // check that a block-click wasn't against air
    if (clicked == null || clicked.getType() == Material.AIR) {
        action = Action.RIGHT_CLICK_AIR;
        // inform the player their perception of reality is wrong
        if (holding.getType().isBlock()) {
            player.sendBlockChange(clicked.getLocation(), Material.AIR, (byte) 0);
            return;
        } else {
            rightClickedAir = true;
        }
    }
    // call interact event
    PlayerInteractEvent event = EventFactory.onPlayerInteract(player, action, rightClickedAir ? null : clicked, face);
    //GlowServer.logger.info("Interact: " + action + " " + clicked + " " + face);
    // attempt to use interacted block
    // DEFAULT is treated as ALLOW, and sneaking is always considered
    boolean useInteractedBlock = event.useInteractedBlock() != Result.DENY;
    if (useInteractedBlock && !rightClickedAir && (!player.isSneaking() || InventoryUtil.isEmpty(holding))) {
        BlockType blockType = ItemTable.instance().getBlock(clicked.getType());
        if (blockType != null) {
            useInteractedBlock = blockType.blockInteract(player, clicked, face, clickedLoc);
        } else {
            GlowServer.logger.info("Unknown clicked block, " + clicked.getType());
        }
    } else {
        useInteractedBlock = false;
    }
    // follows ALLOW/DENY: default to if no block was interacted with
    if (selectResult(event.useItemInHand(), !useInteractedBlock) && holding != null) {
        ItemType type = ItemTable.instance().getItem(holding.getType());
        if (!rightClickedAir && holding.getType() != Material.AIR && !type.canOnlyUseSelf()) {
            type.rightClickBlock(player, clicked, face, holding, clickedLoc);
        }
    }
    // in case something is unimplemented or otherwise screwy on our side
    if (!rightClickedAir) {
        revert(player, clicked);
        revert(player, clicked.getRelative(face));
    }
    // if there's been a change in the held item, make it valid again
    if (!InventoryUtil.isEmpty(holding)) {
        if (holding.getType().getMaxDurability() > 0 && holding.getDurability() > holding.getType().getMaxDurability()) {
            holding.setAmount(holding.getAmount() - 1);
            holding.setDurability((short) 0);
        }
        if (holding.getAmount() <= 0) {
            holding = null;
        }
    }
    player.setItemInHand(holding);
}
Also used : BlockPlacementMessage(net.glowstone.net.message.play.player.BlockPlacementMessage) Action(org.bukkit.event.block.Action) GlowBlock(net.glowstone.block.GlowBlock) BlockType(net.glowstone.block.blocktype.BlockType) GlowPlayer(net.glowstone.entity.GlowPlayer) BlockFace(org.bukkit.block.BlockFace) PlayerInteractEvent(org.bukkit.event.player.PlayerInteractEvent) ItemType(net.glowstone.block.itemtype.ItemType) ItemStack(org.bukkit.inventory.ItemStack) Vector(org.bukkit.util.Vector)

Example 5 with ItemType

use of net.glowstone.block.itemtype.ItemType in project Glowstone by GlowstoneMC.

the class DiggingHandler method handle.

@Override
public void handle(GlowSession session, DiggingMessage message) {
    //Todo: Implement SHOOT_ARROW_FINISH_EATING
    //Todo: Implement SWAP_ITEM_IN_HAND
    GlowPlayer player = session.getPlayer();
    GlowWorld world = player.getWorld();
    GlowBlock block = world.getBlockAt(message.getX(), message.getY(), message.getZ());
    BlockFace face = BlockPlacementHandler.convertFace(message.getFace());
    ItemStack holding = player.getItemInHand();
    if (block.getRelative(face).getType() == Material.FIRE) {
        block.getRelative(face).breakNaturally();
        // returns to avoid breaking block in creative
        return;
    }
    boolean blockBroken = false;
    boolean revert = false;
    if (message.getState() == DiggingMessage.START_DIGGING) {
        // call interact event
        Action action = Action.LEFT_CLICK_BLOCK;
        Block eventBlock = block;
        if (player.getLocation().distanceSquared(block.getLocation()) > 36 || block.getTypeId() == 0) {
            action = Action.LEFT_CLICK_AIR;
            eventBlock = null;
        }
        PlayerInteractEvent interactEvent = EventFactory.onPlayerInteract(player, action, eventBlock, face);
        // attempt to use item in hand, that is, dig up the block
        if (!BlockPlacementHandler.selectResult(interactEvent.useItemInHand(), true)) {
            // the event was cancelled, get out of here
            revert = true;
        } else if (player.getGameMode() != GameMode.SPECTATOR) {
            player.setDigging(null);
            // emit damage event - cancel by default if holding a sword
            boolean instaBreak = player.getGameMode() == GameMode.CREATIVE || block.getMaterialValues().getHardness() == 0;
            BlockDamageEvent damageEvent = new BlockDamageEvent(player, block, player.getItemInHand(), instaBreak);
            if (player.getGameMode() == GameMode.CREATIVE && holding != null && EnchantmentTarget.WEAPON.includes(holding.getType())) {
                damageEvent.setCancelled(true);
            }
            EventFactory.callEvent(damageEvent);
            // follow orders
            if (damageEvent.isCancelled()) {
                revert = true;
            } else {
                // in creative, break even if denied in the event, or the block
                // can never be broken (client does not send DONE_DIGGING).
                blockBroken = damageEvent.getInstaBreak();
                if (!blockBroken) {
                    /// TODO: add a delay here based on hardness
                    player.setDigging(block);
                }
            }
        }
    } else if (message.getState() == DiggingMessage.CANCEL_DIGGING) {
        player.setDigging(null);
    } else if (message.getState() == DiggingMessage.FINISH_DIGGING) {
        // shouldn't happen in creative mode
        // todo: verification against malicious clients
        blockBroken = block.equals(player.getDigging());
        if (blockBroken && holding.getType().getMaxDurability() != 0 && holding.getType() != Material.AIR && holding.getDurability() != holding.getType().getMaxDurability()) {
            switch(block.getType()) {
                case GRASS:
                case DIRT:
                case SAND:
                case GRAVEL:
                case MYCEL:
                case SOUL_SAND:
                    switch(holding.getType()) {
                        case WOOD_SPADE:
                        case STONE_SPADE:
                        case IRON_SPADE:
                        case GOLD_SPADE:
                        case DIAMOND_SPADE:
                            holding.setDurability((short) (holding.getDurability() + 1));
                            break;
                        default:
                            holding.setDurability((short) (holding.getDurability() + 2));
                            break;
                    }
                    break;
                case LOG:
                case LOG_2:
                case WOOD:
                case CHEST:
                    switch(holding.getType()) {
                        case WOOD_AXE:
                        case STONE_AXE:
                        case IRON_AXE:
                        case GOLD_AXE:
                        case DIAMOND_AXE:
                            holding.setDurability((short) (holding.getDurability() + 1));
                            break;
                        default:
                            holding.setDurability((short) (holding.getDurability() + 2));
                            break;
                    }
                    break;
                case STONE:
                case COBBLESTONE:
                    switch(holding.getType()) {
                        case WOOD_PICKAXE:
                        case STONE_PICKAXE:
                        case IRON_PICKAXE:
                        case GOLD_PICKAXE:
                        case DIAMOND_PICKAXE:
                            holding.setDurability((short) (holding.getDurability() + 1));
                            break;
                        default:
                            holding.setDurability((short) (holding.getDurability() + 2));
                            break;
                    }
                    break;
                default:
                    holding.setDurability((short) (holding.getDurability() + 2));
                    break;
            }
            if (holding.getType().getMaxDurability() != 0 && holding.getDurability() >= holding.getType().getMaxDurability()) {
                player.getItemInHand().setType(Material.AIR);
            }
        }
        player.setDigging(null);
    } else if (message.getState() == DiggingMessage.STATE_DROP_ITEM) {
        player.dropItemInHand(false);
        return;
    } else if (message.getState() == DiggingMessage.STATE_DROP_ITEMSTACK) {
        player.dropItemInHand(true);
        return;
    } else if (message.getState() == DiggingMessage.STATE_SHOT_ARROW_FINISH_EATING && player.getUsageItem() != null) {
        if (Objects.equals(player.getUsageItem(), holding)) {
            ItemType type = ItemTable.instance().getItem(player.getUsageItem().getType());
            if (type != null && type instanceof ItemTimedUsage) {
                ((ItemTimedUsage) type).endUse(player, player.getUsageItem());
            } else {
            // todo: inform the player that this item cannot be consumed/used
            }
        } else {
        // todo: verification against malicious clients
        // todo: inform player their item is wrong
        }
        return;
    } else if (message.getState() == DiggingMessage.SWAP_ITEM_IN_HAND) {
        ItemStack main = player.getInventory().getItemInMainHand();
        ItemStack off = player.getInventory().getItemInOffHand();
        player.getInventory().setItemInOffHand(main);
        player.getInventory().setItemInMainHand(off);
        player.updateInventory();
        return;
    } else {
        return;
    }
    if (blockBroken && !revert) {
        // fire the block break event
        BlockBreakEvent breakEvent = EventFactory.callEvent(new BlockBreakEvent(block, player));
        if (breakEvent.isCancelled()) {
            BlockPlacementHandler.revert(player, block);
            return;
        }
        MaterialData data = block.getState().getData();
        if (data instanceof DoublePlant) {
            if (((DoublePlant) data).getSpecies() == DoublePlantSpecies.PLANT_APEX && block.getRelative(BlockFace.DOWN).getState().getData() instanceof DoublePlant) {
                block = block.getRelative(BlockFace.DOWN);
            }
        }
        BlockType blockType = ItemTable.instance().getBlock(block.getType());
        if (blockType != null) {
            blockType.blockDestroy(player, block, face);
        }
        // destroy the block
        if (!block.isEmpty() && !block.isLiquid() && (player.getGameMode() != GameMode.CREATIVE || blockType instanceof BlockContainer) && world.getGameRuleMap().getBoolean("doTileDrops")) {
            Collection<ItemStack> drops = blockType.getDrops(block, holding);
            if (blockType instanceof BlockContainer && player.getGameMode() == GameMode.CREATIVE) {
                drops = ((BlockContainer) blockType).getContentDrops(block);
            }
            for (ItemStack drop : drops) {
                GlowItem item = world.dropItemNaturally(block.getLocation(), drop);
                item.setPickupDelay(30);
                item.setBias(player);
            }
        }
        player.addExhaustion(0.005f);
        // STEP_SOUND actually is the block break particles
        world.playEffectExceptTo(block.getLocation(), Effect.STEP_SOUND, block.getTypeId(), 64, player);
        GlowBlockState state = block.getState();
        block.setType(Material.AIR);
        if (blockType != null) {
            blockType.afterDestroy(player, block, face, state);
        }
    } else if (revert) {
        // replace the block that wasn't really dug
        BlockPlacementHandler.revert(player, block);
    } else if (block.getType() != Material.AIR) {
        BlockType blockType = ItemTable.instance().getBlock(block.getType());
        blockType.leftClickBlock(player, block, holding);
    }
}
Also used : ItemTimedUsage(net.glowstone.block.itemtype.ItemTimedUsage) Action(org.bukkit.event.block.Action) GlowPlayer(net.glowstone.entity.GlowPlayer) BlockFace(org.bukkit.block.BlockFace) BlockContainer(net.glowstone.block.blocktype.BlockContainer) GlowBlockState(net.glowstone.block.GlowBlockState) PlayerInteractEvent(org.bukkit.event.player.PlayerInteractEvent) ItemType(net.glowstone.block.itemtype.ItemType) GlowItem(net.glowstone.entity.objects.GlowItem) GlowBlock(net.glowstone.block.GlowBlock) BlockType(net.glowstone.block.blocktype.BlockType) BlockDamageEvent(org.bukkit.event.block.BlockDamageEvent) GlowWorld(net.glowstone.GlowWorld) GlowBlock(net.glowstone.block.GlowBlock) Block(org.bukkit.block.Block) BlockBreakEvent(org.bukkit.event.block.BlockBreakEvent) MaterialData(org.bukkit.material.MaterialData) ItemStack(org.bukkit.inventory.ItemStack) DoublePlant(org.bukkit.material.DoublePlant)

Aggregations

ItemType (net.glowstone.block.itemtype.ItemType)8 GlowBlock (net.glowstone.block.GlowBlock)5 BlockType (net.glowstone.block.blocktype.BlockType)4 ItemStack (org.bukkit.inventory.ItemStack)4 GlowPlayer (net.glowstone.entity.GlowPlayer)3 BlockFace (org.bukkit.block.BlockFace)3 GlowBlockState (net.glowstone.block.GlowBlockState)2 BlockEntity (net.glowstone.block.entity.BlockEntity)2 GlowItem (net.glowstone.entity.objects.GlowItem)2 Block (org.bukkit.block.Block)2 Entity (org.bukkit.entity.Entity)2 Action (org.bukkit.event.block.Action)2 PlayerInteractEvent (org.bukkit.event.player.PlayerInteractEvent)2 MaterialData (org.bukkit.material.MaterialData)2 Vector (org.bukkit.util.Vector)2 Title (com.destroystokyo.paper.Title)1 Message (com.flowpowered.network.Message)1 ByteBufUtils (com.flowpowered.network.util.ByteBufUtils)1 Preconditions (com.google.common.base.Preconditions)1 Preconditions.checkArgument (com.google.common.base.Preconditions.checkArgument)1