File tree Expand file tree Collapse file tree
AnarchyExploitFixesFolia/src/main/java/me/xginko/aef/modules/chunklimits
AnarchyExploitFixesLegacy/src/main/java/me/xginko/aef/modules/chunklimits Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -170,12 +170,14 @@ public void disable() {
170170 private void enforceEntityLimit (Map <EntityType , List <Entity >> entitiesByTypes ) {
171171 for (Map .Entry <EntityType , List <Entity >> entry : entitiesByTypes .entrySet ()) {
172172 if (!entityLimits .containsKey (entry .getKey ())) {
173+ entry .getValue ().clear ();
173174 continue ;
174175 }
175176
176177 int entityLimit = entityLimits .get (entry .getKey ());
177178
178179 if (entry .getValue ().size () <= entityLimit ) {
180+ entry .getValue ().clear ();
179181 continue ;
180182 }
181183
Original file line number Diff line number Diff line change @@ -158,12 +158,14 @@ public void disable() {
158158 private void enforceEntityLimit (Map <EntityType , List <Entity >> entitiesByTypes ) {
159159 for (Map .Entry <EntityType , List <Entity >> entry : entitiesByTypes .entrySet ()) {
160160 if (!entityLimits .containsKey (entry .getKey ())) {
161+ entry .getValue ().clear ();
161162 continue ;
162163 }
163164
164165 int entityLimit = entityLimits .get (entry .getKey ());
165166
166167 if (entry .getValue ().size () <= entityLimit ) {
168+ entry .getValue ().clear ();
167169 continue ;
168170 }
169171
You can’t perform that action at this time.
0 commit comments