Skip to content

Commit 784d928

Browse files
authored
Update README.md
1 parent bfdd85a commit 784d928

1 file changed

Lines changed: 0 additions & 69 deletions

File tree

README.md

Lines changed: 0 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -147,72 +147,3 @@ public class TestListener implements Listener{
147147

148148
}
149149
```
150-
> Old Method
151-
152-
this method can also create a plugin:
153-
154-
1. First you need to create a plugin.yml
155-
156-
[@Deprecated]
157-
`now you can not create this file for the plugin,and use @Main instead`
158-
```yaml
159-
160-
name: pluginName
161-
main: Package.MainClass
162-
description: Description of the plugin.
163-
version: The version of the plugin.
164-
165-
```
166-
2. Create JSmod2 main class, and the main class you had been set in plugin.yml:
167-
```java
168-
package Package;
169-
/**
170-
* This is the main class
171-
*/
172-
public class MainClass extends PluginBase{
173-
174-
public void onLoad(){
175-
//The server is officially started before it can be registered.
176-
}
177-
178-
public void onEnable(){
179-
//The contents of the server startup, can be registered, initialized, etc.
180-
181-
}
182-
183-
public void onDisable(){
184-
//Running content when the server is shut down
185-
}
186-
}
187-
188-
```
189-
190-
191-
3.Register the Command and Listener:
192-
193-
[@Deprecated]
194-
`now you can not register the listener and command,use @EnableRegister instead`
195-
```java
196-
package Package;
197-
/**
198-
* This is the main class
199-
*/
200-
public class MainClass extends PluginBase{
201-
202-
public void onLoad(){
203-
//The server is officially started before it can be registered.
204-
}
205-
206-
public void onEnable(){
207-
//The contents of the server startup, can be registered, initialized, etc.
208-
this.getServer().getPluginManager().registerEvents(new TestListener(),this);
209-
this.getServer().getPluginManager().registerCommand(new TestCommand(this));
210-
}
211-
212-
public void onDisable(){
213-
//Running content when the server is shut down
214-
}
215-
}
216-
217-
```
218-

0 commit comments

Comments
 (0)