Aurora-Gaming / PermabuffsV2

Updated version of Permabuffs plugin
12 stars 16 forks source link

NullReferenceException at OnGreet and and OnLeave #4

Closed moisterrific closed 4 years ago

moisterrific commented 4 years ago

Whenever a player joins or leaves the server, the plugin throws an unhandled null reference exception. but there were no errors when I compiled it. Also trying to use the basic /permabuffs command shows command failed and also throws null reference exception.

For reference I'm running TShock Bellatrix (mobile port, TShock v4.3.26 on 1.3.0.7 compatible OTAPI)

Compiled it directly from the files on GitHub, only things I've changed in the code were outdated references such as User.ID (as TSPlayer no longer has that) to Account.ID and TShock.Utils.SendMultipleMatchError to args.Player.SendMultipleMatchError

[Server API] Warning: Plugin "Permabuffs" has had an unhandled exception thrown by one of its NetGreetPlayer handlers: 
System.NullReferenceException: Object reference not set to an instance of an object.
   at Permabuffs_V2.Permabuffs.OnGreet(GreetPlayerEventArgs args)
   at TerrariaApi.Server.HandlerCollection`1.Invoke(ArgsType args)
moisterrific commented 4 years ago

Fixed in https://github.com/Zaicon/PermabuffsV2/commit/0e406dca543879cc8439f94febaa059922dfd0ff