mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-20 07:34:48 +01:00
We weren't supposed to break things *that* hard. Plugins still need to update but here's a TEMPORARY fix.
By: Dinnerbone <dinnerbone@dinnerbone.com>
This commit is contained in:
parent
d15ff4b638
commit
19ec204cc9
5 changed files with 36 additions and 14 deletions
|
@ -2,6 +2,7 @@
|
|||
package org.bukkit.event.player;
|
||||
|
||||
import org.bukkit.event.Listener;
|
||||
import org.bukkit.plugin.AuthorNagException;
|
||||
|
||||
/**
|
||||
* Handles all events thrown in relation to a Player
|
||||
|
@ -16,6 +17,8 @@ public class PlayerListener implements Listener {
|
|||
* @param event Relevant event details
|
||||
*/
|
||||
public void onPlayerJoin(PlayerJoinEvent event) {
|
||||
onPlayerJoin((PlayerEvent)event);
|
||||
throw new AuthorNagException("onPlayerJoin has been replaced with a new signature, (PlayerJoinEvent)");
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -24,6 +27,8 @@ public class PlayerListener implements Listener {
|
|||
* @param event Relevant event details
|
||||
*/
|
||||
public void onPlayerQuit(PlayerQuitEvent event) {
|
||||
onPlayerQuit((PlayerEvent)event);
|
||||
throw new AuthorNagException("onPlayerQuit has been replaced with a new signature, (PlayerQuitEvent)");
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -49,6 +54,8 @@ public class PlayerListener implements Listener {
|
|||
* @param event Relevant event details
|
||||
*/
|
||||
public void onPlayerCommandPreprocess(PlayerCommandPreprocessEvent event) {
|
||||
onPlayerCommandPreprocess((PlayerChatEvent)event);
|
||||
throw new AuthorNagException("onPlayerCommandPreprocess has been replaced with a new signature, (PlayerCommandPreprocessEvent)");
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -65,6 +72,8 @@ public class PlayerListener implements Listener {
|
|||
* @param event Relevant event details
|
||||
*/
|
||||
public void onPlayerTeleport(PlayerTeleportEvent event) {
|
||||
onPlayerTeleport((PlayerMoveEvent)event);
|
||||
throw new AuthorNagException("onPlayerTeleport has been replaced with a new signature, (PlayerTeleportEvent)");
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -163,9 +172,9 @@ public class PlayerListener implements Listener {
|
|||
public void onPlayerBucketEmpty(PlayerBucketEmptyEvent event) {
|
||||
}
|
||||
|
||||
// Prevent compilation of old signatures TODO: Remove after 1.4
|
||||
@Deprecated public final void onPlayerQuit(PlayerEvent event) {}
|
||||
@Deprecated public final void onPlayerCommandPreprocess(PlayerChatEvent event) {}
|
||||
@Deprecated public final void onPlayerTeleport(PlayerMoveEvent event) {}
|
||||
@Deprecated public final void onPlayerJoin(PlayerEvent event) {}
|
||||
// TODO: Remove after RB
|
||||
@Deprecated public void onPlayerQuit(PlayerEvent event) {}
|
||||
@Deprecated public void onPlayerCommandPreprocess(PlayerChatEvent event) {}
|
||||
@Deprecated public void onPlayerTeleport(PlayerMoveEvent event) {}
|
||||
@Deprecated public void onPlayerJoin(PlayerEvent event) {}
|
||||
}
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
package org.bukkit.event.server;
|
||||
|
||||
import org.bukkit.event.Listener;
|
||||
import org.bukkit.plugin.AuthorNagException;
|
||||
|
||||
/**
|
||||
* Handles all miscellaneous server events
|
||||
|
@ -13,6 +14,8 @@ public class ServerListener implements Listener {
|
|||
* @param event Relevant event details
|
||||
*/
|
||||
public void onPluginEnable(PluginEnableEvent event) {
|
||||
onPluginEnable((PluginEvent)event);
|
||||
throw new AuthorNagException("onPluginEnable has been replaced with a new signature, (PluginEnableEvent)");
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -21,6 +24,8 @@ public class ServerListener implements Listener {
|
|||
* @param event Relevant event details
|
||||
*/
|
||||
public void onPluginDisable(PluginDisableEvent event) {
|
||||
onPluginDisable((PluginEvent)event);
|
||||
throw new AuthorNagException("onPluginDisable has been replaced with a new signature, (PluginDisableEvent)");
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -31,7 +36,7 @@ public class ServerListener implements Listener {
|
|||
public void onServerCommand(ServerCommandEvent event) {
|
||||
}
|
||||
|
||||
// Prevent compilation of old signatures TODO: Remove after 1.4
|
||||
@Deprecated public final void onPluginDisable(PluginEvent event) {}
|
||||
@Deprecated public final void onPluginEnable(PluginEvent event) {}
|
||||
// TODO: Remove after RB
|
||||
@Deprecated public void onPluginDisable(PluginEvent event) {}
|
||||
@Deprecated public void onPluginEnable(PluginEvent event) {}
|
||||
}
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
package org.bukkit.event.vehicle;
|
||||
|
||||
import org.bukkit.event.Listener;
|
||||
import org.bukkit.plugin.AuthorNagException;
|
||||
|
||||
/**
|
||||
* Listener for vehicle events.
|
||||
|
@ -74,8 +75,10 @@ public class VehicleListener implements Listener {
|
|||
* @param event
|
||||
*/
|
||||
public void onVehicleUpdate(VehicleUpdateEvent event) {
|
||||
onVehicleUpdate((VehicleEvent)event);
|
||||
throw new AuthorNagException("onVehicleUpdate has been replaced with a new signature, (VehicleUpdateEvent)");
|
||||
}
|
||||
|
||||
// Prevent compilation of old signatures TODO: Remove after 1.4
|
||||
@Deprecated public final void onVehicleUpdate(VehicleEvent event) {}
|
||||
// TODO: Remove after RB
|
||||
@Deprecated public void onVehicleUpdate(VehicleEvent event) {}
|
||||
}
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
package org.bukkit.event.world;
|
||||
|
||||
import org.bukkit.event.Listener;
|
||||
import org.bukkit.plugin.AuthorNagException;
|
||||
|
||||
/**
|
||||
* Handles all World related events
|
||||
|
@ -29,6 +30,8 @@ public class WorldListener implements Listener {
|
|||
* @param event Relevant event details
|
||||
*/
|
||||
public void onWorldSave(WorldSaveEvent event) {
|
||||
onWorldSave((WorldEvent)event);
|
||||
throw new AuthorNagException("onWorldSave has been replaced with a new signature, (WorldSaveEvent)");
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -37,9 +40,11 @@ public class WorldListener implements Listener {
|
|||
* @param event Relevant event details
|
||||
*/
|
||||
public void onWorldLoad(WorldLoadEvent event) {
|
||||
onWorldLoad((WorldEvent)event);
|
||||
throw new AuthorNagException("onWorldLoad has been replaced with a new signature, (WorldLoadEvent)");
|
||||
}
|
||||
|
||||
// Prevent compilation of old signatures TODO: Remove after 1.4
|
||||
@Deprecated public final void onWorldLoad(WorldEvent event) {}
|
||||
@Deprecated public final void onWorldSave(WorldEvent event) {}
|
||||
// TODO: Remove after RB
|
||||
@Deprecated public void onWorldLoad(WorldEvent event) {}
|
||||
@Deprecated public void onWorldSave(WorldEvent event) {}
|
||||
}
|
||||
|
|
|
@ -258,7 +258,7 @@ public final class SimplePluginManager implements PluginManager {
|
|||
if (plugin.isNaggable()) {
|
||||
plugin.setNaggable(false);
|
||||
server.getLogger().log(Level.SEVERE, String.format(
|
||||
"Nag author: %s of %s about the following:",
|
||||
"Nag author: '%s' of '%s' about the following: %s",
|
||||
plugin.getDescription().getAuthors().get(0),
|
||||
plugin.getDescription().getName(),
|
||||
ex.getMessage()
|
||||
|
|
Loading…
Reference in a new issue