From 7dccecf6206f9008923bd0f182e2749f540ba762 Mon Sep 17 00:00:00 2001 From: ColdDev Date: Mon, 24 Oct 2022 18:22:00 +0100 Subject: [PATCH] chore(readme): add permissions and some extra instructions relating to Bungee --- README.md | 41 +++++++++++++++++++++++++++++---- src/main/java/uranium/Main.java | 1 + src/main/resources/plugin.yml | 23 +++++++++++++++++- 3 files changed, 59 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index fc25dc6..2faffdf 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ Uranium is a moderation utility built for Eaglercraft 1.8 servers. **THIS PLUGIN WILL NOT WORK ON CRAFTBUKKIT 1.5.2, SO DO NOT TRY IT!** -## How to Install +# How to Install - Download the latest jarfile from the Releases page - Drag and drop into your **1.8.8 server**'s plugin folder - Restart, **not reload**, your server @@ -10,10 +10,41 @@ Uranium is a moderation utility built for Eaglercraft 1.8 servers. **THIS PLUGIN - ???? - Profit -## IP Banning +# Bungee Configuration -Since Eaglercraft uses a different protocol, getting IP addresses via Bukkit's normal methods is not possible. For this reason, Uranium utilizes plugin messaging. +Certain features of Uranium require modifications to the Bungee config. -Additionally, IP banning is done at the Bungee level, which means that you need to modify your EaglerBungee config for this portion of the plugin to work as expected. +### IP Banning -You will need to modify `accept_bukkit_console_command_packets` in your Bungee configuration, and set it to `true`. This is to allow IP banning from in-game. \ No newline at end of file +The first modification you will need to make is allowing Bukkit to send console command packets to Bungee via plugin messaging. + +To do this, go to your Bungee config, and set `accept_bukkit_console_command_packets` to `true`. + +### IP/Domain + +For commands like `/ip` and `/domain` to work, you will need to disable the Bungee versions of those commands. + +To do this, just add `ip` and `domain` to `disabled_commands` in the Bungee config, like this: +```yaml +disabled_commands: +- ip +- domain +``` + +**Note**: These commands will still work in console, they will just not work in-game. + +# Permissions + +| Permission | Description | +|---------------------------|-----------------------------------------------------------------------------------------------------------| +| uranium.notify | Receive all staff-only alerts, such as suspicious domains. | +| uranium.bypass | Bypass the chat filter. | +| uranium.reload | Reload the plugin configuration file. | +| uranium.banip | Will allow any user with this permission to IP ban users online. | +| uranium.banip.exempt | Allows the user to be made exempt from the above command. | +| uranium.ip | Gives the user the ability to view any user's IP. Half of the IP will be censored for user privacy. | +| uranium.ip.full | Instead of half the IP being censored, having this permission will allow the user to view the whole IP. | +| uranium.domain | Gives the user the ability to view any user's domain. | +| uranium.vanish | Allows the user to vanish, making them invisible to everyone except other users who have this permission. | +| uranium.commandspy | Gives the user access to spy on other user commands. | +| uranium.commandspy.exempt | Makes the user exempt from their commands showing up on command spy. | \ No newline at end of file diff --git a/src/main/java/uranium/Main.java b/src/main/java/uranium/Main.java index 340c623..5a6669f 100644 --- a/src/main/java/uranium/Main.java +++ b/src/main/java/uranium/Main.java @@ -36,6 +36,7 @@ public class Main extends JavaPlugin implements PluginMessageListener { } private void setupCommands() { + getLogger().info("Initializing commands..."); getCommand("ubanip").setExecutor(new BanIP(this)); getCommand("ip").setExecutor(new IP(this)); getCommand("domain").setExecutor(new Domain(this)); diff --git a/src/main/resources/plugin.yml b/src/main/resources/plugin.yml index daa06e4..ec338f4 100644 --- a/src/main/resources/plugin.yml +++ b/src/main/resources/plugin.yml @@ -3,4 +3,25 @@ version: 1.0-LITE main: uranium.Main description: A moderation utility for Eaglercraft 1.8 servers. author: Cold -softdepend: [PlaceholderAPI] \ No newline at end of file +softdepend: [PlaceholderAPI] +commands: + uranium: + description: Reload the plugin config file. + permission: uranium.reload + domain: + description: View the domain that a user is using. + permission: uranium.domain + ip: + description: View the IP address that a user is using to connect. + permission: uranium.ip + vanish: + aliases: [v] + description: Disappear into thin air. Poof! + permission: uranium.vanish + commandspy: + aliases: [cspy, cs] + description: Spy on player commands. + permission: uranium.commandspy + ubanip: + description: Ban users by IP. + permission: uranium.banip \ No newline at end of file