예제 #1
0
 public final void setUUID(@Nonnull UUID id) {
   Preconditions.checkNotNull("id", "id cannot be NULL.");
   data.put("UUIDLeast", id.getLeastSignificantBits());
   data.put("UUIDMost", id.getMostSignificantBits());
 }
예제 #2
0
 public final void setName(@Nonnull String name) {
   Preconditions.checkNotNull(name, "name cannot be NULL.");
   data.put("Name", name);
 }
예제 #3
0
 public UUID getUUID() {
   return new UUID(data.getLong("UUIDMost", null), data.getLong("UUIDLeast", null));
 }
예제 #4
0
 public final void setAttributeType(@Nonnull TARDISAttributeType type) {
   Preconditions.checkNotNull(type, "type cannot be NULL.");
   data.put("AttributeName", type.getMinecraftId());
 }
예제 #5
0
 public String getName() {
   return data.getString("Name", null);
 }
예제 #6
0
 public TARDISAttributeType getAttributeType() {
   return TARDISAttributeType.fromId(data.getString("AttributeName", null));
 }
예제 #7
0
 public final void setOperation(@Nonnull TARDISAttributeOperation operation) {
   Preconditions.checkNotNull(operation, "operation cannot be NULL.");
   data.put("Operation", operation.getId());
 }
예제 #8
0
 public TARDISAttributeOperation getOperation() {
   return TARDISAttributeOperation.fromId(data.getInteger("Operation", 0));
 }
예제 #9
0
 public final void setAmount(double amount) {
   data.put("Amount", amount);
 }
예제 #10
0
 public double getAmount() {
   return data.getDouble("Amount", 0.0);
 }