mirror of
https://github.com/NoCheatPlus/NoCheatPlus.git
synced 2024-11-09 12:10:37 +01:00
Fixes after fast commits.
This commit is contained in:
parent
2f482649a0
commit
5fc17e0c11
@ -160,11 +160,11 @@ public class GenericListener<E extends Event> implements Listener, EventExecutor
|
|||||||
final MethodEntry[] newEntries;
|
final MethodEntry[] newEntries;
|
||||||
if (insertion == entries.length || insertion == -1){
|
if (insertion == entries.length || insertion == -1){
|
||||||
newEntries = Arrays.copyOf(entries, entries.length + 1);
|
newEntries = Arrays.copyOf(entries, entries.length + 1);
|
||||||
newEntries[entries.length - 1] = entry;
|
newEntries[newEntries.length - 1] = entry;
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
newEntries = new MethodEntry[entries.length + 1];
|
newEntries = new MethodEntry[entries.length + 1];
|
||||||
for (int i = 0; i < entries.length + 1; i ++ ){
|
for (int i = 0; i < newEntries.length; i ++ ){
|
||||||
if (i < insertion) newEntries[i] = entries[i];
|
if (i < insertion) newEntries[i] = entries[i];
|
||||||
else if (i == insertion) newEntries[i] = entry;
|
else if (i == insertion) newEntries[i] = entry;
|
||||||
else{
|
else{
|
||||||
|
Loading…
Reference in New Issue
Block a user