@@ -67,11 +67,9 @@ private static int teleport(CommandContext<ServerCommandSource> context) {
6767 } else {
6868
6969 if (OptCarpetSettings .allowTpToRealPlayer .equals ("true" )) {
70- server .getCommandManager ().execute (server .getCommandSource (), "tell @a Teleport " + context .getSource ().getName () + " to " + StringArgumentType .getString (context , "player" ));
7170 server .getCommandManager ().execute (server .getCommandSource (), "tp " + commandSourcePlayerName + " " + StringArgumentType .getString (context , "player" ));
7271 } else if (OptCarpetSettings .allowTpToRealPlayer .equals ("ops" )) {
7372 if ((server .getPlayerManager ().isOperator (context .getSource ().getPlayer ().getGameProfile ()))) {
74- server .getCommandManager ().execute (server .getCommandSource (), "tell @a Teleport " + context .getSource ().getName () + " to " + StringArgumentType .getString (context , "player" ));
7573 server .getCommandManager ().execute (server .getCommandSource (), "tp " + commandSourcePlayerName + " " + StringArgumentType .getString (context , "player" ));
7674 } else {
7775 Messenger .m (context .getSource (), "r You have no permission to teleport to real player.You aren't op." );
@@ -126,11 +124,9 @@ private static int teleportHere(CommandContext<ServerCommandSource> context) {
126124 } else {
127125
128126 if (OptCarpetSettings .allowTpHereRealPlayer .equals ("true" )) {
129- server .getCommandManager ().execute (server .getCommandSource (), "tell @a Teleport " + StringArgumentType .getString (context , "player" ) + " to " + context .getSource ().getName ());
130127 server .getCommandManager ().execute (server .getCommandSource (), "tp " + StringArgumentType .getString (context , COMMAND_PREFIX ) + " " + commandSourcePlayerName );
131128 } else if (OptCarpetSettings .allowTpHereRealPlayer .equals ("ops" )) {
132129 if ((server .getPlayerManager ().isOperator (context .getSource ().getPlayer ().getGameProfile ()))) {
133- server .getCommandManager ().execute (server .getCommandSource (), "tell @a Teleport " + StringArgumentType .getString (context , "player" ) + " to " + context .getSource ().getName ());
134130 server .getCommandManager ().execute (server .getCommandSource (), "tp " + StringArgumentType .getString (context , COMMAND_PREFIX ) + " " + commandSourcePlayerName );
135131 } else {
136132 Messenger .m (context .getSource (), "r You have no permission to teleport here real player.You aren't op." );
@@ -151,13 +147,10 @@ private static int teleportHere(CommandContext<ServerCommandSource> context) {
151147
152148 private static void executeTp (String commandSourcePlayerName , CommandContext <ServerCommandSource > context , MinecraftServer server ) {
153149 if (OptCarpetSettings .enableTpPrefixWhitelist && checkTpWhitelist (StringArgumentType .getString (context , "player" ))) {
154- server .getCommandManager ().execute (server .getCommandSource (), "tell @a Teleport " + context .getSource ().getName () + " to " + StringArgumentType .getString (context , "player" ));
155150 server .getCommandManager ().execute (server .getCommandSource (), "tp " + commandSourcePlayerName + " " + StringArgumentType .getString (context , "player" ));
156151 } else if (OptCarpetSettings .enableTpPrefixBlacklist && checkTpBlacklist (StringArgumentType .getString (context , "player" ))) {
157- server .getCommandManager ().execute (server .getCommandSource (), "tell @a Teleport " + context .getSource ().getName () + " to " + StringArgumentType .getString (context , "player" ));
158152 server .getCommandManager ().execute (server .getCommandSource (), "tp " + commandSourcePlayerName + " " + StringArgumentType .getString (context , "player" ));
159153 } else if (!OptCarpetSettings .enableTpPrefixBlacklist && !OptCarpetSettings .enableTpPrefixWhitelist ) {
160- server .getCommandManager ().execute (server .getCommandSource (), "tell @a Teleport " + context .getSource ().getName () + " to " + StringArgumentType .getString (context , "player" ));
161154 server .getCommandManager ().execute (server .getCommandSource (), "tp " + commandSourcePlayerName + " " + StringArgumentType .getString (context , "player" ));
162155 } else {
163156 Messenger .m (context .getSource (), "r You can't tp to this player because of tp limit." );
@@ -166,13 +159,10 @@ private static void executeTp(String commandSourcePlayerName, CommandContext<Ser
166159
167160 private static void executeTpHere (String commandSourcePlayerName , CommandContext <ServerCommandSource > context , MinecraftServer server ) {
168161 if (OptCarpetSettings .enableTpHerePrefixWhitelist && checkTpHereWhitelist (StringArgumentType .getString (context , "player" ))) {
169- server .getCommandManager ().execute (server .getCommandSource (), "tell @a Teleport " + StringArgumentType .getString (context , "player" ) + " to " + context .getSource ().getName ());
170162 server .getCommandManager ().execute (server .getCommandSource (), "tp " + StringArgumentType .getString (context , "player" ) + " " + commandSourcePlayerName );
171163 } else if (OptCarpetSettings .enableTpHerePrefixBlacklist && checkTpHereBlacklist (StringArgumentType .getString (context , "player" ))) {
172- server .getCommandManager ().execute (server .getCommandSource (), "tell @a Teleport " + StringArgumentType .getString (context , "player" ) + " to " + context .getSource ().getName ());
173164 server .getCommandManager ().execute (server .getCommandSource (), "tp " + StringArgumentType .getString (context , "player" ) + " " + commandSourcePlayerName );
174165 } else if (!OptCarpetSettings .enableTpHerePrefixBlacklist && !OptCarpetSettings .enableTpHerePrefixWhitelist ) {
175- server .getCommandManager ().execute (server .getCommandSource (), "tell @a Teleport " + StringArgumentType .getString (context , "player" ) + " to " + context .getSource ().getName ());
176166 server .getCommandManager ().execute (server .getCommandSource (), "tp " + StringArgumentType .getString (context , "player" ) + " " + commandSourcePlayerName );
177167 } else {
178168 Messenger .m (context .getSource (), "r You can't tp here this player because of tp limit." );
0 commit comments