Overriding/changing player respawn location?
NotBad
I am still in different position
object OnPlayerRespawned(BasePlayer player)
        {
            var vector = new Vector3(configData.x, 0, configData.z);
            vector.y = TerrainMeta.HeightMap.GetHeight(vector);
            return new BasePlayer.SpawnPoint() { pos = (Vector3)vector};
        }​

But when I do this command it works

        [ChatCommand("Hey")]
        void HelloCommand(BasePlayer player)
        {
            player.Teleport(new Vector3(configData.x, configData.y, configData.z));
        }

Because you are using hook the wrong way.
OnPlayerRespawn returns object (which may be a spawnpoint to override defaults)
OnPlayerRespawned returns void, you cannot change the spawnpoint in this hook!
Read the documentation more careful

5b6ed4c9ac8e4.jpg misticos
Create one then :)
void Init() => LoadVariables(); or with {}

No, no and no. Bad practice! Oxide provides special method LoadConfig which you can override in plugin, it is made specificly for this purpose, so you should prefer it over other ways. (Atleast at the point you start learning plugin development you should use recommended patterns)



Merged post

Example
	public class Example:CovalencePlugin
	{

		public class PluginSettings
		{
			[JsonProperty("Example config variable")]
			public bool ExampleConfigVariable { get; set; }
		}

		public PluginSettings Settings { get; set; }

		public PluginSettings GetDefaultConfig => new PluginSettings
		{
			// initialize stuff here
			ExampleConfigVariable = true
		};

		protected override void LoadDefaultConfig()
		{
			Settings = GetDefaultConfig;
			SaveConfig();
		}

		protected override void LoadConfig()
		{
			base.LoadConfig();
			try
			{
				Settings = Config.ReadObject();
				if(Settings == null /* if your config contains reference types, check them for null as well */)
				{
					throw new Exception("Something's wrong with config");
				}
			}
			catch(Exception ex)
			{
				PrintError(ex.Message);
				LoadDefaultConfig();
			}
		}

		protected override void SaveConfig() => Config.WriteObject(Settings);
	}
Sure it is bad practice, and I warned him about this method.
Okey it works, how can I clean playeres invenotry on spawn, so he doesnt have rock and torch
NotBad
Okey it works, how can I clean playeres invenotry on spawn, so he doesnt have rock and torch

Look into native game code, BasePlayer type (Assembly-CSharp.dll). Use IL decompiler.

Thanks I have one more question.

I have error in Containskey it says baseplayer does not contain definition for ContainsKey

if(player.ContainsKey(player)){
                return true;
            }else{
                return false;
            }
NotBad

Thanks I have one more question.

I have error in Containskey it says baseplayer does not contain definition for ContainsKey

if(player.ContainsKey(player)){
                return true;
            }else{
                return false;
            }

Why do you think it should?

And it doesn't, because there is no ContainsKey in BasePlayer. It's for dictionary
Okey, thanks for the information. I have one thing I am trying to do is so people spawn randomly in radius 10, how can I do it?
        object OnPlayerRespawn(BasePlayer player)
        {
            var vector = new Vector3(configData.x, 0, configData.z);
            vector.y = TerrainMeta.HeightMap.GetHeight(vector);
            return new BasePlayer.SpawnPoint() { pos = (Vector3)vector};
        }​
I am randomly selecting a position (see Power Spawn). You can just add to your X and Z like.. random value from -10 to 10

I need to know the command to change a players spawn location