Skip to content

Commit

Permalink
Updated Readme and a few bits and bobs
Browse files Browse the repository at this point in the history
  • Loading branch information
p0t4t0sandwich committed Jun 2, 2023
1 parent 7cb2c8f commit da45919
Show file tree
Hide file tree
Showing 7 changed files with 743 additions and 5 deletions.
674 changes: 674 additions & 0 deletions LICENSE

Large diffs are not rendered by default.

64 changes: 62 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,63 @@
# LuckPermsPronouns
# LPPronouns

Repo for the LuckPermsPronouns plugin
A simple, cross API plugin that allows players to set their pronouns.

Works on: Spigot, BungeeCord, Forge, Fabric, and Velocity

Link to our support: [Discord](https://discord.gg/jec2jpdj7A)

## Download

GitHub: [Releases](https://github.com/p0t4t0sandwich/LPPronouns/releases)

Spigot: [LPPronouns](https://www.spigotmc.org/resources/lppronouns.110206/)


## Dependencies

This plugin requires [LuckPerms](https://luckperms.net/) to function.

## Commands

| Command | Permission | Description |
|-------------|------------|---------------------|
| `/pronouns` | `WIP` | Sets your pronouns. |

## Configuration

```yaml
# Database configuration
# Supported storage types: mongodb, mysql
storage:
type: mongodb
config:
host: localhost
port: 27017
database: playerdata
username: root
password: password

# Pronoun configuration
pronouns:
none: ""

any: any
other: other
ask: ask
avoid: avoid
# ...
```

## TODO

- [ ] Improve MySQL support
- [ ] add sqlite support
- [ ] add h2 support
- [ ] add filestorage support
- [ ] Add support for more storage types
- [ ] Add Forge command
- [ ] Add Fabric command
- [ ] Add command permissions
- [ ] Add tab completion? -- API dependent
- [ ] Add table prefix option in config
- [ ] Include a proper check for LuckPerms, gracefully disable if not found
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ public String commandHandler(PlayerInstance player, String[] args) {
StringBuilder text = new StringBuilder();

// If player does not have a pronoun set, set it to unspecified
if (Objects.equals(args[0], "unspecified") || Objects.equals(args[0], "remove")) {
if (Objects.equals(args[0], "none") || Objects.equals(args[0], "remove")) {
pronounsData.deletePronouns(player);
text = new StringBuilder("Your pronouns have been removed.");

Expand Down
3 changes: 2 additions & 1 deletion common/src/main/resources/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
version: 1

# Database configuration
# Supported storage types: mongodb, mysql
storage:
type: mongodb
config:
Expand All @@ -13,7 +14,7 @@ storage:

# Pronoun configuration
pronouns:
unspecified: ""
none: ""

any: "any"
other: "other"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ public void onInitializeServer() {
// Register event listeners
ServerPlayConnectionEvents.JOIN.register(new FabricEventListener());

// Register commands

// Mod enable message
logger.info("[LPPronouns]: LPPronouns has been enabled!");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ public ForgeMain() {
// Register event listener
MinecraftForge.EVENT_BUS.register(new ForgeEventListener());

// Register commands

// Mod enable message
logger.info("[LPPronouns]: LPPronouns has been enabled!");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ public class ForgeUtils {
/**
* Maps a Forge Player to a PlayerInstance.
* @param player Forge Player
* @param serverName Name of the server
* @return PlayerInstance
*/
public static PlayerInstance mapPlayer(ServerPlayer player) {
Expand Down

0 comments on commit da45919

Please sign in to comment.