Added unit tests
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
package io.anuke.mindustry.net;
|
||||
|
||||
import com.badlogic.gdx.utils.Array;
|
||||
import com.badlogic.gdx.utils.IntMap;
|
||||
import com.badlogic.gdx.utils.ObjectMap;
|
||||
import io.anuke.annotations.Annotations.Serialize;
|
||||
import io.anuke.ucore.core.Settings;
|
||||
@@ -16,8 +15,6 @@ public class Administration{
|
||||
private ObjectMap<String, PlayerInfo> playerInfo = new ObjectMap<>();
|
||||
/**Maps UUIDs to trace infos. This is wiped when a player logs off.*/
|
||||
private ObjectMap<String, TraceInfo> traceInfo = new ObjectMap<>();
|
||||
/** Maps packed coordinates to logs for that coordinate*/
|
||||
private IntMap<Array<EditLog>> editLogs = new IntMap<>();
|
||||
private Array<String> bannedIPs = new Array<>();
|
||||
|
||||
public Administration(){
|
||||
@@ -46,16 +43,6 @@ public class Administration{
|
||||
Settings.save();
|
||||
}
|
||||
|
||||
public void setAntiGriefParams(int maxBreak, int cooldown){
|
||||
Settings.putInt("antigrief-max", maxBreak);
|
||||
Settings.putInt("antigrief-cooldown", cooldown);
|
||||
Settings.save();
|
||||
}
|
||||
|
||||
public IntMap<Array<EditLog>> getEditLogs(){
|
||||
return editLogs;
|
||||
}
|
||||
|
||||
/**
|
||||
* Call when a player joins to update their information here.
|
||||
*/
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
package io.anuke.mindustry.net;
|
||||
|
||||
import io.anuke.mindustry.world.Block;
|
||||
|
||||
public class EditLog{
|
||||
public String playername;
|
||||
public Block block;
|
||||
public int rotation;
|
||||
public EditAction action;
|
||||
|
||||
EditLog(String playername, Block block, int rotation, EditAction action){
|
||||
this.playername = playername;
|
||||
this.block = block;
|
||||
this.rotation = rotation;
|
||||
this.action = action;
|
||||
}
|
||||
|
||||
public enum EditAction{
|
||||
PLACE, BREAK
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user