Skip to content

Commit a40ad3d

Browse files
committed
static declarations not allowed in inner classes
1 parent 4cec203 commit a40ad3d

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

src/main/java/com/github/iamtakagi/playerleveltag/PlayerLevelTag.java

+8-7
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,10 @@ public void onEnable() {
2727
this.getServer().getPluginManager().registerEvents(new ListenerImpl(), this);
2828
}
2929

30+
enum Position {
31+
PREFIX, SUFFIX
32+
}
33+
3034
class Config {
3135
private Position position;
3236
private String format;
@@ -36,10 +40,6 @@ public Config(FileConfiguration fileConfiguration) {
3640
this.format = fileConfiguration.getString("tag.format", "&7[&a%d&7] &r");
3741
}
3842

39-
enum Position {
40-
PREFIX, SUFFIX
41-
}
42-
4343
public Position getPosition() {
4444
return position;
4545
}
@@ -63,11 +63,12 @@ public void onLevelChange(PlayerLevelChangeEvent event) {
6363

6464
private void setLevelTag(PlayerEvent event) {
6565
Player player = event.getPlayer();
66-
if (player == null)
66+
if (player == null) {
6767
return;
68-
if (PlayerLevelTag.this.config.position == null || PlayerLevelTag.this.config.format == null)
68+
}
69+
if (PlayerLevelTag.this.config.position == null || PlayerLevelTag.this.config.format == null) {
6970
return;
70-
71+
}
7172
switch (PlayerLevelTag.this.config.position) {
7273
case PREFIX:
7374
NametagEdit.getApi().setPrefix(player, String.format(PlayerLevelTag.this.config.format, player.getLevel()));

0 commit comments

Comments
 (0)