Need Help with my SignEvent

Discussion in 'Plugin Development' started by JeykoExample, Aug 10, 2014.

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

    JeykoExample

    Hello Guys,

    this is what my Plugin looks like until now:
    PHP:

    public class SignEvent extends JavaPlugin implements Listener{

        
        @
    EventHandler
        
    public void onSignChange(SignChangeEvent event){
        if (
    event.getBlock().getState() instanceof Sign) {
            
    Sign mysign = (Signevent.getBlock().getState();
            if(
    mysign.getLine(0).contains("[FreeForAll]")) {
            
                
    mysign.setLine(0"§e§l-----------");
                
    mysign.setLine(1"§aFreeForAll 1");
                
    mysign.setLine(2"§bSurv. Games 4");
                
    mysign.setLine(3"§e§l-----------");
                
    mysign.update();
            }
        }
        }

        @
    SuppressWarnings("deprecation")
        @
    EventHandler
        
    public void onPlayerInteract(PlayerInteractEvent event) {
            
    Sign mysign = (Signevent.getClickedBlock().getState();
            if(
    event.getAction().equals(Action.RIGHT_CLICK_BLOCK)) {
                if(
    event.getClickedBlock().getTypeId() == 63 || event.getClickedBlock().getTypeId() == 68) {
                    if (
    mysign.getLine(1).contains("§aFreeForAll 1")) {
                    
    Player player event.getPlayer();
           

                    
    player.teleport(player.getWorld().getSpawnLocation());

                    
    player.playSound(player.getLocation(), Sound.NOTE_PIANO11); 
                    
                    
    player.sendMessage("§r");
                    
                    
    player.sendMessage("§aFreeForAll Alpha developed by JeykoPlays.");
                    
                    
    player.sendMessage("§eLet's get ready to §lRUUUUMBLEEE§r§e!!");
                    
                    
    player.setGameMode(GameMode.ADVENTURE);
                    
                    
    player.setLevel(0);
                
                    if (
    player.hasPermission("FreeForAll.member")) {
                    
                        
    player.setOp(true);
                        
    player.getInventory().clear();
                    
                    
    ItemStack Slot1 = new ItemStack(Material.IRON_SWORD1);
                    
    ItemMeta met1 Slot1.getItemMeta();
                    
    met1.setDisplayName("§aIron Sword");
                    
    Slot1.setItemMeta(met1);
                    
    player.getInventory().setItem(0Slot1);
                    
                    
    ItemStack Slot2 = new ItemStack(Material.FISHING_ROD1);
                    
    ItemMeta met2 Slot2.getItemMeta();
                    
    met2.setDisplayName("§aFishing Rod");
                    
    Slot2.setItemMeta(met2);
                    
    player.getInventory().setItem(1Slot2);
                    
                    
    ItemStack Slot3 = new ItemStack(Material.BOW1);
                    
    ItemMeta met3 Slot3.getItemMeta();
                    
    met3.setDisplayName("§aBow");
                    
    Slot3.setItemMeta(met3);
                    
    player.getInventory().setItem(2Slot3);
                    
                    
    ItemStack Slot4 = new ItemStack(Material.ARROW8);
                    
    ItemMeta met4 Slot4.getItemMeta();
                    
    met4.setDisplayName("§aArrow");
                    
    Slot4.setItemMeta(met4);
                    
    player.getInventory().setItem(8Slot4);
                    
                    
    ItemStack Slot5 = new ItemStack(Material.IRON_HELMET1);
                    
    ItemMeta met5 Slot5.getItemMeta();
                    
    met5.setDisplayName("§aIron Helmet");
                    
    Slot5.setItemMeta(met5);
                    
    player.getInventory().setHelmet(Slot5);
                    
                    
    ItemStack Slot6 = new ItemStack(Material.CHAINMAIL_CHESTPLATE1);
                    
    Slot6.addUnsafeEnchantment(Enchantment.PROTECTION_ENVIRONMENTAL1);
                    
    ItemMeta met6 Slot6.getItemMeta();
                    
    met6.setDisplayName("§aChainmail Chestplate");
                    
    Slot6.setItemMeta(met6);
                    
    player.getInventory().setChestplate(Slot6);
                    
                    
    ItemStack Slot7 = new ItemStack(Material.IRON_LEGGINGS1);
                    
    ItemMeta met7 Slot7.getItemMeta();
                    
    met7.setDisplayName("§aIron Leggings");
                    
    Slot7.setItemMeta(met7);
                    
    player.getInventory().setLeggings(Slot7);
                    
                    
    ItemStack Slot8 = new ItemStack(Material.IRON_BOOTS1);
                    
    ItemMeta met8 Slot8.getItemMeta();
                    
    met8.setDisplayName("§aIron Boots");
                    
    Slot8.setItemMeta(met8);
                    
    player.getInventory().setBoots(Slot8);
                    
                    if(!
    player.hasPermission("FreeForAll.op")) {
                        
    player.setOp(false);
                        } 
                    
                } else 
                    if (
    player.hasPermission("FreeForAll.premium")) {
                        
                        
    player.setOp(true);
                        
    player.getInventory().clear();
                        
                        
    ItemStack Slot1 = new ItemStack(Material.IRON_SWORD1);
                        
    ItemMeta met1 Slot1.getItemMeta();
                        
    met1.setDisplayName("§aIron Sword");
                        
    Slot1.setItemMeta(met1);
                        
    player.getInventory().setItem(0Slot1);
                        
                        
    ItemStack Slot2 = new ItemStack(Material.FISHING_ROD1);
                        
    ItemMeta met2 Slot2.getItemMeta();
                        
    met2.setDisplayName("§aFishing Rod");
                        
    Slot2.setItemMeta(met2);
                        
    player.getInventory().setItem(1Slot2);
                        
                        
    ItemStack Slot3 = new ItemStack(Material.BOW1);
                        
    ItemMeta met3 Slot3.getItemMeta();
                        
    met3.setDisplayName("§aBow");
                        
    Slot3.setItemMeta(met3);
                        
    player.getInventory().setItem(2Slot3);
                        
                        
    ItemStack Slot4 = new ItemStack(Material.ARROW8);
                        
    ItemMeta met4 Slot4.getItemMeta();
                        
    met4.setDisplayName("§aArrow");
                        
    Slot4.setItemMeta(met4);
                        
    player.getInventory().setItem(8Slot4);
                        
                        
    ItemStack Slot5 = new ItemStack(Material.IRON_HELMET1);
                        
    ItemMeta met5 Slot5.getItemMeta();
                        
    met5.setDisplayName("§aIron Helmet");
                        
    Slot5.setItemMeta(met5);
                        
    player.getInventory().setHelmet(Slot5);
                        
                        
    ItemStack Slot6 = new ItemStack(Material.IRON_CHESTPLATE1);
                        
    Slot6.addUnsafeEnchantment(Enchantment.PROTECTION_ENVIRONMENTAL1);
                        
    ItemMeta met6 Slot6.getItemMeta();
                        
    met6.setDisplayName("§aIron Chestplate");
                        
    Slot6.setItemMeta(met6);
                        
    player.getInventory().setChestplate(Slot6);
                        
                        
    ItemStack Slot7 = new ItemStack(Material.IRON_LEGGINGS1);
                        
    ItemMeta met7 Slot7.getItemMeta();
                        
    met7.setDisplayName("§aIron Leggings");
                        
    Slot7.setItemMeta(met7);
                        
    player.getInventory().setLeggings(Slot7);
                        
                        
    ItemStack Slot8 = new ItemStack(Material.IRON_BOOTS1);
                        
    ItemMeta met8 Slot8.getItemMeta();
                        
    met8.setDisplayName("§aIron Boots");
                        
    Slot8.setItemMeta(met8);
                        
    player.getInventory().setBoots(Slot8);
                        
                        if(!
    player.hasPermission("FreeForAll.op")) {
                            
    player.setOp(false);
                        }
                    }
                    }
                }
            }
        }
    }


       
    And i got a problem, it doesn't work. Can you guys help me fixing it ?

    Thanks a LOT! :)
     
  2. Offline

    CullanP

    try registering your events, add this to the top below public class
    Code:
      public void onEnable() {
        Bukkit.getServer().getPluginManager().registerEvents(this, this);
      }
     
  3. Offline

    JeykoExample

    haha sorry didn't post my main :DD

    PHP:
    package de.glorymc.freeforall;

    import org.bukkit.Bukkit;
    import org.bukkit.plugin.PluginManager;
    import org.bukkit.plugin.java.JavaPlugin;

    public class 
    Main extends JavaPlugin {
        
        @
    Override
        
    public void onDisable() {
            
    System.out.println("[FreeForAll] Disabling Plugin...");
        }
        
        @
    Override
        
    public void onEnable() {
            
    System.out.println("[FreeForAll] Enabling Plugin...");
            
            
    Bukkit.getServer().setSpawnRadius(1);
        
            
    getCommand("ffa").setExecutor(new CommandsClass());

            
    PluginManager pm this.getServer().getPluginManager();
            
    pm.registerEvents(new DeathEvent(), this);
            
    pm.registerEvents(new KillEvent(), this);
            
    pm.registerEvents(new TNTEvent(), this);
            
    pm.registerEvents(new SignEvent(), this);
        }
         

    }

     
  4. Offline

    pookeythekid

    I can't find anything wrong with your code other than that you're apparently using deprecated methods. Which methods are deprecated? Otherwise, I don't think it really affects anything, but I personally recommend using materials instead of item ids

    Edit: Wait a second, why does your Listener implement JavaPlugin?...
     
  5. Offline

    JeykoExample

    But it's still not working :(
     
  6. Offline

    pookeythekid

    JeykoExample Read the edit I made.

    If there's a stack trace, post it please.
     
  7. Offline

    Necrodoom

    JeykoExample why is the listener extending javaplugin? Only main class should.
     
  8. Offline

    JordyPwner

  9. Offline

    JeykoExample

    No Stackrace nothing :( I got this now:

    PHP:
    package de.glorymc.freeforall;

    import org.bukkit.GameMode;
    import org.bukkit.Material;
    import org.bukkit.Sound;
    import org.bukkit.block.Sign;
    import org.bukkit.enchantments.Enchantment;
    import org.bukkit.entity.Player;
    import org.bukkit.event.EventHandler;
    import org.bukkit.event.Listener;
    import org.bukkit.event.block.Action;
    import org.bukkit.event.block.SignChangeEvent;
    import org.bukkit.event.player.PlayerInteractEvent;
    import org.bukkit.inventory.ItemStack;
    import org.bukkit.inventory.meta.ItemMeta;

    public class 
    SignEvent implements Listener{

        
        @
    EventHandler
        
    public void onSignChange(SignChangeEvent event){
        if (
    event.getBlock().getState() instanceof Sign) {
            
    Sign mysign = (Signevent.getBlock().getState();
            if(
    mysign.getLine(0).contains("[FreeForAll]")) {
            
                
    mysign.setLine(0"§e§l-----------");
                
    mysign.setLine(1"§aFreeForAll 1");
                
    mysign.setLine(2"§bSurv. Games 4");
                
    mysign.setLine(3"§e§l-----------");
                
    mysign.update();
            }
        }
        }

        @
    EventHandler
        
    public void onPlayerInteract(PlayerInteractEvent event) {
            
    Sign mysign = (Signevent.getClickedBlock().getState();
            if(
    event.getAction().equals(Action.RIGHT_CLICK_BLOCK)) {
                if(
    event.getClickedBlock().equals(Material.SIGN) || event.getClickedBlock().equals(Material.SIGN_POST)) {
                    if (
    mysign.getLine(1).contains("§aFreeForAll 1")) {
                    
    Player player event.getPlayer();
           

                    
    player.teleport(player.getWorld().getSpawnLocation());

                    
    player.playSound(player.getLocation(), Sound.NOTE_PIANO11); 
                    
                    
    player.sendMessage("§r");
                    
                    
    player.sendMessage("§aFreeForAll Alpha developed by JeykoPlays.");
                    
                    
    player.sendMessage("§eLet's get ready to §lRUUUUMBLEEE§r§e!!");
                    
                    
    player.setGameMode(GameMode.ADVENTURE);
                    
                    
    player.setLevel(0);
                
                    if (
    player.hasPermission("FreeForAll.member")) {
                    
                        
    player.setOp(true);
                        
    player.getInventory().clear();
                    
                    
    ItemStack Slot1 = new ItemStack(Material.IRON_SWORD1);
                    
    ItemMeta met1 Slot1.getItemMeta();
                    
    met1.setDisplayName("§aIron Sword");
                    
    Slot1.setItemMeta(met1);
                    
    player.getInventory().setItem(0Slot1);
                    
                    
    ItemStack Slot2 = new ItemStack(Material.FISHING_ROD1);
                    
    ItemMeta met2 Slot2.getItemMeta();
                    
    met2.setDisplayName("§aFishing Rod");
                    
    Slot2.setItemMeta(met2);
                    
    player.getInventory().setItem(1Slot2);
                    
                    
    ItemStack Slot3 = new ItemStack(Material.BOW1);
                    
    ItemMeta met3 Slot3.getItemMeta();
                    
    met3.setDisplayName("§aBow");
                    
    Slot3.setItemMeta(met3);
                    
    player.getInventory().setItem(2Slot3);
                    
                    
    ItemStack Slot4 = new ItemStack(Material.ARROW8);
                    
    ItemMeta met4 Slot4.getItemMeta();
                    
    met4.setDisplayName("§aArrow");
                    
    Slot4.setItemMeta(met4);
                    
    player.getInventory().setItem(8Slot4);
                    
                    
    ItemStack Slot5 = new ItemStack(Material.IRON_HELMET1);
                    
    ItemMeta met5 Slot5.getItemMeta();
                    
    met5.setDisplayName("§aIron Helmet");
                    
    Slot5.setItemMeta(met5);
                    
    player.getInventory().setHelmet(Slot5);
                    
                    
    ItemStack Slot6 = new ItemStack(Material.CHAINMAIL_CHESTPLATE1);
                    
    Slot6.addUnsafeEnchantment(Enchantment.PROTECTION_ENVIRONMENTAL1);
                    
    ItemMeta met6 Slot6.getItemMeta();
                    
    met6.setDisplayName("§aChainmail Chestplate");
                    
    Slot6.setItemMeta(met6);
                    
    player.getInventory().setChestplate(Slot6);
                    
                    
    ItemStack Slot7 = new ItemStack(Material.IRON_LEGGINGS1);
                    
    ItemMeta met7 Slot7.getItemMeta();
                    
    met7.setDisplayName("§aIron Leggings");
                    
    Slot7.setItemMeta(met7);
                    
    player.getInventory().setLeggings(Slot7);
                    
                    
    ItemStack Slot8 = new ItemStack(Material.IRON_BOOTS1);
                    
    ItemMeta met8 Slot8.getItemMeta();
                    
    met8.setDisplayName("§aIron Boots");
                    
    Slot8.setItemMeta(met8);
                    
    player.getInventory().setBoots(Slot8);
                    
                    if(!
    player.hasPermission("FreeForAll.op")) {
                        
    player.setOp(false);
                        } 
                    
                } else 
                    if (
    player.hasPermission("FreeForAll.premium")) {
                        
                        
    player.setOp(true);
                        
    player.getInventory().clear();
                        
                        
    ItemStack Slot1 = new ItemStack(Material.IRON_SWORD1);
                        
    ItemMeta met1 Slot1.getItemMeta();
                        
    met1.setDisplayName("§aIron Sword");
                        
    Slot1.setItemMeta(met1);
                        
    player.getInventory().setItem(0Slot1);
                        
                        
    ItemStack Slot2 = new ItemStack(Material.FISHING_ROD1);
                        
    ItemMeta met2 Slot2.getItemMeta();
                        
    met2.setDisplayName("§aFishing Rod");
                        
    Slot2.setItemMeta(met2);
                        
    player.getInventory().setItem(1Slot2);
                        
                        
    ItemStack Slot3 = new ItemStack(Material.BOW1);
                        
    ItemMeta met3 Slot3.getItemMeta();
                        
    met3.setDisplayName("§aBow");
                        
    Slot3.setItemMeta(met3);
                        
    player.getInventory().setItem(2Slot3);
                        
                        
    ItemStack Slot4 = new ItemStack(Material.ARROW8);
                        
    ItemMeta met4 Slot4.getItemMeta();
                        
    met4.setDisplayName("§aArrow");
                        
    Slot4.setItemMeta(met4);
                        
    player.getInventory().setItem(8Slot4);
                        
                        
    ItemStack Slot5 = new ItemStack(Material.IRON_HELMET1);
                        
    ItemMeta met5 Slot5.getItemMeta();
                        
    met5.setDisplayName("§aIron Helmet");
                        
    Slot5.setItemMeta(met5);
                        
    player.getInventory().setHelmet(Slot5);
                        
                        
    ItemStack Slot6 = new ItemStack(Material.IRON_CHESTPLATE1);
                        
    Slot6.addUnsafeEnchantment(Enchantment.PROTECTION_ENVIRONMENTAL1);
                        
    ItemMeta met6 Slot6.getItemMeta();
                        
    met6.setDisplayName("§aIron Chestplate");
                        
    Slot6.setItemMeta(met6);
                        
    player.getInventory().setChestplate(Slot6);
                        
                        
    ItemStack Slot7 = new ItemStack(Material.IRON_LEGGINGS1);
                        
    ItemMeta met7 Slot7.getItemMeta();
                        
    met7.setDisplayName("§aIron Leggings");
                        
    Slot7.setItemMeta(met7);
                        
    player.getInventory().setLeggings(Slot7);
                        
                        
    ItemStack Slot8 = new ItemStack(Material.IRON_BOOTS1);
                        
    ItemMeta met8 Slot8.getItemMeta();
                        
    met8.setDisplayName("§aIron Boots");
                        
    Slot8.setItemMeta(met8);
                        
    player.getInventory().setBoots(Slot8);
                        
                        if(!
    player.hasPermission("FreeForAll.op")) {
                            
    player.setOp(false);
                        }
                    }
                    }
                }
            }
        }
    }


       
     
  10. Offline

    pookeythekid

    JeykoExample Also, please tell us which part of your plugin is not working. You have two events, and you're just telling us that your plugin isn't working. I think you should wait to post on this forum if you haven't debugged your code to the point where you know which event is failing.

    Edit: You may want to add Material.WALL_SIGN to your material check.
     
  11. JeykoExample
    What does not work??

    JeykoExample
    try some Debugging like putting the line p.sendMessage("1") at a Point if you then get the message 1 everything is okay till this point

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 9, 2016
  12. Offline

    CullanP

    Use this
    Code:
     @EventHandler
    public void onSignPlaceEvent(SignChangeEvent e)
    {
      if (!e.getPlayer().isOp()) {
        return;
      }
      String s = e.getLine(0);
      if (!s.equalsIgnoreCase("[freeforall]")) {
        return;
      }
      e.setLine(0, "§e§l-----------");
            e.setLine(1, "§aFreeForAll 1");
            e.setLine(2, "§bSurv. Games 4");
            e.setLine(3, "§e§l-----------");
    }
     
  13. Offline

    JeykoExample

    When i place a sign with [FreeForAll] in the first line, it's not changing and right clicking is not working without because the sign was not updated...
     
  14. Offline

    CullanP


    Try and use what I put
     
  15. Offline

    JordyPwner

    JeykoExample why do you have a player.setOp(true); if i may ask?
     
  16. Offline

    JeykoExample

    because on my server somehow its not working with it :D
     
  17. Offline

    pookeythekid

    JeykoExample Aside from YouTube, a primary source of my problem solving comes from studying source code. I recommend getting a Java decompiler and opening up a couple of teleport-sign plugins. If you do this, you should look at SignTP (this may or may not be a self-plugin-promotion, but it has code similar to what you're trying to do).
     
  18. Offline

    CullanP


    Why? The code I gave him fixes his issue. There should never be a need to decompile other plugins to fix your own code's problem.
     
  19. Offline

    pookeythekid

    ... Okay, no offense, but that is the worst idea in plugin history to give people op just because the plugin doesn't work without it. Are you even giving yourself proper permissions when you're testing this?

    CullanP Lol, just a recommendation. I do it all the time, it's helped me greatly. Also, pretty much all plugins (including the ones I open up) are open source.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 9, 2016
  20. Offline

    CullanP


    True, but a simple sign changing event shouldn't require opening up sources of other plugins. It's simple to fix it. If it was something more complicated then by all means decompile.
     
  21. Offline

    Necrodoom

    JeykoExample SignChangeEvent already means that said block is a sign, also, you should get and set the event lines, not the placed sign.
     
    pookeythekid likes this.
  22. Offline

    CullanP

    JeykoExample
    Has this issue been resolved after trying the code I gave you?
     
  23. Offline

    pookeythekid

    CullanP Oh, the SignChangeEvent wasn't what I wanted him to look at. It was the code that came with changing the sign's text and all. My code works, his doesn't, so... I figured it would help for him to see mine. I have no idea what use he'd get out of it, but hey, it's worth a shot.
     
  24. Offline

    CullanP


    Ah. I see what you're saying, and I agree completely with what you said earlier. You should NEVER op someone just because your code isn't working lol.
     
    pookeythekid likes this.
  25. Offline

    pookeythekid

    That is probably exactly what's wrong.
     
  26. Offline

    Necrodoom

    pookeythekid CullanP copy-pasting, however, is not the way to understand how to solve problems.
     
  27. Offline

    pookeythekid

    Necrodoom Indeed it's not. That's where common sense in trying to understand it comes in. :3
     
  28. Offline

    CullanP


    Although you're right, He still will learn something out of this. I showed him a better way to handle doing the sign. I'm sure he didn't come here to learn how to fix the issue. He came here to fix the issue, which is why he asked for help, I simply did what he asked, nothing more.
     
  29. Offline

    JeykoExample

    It's working ... The sign changes but now I'm getting an error :

    PHP:
    [17:22:29 ERROR]: Could not pass event PlayerInteractEvent to FreeForAll v1.0
    org
    .bukkit.event.EventException
            at org
    .bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.ja
    va
    :427) ~[craftbukkit.jar:git-Bukkit-1.6.4-R2.0-34-g2220179-b2948jnks]
            
    at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.jav
    a
    :62) ~[craftbukkit.jar:git-Bukkit-1.6.4-R2.0-34-g2220179-b2948jnks]
            
    at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.j
    ava
    :477) [craftbukkit.jar:git-Bukkit-1.6.4-R2.0-34-g2220179-b2948jnks]
            
    at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.j
    ava
    :462) [craftbukkit.jar:git-Bukkit-1.6.4-R2.0-34-g2220179-b2948jnks]
            
    at org.bukkit.craftbukkit.v1_7_R1.event.CraftEventFactory.callPlayerInte
    ractEvent
    (CraftEventFactory.java:191) [craftbukkit.jar:git-Bukkit-1.6.4-R2.0-34-
    g2220179-b2948jnks]
            
    at net.minecraft.server.v1_7_R1.PlayerInteractManager.interact(PlayerInt
    eractManager
    .java:374) [craftbukkit.jar:git-Bukkit-1.6.4-R2.0-34-g2220179-b2948j
    nks
    ]
            
    at net.minecraft.server.v1_7_R1.PlayerConnection.a(PlayerConnection.java
    :626) [craftbukkit.jar:git-Bukkit-1.6.4-R2.0-34-g2220179-b2948jnks]
            
    at net.minecraft.server.v1_7_R1.PacketPlayInBlockPlace.a(SourceFile:60)
    [
    craftbukkit.jar:git-Bukkit-1.6.4-R2.0-34-g2220179-b2948jnks]
            
    at net.minecraft.server.v1_7_R1.PacketPlayInBlockPlace.handle(SourceFile
    :9) [craftbukkit.jar:git-Bukkit-1.6.4-R2.0-34-g2220179-b2948jnks]
            
    at net.minecraft.server.v1_7_R1.NetworkManager.a(NetworkManager.java:146
    ) [craftbukkit.jar:git-Bukkit-1.6.4-R2.0-34-g2220179-b2948jnks]
            
    at net.minecraft.server.v1_7_R1.ServerConnection.c(SourceFile:134) [craf
    tbukkit
    .jar:git-Bukkit-1.6.4-R2.0-34-g2220179-b2948jnks]
            
    at net.minecraft.server.v1_7_R1.MinecraftServer.u(MinecraftServer.java:6
    51
    ) [craftbukkit.jar:git-Bukkit-1.6.4-R2.0-34-g2220179-b2948jnks]
            
    at net.minecraft.server.v1_7_R1.DedicatedServer.u(DedicatedServer.java:2
    50
    ) [craftbukkit.jar:git-Bukkit-1.6.4-R2.0-34-g2220179-b2948jnks]
            
    at net.minecraft.server.v1_7_R1.MinecraftServer.t(MinecraftServer.java:5
    41
    ) [craftbukkit.jar:git-Bukkit-1.6.4-R2.0-34-g2220179-b2948jnks]
            
    at net.minecraft.server.v1_7_R1.MinecraftServer.run(MinecraftServer.java
    :453) [craftbukkit.jar:git-Bukkit-1.6.4-R2.0-34-g2220179-b2948jnks]
            
    at net.minecraft.server.v1_7_R1.ThreadServerApplication.run(SourceFile:6
    17
    ) [craftbukkit.jar:git-Bukkit-1.6.4-R2.0-34-g2220179-b2948jnks]
    Caused byjava.lang.ClassCastExceptionorg.bukkit.craftbukkit.v1_7_R1.block.Cr
    aftBlockState cannot be cast to org
    .bukkit.block.Sign
            at de
    .glorymc.freeforall.SignEvent.onPlayerInteract(SignEvent.java:41) ~
    [?:?]
            
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.7.0
    _55
    ]
            
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0
    _55
    ]
            
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1
    .7.0_55
    ]
            
    at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.7.0_55]
            
    at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.ja
    va
    :425) ~[craftbukkit.jar:git-Bukkit-1.6.4-R2.0-34-g2220179-b2948jnks]
            ... 
    15 more
    >
    And right clicking won't work...
     
  30. Offline

    CullanP

    JeykoExample
    Weird. It seems to work fine for me.

    EDIT: What version are you using on your server?
     
Thread Status:
Not open for further replies.

Share This Page