Skip to content

UCR v2.0.0 for EXILED 8.8.1

Compare
Choose a tag to compare
@FoxWorn3365 FoxWorn3365 released this 24 May 22:12
· 161 commits to main since this release
fe0ecf5

UncomplicatedCustomRoles v2.0.0 for EXILED 8.8.1

Finally a new version of the plugin came out (after only 2 months of work)!

What's new?

  • Added the infinite_stamina option to make roles not use stamina while running.
  • Changed the command system, now there's a parent command (ucr) with subcommands like list, spawn, etc.
  • Now the role inside outisde the default EXILED yaml config works correctly (yeah, even the scale!)
  • SCPs escape events are now evaulated by the plugin.
  • Added support for UncomplicatedCustomItems.
  • Added the sync option for the command ucr spawn.

Bug fix

  • Fixed the escaping bug: now you won't became the escaped role 190393243487293492872398792387 times (yee)
  • Fixed some skill issues in the APIs.
  • Now when you set a different scale in an external role you won't fall into the void!
  • The command ucr spawn now works.

Removed

  • Removed the CustomFiream feature as now we have UncomplicatedCustomItems.
  • Removed the nickname feature as it can be added with other plugins.

Developers changelog (IMPORTANT)

Yeah we made lots of changes also for the developers

Changed the API class name

Before that the main API file was UncomplicatedCustomRoles.API.Manager, now you must use UncomplicatedCustomRoles.API.Features.CustomRole only to manage the ICustomRole instances!
Examples at the end of the message

Removed the Event API

As UncomplicatedCustomRoles.API.Features.CustomRole now exists you can do a fast and easy check if a player have a custom role (and retrive the custom role) using your own registered events!
Examples at the end of the message

Removed the ExternalCustomRole and IExternalCustomRole class and interface

That's true!
Now we are using the built-in EXILED YAML parser so no more skill issues from YamlDotNet!

Changed the interfaces namespace

Before that the namespace was UncomplicatedCustomRoles.Structures for classes like ICustomRole and IUCREffect but now it's UncomplicatedCustomRoles.Interfaces

Removed Custom Roles handling for players from the APIs

But don't worry, now you can easily handle the custom roles for a player with the new built-in extension!
Examples at the end of the message

Now you can also not register a Custom Role

You'll have to register a custom role only if you want it to get evaluated while evaluating spawn roles for players. (So natural spawn).

EXAMPLES

Finally!

Check if a player has a custom role and retrive it

if (player.TryGetCustomRole(out ICustomRole role)) 
{
  Log.Info($"Player {player.Nickname} has a custom role!\nRole: {role.Id}");
}
else
{
  // Nah the player does not have the custom role :(
}

Set a custom role for a player

player.SetCustomRole(ICustomRole role);
player.SetCustomRole(int roleId);

Check if a custom role is registered and try to retrive it

// We'll try the custom role with the Id 25
if (UncomplicatedCustomRoles.API.Features.CustomRole.TryGet(25, out ICustomRole role)) 
{
  // Yeah the role exists!
}
else
{
  // Nop
}

Full Changelog: v1.8.0...v2.0.0
Discord server: https://discord.gg/dpvHzC5mst