mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-17 23:01:01 +01:00
Change some more signatures :(
onPlayerCommandPreprocess(PlayerChatEvent event) -> onPlayerCommandPreprocess(PlayerCommandPreprocessEvent event) onBlockFlow(BlockFromToEvent event) -> onBlockFromTo(BlockFromToEvent event) onPlayerJoin(PlayerEvent event) -> onPlayerJoin(PlayerJoinEvent event) onPlayerQuit(PlayerEvent event) -> onPlayerQuit(PlayerQuitEvent event) onPlayerTeleport(PlayerMoveEvent event) -> onPlayerTeleport(PlayerTeleportEvent event) By: Erik Broes <erikbroes@grum.nl>
This commit is contained in:
parent
41325be679
commit
c640518469
6 changed files with 38 additions and 9 deletions
|
@ -33,7 +33,7 @@ public class BlockListener implements Listener {
|
|||
*
|
||||
* @param event Relevant event details
|
||||
*/
|
||||
public void onBlockFlow(BlockFromToEvent event) {
|
||||
public void onBlockFromTo(BlockFromToEvent event) {
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
package org.bukkit.event.player;
|
||||
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
public class PlayerCommandPreprocessEvent extends PlayerChatEvent {
|
||||
public PlayerCommandPreprocessEvent(Player player, String message) {
|
||||
super(player, message);
|
||||
}
|
||||
}
|
|
@ -23,7 +23,7 @@ public class PlayerListener implements Listener {
|
|||
*
|
||||
* @param event Relevant event details
|
||||
*/
|
||||
public void onPlayerQuit(PlayerEvent event) {
|
||||
public void onPlayerQuit(PlayerQuitEvent event) {
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -48,7 +48,7 @@ public class PlayerListener implements Listener {
|
|||
*
|
||||
* @param event Relevant event details
|
||||
*/
|
||||
public void onPlayerCommandPreprocess(PlayerChatEvent event) {
|
||||
public void onPlayerCommandPreprocess(PlayerCommandPreprocessEvent event) {
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -64,7 +64,7 @@ public class PlayerListener implements Listener {
|
|||
*
|
||||
* @param event Relevant event details
|
||||
*/
|
||||
public void onPlayerTeleport(PlayerMoveEvent event) {
|
||||
public void onPlayerTeleport(PlayerTeleportEvent event) {
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
package org.bukkit.event.player;
|
||||
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
public class PlayerQuitEvent extends PlayerEvent {
|
||||
public PlayerQuitEvent(Player who) {
|
||||
super(Type.PLAYER_QUIT, who);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
package org.bukkit.event.player;
|
||||
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
public class PlayerTeleportEvent extends PlayerMoveEvent {
|
||||
public PlayerTeleportEvent(Player player, Location from, Location to) {
|
||||
super(player, from, to);
|
||||
}
|
||||
}
|
|
@ -96,7 +96,7 @@ public final class JavaPluginLoader implements PluginLoader {
|
|||
|
||||
Constructor<? extends JavaPlugin> constructor = plugin.getConstructor();
|
||||
result = constructor.newInstance();
|
||||
|
||||
|
||||
result.initialize(this, server, description, dataFolder, file, loader);
|
||||
} catch (Throwable ex) {
|
||||
throw new InvalidPluginException(ex);
|
||||
|
@ -169,7 +169,7 @@ public final class JavaPluginLoader implements PluginLoader {
|
|||
case PLAYER_QUIT:
|
||||
return new EventExecutor() {
|
||||
public void execute(Listener listener, Event event) {
|
||||
((PlayerListener) listener).onPlayerQuit((PlayerEvent) event);
|
||||
((PlayerListener) listener).onPlayerQuit((PlayerQuitEvent) event);
|
||||
}
|
||||
};
|
||||
case PLAYER_RESPAWN:
|
||||
|
@ -187,7 +187,7 @@ public final class JavaPluginLoader implements PluginLoader {
|
|||
case PLAYER_COMMAND_PREPROCESS:
|
||||
return new EventExecutor() {
|
||||
public void execute(Listener listener, Event event) {
|
||||
((PlayerListener) listener).onPlayerCommandPreprocess((PlayerChatEvent) event);
|
||||
((PlayerListener) listener).onPlayerCommandPreprocess((PlayerCommandPreprocessEvent) event);
|
||||
}
|
||||
};
|
||||
case PLAYER_CHAT:
|
||||
|
@ -205,7 +205,7 @@ public final class JavaPluginLoader implements PluginLoader {
|
|||
case PLAYER_TELEPORT:
|
||||
return new EventExecutor() {
|
||||
public void execute(Listener listener, Event event) {
|
||||
((PlayerListener) listener).onPlayerTeleport((PlayerMoveEvent) event);
|
||||
((PlayerListener) listener).onPlayerTeleport((PlayerTeleportEvent) event);
|
||||
}
|
||||
};
|
||||
case PLAYER_INTERACT:
|
||||
|
@ -303,7 +303,7 @@ public final class JavaPluginLoader implements PluginLoader {
|
|||
case BLOCK_FROMTO:
|
||||
return new EventExecutor() {
|
||||
public void execute(Listener listener, Event event) {
|
||||
((BlockListener) listener).onBlockFlow((BlockFromToEvent) event);
|
||||
((BlockListener) listener).onBlockFromTo((BlockFromToEvent) event);
|
||||
}
|
||||
};
|
||||
case LEAVES_DECAY:
|
||||
|
@ -539,3 +539,4 @@ public final class JavaPluginLoader implements PluginLoader {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue