Skip to content
This repository has been archived by the owner on Dec 14, 2024. It is now read-only.

Commit

Permalink
Fix Bad Event Names
Browse files Browse the repository at this point in the history
  • Loading branch information
gmitch215 committed May 12, 2024
1 parent 238e20f commit 7b72437
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
/**
* Called when a player clicks or releases a button their mouse.
*/
public class AsyncPlayerClickMouseEventAsync extends AsyncModifiedInputEvent {
public class AsyncPlayerClickMouseEvent extends AsyncModifiedInputEvent {

private final MouseButton button;
private final Action action;
Expand All @@ -20,7 +20,7 @@ public class AsyncPlayerClickMouseEventAsync extends AsyncModifiedInputEvent {
* @param action The action that was performed
* @param flags Bitfield for flags of the mouse click
*/
public AsyncPlayerClickMouseEventAsync(@NotNull SocketPlayer player, @NotNull MouseButton button, @NotNull Action action, int flags) {
public AsyncPlayerClickMouseEvent(@NotNull SocketPlayer player, @NotNull MouseButton button, @NotNull Action action, int flags) {
super(player, flags);

this.button = button;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
/**
* Called when a player presses or releases a key on a keyboard.
*/
public class AsyncPlayerPressKeyEventAsync extends AsyncModifiedInputEvent {
public class AsyncPlayerPressKeyEvent extends AsyncModifiedInputEvent {

private final Key key;
private final int flags;
Expand All @@ -21,7 +21,7 @@ public class AsyncPlayerPressKeyEventAsync extends AsyncModifiedInputEvent {
* @param flags Bitfield for flags of the key press
* @param action The action of the key press
*/
public AsyncPlayerPressKeyEventAsync(@NotNull SocketPlayer player, Key key, Action action, int flags) {
public AsyncPlayerPressKeyEvent(@NotNull SocketPlayer player, Key key, Action action, int flags) {
super(player, flags);

this.key = key;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

import io.netty.channel.ChannelPipeline;
import me.gamercoder215.socketmc.events.SocketEvent;
import me.gamercoder215.socketmc.events.input.AsyncPlayerClickMouseEventAsync;
import me.gamercoder215.socketmc.events.input.AsyncPlayerClickMouseEvent;
import me.gamercoder215.socketmc.events.input.AsyncPlayerMoveMouseEvent;
import me.gamercoder215.socketmc.events.input.AsyncPlayerPressKeyEventAsync;
import me.gamercoder215.socketmc.events.input.AsyncPlayerPressKeyEvent;
import me.gamercoder215.socketmc.events.input.AsyncPlayerScrollMouseEvent;
import me.gamercoder215.socketmc.util.input.Action;
import me.gamercoder215.socketmc.util.input.Key;
Expand Down Expand Up @@ -40,7 +40,7 @@ static void addPacketInjector(SocketPlayer p) {
int flags = (int) params.get("flags");
int action = (int) params.get("action");

return new AsyncPlayerPressKeyEventAsync(p, Key.fromCode(key), Action.values()[action], flags);
return new AsyncPlayerPressKeyEvent(p, Key.fromCode(key), Action.values()[action], flags);
},
// PlayerMoveMouseEvent
(p, params) -> {
Expand All @@ -62,7 +62,7 @@ static void addPacketInjector(SocketPlayer p) {
int action = (int) params.get("action");
int flags = (int) params.get("mods");

return new AsyncPlayerClickMouseEventAsync(p, MouseButton.values()[button], Action.values()[action], flags);
return new AsyncPlayerClickMouseEvent(p, MouseButton.values()[button], Action.values()[action], flags);
}
);

Expand Down

0 comments on commit 7b72437

Please sign in to comment.