Skip to content

Plugin Rewrite #8

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 40 commits into
base: master
Choose a base branch
from
Open

Plugin Rewrite #8

wants to merge 40 commits into from

Conversation

RhythmicSys
Copy link
Member

Big Changes

  • Saving changed to MySQL & SQLite
  • Command structure has changed
  • Placeholder API placeholders changed
  • Permissions changed

Saving now uses SQL to store data, allowing easier indexing

This allows three new config options:

  • nickname-protection.online.enabled (Prevents people from setting the same nickname as someone else who is online)
  • nickname-protection.offline.enabled (Prevents people from setting the same nickname as someone regardless whether they're online or not)
  • nickname-protection.offline.expires (How many days a nickname should be protected for, if the person doesn't log in)
    Other new config options:
    require-permission
  • nick : whether the basic nickname commands should require permissions set by a permission plugin
  • color : Whether nicknames can have color without having permissions set by a permission plugin
  • format : Whether nicknames can have formatting without having permissions set by a permissions plugin
  • who : Whether you can look up who a user is based on their nickname without having permissions set by a permissions plugin

New Commands:

  • /nick who <nickname> tells you the username of the player with the supplied nickname
  • /nick save can now take in an argument, so you can now do /nick save <nickname> if you want to save something that isn't your current nickname
  • /nick admin lookup <username> will display a user's current nickname, as well as their saved nicknames

Changed Commands (Admin Commands)

  • Admin commands are no longer running from the same commands as the normal nickname commands, they are now as follows
  • /nick admin set <username> <nickname>
  • /nick admin reset <username>
  • `/nick admin delete

Removed:

  • Removed the ability to save a nickname for someone else
  • Removed the 'restrictive' and 'full' admin permissions, when setting a nickname for someone else, the plugin will always use the admins' permissions for parsing
  • Removed the 'save' permission, for the above listed reason

Permission Changes:

  • Added: simplenick.bypass.nick-protection - Allows bypassing the new nick protection options
  • Color permissions have been moved out of the 'nick' node, and into their own 'color' node, and 'reset' has been moved into the color node
    • simplenick.nick.color -> simplenick.color.basic
    • simplenick.nick.gradient -> simplenick.color.gradient
    • simplenick.nick.rainbow -> simplenick.color.rainbow
    • simplenick.nick.format.reset -> simplenick.color.reset
  • Format permissions have also been moved out of the 'nick' node, into a 'format' node
    • simplenick.nick.format.underline -> simplenick.format.underline
    • simplenick.nick.format.italic -> simplenick.format.italic
    • simplenick.nick.format.strikethrough -> simplenick.format.strikethrough
    • simplenick.nick.format.bold -> simplenick.format.bold
    • simplenick.nick.format.obfuscated -> simplenick.format.obfuscated

Placeholder API changes:

  • Placeholder now starts with simplenick to be consistent with the permissions and other naming schemes
  • Two new placeholders have been added: prefixed-mininick and prefixed-nickname
  • the prefixed placeholders will insert the configured prefix, this was previously the default behavior, so you might need to use this one if you need that
    • %simplenicks_mininick% -> %simplenick_prefixed-mininick%
    • %simplenicks_nickname% -> %simplenick_nickname%
    • [] -> %simplenick_mininick%
    • [] -> %simplenick_nickname%

RhythmicSys and others added 30 commits May 2, 2025 14:50
removed:
- simplenick.nick.reset
- simplenick.nick.delete
- simplenick.admin.set.basic
- simplenick.admin.set.full
- simplenick.admin.set.restrictive
… added admin reset command and nick reload command, added nickname protection check and adjusted username protection check to use plugin's save system and not bukkit's.
…splayName' to more accurately explain what it does
- Changes NickUtils to use static methods, rather than be a singleton class
- Removes migrate command - migration is implemented back on enable instead
- Change constants to permission enum
- fixed issue where database connection was not closed on disable
Changed placeholder expansion version, and identifier to be consistent with the permission naming
- fix permissions not working properly
- add configuration options for what requires permissions
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants