1. Welcome to LilyPad. Download the project, explore the forums, and create your own LilyPad network.


    If you use the software and enjoy it or have a question, or would like to contribute to the future of the software directly or through resources, please sign up and join our little community.

Plugin error

Discussion in 'Development' started by Shawshark, Sep 14, 2013.

  1. Shawshark

    Shawshark Active Member Resource Contributor

    Can anyone help this is the code and error below.

    This is the error from the minigames lobby

    Code (text):
    09:40:38 [SEVERE] java.lang.IllegalAccessException: Class lilypad.client.connect.lib.ConnectImpl can not access a member of class me.loderos.connect.main$1 with modifiers "public"
    09:40:38 [SEVERE]      at sun.reflect.Reflection.ensureMemberAccess(Reflection.java:105)
    09:40:38 [SEVERE]      at java.lang.reflect.AccessibleObject.slowCheckMemberAccess(AccessibleObject.java:261)
    09:40:38 [SEVERE]      at java.lang.reflect.AccessibleObject.checkAccess(AccessibleObject.java:253)
    09:40:38 [SEVERE]      at java.lang.reflect.Method.invoke(Method.java:599)
    09:40:38 [SEVERE]      at lilypad.client.connect.lib.ConnectImpl.dispatchEvent(ConnectImpl.java:318)
    09:40:38 [SEVERE]      at lilypad.client.connect.lib.ConnectNetworkHandler.channelRead0(ConnectNetworkHandler.java:59)
    09:40:38 [SEVERE]      at lilypad.client.connect.lib.ConnectNetworkHandler.channelRead0(ConnectNetworkHandler.java:23)
    09:40:38 [SEVERE]      at lilypad.libs.io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:98)
    09:40:38 [SEVERE]      at lilypad.libs.io.netty.channel.DefaultChannelHandlerContext.invokeChannelRead(DefaultChannelHandlerContext.java:334)
    09:40:38 [SEVERE]      at lilypad.libs.io.netty.channel.DefaultChannelHandlerContext.fireChannelRead(DefaultChannelHandlerContext.java:320)
    09:40:38 [SEVERE]      at lilypad.libs.io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:173)
    09:40:38 [SEVERE]      at lilypad.libs.io.netty.channel.DefaultChannelHandlerContext.invokeChannelRead(DefaultChannelHandlerContext.java:334)
    09:40:38 [SEVERE]      at lilypad.libs.io.netty.channel.DefaultChannelHandlerContext.fireChannelRead(DefaultChannelHandlerContext.java:320)
    09:40:38 [SEVERE]      at lilypad.libs.io.netty.handler.timeout.ReadTimeoutHandler.channelRead(ReadTimeoutHandler.java:149)
    09:40:38 [SEVERE]      at lilypad.libs.io.netty.channel.DefaultChannelHandlerContext.invokeChannelRead(DefaultChannelHandlerContext.java:334)
    09:40:38 [SEVERE]      at lilypad.libs.io.netty.channel.DefaultChannelHandlerContext.fireChannelRead(DefaultChannelHandlerContext.java:320)
    09:40:38 [SEVERE]      at lilypad.libs.io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:785)
    09:40:38 [SEVERE]      at lilypad.libs.io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:100)
    09:40:38 [SEVERE]      at lilypad.libs.io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:497)
    09:40:38 [SEVERE]      at lilypad.libs.io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:465)
    09:40:38 [SEVERE]      at lilypad.libs.io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:359)
    09:40:38 [SEVERE]      at lilypad.libs.io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:101)
    09:40:38 [SEVERE]      at java.lang.Thread.run(Thread.java:724)
     

    This is the code fron the plugin in the hide and seek server.
    Code (text):
    @Override
    public boolean onCommand(CommandSender sender, Command command,
      String label, String[] args) {
      if(label.equalsIgnoreCase("testtoken")){
      MessageRequest request = null;
      String playername = args[0];
      String tokens = args[1];





      try {
        request = new MessageRequest("minigames","tokens", playername + "%" + tokens);
      } catch (UnsupportedEncodingException e) {
        // TODO Auto-generated catch block
        e.printStackTrace();
      }try {
        c.request(request);
      } catch (RequestException e) {
        // TODO Auto-generated catch block
        e.printStackTrace();
      }




      }else if(label.equalsIgnoreCase("serverstatus")){
      MessageRequest request = null;
      int online =  getServer().getOnlinePlayers().length;
      String message = args[0] + "%" + online;




      try {
        request = new MessageRequest("minigames","sendsigns",message + "");
      } catch (UnsupportedEncodingException e) {
        // TODO Auto-generated catch block
        e.printStackTrace();
      }try {
        c.request(request);
      } catch (RequestException e) {
        // TODO Auto-generated catch block
        e.printStackTrace();
      }
  2. Shawshark

    Shawshark Active Member Resource Contributor

  3. Matt

    Matt Forum Moderator & Contributor Staff Member Moderator Contributor

    Can you post your hole code? And maybe on pastebin?
  4. Shawshark

    Shawshark Active Member Resource Contributor

    That's the only part of the plugin using the code.
  5. Matt

    Matt Forum Moderator & Contributor Staff Member Moderator Contributor

    Where is your import part etc.. ?
  6. Shawshark

    Shawshark Active Member Resource Contributor

    Code (text):
    import java.io.UnsupportedEncodingException;

    import lilypad.client.connect.api.Connect;
    import lilypad.client.connect.api.ConnectSettings;
    import lilypad.client.connect.api.MessageEvent;
    import lilypad.client.connect.api.MessageEventListener;
    import lilypad.client.connect.api.RedirectEvent;
    import lilypad.client.connect.api.RedirectEventListener;
    import lilypad.client.connect.api.ServerAddEvent;
    import lilypad.client.connect.api.ServerEventListener;
    import lilypad.client.connect.api.request.RequestException;
    import lilypad.client.connect.api.request.impl.MessageRequest;

    import org.bukkit.Bukkit;
    import org.bukkit.command.Command;
    import org.bukkit.command.CommandSender;
    import org.bukkit.event.EventHandler;
    import org.bukkit.event.Listener;
    import org.bukkit.event.player.PlayerJoinEvent;
    import org.bukkit.plugin.java.JavaPlugin;
    import org.bukkit.scoreboard.Scoreboard;
    import org.bukkit.scoreboard.ScoreboardManager;

    public class main extends JavaPlugin implements Listener{
    public Connect c;
    ScoreboardManager manager;
    Scoreboard board;
    @Override
    public void onEnable() {
      c = getBukkitConnect();}

    public Connect getBukkitConnect() {
      return (Connect) getServer().getServicesManager().getRegistration(Connect.class).getProvider();
    }
  7. Matt

    Matt Forum Moderator & Contributor Staff Member Moderator Contributor

    Can you send it now completely? On paste bin please. ( With the import section ;) )
  8. Shawshark

    Shawshark Active Member Resource Contributor

    what I have gave you is the only part that is using lilypad.
  9. Matt

    Matt Forum Moderator & Contributor Staff Member Moderator Contributor

    Can you send me the hole part please?
  10. Shawshark

    Shawshark Active Member Resource Contributor

    Why? Theres nothing eles that could be effecting it.
  11. Matt

    Matt Forum Moderator & Contributor Staff Member Moderator Contributor

    I just want to be sure okay?
  12. Shawshark

    Shawshark Active Member Resource Contributor

    Iv created another plugin with just using the code above with onEnable and its still not working, You have the full code of that above.

Share This Page