@@ -66,7 +66,7 @@ default void onCommand(CommandSourceWrapper sender, String[] args, PistonQueuePl
6666 sendLine (sender );
6767 }
6868 case "slotstats" -> {
69- if (!sender .hasPermission (config .ADMIN_PERMISSION )) {
69+ if (!sender .hasPermission (config .adminPermission () )) {
7070 noPermission (sender );
7171 return ;
7272 }
@@ -83,7 +83,7 @@ default void onCommand(CommandSourceWrapper sender, String[] args, PistonQueuePl
8383 sendLine (sender );
8484 }
8585 case "reload" -> {
86- if (!sender .hasPermission (config .ADMIN_PERMISSION )) {
86+ if (!sender .hasPermission (config .adminPermission () )) {
8787 noPermission (sender );
8888 return ;
8989 }
@@ -96,7 +96,7 @@ default void onCommand(CommandSourceWrapper sender, String[] args, PistonQueuePl
9696 sendLine (sender );
9797 }
9898 case "shadowban" -> {
99- if (!sender .hasPermission (config .ADMIN_PERMISSION )) {
99+ if (!sender .hasPermission (config .adminPermission () )) {
100100 noPermission (sender );
101101 return ;
102102 }
@@ -148,7 +148,7 @@ default void onCommand(CommandSourceWrapper sender, String[] args, PistonQueuePl
148148
149149 }
150150 case "unshadowban" -> {
151- if (!sender .hasPermission (config .ADMIN_PERMISSION )) {
151+ if (!sender .hasPermission (config .adminPermission () )) {
152152 noPermission (sender );
153153 return ;
154154 }
@@ -191,7 +191,7 @@ default void help(CommandSourceWrapper sender, Config config) {
191191 sender .sendMessage (component ().text ("/pq version" ).color (TextColorWrapper .GOLD ));
192192 sender .sendMessage (component ().text ("/pq stats" ).color (TextColorWrapper .GOLD ));
193193
194- if (sender .hasPermission (config .ADMIN_PERMISSION )) {
194+ if (sender .hasPermission (config .adminPermission () )) {
195195 sender .sendMessage (component ().text ("/pq slotstats" ).color (TextColorWrapper .GOLD ));
196196 sender .sendMessage (component ().text ("/pq reload" ).color (TextColorWrapper .GOLD ));
197197 sender .sendMessage (component ().text ("/pq shadowban" ).color (TextColorWrapper .GOLD ));
@@ -225,7 +225,7 @@ default void sendLine(CommandSourceWrapper sender) {
225225
226226 default List <String > onTab (String [] args , PermissibleWrapper wrapper , PistonQueuePlugin plugin ) {
227227 Config config = plugin .getConfiguration ();
228- if (config .REGISTER_TAB ) {
228+ if (config .registerTab () ) {
229229 final List <String > completions = new ArrayList <>();
230230
231231 if (args .length == 1 ) {
@@ -235,14 +235,14 @@ default List<String> onTab(String[] args, PermissibleWrapper wrapper, PistonQueu
235235 }
236236 }
237237
238- if (wrapper .hasPermission (config .ADMIN_PERMISSION )) {
238+ if (wrapper .hasPermission (config .adminPermission () )) {
239239 for (String string : adminCommands ) {
240240 if (string .toLowerCase (Locale .ROOT ).startsWith (args [0 ].toLowerCase (Locale .ROOT ))) {
241241 completions .add (string );
242242 }
243243 }
244244 }
245- } else if (wrapper .hasPermission (config .ADMIN_PERMISSION )
245+ } else if (wrapper .hasPermission (config .adminPermission () )
246246 && args .length == 2
247247 && ("shadowban" .equalsIgnoreCase (args [0 ]) || "unshadowban" .equalsIgnoreCase (args [0 ]))) {
248248 addPlayers (completions , args , plugin );
0 commit comments