Advertisement
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Solved I need help with player move event.

Comments in 'Plugin Development' started by iiDeathStrokeii, Aug 2, 2015.

Thread Status:
Not open for further replies.
  1. Gamecrafter
    Offline

    Gamecrafter

    Joined:
    Nov 20, 2014
    Posts:
    978
    Plugins:
    9
    I think it's just based on personal preferences.
    Andrey Nazarchuk and Legoboy0215 like this.
  2. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,294
    Plugins:
    11
    Minecraft User:
    PEMapModder
    1. EntityMoveEvent is already deprecated. Please erase it from your memory forever.
    2. `and` and `&&` are basically the same, but if you use them together with `||` and `or` without parentheses, there may be issues with the precedence, where probably or loads before & &. (I forgot) Just don't use both together.
    3. Didn't anyone notice the initial issue?
    PHP:
    $x >= 509.5 and $x <=496.7
    I can rephrase it into:
    PHP:
    509.5 <= $x and $x <= 496.7
    In mathematics, there is no real number $x that satisfies the above condition.
    And $y >= 27 and $y <= 2? Can you give any numbers that satisfy this situation?
    4. It is not necessary to round or floor numbers. Just compare the player coordinate directly against your boundaries.



    Please, everyone, you are all talking nonsense and simply creating more issues. The only issue in the first post is that it is comparing numbers incorrectly. He simply needed to swap >= and <=. Why are you all complicating the issue and confusing him? Just give an answer that you are sure to be correct, and shut up if you don't know what the issue is.
Thread Status:
Not open for further replies.

Share This Page

Advertisement