TSHOCKPLUGINS-9 #close fixed Fixed.
Workaround for REST meteor null reference exception crash. Requires an initializer for genRand if using any WorldGen methods in the future.
This commit is contained in:
parent
946bf2ad49
commit
714746ab6c
1 changed files with 4 additions and 4 deletions
|
|
@ -428,11 +428,11 @@ namespace TShockAPI
|
|||
|
||||
private object WorldMeteor(RestVerbs verbs, IParameterCollection parameters)
|
||||
{
|
||||
if (WorldGen.genRand == null)
|
||||
WorldGen.genRand = new Random();
|
||||
WorldGen.dropMeteor();
|
||||
var returnBlock = new Dictionary<string, string>();
|
||||
returnBlock.Add("status", "200");
|
||||
returnBlock.Add("response", "Meteor has been spawned.");
|
||||
return returnBlock;
|
||||
var returnBlock = new Dictionary<string, string> {{"status", "200"}, {"response", "Meteor has been spawned."}};
|
||||
return returnBlock;
|
||||
}
|
||||
|
||||
private object WorldBloodmoon(RestVerbs verbs, IParameterCollection parameters)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue