Skip to content

Conversation

davight
Copy link
Contributor

@davight davight commented Aug 18, 2025

Additions:

Changes:

  • Deprecated player steers <entity> event

@@ -268,6 +268,9 @@ public class BukkitImplDeprecations {
// Added 2025/03/14
public static Warning settingBoatType = new Warning("settingBoatType", "As of MC 1.21, separate boat wood types are separate entity types, meaning the wood type of an existing boat entity cannot be changed without spawning a new one.");

// Added 2025/08/18
public static Warning playerSteerEntityEvent = new Warning("playerSteerEntityEvent", "The 'player steers <entity>' is deprecated in favor of the 'player input' event.");
Copy link
Contributor

@MC-Samuel MC-Samuel Aug 18, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'player steers <entity>' event

@@ -38,6 +40,8 @@ public class PlayerSteersEntityScriptEvent extends BukkitScriptEvent {
//
// @Player Always.
//
// @deprecated Use <@link event player input> on versions above 1.21.
Copy link
Contributor

@MC-Samuel MC-Samuel Aug 18, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The link won't work, since @deprecated uses plain-text

// @Triggers when a player sends updated input to the server.
//
// @Context
// <context.is_backward> returns an ElementTag(Boolean) that signifies whether the player moves backward
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could probably shorten all of these to returns whether the player input was <direction>

@davight
Copy link
Contributor Author

davight commented Aug 21, 2025

fixed

// @Triggers when a player sends updated input to the server.
//
// @Context
// <context.is_backward> returns whether the player moves backward
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are a bit too definitive imo - the player is giving backwards input, but there's still many things that can stop them from actually moving backwards (I.e. this isn't the way to check if the player is actually moving).
I'd mybe do something like returns whether the player is trying to move backwards or just straight up returns whether the player provided backwards movement input., but can discuss further on Discord.

@EventHandler
public void onPlayerInputEvent(PlayerInputEvent event) {
this.event = event;
player = event.getPlayer();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any specific reason to store the player here, as opposed to just event.getPlayer() in getScriptEntryData?

@@ -268,6 +268,9 @@ public class BukkitImplDeprecations {
// Added 2025/03/14
public static Warning settingBoatType = new Warning("settingBoatType", "As of MC 1.21, separate boat wood types are separate entity types, meaning the wood type of an existing boat entity cannot be changed without spawning a new one.");

// Added 2025/08/18
public static Warning playerSteerEntityEvent = new Warning("playerSteerEntityEvent", "The 'player steers <entity>' event is deprecated in favor of the 'player input' event.");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe a SlowWarning? the event still has back-support and everything, don't think we should go directly to Warning here

@davight
Copy link
Contributor Author

davight commented Aug 29, 2025

resolved comments

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants