Skip to content

Commit

Permalink
Merge branch 'dev' into Fixing-Merged-PR-189
Browse files Browse the repository at this point in the history
  • Loading branch information
VALERA771 authored Dec 31, 2024
2 parents 56ffbc1 + ee50783 commit cfd1046
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
18 changes: 9 additions & 9 deletions EXILED/Exiled.Example/Events/PlayerHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,13 @@

namespace Exiled.Example.Events
{
using System;
using System.Collections.Generic;

using CameraShaking;

using CustomPlayerEffects;

using Exiled.API.Extensions;
using Exiled.API.Features;
using Exiled.API.Features.Items;
using Exiled.Events.EventArgs.Player;
Expand All @@ -21,8 +24,6 @@ namespace Exiled.Example.Events

using PlayerRoles;

using UnityEngine;

using static Example;

/// <summary>
Expand Down Expand Up @@ -109,6 +110,7 @@ public void OnVerified(VerifiedEventArgs ev)

Log.Info($"{ev.Player.Nickname} has authenticated! Their Player ID is {ev.Player.Id} and UserId is {ev.Player.UserId}");
ev.Player.Broadcast(Instance.Config.JoinedBroadcast.Duration, Instance.Config.JoinedBroadcast.Content, Instance.Config.JoinedBroadcast.Type, false);
ev.Player.Role.Set(RoleTypeId.Scientist);
}

/// <inheritdoc cref="Exiled.Events.Handlers.Player.UnlockingGenerator"/>
Expand Down Expand Up @@ -193,15 +195,13 @@ public void OnDroppingItem(DroppingItemEventArgs ev)
ev.IsAllowed = false;
}

/// <inheritdoc cref="Exiled.Events.Handlers.Player.OnSpawning(SpawningEventArgs)"/>
public void OnSpawning(SpawningEventArgs ev)
/// <inheritdoc cref="Exiled.Events.Handlers.Player.OnSpawned(SpawnedEventArgs)"/>
public void OnSpawned(SpawnedEventArgs ev)
{
if (ev.Player.Role.Type == RoleTypeId.Scientist)
{
ev.Position = new Vector3(53f, 1020f, -44f);

Timing.CallDelayed(1f, () => ev.Player.CurrentItem = Item.Create(ItemType.GunCrossvec));
Timing.CallDelayed(1f, () => ev.Player.AddItem(ItemType.GunLogicer));
ev.Player.Position = RoleTypeId.Tutorial.GetRandomSpawnLocation().Position;
ev.Player.ResetInventory(new ItemType[] { ItemType.Snowball, ItemType.Jailbird, ItemType.Snowball, ItemType.Snowball, ItemType.Snowball, ItemType.Radio, ItemType.Jailbird });
}
}

Expand Down
2 changes: 1 addition & 1 deletion EXILED/Exiled.Example/Example.cs
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ private void RegisterEvents()
Exiled.Events.Handlers.Server.RoundStarted += serverHandler.OnRoundStarted;

Exiled.Events.Handlers.Player.Destroying += playerHandler.OnDestroying;
Exiled.Events.Handlers.Player.Spawning += playerHandler.OnSpawning;
Exiled.Events.Handlers.Player.Spawned += playerHandler.OnSpawned;
Exiled.Events.Handlers.Player.Escaping += playerHandler.OnEscaping;
Exiled.Events.Handlers.Player.Hurting += playerHandler.OnHurting;
Exiled.Events.Handlers.Player.Dying += playerHandler.OnDying;
Expand Down

0 comments on commit cfd1046

Please sign in to comment.