mirror of
https://github.com/Melledy/Nebula.git
synced 2025-12-14 05:14:46 +01:00
Add Command SetLevel (#8)
* Add Remote Command API (Use KEY) * Clean up HttpServer by removing unused code Removed commented-out code * Add SetLevel Command (need to restart the game for it to take effect) * Add Proto Request Change Level (Not Work) * Update setlevel command --------- Co-authored-by: Melledy <121644117+Melledy@users.noreply.github.com>
This commit is contained in:
@@ -201,7 +201,17 @@ public class Player implements GameDatabaseObject {
|
||||
public boolean hasSession() {
|
||||
return this.session != null;
|
||||
}
|
||||
|
||||
public void setLevel(int level) {
|
||||
this.level = level;
|
||||
Nebula.getGameDatabase().update(this, this.getUid(), "level", this.level);
|
||||
}
|
||||
|
||||
public void setExp(int exp) {
|
||||
this.exp = exp;
|
||||
Nebula.getGameDatabase().update(this, this.getUid(), "exp", this.exp);
|
||||
}
|
||||
|
||||
public void setRemoteToken(String token) {
|
||||
// Skip if tokens are the same
|
||||
if (this.remoteToken == null) {
|
||||
@@ -898,4 +908,4 @@ public class Player implements GameDatabaseObject {
|
||||
return proto;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user