mirror of
https://github.com/GravitLauncher/Launcher
synced 2024-12-22 16:41:46 +03:00
Изменение интерфейса
This commit is contained in:
parent
78d6321f9f
commit
fc6a29cfa2
2 changed files with 4 additions and 2 deletions
|
@ -1,6 +1,8 @@
|
|||
package ru.gravit.utils.event;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
@FunctionalInterface
|
||||
public interface EventHandler<T extends EventInterface> {
|
||||
void run(T event);
|
||||
void run(UUID uuid, T event);
|
||||
}
|
||||
|
|
|
@ -48,7 +48,7 @@ public void process(UUID key, EventInterface event)
|
|||
{
|
||||
for(Entry e : handlers)
|
||||
{
|
||||
if(Arrays.binarySearch(e.events,key) >= 0) e.func.run(event);
|
||||
if(Arrays.binarySearch(e.events,key) >= 0) e.func.run(key, event);
|
||||
}
|
||||
}
|
||||
public class EventExecutor implements Runnable {
|
||||
|
|
Loading…
Reference in a new issue