[Bleeding] Fixes deadlock issue and generic usage. Fixes BUKKIT-844 and fixes BUKKIT-854

By: Wesley Wolfe <weswolf@aol.com>
This commit is contained in:
Bukkit/Spigot
2012-02-29 08:29:22 -06:00
parent 2fa5a7033a
commit 9ebb2f13de
3 changed files with 60 additions and 37 deletions

View File

@@ -4,7 +4,9 @@ import org.bukkit.event.HandlerList;
import org.bukkit.plugin.RegisteredServiceProvider;
/**
* This event is called when a service is registered.
* This event is called when a service is registered.<br>
* <b>Warning:</b> The order in which register and unregister
* events are called should not be relied upon.
*/
public class ServiceRegisterEvent extends ServiceEvent {
private static final HandlerList handlers = new HandlerList();
@@ -13,6 +15,7 @@ public class ServiceRegisterEvent extends ServiceEvent {
super(registeredProvider);
}
@Override
public HandlerList getHandlers() {
return handlers;
}

View File

@@ -4,7 +4,9 @@ import org.bukkit.event.HandlerList;
import org.bukkit.plugin.RegisteredServiceProvider;
/**
* This event is called when a service is unregistered.
* This event is called when a service is unregistered.<br>
* <b>Warning:</b> The order in which register and unregister
* events are called should not be relied upon.
*/
public class ServiceUnregisterEvent extends ServiceEvent {
private static final HandlerList handlers = new HandlerList();
@@ -13,6 +15,7 @@ public class ServiceUnregisterEvent extends ServiceEvent {
super(serviceProvider);
}
@Override
public HandlerList getHandlers() {
return handlers;
}