2014-01-27 05:00:36 +01:00
|
|
|
package appeng.core.features.registries;
|
|
|
|
|
|
|
|
import net.minecraft.entity.player.EntityPlayer;
|
|
|
|
import appeng.api.features.IPlayerRegistry;
|
|
|
|
import appeng.core.WorldSettings;
|
|
|
|
|
|
|
|
public class PlayerRegistry implements IPlayerRegistry
|
|
|
|
{
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public int getID(String username)
|
|
|
|
{
|
|
|
|
return WorldSettings.getInstance().getPlayerID( username );
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public int getID(EntityPlayer player)
|
|
|
|
{
|
2014-02-09 02:34:52 +01:00
|
|
|
return WorldSettings.getInstance().getPlayerID( player.getCommandSenderName() );
|
2014-01-27 05:00:36 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public String getUsername(int id)
|
|
|
|
{
|
|
|
|
return WorldSettings.getInstance().getUsername( id );
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|