forked from TuxCoding/FastLogin
Ignore all canceled events
This commit is contained in:
@@ -51,6 +51,10 @@ public class EncryptionPacketListener extends PacketAdapter {
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void onPacketReceiving(PacketEvent packetEvent) {
|
public void onPacketReceiving(PacketEvent packetEvent) {
|
||||||
|
if (packetEvent.isCancelled()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
Player sender = packetEvent.getPlayer();
|
Player sender = packetEvent.getPlayer();
|
||||||
byte[] sharedSecret = packetEvent.getPacket().getByteArrays().read(0);
|
byte[] sharedSecret = packetEvent.getPacket().getByteArrays().read(0);
|
||||||
|
|
||||||
|
@@ -52,6 +52,10 @@ public class StartPacketListener extends PacketAdapter {
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void onPacketReceiving(PacketEvent packetEvent) {
|
public void onPacketReceiving(PacketEvent packetEvent) {
|
||||||
|
if (packetEvent.isCancelled()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
plugin.setServerStarted();
|
plugin.setServerStarted();
|
||||||
|
|
||||||
Player player = packetEvent.getPlayer();
|
Player player = packetEvent.getPlayer();
|
||||||
|
@@ -49,6 +49,10 @@ public class PlayerConnectionListener implements Listener {
|
|||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
public void onLogin(LoginEvent loginEvent) {
|
public void onLogin(LoginEvent loginEvent) {
|
||||||
|
if (loginEvent.isCancelled()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
//use the loginevent instead of the postlogin event in order to send the loginsuccess packet to the client
|
//use the loginevent instead of the postlogin event in order to send the loginsuccess packet to the client
|
||||||
//with the offline uuid this makes it possible to set the skin then
|
//with the offline uuid this makes it possible to set the skin then
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user