kr4ken-9 / newessentials Goto Github PK
View Code? Open in Web Editor NEWThe Essential plugin for Unturned, built on OpenMod
License: GNU General Public License v3.0
The Essential plugin for Unturned, built on OpenMod
License: GNU General Public License v3.0
When finding users with the usermanager, we need to check if they are online before using them.
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!
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.
[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
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
Kits should have the option to be stored in MySQL databases instead of YAML files
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
[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
When u exit from the server and later reconnect all kits cooldowns restart to 0, with this people can farm kits unlimited
Always prints 0 items cleared even when this is not true.
From uEssentials
https://github.com/iceplugins/spawnpermissions
/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
Can you add an option to delay the teleportation of /tpaccept and /home commands.
Some permissions need to be registered to work with the new permission system
Having some trouble with it right now. Marking nullables as errors for some reason. Also issues with permissions which I think is related.
Create a permission for each new warp so that there is more control over who can use them
This should be fixed soon
Add ability to enable/disable certain components such as:
https://github.com/IcePlugins/AntiLock
People are still using this plugin and it is currently broken due to using an outdated Harmony version. Licensed under WTFPL.
Kit cooldowns are unnecessary and conflict with OpenMod permission cooldowns
There are issues with deserializing the SerializableVector3 with commands like /warp and /home
No reason to manage a dictionary like it does now, session data seems much more convenient
Same as #22
Hi, i saw that tphere dont works, in the server chat type {Player} has been tped to you but the player wasnt tped
Add configurable automated broadcasts
https://github.com/IcePlugins/SuperBroadcaster
Another essential utility
From uEssentials
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
Missed this from uEssentials. Pretty self-explanatory, toggles pvp on or off for the server.
Need to loop through Provider.clients and add keys when loaded.
In the future, convert to using User Session Data. (Or convert to this while fixing)
Commands which Nelson implemented:
Commands I think are stupid:
Commands which need to be implemented:
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.
[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.AsyncUniTask
1[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
Not sure if this is necessary due to this plugin/feature: https://github.com/openmod/OpenMod.Cooldowns
when u crate a kit, the things is been drop inmediatly and isnt equip automatically, please fix it
[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
https://github.com/IcePlugins/BreakAndEnter
This seems like an essential utility, and it's under a very permissive license
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.
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.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.