File tree 1 file changed +8
-7
lines changed
src/main/java/com/github/iamtakagi/playerleveltag
1 file changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -27,6 +27,10 @@ public void onEnable() {
27
27
this .getServer ().getPluginManager ().registerEvents (new ListenerImpl (), this );
28
28
}
29
29
30
+ enum Position {
31
+ PREFIX , SUFFIX
32
+ }
33
+
30
34
class Config {
31
35
private Position position ;
32
36
private String format ;
@@ -36,10 +40,6 @@ public Config(FileConfiguration fileConfiguration) {
36
40
this .format = fileConfiguration .getString ("tag.format" , "&7[&a%d&7] &r" );
37
41
}
38
42
39
- enum Position {
40
- PREFIX , SUFFIX
41
- }
42
-
43
43
public Position getPosition () {
44
44
return position ;
45
45
}
@@ -63,11 +63,12 @@ public void onLevelChange(PlayerLevelChangeEvent event) {
63
63
64
64
private void setLevelTag (PlayerEvent event ) {
65
65
Player player = event .getPlayer ();
66
- if (player == null )
66
+ if (player == null ) {
67
67
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 ) {
69
70
return ;
70
-
71
+ }
71
72
switch (PlayerLevelTag .this .config .position ) {
72
73
case PREFIX :
73
74
NametagEdit .getApi ().setPrefix (player , String .format (PlayerLevelTag .this .config .format , player .getLevel ()));
You can’t perform that action at this time.
0 commit comments