Add the rest of the required items for the new events

This commit is contained in:
Eric Stokes 2012-01-25 18:14:46 -07:00
parent 8488f9db3c
commit 4d97453881
8 changed files with 134 additions and 2 deletions

View File

@ -18,7 +18,7 @@
</repository>
<repository>
<id>Bukkit Offical</id>
<url>http://repo.bukkit.org/content/repositories/public/</url>
<url>http://repo.bukkit.org/content/repositories/public</url>
</repository>
</repositories>

View File

@ -8,6 +8,7 @@
package com.onarandombox.MultiverseCore.event;
import org.bukkit.event.Event;
import org.bukkit.event.HandlerList;
import java.util.List;
@ -23,6 +24,24 @@ public class MVConfigReloadEvent extends Event {
this.configsLoaded = configsLoaded;
}
private static final HandlerList HANDLERS = new HandlerList();
/**
* {@inheritDoc}
*/
@Override
public HandlerList getHandlers() {
return HANDLERS;
}
/**
* Gets the handler list. This is required by the event system.
* @return A list of HANDLERS.
*/
public static HandlerList getHandlerList() {
return HANDLERS;
}
/**
* Adds a config to this event.
* @param config The config to add.

View File

@ -11,6 +11,7 @@ import org.bukkit.Location;
import org.bukkit.entity.Player;
import org.bukkit.event.Cancellable;
import org.bukkit.event.Event;
import org.bukkit.event.HandlerList;
/**
* This event is thrown when a portal is touched.
@ -26,6 +27,24 @@ public class MVPlayerTouchedPortalEvent extends Event implements Cancellable {
this.l = l;
}
private static final HandlerList HANDLERS = new HandlerList();
/**
* {@inheritDoc}
*/
@Override
public HandlerList getHandlers() {
return HANDLERS;
}
/**
* Gets the handler list. This is required by the event system.
* @return A list of HANDLERS.
*/
public static HandlerList getHandlerList() {
return HANDLERS;
}
/**
* Gets the {@link Location} of the portal-block that was touched.
* @return The {@link Location} of the portal-block that was touched.

View File

@ -10,6 +10,7 @@ package com.onarandombox.MultiverseCore.event;
import org.bukkit.Location;
import org.bukkit.entity.Player;
import org.bukkit.event.Event;
import org.bukkit.event.HandlerList;
/**
* Called when a player is respawning.
@ -27,6 +28,24 @@ public class MVRespawnEvent extends Event {
this.respawnMethod = respawnMethod;
}
private static final HandlerList HANDLERS = new HandlerList();
/**
* {@inheritDoc}
*/
@Override
public HandlerList getHandlers() {
return HANDLERS;
}
/**
* Gets the handler list. This is required by the event system.
* @return A list of HANDLERS.
*/
public static HandlerList getHandlerList() {
return HANDLERS;
}
/**
* Gets the {@link Player} that's respawning.
* @return The {@link Player} that's respawning.

View File

@ -14,6 +14,7 @@ import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import org.bukkit.event.Cancellable;
import org.bukkit.event.Event;
import org.bukkit.event.HandlerList;
/**
* Event that gets called when a player use the /mvtp command.
@ -33,6 +34,24 @@ public class MVTeleportEvent extends Event implements Cancellable {
this.useSafeTeleport = safeTeleport;
}
private static final HandlerList HANDLERS = new HandlerList();
/**
* {@inheritDoc}
*/
@Override
public HandlerList getHandlers() {
return HANDLERS;
}
/**
* Gets the handler list. This is required by the event system.
* @return A list of HANDLERS.
*/
public static HandlerList getHandlerList() {
return HANDLERS;
}
/**
* Returns the player who will be teleported by this event.
*

View File

@ -1,6 +1,7 @@
package com.onarandombox.MultiverseCore.event;
import org.bukkit.event.Event;
import org.bukkit.event.HandlerList;
/**
* Called when somebody requests version information about Multiverse.
@ -14,6 +15,24 @@ public class MVVersionEvent extends Event {
versionInfoBuilder = new StringBuilder(versionInfo);
}
private static final HandlerList HANDLERS = new HandlerList();
/**
* {@inheritDoc}
*/
@Override
public HandlerList getHandlers() {
return HANDLERS;
}
/**
* Gets the handler list. This is required by the event system.
* @return A list of HANDLERS.
*/
public static HandlerList getHandlerList() {
return HANDLERS;
}
/**
* Gets the version-info currently saved in this event.
* @return The version-info.

View File

@ -4,6 +4,7 @@ import org.bukkit.event.Cancellable;
import org.bukkit.event.Event;
import com.onarandombox.MultiverseCore.api.MultiverseWorld;
import org.bukkit.event.HandlerList;
/**
* Called when a world is about to be deleted by Multiverse.
@ -24,6 +25,24 @@ public class MVWorldDeleteEvent extends Event implements Cancellable {
this.removeFromConfig = removeFromConfig;
}
private static final HandlerList HANDLERS = new HandlerList();
/**
* {@inheritDoc}
*/
@Override
public HandlerList getHandlers() {
return HANDLERS;
}
/**
* Gets the handler list. This is required by the event system.
* @return A list of HANDLERS.
*/
public static HandlerList getHandlerList() {
return HANDLERS;
}
/**
* {@inheritDoc}
*/

View File

@ -11,6 +11,7 @@ import com.onarandombox.MultiverseCore.api.MultiverseWorld;
import org.bukkit.command.CommandSender;
import org.bukkit.event.Cancellable;
import org.bukkit.event.Event;
import org.bukkit.event.HandlerList;
/**
* This event is fired *before* the property is actually changed.
@ -27,7 +28,6 @@ public class MVWorldPropertyChangeEvent extends Event implements Cancellable {
private String value;
private String name;
public MVWorldPropertyChangeEvent(MultiverseWorld world, CommandSender changer, String name, String value) {
super("MVWorldPropertyChange");
this.world = world;
@ -36,6 +36,24 @@ public class MVWorldPropertyChangeEvent extends Event implements Cancellable {
this.value = value;
}
private static final HandlerList HANDLERS = new HandlerList();
/**
* {@inheritDoc}
*/
@Override
public HandlerList getHandlers() {
return HANDLERS;
}
/**
* Gets the handler list. This is required by the event system.
* @return A list of handlers.
*/
public static HandlerList getHandlerList() {
return HANDLERS;
}
/**
* Gets the changed world property's name.
* @return The changed world property's name.