Merged with master
This commit is contained in:
@@ -172,6 +172,18 @@ public class Administration {
|
||||
return info.admin && ip.equals(info.validAdminIP);
|
||||
}
|
||||
|
||||
public Array<PlayerInfo> findByName(String name, boolean last){
|
||||
Array<PlayerInfo> result = new Array<>();
|
||||
|
||||
for(PlayerInfo info : playerInfo.values()){
|
||||
if(info.lastName.toLowerCase().equals(name.toLowerCase()) || (last && info.names.contains(name, false))){
|
||||
result.add(info);
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
public PlayerInfo getInfo(String id){
|
||||
return getCreateInfo(id);
|
||||
}
|
||||
|
||||
@@ -78,9 +78,13 @@ public class NetEvents {
|
||||
public static void handleSendMessage(String message){
|
||||
ChatPacket packet = new ChatPacket();
|
||||
packet.text = message;
|
||||
packet.name = Vars.player.name;
|
||||
packet.id = Vars.player.id;
|
||||
packet.name = player.name;
|
||||
packet.id = player.id;
|
||||
Net.send(packet, SendMode.tcp);
|
||||
|
||||
if(Net.server() && !headless){
|
||||
ui.chatfrag.addMessage(message, netCommon.colorizeName(player.id, player.name));
|
||||
}
|
||||
}
|
||||
|
||||
public static void handleShoot(SyncEntity entity, float x, float y, float angle, short data){
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package io.anuke.mindustry.net;
|
||||
|
||||
import com.badlogic.gdx.utils.IntIntMap;
|
||||
import io.anuke.mindustry.world.Block;
|
||||
import io.anuke.mindustry.content.blocks.Blocks;
|
||||
|
||||
@@ -9,7 +10,7 @@ public class TraceInfo {
|
||||
public boolean modclient;
|
||||
public boolean android;
|
||||
|
||||
public int fastShots;
|
||||
public IntIntMap fastShots = new IntIntMap();
|
||||
|
||||
public int totalBlocksBroken;
|
||||
public int structureBlocksBroken;
|
||||
|
||||
Reference in New Issue
Block a user