mirror of
https://github.com/BentoBoxWorld/BentoBox.git
synced 2025-01-03 15:08:24 +01:00
Okay, back to allowing custom types
This commit is contained in:
parent
d0cdeb1efd
commit
1b75a2aaf5
@ -23,6 +23,8 @@ public class LogEntry {
|
|||||||
@Expose
|
@Expose
|
||||||
private final LogType type;
|
private final LogType type;
|
||||||
@Expose
|
@Expose
|
||||||
|
private final String customType;
|
||||||
|
@Expose
|
||||||
private final Map<String, String> data;
|
private final Map<String, String> data;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -45,6 +47,10 @@ public class LogEntry {
|
|||||||
* Player banned
|
* Player banned
|
||||||
*/
|
*/
|
||||||
BAN,
|
BAN,
|
||||||
|
/**
|
||||||
|
* Something was completed
|
||||||
|
*/
|
||||||
|
COMPELTE,
|
||||||
/**
|
/**
|
||||||
* Island became unowned
|
* Island became unowned
|
||||||
*/
|
*/
|
||||||
@ -103,6 +109,7 @@ public class LogEntry {
|
|||||||
this.timestamp = builder.timestamp;
|
this.timestamp = builder.timestamp;
|
||||||
this.type = builder.type;
|
this.type = builder.type;
|
||||||
this.data = builder.data;
|
this.data = builder.data;
|
||||||
|
this.customType = builder.customType;
|
||||||
}
|
}
|
||||||
|
|
||||||
public long getTimestamp() {
|
public long getTimestamp() {
|
||||||
@ -123,22 +130,23 @@ public class LogEntry {
|
|||||||
private long timestamp;
|
private long timestamp;
|
||||||
private final LogType type;
|
private final LogType type;
|
||||||
private Map<String, String> data;
|
private Map<String, String> data;
|
||||||
|
private final String customType;
|
||||||
|
|
||||||
public Builder(LogType type) {
|
public Builder(LogType type) {
|
||||||
this.timestamp = System.currentTimeMillis();
|
this.timestamp = System.currentTimeMillis();
|
||||||
this.type = type;
|
this.type = type;
|
||||||
this.data = new LinkedHashMap<>();
|
this.data = new LinkedHashMap<>();
|
||||||
|
this.customType = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string
|
* @param customType log type
|
||||||
* @deprecated Use the enum version. If you need more enums, then add them to the code
|
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
public Builder(String customType) {
|
||||||
public Builder(String string) {
|
|
||||||
this.timestamp = System.currentTimeMillis();
|
this.timestamp = System.currentTimeMillis();
|
||||||
this.type = LogType.UNKNOWN;
|
this.type = LogType.UNKNOWN;
|
||||||
this.data = new LinkedHashMap<>();
|
this.data = new LinkedHashMap<>();
|
||||||
|
this.customType = customType;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Builder timestamp(long timestamp) {
|
public Builder timestamp(long timestamp) {
|
||||||
|
Loading…
Reference in New Issue
Block a user