Add clear reputation API

This commit is contained in:
Mariell Hoversholm 2020-05-26 21:49:02 +02:00
parent 5a933b8217
commit 0de2f11f56
2 changed files with 11 additions and 0 deletions

View file

@ -167,5 +167,11 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ * for all players mapped by their {@link UUID unique IDs}.
+ */
+ public void setReputations(@NotNull Map<UUID, com.destroystokyo.paper.entity.villager.Reputation> reputations);
+
+ /**
+ * Clear all reputations from this villager. This removes every single
+ * reputation regardless of its impact and the player associated.
+ */
+ public void clearReputations();
+ // Paper end
}

View file

@ -143,5 +143,10 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ setReputation(entry.getKey(), entry.getValue());
+ }
+ }
+
+ @Override
+ public void clearReputations() {
+ getHandle().getReputation().getReputations().clear();
+ }
+ // Paper end
}