diff --git a/src/dark/core/network/PacketManagerKeyEvent.java b/src/dark/core/network/PacketManagerKeyEvent.java index 18bea4f11..376625477 100644 --- a/src/dark/core/network/PacketManagerKeyEvent.java +++ b/src/dark/core/network/PacketManagerKeyEvent.java @@ -68,7 +68,10 @@ public class PacketManagerKeyEvent implements IPacketManager int key = data.readInt(); for (IControlReceiver receiver : instance().receivers) { - receiver.keyTyped((EntityPlayer) player, key); + if(receiver.keyTyped((EntityPlayer) player, key)) + { + break; + } } } catch (Exception e) diff --git a/src/dark/core/prefab/vehicles/EntityDrivable.java b/src/dark/core/prefab/vehicles/EntityDrivable.java index 454c47a38..493a20c51 100644 --- a/src/dark/core/prefab/vehicles/EntityDrivable.java +++ b/src/dark/core/prefab/vehicles/EntityDrivable.java @@ -48,18 +48,22 @@ public class EntityDrivable extends EntityAdvanced implements IControlReceiver { player.sendChatToPlayer(ChatMessageComponent.createFromText("Forward we go!")); this.accelerate(true); + return true; } if (keycode == Minecraft.getMinecraft().gameSettings.keyBindBack.keyCode) { this.accelerate(false); + return true; } if (keycode == Minecraft.getMinecraft().gameSettings.keyBindLeft.keyCode) { this.turn(true); + return true; } if (keycode == Minecraft.getMinecraft().gameSettings.keyBindRight.keyCode) { this.turn(false); + return true; } //Power brakes if (keycode == Minecraft.getMinecraft().gameSettings.keyBindJump.keyCode) @@ -69,6 +73,7 @@ public class EntityDrivable extends EntityAdvanced implements IControlReceiver { speed = 0; } + return true; } } return false;