Coder Social home page Coder Social logo

newessentials's Introduction

NewEssentials

The new essential plugin for Unturned. This project aims to be a replacement for uEssentials built on OpenMod.

Current Features

Planned Features

See the issue tracker and milestones to get an idea of the plans for this project. Some are outlined below:

  • Implement permissively licensed essential plugins
  • Support MySQL data stores
  • Moderation

Special Thanks

newessentials's People

Contributors

archie426 avatar charterino avatar cyberandrii avatar diffoz avatar eiromplays avatar ggrandma avatar iamsilk avatar kr4ken-9 avatar nazmiyigitefe avatar nuage00 avatar trojaner avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

newessentials's Issues

Exception on user connect

[14:32:27 INF][SDG.Unturned] Connecting: PlayerID: 76561198138667988 Name: SilK Character: SilK
[14:32:27 ERR][OpenMod.Core.Eventing.EventBus] Exception occured during event UnturnedUserConnected
System.ArgumentException: An item with the same key has already been added. Key: lastMovement
  at System.Collections.Generic.Dictionary`2[TKey,TValue].TryInsert (TKey key, TValue value, System.Collections.Generic.InsertionBehavior behavior) [0x000c1] in <eae584ce26bc40229c1b1aa476bfa589>:0
  at System.Collections.Generic.Dictionary`2[TKey,TValue].Add (TKey key, TValue value) [0x00000] in <eae584ce26bc40229c1b1aa476bfa589>:0
  at NewEssentials.Players.AfkChecker+<PlayerJoin>d__13.MoveNext () [0x000a3] in <79202660374d463aac7eb86420e7fd30>:0
--- End of stack trace from previous location where exception was thrown ---
  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <eae584ce26bc40229c1b1aa476bfa589>:0
  at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0003e] in <eae584ce26bc40229c1b1aa476bfa589>:0
  at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in <eae584ce26bc40229c1b1aa476bfa589>:0
  at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in <eae584ce26bc40229c1b1aa476bfa589>:0
  at System.Runtime.CompilerServices.TaskAwaiter.GetResult () [0x00000] in <eae584ce26bc40229c1b1aa476bfa589>:0
  at OpenMod.Core.Eventing.EventBus+<EmitAsync>d__13.MoveNext () [0x00394] in <1d9eafe1055147818e4fd0269e7d2150>:0

/pvp <on/off>

Missed this from uEssentials. Pretty self-explanatory, toggles pvp on or off for the server.

/item needs some polishing

uEssentials had great /i command for example

-When spawning something by name it would output the id

-/i "bootleeed water" would still spawn you a Bottled Water so when using "" it would be cool if it matched the closest item by name

-For example /i roll in uEssentials spawns a black bedroll since it's the first matching id in game and Newessentials spawns a red one for some reason same with /i drum uEssentials spawned military drum and Newssentials spawns ranger one

It's even worse with for example /i colt Newessentials spawns 1911 magazine instead off colt

Some integrations rely on getting it right like shops and literary 4 years of muscle memory for some players

-Rich colored output would be a nice touch

Fix C# Nullables

Having some trouble with it right now. Marking nullables as errors for some reason. Also issues with permissions which I think is related.

kits cooldowns issues

When u exit from the server and later reconnect all kits cooldowns restart to 0, with this people can farm kits unlimited

Kits Improvements

Kits should have the option to be stored in MySQL databases instead of YAML files

Commands Not Working Properly

