You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
1.0 KiB
33 lines
1.0 KiB
--- ../src-base/minecraft/net/minecraft/server/management/BanEntry.java |
|
+++ ../src-work/minecraft/net/minecraft/server/management/BanEntry.java |
|
@@ -76,4 +76,30 @@ |
|
p_152641_1_.addProperty("expires", this.banEndDate == null ? "forever" : dateFormat.format(this.banEndDate)); |
|
p_152641_1_.addProperty("reason", this.reason); |
|
} |
|
+ |
|
+ // CraftBukkit start |
|
+ public String getSource() { |
|
+ return this.bannedBy; |
|
+ } |
|
+ |
|
+ public Date getCreated() { |
|
+ return this.banStartDate; |
|
+ } |
|
+ |
|
+ private static Object checkExpiry(Object object, JsonObject jsonobject) { |
|
+ Date expires = null; |
|
+ |
|
+ try { |
|
+ expires = jsonobject.has("expires") ? dateFormat.parse(jsonobject.get("expires").getAsString()) : null; |
|
+ } catch (ParseException ex) { |
|
+ // Guess we don't have a date |
|
+ } |
|
+ |
|
+ if (expires == null || expires.after(new Date())) { |
|
+ return object; |
|
+ } else { |
|
+ return null; |
|
+ } |
|
+ } |
|
+ // CraftBukkit end |
|
}
|
|
|