#NPE
1 messages · Page 1 of 1 (latest)
String invstring = data.getInventory(P.getUniqueId(),"NETHPOTINV");
System.out.println(invstring);
SerializeInventory.fromBase64(invstring);
send a paste of the events class
Sorry I'm scattered I was working on my own project
hold on i am also scattered haha
i am talking to two people at the same time trying to fix this lol
there is no doubt something is up with your sql quieries and config gets
data.getInventory(P.getUniqueId(),"NETHPOTINV");```
is returning null from the config get
```java
CallousConfig.getString("Default"+stat+"InventoryContents");
somethings wrong with your config getter / storage
i tried printing it
the config
and it returns what it is supposed to return
so this is the error line but its returning what its supposed too?
thats contradictory
try recompiling
i misworded what i was saying
i printed the config from inside of the getinventory and it returned what i was supposed to
public String getInventory(UUID uuid,String stat){
Configuration CallousConfig = CallousPvP.getInstance().getConfig();
try{
PreparedStatement ps = plugin.SQL.getConnection().prepareStatement("SELECT " + stat + " FROM callouspvp WHERE UUID=?");
ps.setString(1,uuid.toString());
ResultSet rs = ps.executeQuery();
System.out.println(stat);
String stats = CallousConfig.getString("Default"+stat+"InventoryContents");
System.out.println(stats);
if (rs.next()){
stats = rs.getString(stat);
System.out.println(stats);
System.out.println("r2");
return stats;
}
}catch (SQLException e){
e.printStackTrace();
}
System.out.println(CallousConfig.getString("Default"+stat+"InventoryContents"));
System.out.println("r1");
return CallousConfig.getString("Default"+stat+"InventoryContents");
}
although getinventory still returns null