TPHere <Name> always teleports you to yourself
God doesn't prevent you from dying from explosions, radiation, (probably hunger/thirst as well)
Heal only heals health, broken bones, and bleeding. (unless it isn't supposed to max out your oxygen, hunger, thirst, and radiation)
Set (Home) doesn't do anything

Teleport Delays

Can you add an option to delay the teleportation of /tpaccept and /home commands.

/clear inventory not clearing all the inventory

When I use /clear inventory to clean my inventory, it keeps most of the items. I have to use it like 4 or 5 times (depends of how much items I have in my inventory) to clear all the inventory.

Update OpenMod libs

[23:17:26 ERR][OpenMod.Core.Plugins.PluginActivator] Failed to load plugin from type: NewEssentials.NewEssentials in ass
embly: NewEssentials, Version=1.0.3.0, Culture=neutral, PublicKeyToken=null
Autofac.Core.DependencyResolutionException: An exception was thrown while activating NewEssentials.NewEssentials. ---> A
utofac.Core.DependencyResolutionException: None of the constructors found with 'Autofac.Core.Activators.Reflection.Defau
ltConstructorFinder' on type 'NewEssentials.NewEssentials' can be invoked with the available services and parameters:
Cannot resolve parameter 'Microsoft.Extensions.Localization.IStringLocalizer stringLocalizer' of constructor 'Void .ctor
(IStringLocalizer, IConfiguration, IUserDataStore, ITeleportRequestManager, IDataStore, IBroadcastingService, IAfkChecke
r, IPermissionRegistry, IServiceProvider)'.
  at Autofac.Core.Activators.Reflection.ReflectionActivator.GetValidConstructorBindings (System.Reflection.ConstructorIn
fo[] availableConstructors, Autofac.IComponentContext context, System.Collections.Generic.IEnumerable`1[T] parameters) [
0x000b3] in <0e43922c38cb4505ab27fe9ce1207b2d>:0
  at Autofac.Core.Activators.Reflection.ReflectionActivator.ActivateInstance (Autofac.IComponentContext context, System.
Collections.Generic.IEnumerable`1[T] parameters) [0x00090] in <0e43922c38cb4505ab27fe9ce1207b2d>:0
  at Autofac.Core.Resolving.InstanceLookup.CreateInstance (System.Collections.Generic.IEnumerable`1[T] parameters) [0x00
02b] in <0e43922c38cb4505ab27fe9ce1207b2d>:0
   --- End of inner exception stack trace ---
  at Autofac.Core.Resolving.InstanceLookup.CreateInstance (System.Collections.Generic.IEnumerable`1[T] parameters) [0x00
061] in <0e43922c38cb4505ab27fe9ce1207b2d>:0
  at Autofac.Core.Resolving.InstanceLookup.<Execute>b__8_0 () [0x00007] in <0e43922c38cb4505ab27fe9ce1207b2d>:0
  at Autofac.Core.Lifetime.LifetimeScope.CreateSharedInstance (System.Guid id, System.Func`1[TResult] creator) [0x00033]
 in <0e43922c38cb4505ab27fe9ce1207b2d>:0
  at Autofac.Core.Lifetime.LifetimeScope.CreateSharedInstance (System.Guid primaryId, System.Nullable`1[T] qualifyingId,
 System.Func`1[TResult] creator) [0x00017] in <0e43922c38cb4505ab27fe9ce1207b2d>:0
  at Autofac.Core.Resolving.InstanceLookup.Execute () [0x000df] in <0e43922c38cb4505ab27fe9ce1207b2d>:0
  at Autofac.Core.Resolving.ResolveOperation.GetOrCreateInstance (Autofac.Core.ISharingLifetimeScope currentOperationSco
pe, Autofac.ResolveRequest request) [0x00075] in <0e43922c38cb4505ab27fe9ce1207b2d>:0
  at Autofac.Core.Resolving.ResolveOperation.ResolveComponent (Autofac.ResolveRequest request) [0x00000] in <0e43922c38c
b4505ab27fe9ce1207b2d>:0
  at Autofac.Core.Resolving.ResolveOperation.Execute (Autofac.ResolveRequest request) [0x00015] in <0e43922c38cb4505ab27
fe9ce1207b2d>:0
  at Autofac.Core.Lifetime.LifetimeScope.ResolveComponent (Autofac.ResolveRequest request) [0x00033] in <0e43922c38cb450
5ab27fe9ce1207b2d>:0
  at Autofac.ResolutionExtensions.TryResolveService (Autofac.IComponentContext context, Autofac.Core.Service service, Sy
stem.Collections.Generic.IEnumerable`1[T] parameters, System.Object& instance) [0x0002d] in <0e43922c38cb4505ab27fe9ce12
07b2d>:0
  at Autofac.ResolutionExtensions.ResolveService (Autofac.IComponentContext context, Autofac.Core.Service service, Syste
m.Collections.Generic.IEnumerable`1[T] parameters) [0x00030] in <0e43922c38cb4505ab27fe9ce1207b2d>:0
  at Autofac.ResolutionExtensions.Resolve (Autofac.IComponentContext context, System.Type serviceType, System.Collection
s.Generic.IEnumerable`1[T] parameters) [0x00007] in <0e43922c38cb4505ab27fe9ce1207b2d>:0
  at Autofac.ResolutionExtensions.Resolve (Autofac.IComponentContext context, System.Type serviceType) [0x00000] in <0e4
3922c38cb4505ab27fe9ce1207b2d>:0
  at OpenMod.Core.Plugins.PluginActivator+<TryActivatePluginAsync>d__10.MoveNext () [0x00131] in <21ea4cf456254c2b98ca7c
302be2c7e3>:0

Implement Commands

  • Max Skills
  • Home
    • Set Home
    • Delete Home
    • Homes
  • Tpa
    • Send
    • Accept
    • Reject
  • Items
    • /i
    • Give Item (To Other Players)
  • Vehicles
    • /v
    • Give Vehicle
  • Messages
    • Send
    • Reply
  • Back
  • Ascend
  • Boom
  • Heal
  • Clear
    • Items
    • Vehicles
    • Empty Vehicles
    • Inventory
  • Warps
    • Add
    • Delete
    • Warp
    • List
  • Descend
  • Experience
  • Freezing
    • Freeze
    • Unfreeze
  • Repair
    • Item
    • Vehicle
  • Refuel
    • Generator
    • Vehicle
    • Tank
    • Oil
  • Jump
  • Respawn
    • Vehicles
    • Animals
    • Zombies
  • Reputation
  • Position

Fix Permissions

Some permissions need to be registered to work with the new permission system

  • /reputation
  • /experience
  • /reputation
  • AfkChecker

Kits System

Kits will be YAML-based. Anyone should be able to edit raw YAML files. It's really easy. Commands for editing the YAML files will come later if they prove to be necessary.

  • Commands
    • /kit
      • create
      • remove
    • /kits
  • Cooldowns

Super Broadcaster Autofac Error

[2020-07-16 10:14:51 ERR][OpenMod.Core.Commands.CommandExecutor] Exception occured on command "superbroadcast" by actor player/Vac Efron (76561198079483032)
Autofac.Core.DependencyResolutionException: An exception was thrown while activating λ:NewEssentials.API.Chat.IBroadcastingService -> λ:NewEssentials.API.Chat.IBroadcastingService -> λ:NewEssentials.Chat.BroadcastingService -> NewEssentials.Chat.BroadcastingService. ---> Autofac.Core.DependencyResolutionException: None of the constructors found with 'Autofac.Core.Activators.Reflection.DefaultConstructorFinder' on type 'NewEssentials.Chat.BroadcastingService' can be invoked with the available services and parameters:
Cannot resolve parameter 'OpenMod.API.Plugins.IPluginAccessor`1[[NewEssentials.NewEssentials, NewEssentials, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null]] plugin' of constructor 'Void .ctor(IConfiguration, IPluginAccessor`1)'.
  at Autofac.Core.Activators.Reflection.ReflectionActivator.GetValidConstructorBindings (System.Reflection.ConstructorInfo[] availableConstructors, Autofac.IComponentContext context, System.Collections.Generic.IEnumerable`1[T] parameters) [0x000b3] in <0e43922c38cb4505ab27fe9ce1207b2d>:0 
  at Autofac.Core.Activators.Reflection.ReflectionActivator.ActivateInstance (Autofac.IComponentContext context, System.Collections.Generic.IEnumerable`1[T] parameters) [0x00090] in <0e43922c38cb4505ab27fe9ce1207b2d>:0 
  at Autofac.Core.Resolving.InstanceLookup.CreateInstance (System.Collections.Generic.IEnumerable`1[T] parameters) [0x0002b] in <0e43922c38cb4505ab27fe9ce1207b2d>:0 
   --- End of inner exception stack trace ---
  at Autofac.Core.Resolving.InstanceLookup.CreateInstance (System.Collections.Generic.IEnumerable`1[T] parameters) [0x00061] in <0e43922c38cb4505ab27fe9ce1207b2d>:0 
  at Autofac.Core.Resolving.InstanceLookup.Execute () [0x000a7] in <0e43922c38cb4505ab27fe9ce1207b2d>:0 
  at Autofac.Core.Resolving.ResolveOperation.GetOrCreateInstance (Autofac.Core.ISharingLifetimeScope currentOperationScope, Autofac.ResolveRequest request) [0x00075] in <0e43922c38cb4505ab27fe9ce1207b2d>:0 
  at Autofac.Core.Resolving.ResolveOperation.ResolveComponent (Autofac.ResolveRequest request) [0x00000] in <0e43922c38cb4505ab27fe9ce1207b2d>:0 
  at Autofac.Core.Resolving.ResolveOperation.Execute (Autofac.ResolveRequest request) [0x00015] in <0e43922c38cb4505ab27fe9ce1207b2d>:0 
  at Autofac.Core.Lifetime.LifetimeScope.ResolveComponent (Autofac.ResolveRequest request) [0x00033] in <0e43922c38cb4505ab27fe9ce1207b2d>:0 
  at Autofac.ResolutionExtensions.TryResolveService (Autofac.IComponentContext context, Autofac.Core.Service service, System.Collections.Generic.IEnumerable`1[T] parameters, System.Object& instance) [0x0002d] in <0e43922c38cb4505ab27fe9ce1207b2d>:0 
  at Autofac.ResolutionExtensions.ResolveOptionalService (Autofac.IComponentContext context, Autofac.Core.Service service, System.Collections.Generic.IEnumerable`1[T] parameters) [0x00030] in <0e43922c38cb4505ab27fe9ce1207b2d>:0 
  at Autofac.ResolutionExtensions.ResolveOptional (Autofac.IComponentContext context, System.Type serviceType, System.Collections.Generic.IEnumerable`1[T] parameters) [0x00007] in <0e43922c38cb4505ab27fe9ce1207b2d>:0 
  at Autofac.ResolutionExtensions.ResolveOptional (Autofac.IComponentContext context, System.Type serviceType) [0x00000] in <0e43922c38cb4505ab27fe9ce1207b2d>:0 
  at Autofac.Extensions.DependencyInjection.AutofacServiceProvider.GetService (System.Type serviceType) [0x00000] in <16a35dbb7431401d8dbe5b3f3333870c>:0 
  at Microsoft.Extensions.DependencyInjection.ActivatorUtilities+ConstructorMatcher.CreateInstance (System.IServiceProvider provider) [0x0001c] in <6d11a612ec1e407b9a6674a2353fb9de>:0 
  at Microsoft.Extensions.DependencyInjection.ActivatorUtilities.CreateInstance (System.IServiceProvider provider, System.Type instanceType, System.Object[] parameters) [0x000c3] in <6d11a612ec1e407b9a6674a2353fb9de>:0 
  at OpenMod.Core.Commands.OpenModComponentBoundCommandRegistration.Instantiate (System.IServiceProvider serviceProvider) [0x0001a] in <7c5424964c854b5e8a34fa5e4fb82f2c>:0 
  at OpenMod.Core.Commands.CommandExecutor+<ExecuteAsync>d__6.MoveNext () [0x00331] in <7c5424964c854b5e8a34fa5e4fb82f2c>:0 

tphere bug

Hi, i saw that tphere dont works, in the server chat type {Player} has been tped to you but the player wasnt tped

maxspawnamount uses unsigned byte

maxspawnamount is limited to only 255

This is too small for creative servers for example when you want to spawn 500 scrap for a team to build etc

Review Afk Checker

Possibly convert to just a long-running task instead of a service? Now that it is using session data there is not much reason for it to be a service. (Besides decoupling?)

Right now it's kind of messy to configure it as a service. I would like to hear opinions on whether it should remain a service or not.

TPA Improvements

  • No Combat TPA
  • Configurable TPA Wait
  • Cancel TPA while waiting if damaged/causes damage
  • Cancel TPA while waiting if user moves
  • Notifications
  • Remaining time error message
  • TPAHere

"/clear vehicle" quality of life improvements

Heyo!

Jumping on the bandwagon of "adding stuff to replace uEssentials"...

uEssentials' vehicle clearing command takes a "range" parameter, which is super useful for just clearing a single vehicle or a couple somewhere in a garage or car park. It's pretty rubbish though and has a few issues so it might be better that in the case it's ported over to NewEssentials, it be something like "/clear v nearest" to clear the nearest vehicle, or "/clear v nearest 10" for the 10 nearest vehicles. Whatever's easiest to implement with OpenMod's API I suppose, I haven't had too much a look into how it works.

Also, quick side note, uEssentials also had a command alias for inventory clearing, which was just "/ci". Something similar would be greatly appreciated : ). I might do a pull request and add "/clear inv" or something similar.

Thanks!

Implement RocketMod Commands

Commands which Nelson implemented:

  • Admin
  • Broadcast
  • Unadmin
  • TP/Teleport

Commands I think are stupid:

  • Exit

Commands which need to be implemented:

  • Effect
  • Compass
  • God
  • Heal
  • Home
  • I/Item
  • Investigate
  • More
  • TpHere/Teleport Here
  • V/Vehicle
  • Vanish

/jump Ignores Ground

/jump works for jumping to any type of object except the ground. It will say you are not looking at anything, which means Physics.Raycast returned false or hit.transform was null.

99% sure it's a layermask issue. Looking at Unturned's code we are using the correct layermask for detecting the ground though. Pretty frustrating

AFK Checker Improvements

  • Make singleton
  • Initialize on plugin load
  • Make plugin agnostic
  • Add option to send chat messages
  • Add translations

kits issues

when u crate a kit, the things is been drop inmediatly and isnt equip automatically, please fix it

Home Improvements

  • Limit homes by permission
  • Delete Home
    • Delete other people's homes
  • List Homes
    • List other people's homes

AfkChecker permissions not registered

[20:58:31 ERR][] Exception occured in task "NewEssentials::AfkChecker"
System.Exception: Permission is not registered: afkchecker.exempt
at OpenMod.Core.Permissions.PermissionChecker+d__12.MoveNext () [0x0005f] in :0
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in :0
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0003e] in :0
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in :0
at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in :0
at System.Runtime.CompilerServices.TaskAwaiter1[TResult].GetResult () [0x00000] in <e1319b7195c343e79b385cd3aa43f5dc>:0 at NewEssentials.Players.AfkChecker+<CheckAfkPlayers>d__10.MoveNext () [0x001fc] in <84e95df9db6443198700ff41ab9565da>:0 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <e1319b7195c343e79b385cd3aa43f5dc>:0 at Cysharp.Threading.Tasks.CompilerServices.AsyncUniTask1[TStateMachine].GetResult (System.Int16 token) [0x00000] in <79e9ff4795d74af7ae08bb6e8b497923>:0
at NewEssentials.Players.AfkChecker+<<-ctor>b__8_1>d.MoveNext () [0x00065] in <84e95df9db6443198700ff41ab9565da>:0
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in :0
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0003e] in :0
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in :0
at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in :0
at System.Runtime.CompilerServices.TaskAwaiter.GetResult () [0x00000] in :0
at OpenMod.Core.Helpers.AsyncHelper+<>c__DisplayClass5_0+<b__0>d.MoveNext () [0x0006d] in :0

Cleanup TODOs

Trying to push a 1.0 close to when OpenMod releases, there are lots of things that need polishing or straight up bugs that need to be fixed. They should be added to the issue tracker and then promptly resolved.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.