This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// inside the plugin class | |
private static final long ASYNC_TASKS_TIMEOUT_SECONDS = 10; | |
@Override | |
public void onDisable() { | |
// wait for async tasks to complete: | |
final long asyncTasksTimeoutMillis = ASYNC_TASKS_TIMEOUT_SECONDS * 1000; | |
final long asyncTasksStart = System.currentTimeMillis(); | |
boolean asyncTasksTimeout = false; | |
while (this.getActiveAsyncTasks() > 0) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.spongepowered.api.event.player; | |
import org.spongepowered.api.entity.Player; | |
/** | |
* Called when a {@link Player} sends a chat message | |
*/ | |
public interface AsyncPlayerChatEvent extends PlayerEvent { | |
/** |