#39: fix spelling, punctuation, and code-style

This commit is contained in:
2025-02-10 00:37:13 +01:00
parent 7efea34519
commit d515f0138c
+22 -15
View File
@@ -12,19 +12,23 @@
# [StaffChat](https://oskar3123.github.io/StaffChat)
Simple and highly configurable staffchat
Simple and highly configurable staff chat.
## Download
You can download the plugin from the [Spigot resource page](https://www.spigotmc.org/resources/37804/) or via the [GitHub releases](https://github.com/oskar3123/StaffChat/releases)
You can download the plugin from
the [Spigot resource page](https://www.spigotmc.org/resources/37804/) or via
the [GitHub releases](https://github.com/oskar3123/StaffChat/releases).
## License
This plugin is licensed with the MIT License, for more information see the [LICENSE file](https://github.com/oskar3123/StaffChat/blob/master/LICENSE)
This plugin is licensed with the MIT License, for more information see
the [LICENSE file](https://github.com/oskar3123/StaffChat/blob/master/LICENSE).
## Building
To build this yourself just clone the repository and run the `shadowJar` task with the Gradle Wrapper
To build this yourself just clone the repository and run the `shadowJar` task with the Gradle
Wrapper.
### Windows
@@ -46,52 +50,53 @@ cd StaffChat
### Bukkit/Spigot
Because the event API in 1.14+ is now strict between sync and async events you should check whether this was called synchronously or asynchronously by using `event.isAsynchronous()`
Because the event API in 1.14+ is now strict between sync and async events you should check whether
this was called synchronously or asynchronously by using `event.isAsynchronous()`.
```java
public class StaffChatListener implements Listener
{
public class StaffChatListener implements Listener {
@EventHandler
public void onStaffChat(StaffChatEvent event)
{
public void onStaffChat(StaffChatEvent event) {
// String format = event.getFormat();
// event.setFormat("&b{NAME} >> {MESSAGE}");
// String message = event.getMessage();
// Player player = event.getPlayer();
// event.setCancelled(true);
}
}
```
Register the listener with
```java
getServer().getPluginManager().registerEvents(new StaffChatListener(), this);
```
in your plugin onEnable.
### BungeeCord
```java
public class StaffChatListener implements Listener
{
public class StaffChatListener implements Listener {
@EventHandler
public void onStaffChat(BungeeStaffChatEvent event)
{
public void onStaffChat(BungeeStaffChatEvent event) {
// String format = event.getFormat();
// event.setFormat("&b{NAME} >> {MESSAGE}");
// String message = event.getMessage();
// Player player = event.getPlayer();
// event.setCancelled(true);
}
}
```
Register the listener with
```java
getProxy().getPluginManager().registerListener(this, new StaffChatListener());
```
in your plugin onEnable.
### Velocity
@@ -117,7 +122,9 @@ public class StaffChatListener {
}
}
```
Register the listener on the `ProxyInitializeEvent` in your plugin.
```java
@Plugin
public class Plugin {