11package io .github .optijava .opt_carpet_addition .commands ;
22
3+ import carpet .CarpetSettings ;
34import carpet .patches .EntityPlayerMPFake ;
45import carpet .utils .Messenger ;
56import com .mojang .brigadier .CommandDispatcher ;
67import com .mojang .brigadier .arguments .StringArgumentType ;
78import com .mojang .brigadier .builder .LiteralArgumentBuilder ;
89import com .mojang .brigadier .context .CommandContext ;
910import com .mojang .brigadier .exceptions .CommandSyntaxException ;
10- import io .github .optijava .opt_carpet_addition .OptCarpetAddition ;
1111import io .github .optijava .opt_carpet_addition .OptCarpetSettings ;
1212import net .minecraft .server .MinecraftServer ;
1313import net .minecraft .server .command .ServerCommandSource ;
@@ -37,7 +37,7 @@ private static int teleport(CommandContext<ServerCommandSource> context) {
3737
3838 if (context .getSource ().equals (server .getCommandSource ())) {
3939 Messenger .m (context .getSource (), "r Console can't tp to player." );
40- OptCarpetAddition . LOGGER .warn ("[OptCarpetAddition] Console can't tp to player" );
40+ CarpetSettings . LOG .warn ("[OptCarpetAddition] Console can't tp to player" );
4141 return 0 ;
4242 }
4343 if (StringArgumentType .getString (context , COMMAND_PREFIX ).equals ("" ) || StringArgumentType .getString (context , COMMAND_PREFIX ) == null ) {
@@ -48,7 +48,7 @@ private static int teleport(CommandContext<ServerCommandSource> context) {
4848 try {
4949 final String commandSourcePlayerName = context .getSource ().getPlayer ().getGameProfile ().getName ();
5050
51- OptCarpetAddition . LOGGER .info ("[OptCarpetAddition] " + commandSourcePlayerName + " submit command: /player " + StringArgumentType .getString (context , COMMAND_PREFIX ) + " tp" );
51+ CarpetSettings . LOG .info ("[OptCarpetAddition] " + commandSourcePlayerName + " submit command: /player " + StringArgumentType .getString (context , COMMAND_PREFIX ) + " tp" );
5252
5353 if (server .getPlayerManager ().getPlayer (StringArgumentType .getString (context , COMMAND_PREFIX )) instanceof EntityPlayerMPFake ) {
5454
@@ -83,7 +83,7 @@ private static int teleport(CommandContext<ServerCommandSource> context) {
8383
8484 } catch (CommandSyntaxException e ) {
8585 Messenger .m (context .getSource (), "r Maybe player name is not correct." );
86- OptCarpetAddition . LOGGER .error ("[OptCarpetAddition] Unknown error occurred when execute command." , e );
86+ CarpetSettings . LOG .error ("[OptCarpetAddition] Unknown error occurred when execute command." , e );
8787 return 0 ;
8888 }
8989 return 1 ;
@@ -94,7 +94,7 @@ private static int teleportHere(CommandContext<ServerCommandSource> context) {
9494
9595 if (context .getSource ().equals (server .getCommandSource ())) {
9696 Messenger .m (context .getSource (), "r Console can't tp here player." );
97- OptCarpetAddition . LOGGER .warn ("[OptCarpetAddition] Console can't tp here player" );
97+ CarpetSettings . LOG .warn ("[OptCarpetAddition] Console can't tp here player" );
9898 return 0 ;
9999 }
100100 if (StringArgumentType .getString (context , COMMAND_PREFIX ).equals ("" ) || StringArgumentType .getString (context , "player" ) == null ) {
@@ -105,7 +105,7 @@ private static int teleportHere(CommandContext<ServerCommandSource> context) {
105105 try {
106106 final String commandSourcePlayerName = context .getSource ().getPlayer ().getGameProfile ().getName ();
107107
108- OptCarpetAddition . LOGGER .info ("[OptCarpetAddition] " + commandSourcePlayerName + " submit command: /player " + StringArgumentType .getString (context , COMMAND_PREFIX ) + " tphere" );
108+ CarpetSettings . LOG .info ("[OptCarpetAddition] " + commandSourcePlayerName + " submit command: /player " + StringArgumentType .getString (context , COMMAND_PREFIX ) + " tphere" );
109109
110110 if (server .getPlayerManager ().getPlayer (StringArgumentType .getString (context , COMMAND_PREFIX )) instanceof EntityPlayerMPFake ) {
111111
@@ -139,7 +139,7 @@ private static int teleportHere(CommandContext<ServerCommandSource> context) {
139139
140140 } catch (CommandSyntaxException e ) {
141141 Messenger .m (context .getSource (), "r Unknown error occurred when execute command : com.mojang.brigadier.exceptions.CommandSyntaxException" );
142- OptCarpetAddition . LOGGER .error ("[OptCarpetAddition] Unknown error occurred when execute command." , e );
142+ CarpetSettings . LOG .error ("[OptCarpetAddition] Unknown error occurred when execute command." , e );
143143 return 0 ;
144144 }
145145 return 1 ;
@@ -170,7 +170,7 @@ private static void executeTpHere(String commandSourcePlayerName, CommandContext
170170 }
171171
172172 private static boolean checkTpBlacklist (String name ) {
173- for (String s : OptCarpetSettings .bean .TpBlacklist ) {
173+ for (String s : OptCarpetSettings .bean .tpBlacklist ) {
174174 if (name .startsWith (s )) {
175175 return false ;
176176 }
@@ -179,7 +179,7 @@ private static boolean checkTpBlacklist(String name) {
179179 }
180180
181181 private static boolean checkTpWhitelist (String name ) {
182- for (String s : OptCarpetSettings .bean .TpWhitelist ) {
182+ for (String s : OptCarpetSettings .bean .tpWhitelist ) {
183183 if (name .startsWith (s )) {
184184 return true ;
185185 }
@@ -188,7 +188,7 @@ private static boolean checkTpWhitelist(String name) {
188188 }
189189
190190 private static boolean checkTpHereBlacklist (String name ) {
191- for (String s : OptCarpetSettings .bean .TphereBlacklist ) {
191+ for (String s : OptCarpetSettings .bean .tphereBlacklist ) {
192192 if (name .startsWith (s )) {
193193 return false ;
194194 }
@@ -197,7 +197,7 @@ private static boolean checkTpHereBlacklist(String name) {
197197 }
198198
199199 private static boolean checkTpHereWhitelist (String name ) {
200- for (String s : OptCarpetSettings .bean .TphereWhitelist ) {
200+ for (String s : OptCarpetSettings .bean .tphereWhitelist ) {
201201 if (name .startsWith (s )) {
202202 return true ;
203203 }
0 commit comments