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

Solved Position

Comments in 'Plugin Development' started by CaptainKenji17, Feb 16, 2016.

  1. CaptainKenji17
    Offline

    CaptainKenji17 Active Member

    Joined:
    Apr 22, 2014
    Posts:
    252
    Minecraft User:
    CaptainKenji17
    what code is to get the xyz position?

    example I have code particles and I want to spawn it in x100 y70. y123.

    also with world name
    Last edited: Feb 16, 2016
  2. CraftYourBukkit
    Offline

    CraftYourBukkit Notable Member Plugin Developer

    Joined:
    Jan 20, 2015
    Posts:
    1,022
    Plugins:
    2
    Minecraft User:
    CraftYourBukkit
    PHP:
    $pos = new Position($x$y$z$level);
  3. CaptainKenji17
    Offline

    CaptainKenji17 Active Member

    Joined:
    Apr 22, 2014
    Posts:
    252
    Minecraft User:
    CaptainKenji17
    Thank you :D
  4. CaptainKenji17
    Offline

    CaptainKenji17 Active Member

    Joined:
    Apr 22, 2014
    Posts:
    252
    Minecraft User:
    CaptainKenji17
    it needs to be an array :D
    PHP:
    $pos = new Position($x$y$z$level),array($level);
  5. CraftYourBukkit
    Offline

    CraftYourBukkit Notable Member Plugin Developer

    Joined:
    Jan 20, 2015
    Posts:
    1,022
    Plugins:
    2
    Minecraft User:
    CraftYourBukkit
    Please what?
  6. CaptainKenji17
    Offline

    CaptainKenji17 Active Member

    Joined:
    Apr 22, 2014
    Posts:
    252
    Minecraft User:
    CaptainKenji17
    itll give u an error if its not array
    $level must be an array or Argument 2, use\pocketmine... must be of the type array, object given
  7. CaptainKenji17
    Offline

    CaptainKenji17 Active Member

    Joined:
    Apr 22, 2014
    Posts:
    252
    Minecraft User:
    CaptainKenji17
    nevermind it i was wrong
  8. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,294
    Plugins:
    11
    Minecraft User:
    PEMapModder
    It is not part of the Position itself. Please, again, learn PHP - a variable is something that holds a value, or especially a reference to an immutable object when it is an object variable. It is not like you write some code and the PHP parser would magically replace the variable with what you typed behind the =.
  9. CaptainKenji17
    Offline

    CaptainKenji17 Active Member

    Joined:
    Apr 22, 2014
    Posts:
    252
    Minecraft User:
    CaptainKenji17
    AndrewBit likes this.

Share This Page

Advertisement