The only nice way I can think of is actually not an extension but a wrapper:
class Player {
private final static Charachter me = new Character();
public static doSomething(){ me.doSomething(); }
}
Of course you can also extend AND wrap:
class Player extends Character {
private final static Player me = new Player();
// if you don't want anyone creating player objects
// make the constructor private:
private Player(){ super(); }
public void doSomething(){
// stuff
}
public static void staticDoSomething(){ me.doSomething(); }
}
Or, actually, since your goal is just to guarantee that there is a single player object, you can forget about making the methods static, but hide the constructor(s):
class Player extends Character {
private static Player thePlayer = null;
public static Player getPlayer(){
if( thePlayer == null ){
// Create the player
thePlayer = new Player();
}
// There is a valid player object, so return it.
return thePlayer;
}
// hide the constructor(s) by making them private:
private Player(){ super(); }
}
That ensures that the only way to get a Player is to call Player.getPlayer(), and that it always gives you the same object (you never create more than one).