mirror of
https://github.com/NoCheatPlus/NoCheatPlus.git
synced 2024-11-07 11:10:05 +01:00
Also remove clear parkedInfo in case of reload or data removal.
This commit is contained in:
parent
8c2bda2b70
commit
8c3ed77c7c
@ -47,6 +47,7 @@ import fr.neatmonster.nocheatplus.checks.CheckType;
|
|||||||
import fr.neatmonster.nocheatplus.checks.combined.BedLeave;
|
import fr.neatmonster.nocheatplus.checks.combined.BedLeave;
|
||||||
import fr.neatmonster.nocheatplus.checks.combined.Combined;
|
import fr.neatmonster.nocheatplus.checks.combined.Combined;
|
||||||
import fr.neatmonster.nocheatplus.checks.combined.CombinedData;
|
import fr.neatmonster.nocheatplus.checks.combined.CombinedData;
|
||||||
|
import fr.neatmonster.nocheatplus.command.INotifyReload;
|
||||||
import fr.neatmonster.nocheatplus.compat.MCAccess;
|
import fr.neatmonster.nocheatplus.compat.MCAccess;
|
||||||
import fr.neatmonster.nocheatplus.components.IData;
|
import fr.neatmonster.nocheatplus.components.IData;
|
||||||
import fr.neatmonster.nocheatplus.components.IHaveCheckType;
|
import fr.neatmonster.nocheatplus.components.IHaveCheckType;
|
||||||
@ -84,7 +85,7 @@ import fr.neatmonster.nocheatplus.utilities.StringUtil;
|
|||||||
*
|
*
|
||||||
* @see MovingEvent
|
* @see MovingEvent
|
||||||
*/
|
*/
|
||||||
public class MovingListener extends CheckListener implements TickListener, IRemoveData, IHaveCheckType{
|
public class MovingListener extends CheckListener implements TickListener, IRemoveData, IHaveCheckType, INotifyReload{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Coupling from and to PlayerLocation objects with a block cache for easy storage and reuse.
|
* Coupling from and to PlayerLocation objects with a block cache for easy storage and reuse.
|
||||||
@ -1210,5 +1211,15 @@ public class MovingListener extends CheckListener implements TickListener, IRemo
|
|||||||
@Override
|
@Override
|
||||||
public void removeAllData() {
|
public void removeAllData() {
|
||||||
hoverTicks.clear();
|
hoverTicks.clear();
|
||||||
|
parkedInfo.clear();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onReload() {
|
||||||
|
for (final MoveInfo info : parkedInfo){
|
||||||
|
// Just in case.
|
||||||
|
info.cleanup();
|
||||||
|
}
|
||||||
|
parkedInfo.clear();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user