mirror of
https://github.com/Melledy/Nebula.git
synced 2025-12-15 05:44:36 +01:00
Implement setting headicons/skins
This commit is contained in:
@@ -199,6 +199,27 @@ public class Player implements GameDatabaseObject {
|
||||
return true;
|
||||
}
|
||||
|
||||
public boolean editHeadIcon(int id) {
|
||||
// Skip if we are not changing head icon
|
||||
if (this.headIcon == id) {
|
||||
return true;
|
||||
}
|
||||
|
||||
// Make sure we own the head icon
|
||||
if (!getInventory().hasHeadIcon(id)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Set
|
||||
this.headIcon = id;
|
||||
|
||||
// Update in database
|
||||
Nebula.getGameDatabase().update(this, this.getUid(), "headIcon", this.getHeadIcon());
|
||||
|
||||
// Success
|
||||
return true;
|
||||
}
|
||||
|
||||
public boolean editSignature(String signature) {
|
||||
// Sanity check
|
||||
if (signature == null) {
|
||||
|
||||
Reference in New Issue
Block a user