mirror of
https://git.krews.org/morningstar/Arcturus-Community.git
synced 2024-11-23 15:20:52 +01:00
room nullable..
This commit is contained in:
parent
607c29af07
commit
176cf2c218
@ -36,7 +36,7 @@ public class InteractionWiredHighscore extends HabboItem {
|
||||
|
||||
try {
|
||||
String name = this.getBaseItem().getName().split("_")[1].toUpperCase().split("\\*")[0];
|
||||
int ctype = Integer.valueOf(this.getBaseItem().getName().split("\\*")[1]) - 1;
|
||||
int ctype = Integer.parseInt(this.getBaseItem().getName().split("\\*")[1]) - 1;
|
||||
this.scoreType = WiredHighscoreScoreType.valueOf(name);
|
||||
this.clearType = WiredHighscoreClearType.values()[ctype];
|
||||
} catch (Exception e) {
|
||||
@ -54,7 +54,7 @@ public class InteractionWiredHighscore extends HabboItem {
|
||||
|
||||
try {
|
||||
String name = this.getBaseItem().getName().split("_")[1].toUpperCase().split("\\*")[0];
|
||||
int ctype = Integer.valueOf(this.getBaseItem().getName().split("\\*")[1]) - 1;
|
||||
int ctype = Integer.parseInt(this.getBaseItem().getName().split("\\*")[1]) - 1;
|
||||
this.scoreType = WiredHighscoreScoreType.valueOf(name);
|
||||
this.clearType = WiredHighscoreClearType.values()[ctype];
|
||||
} catch (Exception e) {
|
||||
@ -81,7 +81,7 @@ public class InteractionWiredHighscore extends HabboItem {
|
||||
|
||||
@Override
|
||||
public void onClick(GameClient client, Room room, Object[] objects) throws Exception {
|
||||
if (!((client != null && room != null && room.hasRights(client.getHabbo())) || (objects.length >= 2 && objects[1] instanceof WiredEffectType)))
|
||||
if (room == null || !((client != null && room.hasRights(client.getHabbo())) || (objects.length >= 2 && objects[1] instanceof WiredEffectType)))
|
||||
return;
|
||||
|
||||
if (this.getExtradata() == null || this.getExtradata().isEmpty() || this.getExtradata().length() == 0) {
|
||||
@ -89,7 +89,7 @@ public class InteractionWiredHighscore extends HabboItem {
|
||||
}
|
||||
|
||||
try {
|
||||
int state = Integer.valueOf(this.getExtradata());
|
||||
int state = Integer.parseInt(this.getExtradata());
|
||||
this.setExtradata(Math.abs(state - 1) + "");
|
||||
room.updateItem(this);
|
||||
} catch (Exception e) {
|
||||
|
Loading…
Reference in New Issue
Block a user