Add Fix Armor Null
Dieser Commit ist enthalten in:
Ursprung
5f3004c78d
Commit
614fab209f
@ -71,6 +71,9 @@ public class PersonalKit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static PersonalKit create(int userID, String gamemode, String name, ItemStack[] inventory, ItemStack[] armor){
|
public static PersonalKit create(int userID, String gamemode, String name, ItemStack[] inventory, ItemStack[] armor){
|
||||||
|
if(armor == null) {
|
||||||
|
armor = new ItemStack[]{null, null, null, null};
|
||||||
|
}
|
||||||
SQL.update("INSERT INTO PersonalKit (UserID, GameMode, Name, Inventory, Armor) VALUES (?, ?, ?, ?, ?) ON DUPLICATE KEY UPDATE Inventory = VALUES(Inventory), Armor = VALUES(Armor), Name = VALUES(name)",
|
SQL.update("INSERT INTO PersonalKit (UserID, GameMode, Name, Inventory, Armor) VALUES (?, ?, ?, ?, ?) ON DUPLICATE KEY UPDATE Inventory = VALUES(Inventory), Armor = VALUES(Armor), Name = VALUES(name)",
|
||||||
userID, gamemode, name, saveInvConfig("Inventory", inventory), saveInvConfig("Armor", armor));
|
userID, gamemode, name, saveInvConfig("Inventory", inventory), saveInvConfig("Armor", armor));
|
||||||
return get(userID, gamemode, name);
|
return get(userID, gamemode, name);
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren