ParameterName.UUID: Allow [uuid] in the strings configuration.

This commit is contained in:
asofold 2014-04-01 23:13:29 +02:00
parent b6034162ee
commit e103acea4a
2 changed files with 8 additions and 4 deletions

View File

@ -4,19 +4,21 @@ package fr.neatmonster.nocheatplus.actions;
* Some wildcards that are used in commands and log messages. * Some wildcards that are used in commands and log messages.
*/ */
public enum ParameterName { public enum ParameterName {
BLOCK_ID("blockid"), // TODO: Cleanup for some kind of policies: useful names, alternative names, prefer generic names.
BLOCK_ID("blockid"), // TODO: Block name ?
CHECK("check"), CHECK("check"),
TAGS("tags"), TAGS("tags"),
DISTANCE("distance"), DISTANCE("distance"),
FALL_DISTANCE("falldistance"), FALL_DISTANCE("falldistance"), // TODO: rather not deprecate ?
FOOD("food"), FOOD("food"),
IP("ip"), IP("ip"),
LIMIT("limit"), LIMIT("limit"),
LOCATION_FROM("locationfrom"), LOCATION_FROM("locationfrom"),
LOCATION_TO("locationto"), LOCATION_TO("locationto"),
PACKETS("packets"), PACKETS("packets"),
PLAYER("player"), PLAYER("player"), // TODO: playername rather ? + displayname ?
REACH_DISTANCE("reachdistance"), REACH_DISTANCE("reachdistance"), // TODO: deprecate ?
UUID("uuid"),
VIOLATIONS("violations"), VIOLATIONS("violations"),
WORLD("world"); WORLD("world");

View File

@ -135,6 +135,8 @@ public class ViolationData implements IViolationInfo, ActionData{
return player.getName(); return player.getName();
case VIOLATIONS: case VIOLATIONS:
return String.valueOf((long) Math.round(vL)); return String.valueOf((long) Math.round(vL));
case UUID:
return player.getUniqueId().toString();
default: default:
break; break;
} }