TabAPI ArrayIndexOutOfBoundsException

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

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


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

    23:03:54 [SEVERE] java.lang.ArrayIndexOutOfBoundsException: 3
    23:03:54 [SEVERE]      at org.mcsg.double0negative.tabapi.TabObject.setTab(
    23:03:54 [SEVERE]      at org.mcsg.double0negative.tabapi.TabAPI.setTabString(
    23:03:54 [SEVERE]      at org.mcsg.double0negative.tabapi.TabAPI.setTabString(
    23:03:54 [SEVERE]      at org.mcsg.double0negative.tabapi.TabAPI.resetTabList(
    23:03:54 [SEVERE]      at HesterQ.HqGAME.helps.GameHelp.restartList(
    23:03:54 [SEVERE]      at HesterQ.HqGAME.helps.GameHelp.removeFromQueue(
    23:03:54 [SEVERE]      at HesterQ.HqGAME.Main.onCommand(
    23:03:54 [SEVERE]      at org.bukkit.command.PluginCommand.execute(
    23:03:54 [SEVERE]      at org.bukkit.command.SimpleCommandMap.dispatch(
    23:03:54 [SEVERE]      at org.bukkit.craftbukkit.v1_6_R2.CraftServer.dispatchCommand(
    23:03:54 [SEVERE]      at sun.reflect.GeneratedMethodAccessor41.invoke(Unknown Source)
    23:03:54 [SEVERE]      at sun.reflect.DelegatingMethodAccessorImpl.invoke(
    23:03:54 [SEVERE]      at java.lang.reflect.Method.invoke(
    23:03:54 [SEVERE]      at$1.execute(
    23:03:54 [SEVERE]      at org.bukkit.plugin.RegisteredListener.callEvent(

    #edit - just update plugin :)
  2. Offline


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


    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


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


    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 :<


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


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

Share This Page