Added configurable limits to skin overlays and dialog images.

This commit is contained in:
Luis C.M committed 2022-06-14 23:27:15 -05:00
1 parent 7cfc4ccca4
commit 40a210ce8f
5 files changed
+29 -1

No files matched your search

@@ -1146,6 +1146,10 @@ public class ScriptNpc<T extends EntityNPCInterface> extends ScriptLiving<T> imp
}
public void setOverlayTexture(String overlayTexture) {
if (this.getOverlays().size() >= CustomNpcs.SkinOverlayLimit) {
return;
}
this.getOverlays().add(0, NpcAPI.Instance().createSkinOverlay(overlayTexture));
npc.updateClient = true;
}