Thread: Parameters

Results 1 to 2 of 2
  1. #1 Parameters 
    Registered Member
    Join Date
    Mar 2012
    Posts
    710
    Thanks given
    19
    Thanks received
    5
    Rep Power
    37
    Hello,

    Just another quick question.

    Can someone explain the "Player player" part here? Is that an argument for the character's name?

    Code:
    	@Override
    	public void onLogout(Player player) {
    		player.move(Config.DEFAULT_POSITION);
    		cleanup();
    		finish();
    	}
    Reply With Quote  
     

  2. #2  
    Donator


    Join Date
    Dec 2014
    Posts
    371
    Thanks given
    57
    Thanks received
    108
    Rep Power
    164
    this passes the player to the function, but if this function is located in Player.java this is pointless.

    player.move(Config.DEFAULT_POSITION);

    this calls the move function in Player class for the player you send to the medhod.
    [Only registered and activated users can see links. ]
    Reply With Quote  
     


Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Similar Threads

  1. Replies: 1
    Last Post: 12-13-2010, 05:05 AM
  2. rs parameters
    By Rowan112 in forum Help
    Replies: 3
    Last Post: 04-25-2010, 12:36 AM
  3. Using command-line parameters
    By Ikram in forum Application Development
    Replies: 4
    Last Post: 08-12-2009, 03:59 PM
  4. Replies: 7
    Last Post: 05-03-2009, 06:24 PM
  5. URL parameter
    By andrew121 in forum Help
    Replies: 0
    Last Post: 09-22-2008, 11:54 PM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •