Skip to content

Commit

Permalink
fix broken formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
phinner committed May 1, 2022
1 parent b40b60e commit 1438d8e
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ repositories {
dependencies {
// Add "-SNAPSHOT" after the version if you are using the snapshot repository
compileOnly("fr.xpdustry:flex:0.1.0" )
compileOnly("fr.xpdustry:flex:0.1.0")
}
```

Expand All @@ -78,16 +78,16 @@ It will pull the plugin from the Xpdustry maven repo.
Then, to add a new Flex handler, do the following :

```java
FlexPlugin plugin=FlexPlugin.getInstance(); // Get the plugin
FlexHandlerManager manager=plugin.getFlexHandlerManager(); // Get the Flex handler manager
FlexPlugin plugin = FlexPlugin.getInstance(); // Get the plugin
FlexHandlerManager manager = plugin.getFlexHandlerManager(); // Get the Flex handler manager
// Register a new handler
manager.registerFlexHandler("your-plugin-internal-name:admin-prefix",(name,uuid,message)->{
if(Vars.netServer.admins.getInfo(uuid).admin){
return"";
}else{
return null;
}
})
manager.registerFlexHandler("your-plugin-internal-name:admin-prefix", (name, uuid, message) -> {
if (Vars.netServer.admins.getInfo(uuid).admin) {
return "";
} else {
return null;
}
})
```

You may be wondering why I return an empty string or null, it's because a component is ignored if
Expand Down

0 comments on commit 1438d8e

Please sign in to comment.