Minecraft plugin problem?

Em
- in Plugins
8

I'm just experimenting with my plugin:

Minecraft plugin problem

The plugin is relatively simple: it places a pumpkin in front of a player. The problem, however, is that the pumpkin is always placed on the x-axis by the player, regardless of where the player is looking.

My question would be, how can I do it or with what command that the position of the player is included? So if I look in the Y direction, the pumpkin should also be placed in the Y direction, etc.

Fl

I can only recommend this playlist to you as a beginner:

https://www.youtube.com/...pw0-_3VpzY

ho

4 videos until you finally installed Eclipse, gg xD

Em

I know anyway, but he doesn't deal specifically with this topic: /

Ka

At the location of the player there's also yaw and pitch and with yaw you should be able to find out the direction of view.

Da

That's 0! The question with absolute basics, the questioner already seems to be through and now deals with problems that are not dealt with in this playlist!

Da

A player's location includes x y z yaw and pitch, the last two describing the direction of the head.

The yaw values are the horizontal ones like this: 0≈ + z, 90≈-x, 180≈-z, 270≈ + x

and then you have to convert that into the axis to find out the location of the new block.

Minor matter:

You should definitely write all variables, class names, etc. In English, as this is a convention! If somebody sees your code, if you want to join a team or something, it's bad.

Does that work at all? You still have to overwrite the command method, implement CommandExecuter and register the command?

Al

CommandExecutor does not need to be registered because JavaPlugin is the command executor. It is therefore not necessary to implement or register this in the main class.
A CommandExecutor only needs to be implemented / registered if the command is defined outside the main class.

Da

Ok thanks for the info I knew net