It will have all of the methods from the client class (That have a default level access or higher).
But this is definitely not what you're looking for. All this is doing is creating a new Client object and adding new methods to it. What I mean is if you were to do this, then Fletching would need to be runnable, have it's own thread, socket, etc.
What you want to do is pass a client parameter onto the Fletching class, and use that to handle everything.
Code:
public class Fletching {
/**
* The Player.
*/
private final Client client;
/**
* Creates a new Fletching instance.
* @param client The client to create this instance for.
*/
public Fletching(Client client) {
this.client = client;
}
/**
* Strings a bow.
*/
public void stringBow(int bowId) {
//TODO - String bow, delete from inventory, etc.
}
}
Note, however that I only recommend doing this if you're going to handle all fletching-related variables and methods in this class. If you're just going to handle them in the Client class, then just access them through the Fletching class, I recommend using this approach instead.
Code:
public class Fletching {
public static void stringBow(int bowId, Client client) {
//TODO - String bow, delete from inventory, etc.
}
}
The difference between the two is that the first passes on a Client parameter to the constructor, and stores it in the class. This allows for you to use that Client instance rather than passing one along to each method. It also allows you to store the variables for Fletching in the class.
The second approach, on the other hand passes nothing on to the constructor, and each of the methods requires a Client parameter. This should only be used if you're handling the Fletching variables in the Client class.