diff options
author | Keuin <[email protected]> | 2020-12-25 00:26:57 +0800 |
---|---|---|
committer | Keuin <[email protected]> | 2020-12-25 00:26:57 +0800 |
commit | 539275fec738d186f57beaafc97619945763fe33 (patch) | |
tree | 0c790deb570c70224622941fdc11742889ae0eda | |
parent | 454ba6aa8fa4368861595dccebdcea41076d9686 (diff) |
merge modifications from another branch (rather not legal)
-rw-r--r-- | src/main/java/com/keuin/blame/EventHandler.java | 2 | ||||
-rw-r--r-- | src/main/java/com/keuin/blame/data/entry/LogEntry.java | 14 |
2 files changed, 16 insertions, 0 deletions
diff --git a/src/main/java/com/keuin/blame/EventHandler.java b/src/main/java/com/keuin/blame/EventHandler.java index b91ddb2..4a28a84 100644 --- a/src/main/java/com/keuin/blame/EventHandler.java +++ b/src/main/java/com/keuin/blame/EventHandler.java @@ -17,6 +17,8 @@ import net.minecraft.util.registry.Registry; import net.minecraft.world.World; import org.jetbrains.annotations.Nullable; +import java.util.Objects; + public class EventHandler implements AttackEntityHandler, PlaceBlockHandler, BreakBlockHandler, UseBlockHandler, UseEntityHandler, UseItemHandler { public static final EventHandler INSTANCE = new EventHandler(); diff --git a/src/main/java/com/keuin/blame/data/entry/LogEntry.java b/src/main/java/com/keuin/blame/data/entry/LogEntry.java index 586ba91..090d77c 100644 --- a/src/main/java/com/keuin/blame/data/entry/LogEntry.java +++ b/src/main/java/com/keuin/blame/data/entry/LogEntry.java @@ -73,6 +73,20 @@ public class LogEntry { public LogEntry() { } + // 拷贝构造器 + public LogEntry(LogEntry entry) { + this.version = entry.version; + this.gameVersion = entry.gameVersion; + this.timeMillis = entry.timeMillis; + this.subjectId = entry.subjectId; + this.subjectUUID = entry.subjectUUID; + this.subjectPos = entry.subjectPos; + this.actionType = entry.actionType; + this.objectType = entry.objectType; + this.objectId = entry.objectId; + this.objectPos = entry.objectPos; + } + public LogEntry(long timeMillis, String subjectId, UUID subjectUUID, WorldPos subjectPos, ActionType actionType, ObjectType objectType, String objectId, WorldPos objectPos) { if (subjectId == null) throw new IllegalArgumentException("subjectId cannot be null"); |