Solved Trying to put a BlockBreakEvent method in EntityDamageByEntityEvent method; not working.

Discussion in 'Plugin Development' started by Bamco6657, Oct 3, 2016.

Thread Status:
Not open for further replies.
  1. Offline

    Bamco6657

    Hello!

    I'm working on a plugin and I'm trying to put a BlockBreakEvent method in an EntityDamageByEntityEvent method. It keeps giving me random errors and I feel that I'm doing something completely wrong. I might even be calling all of these things the wrong name. If someone could help me out and lead me in the right direction, that would be much appreciated. :D

    The code somewhat looks like this.

    Code:
    public void applyEffect(LivingEntity user, LivingEntity target, int enchantLevel, EntityDamageByEntityEvent event) {
    
    //code code code code
    
    public void onBlockBreak(BlockBreakEvent b) {
    
    //code code code code
    
    }
    
    }
     
  2. Offline

    mehboss

    So basically, there can only be one event per one.
    I am not sure if you are doing the 1st one right, but the second one looks good!

    For the event names, you can find most here :)
    Events (open)
    Code:
    org.bukkit.event.block.BlockBreakEvent,
    org.bukkit.event.block.BlockBurnEvent,
    org.bukkit.event.block.BlockCanBuildEvent,
    org.bukkit.event.block.BlockDamageEvent,
    org.bukkit.event.block.BlockDispenseEvent,
    org.bukkit.event.block.BlockFadeEvent,
    org.bukkit.event.block.BlockFormEvent,
    org.bukkit.event.block.BlockFromToEvent,
    org.bukkit.event.block.BlockGrowEvent,
    org.bukkit.event.block.BlockIgniteEvent,
    org.bukkit.event.block.BlockPhysicsEvent,
    org.bukkit.event.block.BlockPistonExtendEvent,
    org.bukkit.event.block.BlockPistonRetractEvent,
    org.bukkit.event.block.BlockPlaceEvent,
    org.bukkit.event.block.BlockRedstoneEvent,
    org.bukkit.event.block.BlockSpreadEvent,
    org.bukkit.event.block.LeavesDecayEvent,
    org.bukkit.event.block.SignChangeEvent,
    org.bukkit.event.enchantment.EnchantItemEvent,
    org.bukkit.event.enchantment.PrepareItemEnchantEvent,
    org.bukkit.event.entity.CreatureSpawnEvent,
    org.bukkit.event.entity.CreeperPowerEvent,
    org.bukkit.event.entity.EntityChangeBlockEvent,
    org.bukkit.event.entity.EntityCombustEvent,
    org.bukkit.event.entity.EntityCreatePortalEvent,
    org.bukkit.event.entity.EntityDamageEvent,
    org.bukkit.event.entity.EntityDeathEvent,
    org.bukkit.event.entity.EntityExplodeEvent,
    org.bukkit.event.entity.EntityInteractEvent,
    org.bukkit.event.entity.EntityPortalEnterEvent,
    org.bukkit.event.entity.EntityRegainHealthEvent,
    org.bukkit.event.entity.EntityShootBowEvent,
    org.bukkit.event.entity.EntityTameEvent,
    org.bukkit.event.entity.EntityTargetEvent,
    org.bukkit.event.entity.EntityTeleportEvent,
    org.bukkit.event.entity.ExplosionPrimeEvent,
    org.bukkit.event.entity.FoodLevelChangeEvent,
    org.bukkit.event.entity.ItemDespawnEvent,
    org.bukkit.event.entity.ItemSpawnEvent,
    org.bukkit.event.entity.PigZapEvent,
    org.bukkit.event.entity.PotionSplashEvent,
    org.bukkit.event.entity.ProjectileHitEvent,
    org.bukkit.event.entity.SheepDyeWoolEvent,
    org.bukkit.event.entity.SheepRegrowWoolEvent,
    org.bukkit.event.entity.SlimeSplitEvent,
    org.bukkit.event.inventory.FurnaceBurnEvent,
    org.bukkit.event.inventory.FurnaceSmeltEvent,
    org.bukkit.event.painting.PaintingBreakEvent,
    org.bukkit.event.painting.PaintingPlaceEvent,
    org.bukkit.event.player.PlayerAnimationEvent,
    org.bukkit.event.player.PlayerBedEnterEvent,
    org.bukkit.event.player.PlayerBedLeaveEvent,
    org.bukkit.event.player.PlayerBucketEmptyEvent,
    org.bukkit.event.player.PlayerBucketFillEvent,
    org.bukkit.event.player.PlayerChangedWorldEvent,
    org.bukkit.event.player.PlayerChatEvent,
    org.bukkit.event.player.PlayerCommandPreprocessEvent,
    org.bukkit.event.player.PlayerDropItemEvent,
    org.bukkit.event.player.PlayerEggThrowEvent,
    org.bukkit.event.player.PlayerExpChangeEvent,
    org.bukkit.event.player.PlayerFishEvent,
    org.bukkit.event.player.PlayerGameModeChangeEvent,
    org.bukkit.event.player.PlayerInteractEntityEvent,
    org.bukkit.event.player.PlayerInteractEvent,
    org.bukkit.event.player.PlayerInventoryEvent,
    org.bukkit.event.player.PlayerItemHeldEvent,
    org.bukkit.event.player.PlayerJoinEvent,
    org.bukkit.event.player.PlayerKickEvent,
    org.bukkit.event.player.PlayerLevelChangeEvent,
    org.bukkit.event.player.PlayerLoginEvent,
    org.bukkit.event.player.PlayerMoveEvent,
    org.bukkit.event.player.PlayerPickupItemEvent,
    org.bukkit.event.player.PlayerPortalEvent,
    org.bukkit.event.player.PlayerPreLoginEvent,
    org.bukkit.event.player.PlayerQuitEvent,
    org.bukkit.event.player.PlayerRespawnEvent,
    org.bukkit.event.player.PlayerShearEntityEvent,
    org.bukkit.event.player.PlayerTeleportEvent,
    org.bukkit.event.player.PlayerToggleSneakEvent,
    org.bukkit.event.player.PlayerToggleSprintEvent,
    org.bukkit.event.player.PlayerVelocityEvent,

    Tutorials (open)
    Java coding examples/tutorials

    http://wiki.bukkit.org/Plugin_Tutorial
     
  3. Offline

    Bamco6657

    Thanks! But if I can only do one at a time, then how would I do what I want it to do? In this code, I'm trying to make the ice blocks drop nothing when mined(When mined with silk touch of course), or cancel the block breaking effect completely so that I won't even have to worry about the drops. But I don't want this condition to be for all ice blocks, only the ones that I specified (block1 and block2) Any tips on how I would do that?

    Code:
        @Override
        public void applyEffect(LivingEntity user, LivingEntity target, int enchantLevel, EntityDamageByEntityEvent event) {
    
            Random random = new Random();
            int Chance = random.nextInt(100);
    
            if (Chance <= (5 * enchantLevel) + 1) {
    
                final Location freezeloc = target.getLocation();
    
                final Block block1 = target.getLocation().add(0, 1, 0).getBlock();
                final Block block2 = target.getLocation().getBlock();
    
                final Material type1 = block1.getType();
                final Material type2 = block2.getType();
    
                block1.setType(Material.ICE);
                block2.setType(Material.ICE);
    
                //SOMETHING THAT KEEPS THE ICE BLOCK FROM DROPPING ANYTHING OR CANCELING THE BREAKING EVENT ENTIRELY
            }
        }
     
  4. Offline

    mehboss

    @Bamco6657
    Alright so for the specified ice blocks, would the specified ice blocks be in only a certain location or what?

    Example:
    You could use the block break event and if it is your block specified, you could cancel it from dropping. :)
    Code:
        @EventHandler
        public void onBreak(BlockBreakEvent e) {
    // code
                e.setCancelled(true);
            }
        }
     
  5. Offline

    Bamco6657

    Yes, these ice blocks would be in the location of the entity that was damaged.(two blocks) Like this... Code Example Picture.png
     
  6. Offline

    mehboss

    @Bamco6657
    So the idea is if the entity/player gets damaged it will place two blocks, one on the first top level of the player (head to chest) and the second one on ground level (chest and down) and you want the block to be ice? How long would it stay there for, until the user breaks it?
     
  7. Offline

    Bamco6657

    It would stay there for about 2 seconds, then disappear. But in this time span, I want the blocks to be either invincible, or unable to drop anything.
     
  8. Offline

    fireboyev

    Use block.getDrops().clear()
    This is to clear any items from dropping.

    block is your event.getBlock().
     
  9. Offline

    mehboss

    @Bamco6657

    Here are a few things you could do:
    1. you can call the event and have the event BlockBreakEvent not allow breaking any blocks for 2 seconds.
    2. you can call the event and have the event BlockBreakEvent not allow breaking that ice block for 2 seconds.
    3. you can call the event and have the event BlockBreakEvent and simply do "event.getDrops().remove(ItemStack);" to remove that item from dropping when it's broken.
    4. you can call the event and have the event BlockBreakEvent and do event.getBlock().getDrops().clear()
     
  10. Offline

    Bamco6657

    When I do that it spams my console with this(console spam) and pretty much breaks everything :/

    Console Spam (open)

    5:38:37 PM [WARNING] [BetosEnchs] Task #20 for BetosEnchs v1.0 generated an exception
    5:38:37 PM java.lang.IllegalArgumentException: Cannot drop AIR.
    5:38:37 PM at org.apache.commons.lang.Validate.isTrue(Validate.java:136) ~[spigot_server.jar:git-Spigot-6d16e64-bf4818b]
    5:38:37 PM at org.bukkit.craftbukkit.v1_8_R3.CraftWorld.dropItem(CraftWorld.java:310) ~[spigot_server.jar:git-Spigot-6d16e64-bf4818b]
    5:38:37 PM at me.commandcore.betosenchs.enchants.IceAspect$1.run(IceAspect.java:84) ~[?:?]
    5:38:37 PM at org.bukkit.craftbukkit.v1_8_R3.scheduler.CraftTask.run(CraftTask.java:71) ~[spigot_server.jar:git-Spigot-6d16e64-bf4818b]
    5:38:37 PM at org.bukkit.craftbukkit.v1_8_R3.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:350) [spigot_server.jar:git-Spigot-6d16e64-bf4818b]
    5:38:37 PM at net.minecraft.server.v1_8_R3.MinecraftServer.B(MinecraftServer.java:722) [spigot_server.jar:git-Spigot-6d16e64-bf4818b]
    5:38:37 PM at net.minecraft.server.v1_8_R3.DedicatedServer.B(DedicatedServer.java:374) [spigot_server.jar:git-Spigot-6d16e64-bf4818b]
    5:38:37 PM at net.minecraft.server.v1_8_R3.MinecraftServer.A(MinecraftServer.java:653) [spigot_server.jar:git-Spigot-6d16e64-bf4818b]
    5:38:37 PM at net.minecraft.server.v1_8_R3.MinecraftServer.run(MinecraftServer.java:556) [spigot_server.jar:git-Spigot-6d16e64-bf4818b]
    5:38:37 PM at java.lang.Thread.run(Unknown Source) [?:1.8.0_101]


    So what you're saying is that I should change my event to BlockBreakEvent, or what do you mean by "call the event"?

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Oct 3, 2016
  11. Offline

    mehboss

    @Bamco6657 Call the event; do some research. If you know of a different way, go for it. :)

    UPDATE: You don't need to change the event, just create a new one.

    EX:
    Code:
        @EventHandler
        public void onBreak(BlockBreakEvent e) {
    //do stuff here
                if (e.getBlock().getDrops().clear() =!null);
            }
        }
     
    Last edited: Oct 3, 2016
  12. Offline

    fireboyev

    your console errors says that it can't drop air so just check that the drops dont equal null
     
  13. Offline

    Bamco6657

    How would I do that?
     
  14. Offline

    mehboss

    @Bamco6657
    I am assuming like this,
    Code:
                if (!(e.getBlock().getDrops() == null)) {
    //if the block drop doesn't equal null
    e.getblock().getDrops().clear();
    }
    or as he said, use
    Code:
    block.getDrops().clear()
    and block meaning e.getblock();
     
  15. Offline

    Bamco6657

    Tried that, gives the same console spam.
     
  16. Offline

    fireboyev

    @mehboss @Bamco6657
    Eh, it depends what you like but I think this would be better:
    Code:
    if (e.getBlock().getDrops() != null) {
    e.getBlock().getDrops().clear();
    }
     
  17. Offline

    mehboss

    @Bamco6657 @fireboyev
    Is your problem solved? If so scroll up to the top, click more thread options or something and add the tag Solved.
    :)
     
  18. Offline

    Bamco6657

    @mehboss @fireboyev
    Same thing, same console spam. Here's my entire code if it helps. What it does is that when an entity(player or mob, doesn't matter) is attacked, they get trapped in 2 blocks of ice, get a wither effect, and get a slowness effect. They are unable to move until the effect is over, in which the ice and effects are removed. I want the ice that appears to not drop when broken or be unbreakable. I'm using the plugin EnchantmentAPI with this plugin to help make it a custom enchantment. I'm also using a code reference I found online for the particles. Here's the full code:

    Code:
    package me.commandcore.betosenchs.enchants;
    
    import com.rit.sucy.CustomEnchantment;
    import me.commandcore.betosenchs.particles.ParticleEffect;
    import org.bukkit.*;
    import org.bukkit.block.Block;
    import org.bukkit.entity.LivingEntity;
    import org.bukkit.event.EventHandler;
    import org.bukkit.event.block.BlockBreakEvent;
    import org.bukkit.event.entity.EntityDamageByEntityEvent;
    import org.bukkit.event.entity.EntityDamageEvent;
    import org.bukkit.inventory.ItemStack;
    import org.bukkit.material.MaterialData;
    import org.bukkit.potion.PotionEffect;
    import org.bukkit.potion.PotionEffectType;
    import org.bukkit.util.Vector;
    
    import java.util.Collection;
    import java.util.Collections;
    import java.util.Random;
    
    /**
    * Created by Beto on 5/21/2016.
    */
    public class IceAspect extends CustomEnchantment {
        public static IceAspect plugin;
        public int number = 1;
    
    
        // Items able to be enchanted with ice aspect
        static final Material[] ICEASPECT_ITEMS = new Material[]{
                Material.WOOD_SWORD, Material.STONE_SWORD, Material.IRON_SWORD, Material.GOLD_SWORD, Material.DIAMOND_SWORD};
    
        // Constructor
        public IceAspect() {
            super("Ice Aspect", ICEASPECT_ITEMS, 2);
    
            //Max level for enchantment.
            this.max = 2;
    
            //Don't touch these. :)
            this.base = 10;
            this.interval = 8;
        }
    
        @Override
        public void applyEffect(LivingEntity user, LivingEntity target, int enchantLevel, EntityDamageByEntityEvent event) {
    
            Random random = new Random();
            int Chance = random.nextInt(100);
    
            if (Chance <= (5 * enchantLevel) + 1) {
    
                final Location freezeloc = target.getLocation();
    
                final Block block1 = target.getLocation().add(0, 1, 0).getBlock();
                final Block block2 = target.getLocation().getBlock();
    
                final Material type1 = block1.getType();
                final Material type2 = block2.getType();
    
                block1.setType(Material.ICE);
                block2.setType(Material.ICE);
    
                    Vector vector = new Vector(0.0F, 0.0F, 0.0F);
    
                    World world = target.getWorld();
                    world.playEffect(target.getLocation(), Effect.POTION_BREAK, 0);
                    ParticleEffect.CLOUD.display(0.5F, 0.5F, 0.5F, 3.0F, 40, target.getLocation(), 50);
                    target.addPotionEffect(new PotionEffect(PotionEffectType.SLOW, 2 * 20, enchantLevel - 1, true));
                    target.addPotionEffect(new PotionEffect(PotionEffectType.WITHER, 2 * 20, enchantLevel - 1, true));
    
                    int task = Bukkit.getServer().getScheduler().scheduleSyncRepeatingTask(Bukkit.getPluginManager().getPlugin("BetosEnchs"), new Runnable() {
                        @Override
                        public void run() {
                            event.isCancelled();
                            target.teleport(freezeloc);
                            target.setVelocity(vector);
                            ParticleEffect.CLOUD.display(0.5F, 1F, 0.5F, 0.05F, 7, target.getLocation(), 50);
    
                            block1.getWorld().dropItem(block1.getLocation(), new ItemStack(Material.AIR));
                            block2.getWorld().dropItem(block2.getLocation(), new ItemStack(Material.AIR));
    
                            block1.setType(Material.ICE);
                            block2.setType(Material.ICE);
                         
                         
                            //THE STUFF THAT THEY WANTED ME TO ADD - START
                            if (block1.getDrops() != null) {
                                block1.getDrops().clear();
                            }
                            if (block2.getDrops() != null) {
                                block2.getDrops().clear();
                            }
                            //THE STUFF THAT THEY WANTED ME TO ADD - END
                         
    
                            }
                    }, 0L, 1L);
    
                    int task2 = Bukkit.getServer().getScheduler().scheduleSyncDelayedTask(Bukkit.getPluginManager().getPlugin("BetosEnchs"), new Runnable() {
                        @Override
                        public void run() {
    
                            Bukkit.getServer().getScheduler().cancelTask(task);
    
                            if (block1.getType() == Material.ICE) {
                                if (block2.getType() == Material.ICE) {
    
                                    block1.setType(Material.AIR);
                                    block2.setType(Material.AIR);
    
                                    world.playEffect(target.getLocation(), Effect.POTION_BREAK, 0);
                                    ParticleEffect.CLOUD.display(0.5F, 1F, 0.5F, 0.5F, 7, target.getLocation(), 50);
    
                                }
                            } else {
    
                                block1.setType(type1);
                                block2.setType(type2);
    
                                world.playEffect(target.getLocation(), Effect.POTION_BREAK, 0);
                                ParticleEffect.CLOUD.display(0.5F, 1F, 0.5F, 0.5F, 7, target.getLocation(), 50);
    
                            }
                        }
                    }, 2 * 20L);
    
                    Bukkit.getServer().getScheduler().scheduleSyncDelayedTask(Bukkit.getPluginManager().getPlugin("BetosEnchs"), new Runnable() {
                        @Override
                        public void run() {
                            if (target.isDead()) {
    
                                Bukkit.getServer().getScheduler().cancelTask(task);
                                Bukkit.getServer().getScheduler().cancelTask(task2);
    
                                if (block1.getType() == Material.ICE) {
                                    if (block2.getType() == Material.ICE) {
    
                                        block1.setType(Material.AIR);
                                        block2.setType(Material.AIR);
    
                                        world.playEffect(target.getLocation(), Effect.POTION_BREAK, 0);
                                        ParticleEffect.CLOUD.display(0.5F, 1F, 0.5F, 0.5F, 7, target.getLocation(), 50);
                                    }
                                } else {
    
                                    block1.setType(type1);
                                    block2.setType(type2);
    
                                    world.playEffect(target.getLocation(), Effect.POTION_BREAK, 0);
                                    ParticleEffect.CLOUD.display(0.5F, 1F, 0.5F, 0.5F, 7, target.getLocation(), 50);
    
                                }
                            }
    
    
                        }
    
                    }, 1L);
            }
        }
    
    }
    
     
  19. Offline

    mehboss

    @Bamco6657
    I will help to the best of my abilities, what are the console errors?
     
  20. Offline

    Bamco6657

    Same as the last time, it spams it, most likely due to the Bukkit Runnable.

    Console Error (open)

    6:20:40 PM [WARNING] [BetosEnchs] Task #13 for BetosEnchs v1.0 generated an exception
    6:20:40 PM java.lang.IllegalArgumentException: Cannot drop AIR.
    6:20:40 PM at org.apache.commons.lang.Validate.isTrue(Validate.java:136) ~[spigot_server.jar:git-Spigot-6d16e64-bf4818b]
    6:20:40 PM at org.bukkit.craftbukkit.v1_8_R3.CraftWorld.dropItem(CraftWorld.java:310) ~[spigot_server.jar:git-Spigot-6d16e64-bf4818b]
    6:20:40 PM at me.commandcore.betosenchs.enchants.IceAspect$1.run(IceAspect.java:81) ~[?:?]
    6:20:40 PM at org.bukkit.craftbukkit.v1_8_R3.scheduler.CraftTask.run(CraftTask.java:71) ~[spigot_server.jar:git-Spigot-6d16e64-bf4818b]
    6:20:40 PM at org.bukkit.craftbukkit.v1_8_R3.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:350) [spigot_server.jar:git-Spigot-6d16e64-bf4818b]
    6:20:40 PM at net.minecraft.server.v1_8_R3.MinecraftServer.B(MinecraftServer.java:722) [spigot_server.jar:git-Spigot-6d16e64-bf4818b]
    6:20:40 PM at net.minecraft.server.v1_8_R3.DedicatedServer.B(DedicatedServer.java:374) [spigot_server.jar:git-Spigot-6d16e64-bf4818b]
    6:20:40 PM at net.minecraft.server.v1_8_R3.MinecraftServer.A(MinecraftServer.java:653) [spigot_server.jar:git-Spigot-6d16e64-bf4818b]
    6:20:40 PM at net.minecraft.server.v1_8_R3.MinecraftServer.run(MinecraftServer.java:556) [spigot_server.jar:git-Spigot-6d16e64-bf4818b]
    6:20:40 PM at java.lang.Thread.run(Unknown Source) [?:1.8.0_101]
     
  21. Offline

    mehboss

    @Bamco6657
    That spams everytime you break a block or just non-stop spam?

    UPDATE: The null check didn't work:
    did you try
    Code:
    if (e.getBlock().getDrops() != null) {
    e.getBlock().getDrops().clear();
    }
     
    Last edited: Oct 3, 2016
  22. Offline

    Bamco6657

    It spams every time I hit an entity with the custom enchanted item. So pretty much when it runs the EntityDamageByEntity event. And yes, that is what I did, as you can see in the code.
     
  23. Offline

    mehboss

    @Bamco6657
    Alright, sorry for the confusion..

    You have an item stack here, and it is set to AIR, thus generating an exception.. Why do you have the new item stack there?

    ex:
    Code:
          block1.getWorld().dropItem(block1.getLocation(), new ItemStack(Material.AIR));
                            block2.getWorld().dropItem(block2.getLocation(), new ItemStack(Material.AIR));
    An item can't drop air, that makes no sense.. why do you have that, you already have them set to drop nothing when you cleared there drops..
     
    Last edited: Oct 3, 2016
  24. Offline

    Bamco6657

    Hey! I just realized that I screwed up on my code! :p So I removed those lines of code that looked like this:

    Code:
    block1.getWorld().dropItem(block1.getLocation(), new ItemStack(Material.AIR));
    
    So now I just have the ones that look like this:

    Code:
    if (block1.getDrops() != null) {
    block1.getDrops().clear();
    }
    
    But they still drop ice when mined with silk touch. :(
    Maybe it has to do with the code for silk touch, like it always drops ice no matter what.

    But I did find something interesting, I got rid of the the codes and put this instead for a test:

    Code:
    block1.getWorld().dropItem(block1.getLocation(), new ItemStack(Material.GRASS));
     block2.getWorld().dropItem(block2.getLocation(), new ItemStack(Material.GRASS));
    
    So now that I did that, this happens:



    The stick has the Ice Aspect enchantment on it. Even with this weird glitch, the block still drops ice when mined with silk touch! Does this mean that this code could not actually be effecting the drop of the block itself?
     
  25. Offline

    fireboyev

    I've had some problems with drops.clear() myself I think we should like get @Zombie_Striker called in here to help
     
  26. Offline

    Bamco6657

    Haven't heard of him, he's good with these kind of things?
     
  27. Offline

    mehboss

    @Bamco6657
    Yeah don't do that, just remove
    Code:
    block1.getWorld().dropItem(block1.getLocation(), new ItemStack(Material.GRASS));
    block2.getWorld().dropItem(block2.getLocation(), new ItemStack(Material.GRASS));
    Also will you try something for me, create a seperate event and create the item drop and see if it works. No, that new itemstack doesn't effect it if you don't set it to drop air..

    EDIT:
    Yes, ZombieStriker is the master coder, he has helped many people, including fireboyev and I.
     
  28. Offline

    Bamco6657

    1. A seperate event? Like a new class with similar code?

    2. Ah, I hope he comes and helps.
     
  29. Offline

    mehboss

    @Bamco6657
    below your whole code put:
    Code:
            @EventHandler
            public void onBreak(BlockBreakEvent e) {
                Block block = e.getBlock();
                if (block.getDrops() != null) {
                    block.getDrops().clear();
                   }
                }
            }
    
    then register the event on the onEnable, and tell me if when you mine a block, does it drop a block. It shouldn't and if it does tell me if there are any errors.
     
  30. Offline

    Bamco6657

    Sorry, feel like a noob asking this but how do you register your events in the onEnable?

    I did this, but it clearly doesn't work.
    Code:
    getServer().getPluginManager().registerEvents(new onBreak(), this);
     
Thread Status:
Not open for further replies.

Share This Page