TabAPI ArrayIndexOutOfBoundsException

Discussion in 'Plugin Development' started by Hester, Sep 21, 2013.

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

    Hester

    Hey, i had problem with TabAPI, when i restart, update etc tablist i had

    Code:
    23:03:54 [SEVERE] java.lang.ArrayIndexOutOfBoundsException: 3
    23:03:54 [SEVERE]      at org.mcsg.double0negative.tabapi.TabObject.setTab(TabObject.java:66)
    23:03:54 [SEVERE]      at org.mcsg.double0negative.tabapi.TabAPI.setTabString(TabAPI.java:235)
    23:03:54 [SEVERE]      at org.mcsg.double0negative.tabapi.TabAPI.setTabString(TabAPI.java:215)
    23:03:54 [SEVERE]      at org.mcsg.double0negative.tabapi.TabAPI.resetTabList(TabAPI.java:205)
    23:03:54 [SEVERE]      at HesterQ.HqGAME.helps.GameHelp.restartList(GameHelp.java:381)
    23:03:54 [SEVERE]      at HesterQ.HqGAME.helps.GameHelp.removeFromQueue(GameHelp.java:95)
    23:03:54 [SEVERE]      at HesterQ.HqGAME.Main.onCommand(Main.java:243)
    23:03:54 [SEVERE]      at org.bukkit.command.PluginCommand.execute(PluginCommand.java:44)
    23:03:54 [SEVERE]      at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:192)
    23:03:54 [SEVERE]      at org.bukkit.craftbukkit.v1_6_R2.CraftServer.dispatchCommand(CraftServer.java:527)
    23:03:54 [SEVERE]      at sun.reflect.GeneratedMethodAccessor41.invoke(Unknown Source)
    23:03:54 [SEVERE]      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    23:03:54 [SEVERE]      at java.lang.reflect.Method.invoke(Method.java:606)
    23:03:54 [SEVERE]      at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:425)
    23:03:54 [SEVERE]      at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62)
    [/CODE]

    #edit - just update plugin :)
     
  2. Offline

    chasechocolate

    The tablist is only 3 wide, and you are trying to access the fourth column, which doesn't exist.
     
  3. Offline

    Hester

    but error is here(381 line)
    TabAPI.resetTabList(player); #HERE IS 381 LINE
    eh, can u show where is error, i cant find it :F
     
  4. Offline

    chasechocolate

    Hester are you sure? Change the > to >= (when checking the value of x).
     
  5. Offline

    Hester


    You're wrong when I changed it to
    TabAPI.resetTabList (player);
    TabAPI.setTabString (Main.getInstance (), player, 0, 0, "TEST");
    TabAPI.updatePlayer (player);

    error is the same = TabAPI.resetTabList (player);
    maybe is fault of the old api(1.4) ?

    @edit, when i change resetTabList to TabAPI.clearTab(player); there are no errors but it does not clear TabList :<

    bump.

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

    chasechocolate

    Hester do a debug and print out TabAPI.getVertSize() and TabAPI.getHorizSize().
     
Thread Status:
Not open for further replies.

Share This Page