mirror of
https://github.com/Multiverse/Multiverse-Core.git
synced 2024-11-29 14:06:30 +01:00
Add the rest of the required items for the new events
This commit is contained in:
parent
8488f9db3c
commit
4d97453881
2
pom.xml
2
pom.xml
@ -18,7 +18,7 @@
|
|||||||
</repository>
|
</repository>
|
||||||
<repository>
|
<repository>
|
||||||
<id>Bukkit Offical</id>
|
<id>Bukkit Offical</id>
|
||||||
<url>http://repo.bukkit.org/content/repositories/public/</url>
|
<url>http://repo.bukkit.org/content/repositories/public</url>
|
||||||
</repository>
|
</repository>
|
||||||
</repositories>
|
</repositories>
|
||||||
|
|
||||||
|
@ -8,6 +8,7 @@
|
|||||||
package com.onarandombox.MultiverseCore.event;
|
package com.onarandombox.MultiverseCore.event;
|
||||||
|
|
||||||
import org.bukkit.event.Event;
|
import org.bukkit.event.Event;
|
||||||
|
import org.bukkit.event.HandlerList;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@ -23,6 +24,24 @@ public class MVConfigReloadEvent extends Event {
|
|||||||
this.configsLoaded = configsLoaded;
|
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.
|
* Adds a config to this event.
|
||||||
* @param config The config to add.
|
* @param config The config to add.
|
||||||
|
@ -11,6 +11,7 @@ import org.bukkit.Location;
|
|||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.event.Cancellable;
|
import org.bukkit.event.Cancellable;
|
||||||
import org.bukkit.event.Event;
|
import org.bukkit.event.Event;
|
||||||
|
import org.bukkit.event.HandlerList;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This event is thrown when a portal is touched.
|
* This event is thrown when a portal is touched.
|
||||||
@ -26,6 +27,24 @@ public class MVPlayerTouchedPortalEvent extends Event implements Cancellable {
|
|||||||
this.l = l;
|
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.
|
* Gets the {@link Location} of the portal-block that was touched.
|
||||||
* @return The {@link Location} of the portal-block that was touched.
|
* @return The {@link Location} of the portal-block that was touched.
|
||||||
|
@ -10,6 +10,7 @@ package com.onarandombox.MultiverseCore.event;
|
|||||||
import org.bukkit.Location;
|
import org.bukkit.Location;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.event.Event;
|
import org.bukkit.event.Event;
|
||||||
|
import org.bukkit.event.HandlerList;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Called when a player is respawning.
|
* Called when a player is respawning.
|
||||||
@ -27,6 +28,24 @@ public class MVRespawnEvent extends Event {
|
|||||||
this.respawnMethod = respawnMethod;
|
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.
|
* Gets the {@link Player} that's respawning.
|
||||||
* @return The {@link Player} that's respawning.
|
* @return The {@link Player} that's respawning.
|
||||||
|
@ -14,6 +14,7 @@ import org.bukkit.command.CommandSender;
|
|||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.event.Cancellable;
|
import org.bukkit.event.Cancellable;
|
||||||
import org.bukkit.event.Event;
|
import org.bukkit.event.Event;
|
||||||
|
import org.bukkit.event.HandlerList;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Event that gets called when a player use the /mvtp command.
|
* 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;
|
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.
|
* Returns the player who will be teleported by this event.
|
||||||
*
|
*
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
package com.onarandombox.MultiverseCore.event;
|
package com.onarandombox.MultiverseCore.event;
|
||||||
|
|
||||||
import org.bukkit.event.Event;
|
import org.bukkit.event.Event;
|
||||||
|
import org.bukkit.event.HandlerList;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Called when somebody requests version information about Multiverse.
|
* Called when somebody requests version information about Multiverse.
|
||||||
@ -14,6 +15,24 @@ public class MVVersionEvent extends Event {
|
|||||||
versionInfoBuilder = new StringBuilder(versionInfo);
|
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.
|
* Gets the version-info currently saved in this event.
|
||||||
* @return The version-info.
|
* @return The version-info.
|
||||||
|
@ -4,6 +4,7 @@ import org.bukkit.event.Cancellable;
|
|||||||
import org.bukkit.event.Event;
|
import org.bukkit.event.Event;
|
||||||
|
|
||||||
import com.onarandombox.MultiverseCore.api.MultiverseWorld;
|
import com.onarandombox.MultiverseCore.api.MultiverseWorld;
|
||||||
|
import org.bukkit.event.HandlerList;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Called when a world is about to be deleted by Multiverse.
|
* 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;
|
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}
|
* {@inheritDoc}
|
||||||
*/
|
*/
|
||||||
|
@ -11,6 +11,7 @@ import com.onarandombox.MultiverseCore.api.MultiverseWorld;
|
|||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.event.Cancellable;
|
import org.bukkit.event.Cancellable;
|
||||||
import org.bukkit.event.Event;
|
import org.bukkit.event.Event;
|
||||||
|
import org.bukkit.event.HandlerList;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This event is fired *before* the property is actually changed.
|
* 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 value;
|
||||||
private String name;
|
private String name;
|
||||||
|
|
||||||
|
|
||||||
public MVWorldPropertyChangeEvent(MultiverseWorld world, CommandSender changer, String name, String value) {
|
public MVWorldPropertyChangeEvent(MultiverseWorld world, CommandSender changer, String name, String value) {
|
||||||
super("MVWorldPropertyChange");
|
super("MVWorldPropertyChange");
|
||||||
this.world = world;
|
this.world = world;
|
||||||
@ -36,6 +36,24 @@ public class MVWorldPropertyChangeEvent extends Event implements Cancellable {
|
|||||||
this.value = value;
|
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.
|
* Gets the changed world property's name.
|
||||||
* @return The changed world property's name.
|
* @return The changed world property's name.
|
||||||
|
Loading…
Reference in New Issue
Block a user