You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+11-11Lines changed: 11 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,7 +16,7 @@ Also, it sends some sensitive data that can be disabled from sending:
16
16
- List of plugins with versions
17
17
18
18
> NOTE: Inspector filters all tracked exceptions from console to not bother server owners.
19
-
But all plugin-related logs will be saved to log file in the plugin folder.
19
+
All plugin-related logs will be saved to log file in the plugin folder.
20
20
21
21
### Navigation
22
22
-[samples](samples): Samples of usage Inspector
@@ -25,15 +25,15 @@ But all plugin-related logs will be saved to log file in the plugin folder.
25
25
26
26
## For server owners
27
27
This is not a plugin and can't be installed with copying to `plugins` directory.
28
-
But you can configure it.
29
-
You can disable sending of information about server core and installed plugins in the `inspector.yml` that stored in directory of the each plugin that uses Inspector.
30
-
Also you can configure it globally in `plugins/Inspector/config.yml`.
28
+
29
+
You can disable sending of information about server core and installed plugins in the `inspector.yml` that stored in a directory of each plugin that uses Inspector.
30
+
Also, you can configure it globally in `plugins/Inspector/config.yml`.
31
31
32
32
### Config example
33
33
```yaml
34
34
Reporter:
35
35
enabled: true
36
-
# Here you can choose what you don't want to send
36
+
# Here you can choose what you want to send
37
37
data:
38
38
core: true # Info about server core
39
39
plugins: true # Plugins list
@@ -104,7 +104,7 @@ dependencies {
104
104
105
105
### Main plugin class modifications
106
106
107
-
First of all your current main plugin class should extend `PluginLifecycle` instead of `JavaPlugin`.
107
+
First, your current main plugin class should extend `PluginLifecycle` instead of `JavaPlugin`.
108
108
For example, this code:
109
109
```java
110
110
public class MyPlugin extends JavaPlugin {
@@ -122,19 +122,19 @@ public class MyPlugin extends PluginLifecycle {
122
122
}
123
123
```
124
124
125
-
If you doing in constructor any work that requires access to plugin's fields you can receive `UninitializedPropertyAccessException`.
126
-
To avoid it override method init() and do the work within:
125
+
If you're doing anything that requires access to plugin's methods in a constructor, you will get `UninitializedPropertyAccessException`.
126
+
To avoid this problem, override method `init()` and do the work within:
127
127
```java
128
128
public class MyPlugin extends PluginLifecycle {
129
129
@Override
130
130
public void init() {
131
-
// do some work
131
+
// do some work, using plugin's methods
132
132
}
133
133
}
134
134
```
135
135
136
-
When previous action done, you must create the new class extending `TrackedPlugin` that will be used as main plugin class and link it with the lifecycle.
137
-
Also you must override method `createReporter()`. Created reporter will be used for reporting errors.
136
+
Next, you must create the new class extending `TrackedPlugin` that will be used as main plugin class and link it with the lifecycle.
137
+
Also, you must override method `createReporter()`. The created reporter will be used for reporting errors.
138
138
Example:
139
139
```java
140
140
public class MyTrackedPlugin extends TrackedPlugin {
0 commit comments