mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-11 17:31:06 +01:00
Updated for the changes done in Bukkit
This commit is contained in:
parent
84054ec680
commit
ce5ee0996c
2 changed files with 5 additions and 5 deletions
|
@ -126,7 +126,7 @@ public class NetServerHandler extends NetHandler implements ICommandListener {
|
||||||
if (lastPosX != Double.MAX_VALUE) {
|
if (lastPosX != Double.MAX_VALUE) {
|
||||||
PlayerMoveEvent event = new PlayerMoveEvent(player, from, to);
|
PlayerMoveEvent event = new PlayerMoveEvent(player, from, to);
|
||||||
server.getPluginManager().callEvent(event);
|
server.getPluginManager().callEvent(event);
|
||||||
|
|
||||||
from = event.getFrom();
|
from = event.getFrom();
|
||||||
to = event.isCancelled() ? from : event.getTo();
|
to = event.isCancelled() ? from : event.getTo();
|
||||||
|
|
||||||
|
@ -282,7 +282,7 @@ public class NetServerHandler extends NetHandler implements ICommandListener {
|
||||||
Player player = getPlayer();
|
Player player = getPlayer();
|
||||||
Location from = player.getLocation();
|
Location from = player.getLocation();
|
||||||
Location to = dest.clone();
|
Location to = dest.clone();
|
||||||
PlayerMoveEvent event = new PlayerMoveEvent(player, from, to);
|
PlayerTeleportEvent event = new PlayerTeleportEvent(player, from, to);
|
||||||
server.getPluginManager().callEvent(event);
|
server.getPluginManager().callEvent(event);
|
||||||
|
|
||||||
from = event.getFrom();
|
from = event.getFrom();
|
||||||
|
@ -593,7 +593,7 @@ public class NetServerHandler extends NetHandler implements ICommandListener {
|
||||||
// CraftBukkit start
|
// CraftBukkit start
|
||||||
CraftPlayer player = getPlayer();
|
CraftPlayer player = getPlayer();
|
||||||
|
|
||||||
PlayerChatEvent event = new PlayerChatEvent(player, s);
|
PlayerCommandPreprocessEvent event = new PlayerCommandPreprocessEvent(player, s);
|
||||||
server.getPluginManager().callEvent(event);
|
server.getPluginManager().callEvent(event);
|
||||||
if (event.isCancelled()) {
|
if (event.isCancelled()) {
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -18,7 +18,7 @@ import org.bukkit.craftbukkit.CraftServer;
|
||||||
import org.bukkit.craftbukkit.CraftWorld;
|
import org.bukkit.craftbukkit.CraftWorld;
|
||||||
import org.bukkit.craftbukkit.command.ColouredConsoleSender;
|
import org.bukkit.craftbukkit.command.ColouredConsoleSender;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.event.player.PlayerEvent;
|
import org.bukkit.event.player.PlayerQuitEvent;
|
||||||
import org.bukkit.event.player.PlayerJoinEvent;
|
import org.bukkit.event.player.PlayerJoinEvent;
|
||||||
import org.bukkit.event.player.PlayerLoginEvent;
|
import org.bukkit.event.player.PlayerLoginEvent;
|
||||||
import org.bukkit.event.player.PlayerRespawnEvent;
|
import org.bukkit.event.player.PlayerRespawnEvent;
|
||||||
|
@ -118,7 +118,7 @@ public class ServerConfigurationManager {
|
||||||
|
|
||||||
// CraftBukkit start
|
// CraftBukkit start
|
||||||
((WorldServer) entityplayer.world).manager.b(entityplayer);
|
((WorldServer) entityplayer.world).manager.b(entityplayer);
|
||||||
server.getPluginManager().callEvent(new PlayerEvent(PlayerEvent.Type.PLAYER_QUIT, server.getPlayer(entityplayer))); // CraftBukkit
|
server.getPluginManager().callEvent(new PlayerQuitEvent(server.getPlayer(entityplayer))); // CraftBukkit
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue