mirror of
https://github.com/Phoenix616/RandomTeleport.git
synced 2024-11-22 10:36:00 +01:00
Fix hook order reversal
This commit is contained in:
parent
3d378bdb7b
commit
2434bcfb07
@ -121,7 +121,9 @@ public class HookManager implements Listener, ProtectionHook, WorldborderHook {
|
||||
* @return A list of hooks, empty if there are none
|
||||
*/
|
||||
public <T extends PluginHook> List<T> getHooks(Class<T> hookClass) {
|
||||
return hookMap.values().stream().filter(hookClass::isInstance).map(h -> (T) h).sorted(Collections.reverseOrder()).collect(Collectors.toList());
|
||||
List<T> list = hookMap.values().stream().filter(hookClass::isInstance).map(h -> (T) h).collect(Collectors.toList());
|
||||
Collections.reverse(list);
|
||||
return list;
|
||||
}
|
||||
|
||||
// Convenience methods to check all registered hooks
|
||||
|
Loading…
Reference in New Issue
Block a user