#2830: CommandSend - replace iterator-while with for-each
This commit is contained in:
parent
855d152503
commit
b85df4f2a1
@ -6,7 +6,6 @@ import java.util.ArrayList;
|
|||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
import java.util.Iterator;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Locale;
|
import java.util.Locale;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
@ -145,10 +144,8 @@ public class CommandSend extends Command implements TabExecutor
|
|||||||
}
|
}
|
||||||
|
|
||||||
final SendCallback callback = new SendCallback( sender );
|
final SendCallback callback = new SendCallback( sender );
|
||||||
Iterator<ProxiedPlayer> iterator = targets.iterator();
|
for ( ProxiedPlayer player : targets )
|
||||||
while ( iterator.hasNext() )
|
|
||||||
{
|
{
|
||||||
ProxiedPlayer player = iterator.next();
|
|
||||||
ServerConnectRequest request = ServerConnectRequest.builder()
|
ServerConnectRequest request = ServerConnectRequest.builder()
|
||||||
.target( server )
|
.target( server )
|
||||||
.reason( ServerConnectEvent.Reason.COMMAND )
|
.reason( ServerConnectEvent.Reason.COMMAND )
|
||||||
|
Loading…
Reference in New Issue
Block a user