9
0
mirror of https://github.com/WiIIiam278/HuskSync.git synced 2026-01-06 15:41:56 +00:00

Userdata command, API expansion, editor interfaces

This commit is contained in:
William
2022-07-08 01:18:01 +01:00
parent 1c9d74f925
commit b7709f2d6c
43 changed files with 1044 additions and 446 deletions

View File

@@ -8,16 +8,39 @@ import org.jetbrains.annotations.NotNull;
import java.util.concurrent.CompletableFuture;
/**
* Used to fire plugin {@link Event}s
*/
public abstract class EventCannon {
protected EventCannon() {
}
/**
* Fires a {@link PreSyncEvent}
*
* @param user The user to fire the event for
* @param userData The user data to fire the event with
* @return A future that will be completed when the event is fired
*/
public abstract CompletableFuture<Event> firePreSyncEvent(@NotNull OnlineUser user, @NotNull UserData userData);
/**
* Fires a {@link DataSaveEvent}
*
* @param user The user to fire the event for
* @param userData The user data to fire the event with
* @return A future that will be completed when the event is fired
*/
public abstract CompletableFuture<Event> fireDataSaveEvent(@NotNull User user, @NotNull UserData userData,
@NotNull DataSaveCause saveCause);
@NotNull DataSaveCause saveCause);
/**
* Fires a {@link SyncCompleteEvent}
*
* @param user The user to fire the event for
*/
public abstract void fireSyncCompleteEvent(@NotNull OnlineUser user);
}