String Out Of Bounds Error

Discussion in 'Plugin Development' started by Jbitters3, Mar 15, 2014.

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

    Jbitters3

    Here is the error:
    Code:
    [23:14:18] [Server thread/WARN]: [INCore] Task #10 for INCore v1.0 generated an exception
    java.lang.StringIndexOutOfBoundsException: String index out of range: 1
        at java.lang.String.substring(String.java:1907) ~[?:1.7.0_51]
    And here is the onJoin event where the error occurred:
    Code:java
    1. Bukkit.getScheduler().runTaskLater(plugin, new Runnable() {
    2. @Override
    3. public void run() {
    4. try {
    5. plugin.Cache.setup(p.getName());
    6. } catch (Exception e) {
    7. e.printStackTrace();
    8. }
    9.  
    10. PermissionUser pp = PermissionsEx.getUser(p);
    11. plugin.impulseusers.put(p.getName(), new ImpulseUser(p.getName(),
    12. pp.getGroups()[0].getPrefix(),
    13. pp.getGroups()[0].getSuffix(),
    14. pp.getGroups()[0].getPrefix().substring(0, 1),
    15. plugin.Achievement.getAchievements(p.getName()),
    16. plugin.Statistics.getStats(p.getName())));
    17.  

    Any help on this?
     
  2. Offline

    AoH_Ruthless

  3. Offline

    Jbitters3

  4. Offline

    AoH_Ruthless

    Jbitters3
    I thought the stacktrace you provided was incomplete but I took a closer look. Sorry :p

    Not really familiar with hooking into Pex so I can't really help you much. Again sorry.
     
  5. Offline

    Jbitters3

  6. Offline

    ZeusAllMighty11

    Code:
    pp.getGroups()[0].getPrefix().substring(0, 1),
    This is the issue.
     
  7. Offline

    RawCode

    Absence of debug messages is the issue...
     
  8. Offline

    Jbitters3

    ZeusAllMighty11 Yes, I understand that. But what exactly is wrong with that. I do not have this issue when it is not connecting to the database.
     
Thread Status:
Not open for further replies.

Share This Page