Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
G
Grasscutter
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
ziqian zhang
Grasscutter
Commits
e2cfe94b
Commit
e2cfe94b
authored
3 years ago
by
KingRainbow44
Browse files
Options
Downloads
Patches
Plain Diff
Add `loadAfter` plugin setting
parent
63b6b805
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
plugin-schema.json
+59
-45
59 additions, 45 deletions
plugin-schema.json
src/main/java/emu/grasscutter/plugin/PluginConfig.java
+2
-0
2 additions, 0 deletions
src/main/java/emu/grasscutter/plugin/PluginConfig.java
with
61 additions
and
45 deletions
plugin-schema.json
+
59
−
45
View file @
e2cfe94b
...
@@ -9,7 +9,11 @@
...
@@ -9,7 +9,11 @@
"pattern"
:
"^[A-Za-z
\\
d_.-]+$"
"pattern"
:
"^[A-Za-z
\\
d_.-]+$"
}
}
},
},
"required"
:
[
"name"
,
"description"
,
"mainClass"
],
"required"
:
[
"name"
,
"description"
,
"mainClass"
],
"properties"
:
{
"properties"
:
{
"name"
:
{
"name"
:
{
"description"
:
"The unique name of plugin."
,
"description"
:
"The unique name of plugin."
,
...
@@ -22,7 +26,10 @@
...
@@ -22,7 +26,10 @@
},
},
"version"
:
{
"version"
:
{
"description"
:
"A plugin revision identifier."
,
"description"
:
"A plugin revision identifier."
,
"type"
:
[
"string"
,
"number"
]
"type"
:
[
"string"
,
"number"
]
},
},
"description"
:
{
"description"
:
{
"description"
:
"Human readable plugin summary."
,
"description"
:
"Human readable plugin summary."
,
...
@@ -44,6 +51,13 @@
...
@@ -44,6 +51,13 @@
"description"
:
"The URL to the plugin's site"
,
"description"
:
"The URL to the plugin's site"
,
"type"
:
"string"
,
"type"
:
"string"
,
"format"
:
"uri"
"format"
:
"uri"
},
"loadAfter"
:
{
"description"
:
"Plugins to load before this plugin."
,
"type"
:
"array"
,
"items"
:
{
"type"
:
"string"
}
}
}
}
}
}
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
src/main/java/emu/grasscutter/plugin/PluginConfig.java
+
2
−
0
View file @
e2cfe94b
...
@@ -7,11 +7,13 @@ public final class PluginConfig {
...
@@ -7,11 +7,13 @@ public final class PluginConfig {
public
String
name
,
description
,
version
;
public
String
name
,
description
,
version
;
public
String
mainClass
;
public
String
mainClass
;
public
String
[]
authors
;
public
String
[]
authors
;
public
String
[]
loadAfter
;
/**
/**
* Attempts to validate this config instance.
* Attempts to validate this config instance.
* @return True if the config is valid, false otherwise.
* @return True if the config is valid, false otherwise.
*/
*/
@SuppressWarnings
(
"BooleanMethodIsAlwaysInverted"
)
public
boolean
validate
()
{
public
boolean
validate
()
{
return
name
!=
null
&&
description
!=
null
&&
mainClass
!=
null
;
return
name
!=
null
&&
description
!=
null
&&
mainClass
!=
null
;
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment