Commit graph

47 commits

Author SHA1 Message Date
md678685 93d36779f0 Implement regex-based nickname blacklist
Adds `nick-blacklist` list to config which takes phrases or regexes. Users with essentials.nick.blacklist.bypass can bypass the blacklist.
2019-08-05 19:01:48 +01:00
pop4959 a3eb58724f Add a way to use unsafe nicknames (#2152) @pop4959
Pretty much what the title says. Closes #1630.

This is a fun little feature that I'm sure many people have always wanted. I can understand that the original authors of Essentials were probably concerned about users entering names that cannot display correctly in the chat, and that is understandable.

I have added a new permission "essentials.nick.allowunsafe", which must be given to anyone who is allowed to use characters outside of the alphanumeric set. The name of the permission is inspired from "essentials.enchantments.allowunsafe", which allows unsafe enchantment levels to be applied to items without guaranteed behaviour. Similarly, the permission "essentials.nick.allowunsafe" allows unsafe characters to be entered for the user's nickname without making any guarantee that those characters will show up in chat correctly.
2018-09-02 12:14:26 +01:00
md678685 8aa764f69f Check whether nick equals "off" before formatting
Fixes #1910.
2018-06-15 19:41:56 +01:00
Ali 'SupaHam' M bbe0ca9302 Implement tab completion for all commands. (#1282)
List of supported commands:
```
/afk
/balance
/balancetop
/ban
/banip
/bigtree
/book
/broadcastworld
/burn
/clearinventory
/condense
/delhome
/deljail
/delwarp
/eco
/enchant
/enderchest
/essentials
/exp
/ext
/feed
/fireball
/firework
/gamemode
/getpos
/give
/hat
/heal
/help
/helpop
/home
/ignore
/invsee
/item
/itemdb
/jump
/kick
/kill
/kit
/lightning
/list
/mail
/me
/msg
/mute
/near
/nick
/nuke
/pay
/potion
/powertool
/ptime
/pweather
/recipe
/remove
/repair
/sell
/showkit
/skull
/speed
/tempban
/thunder
/time
/togglejail
/tp
/tpa
/tpaall
/tpahere
/tpall
/tphere
/tpo
/tpohere
/tppos
/tree
/warp
/weather
/world
/worth```
2017-06-11 01:17:43 +01:00
AdamQpzm 9f75f1aad3 Add bypass permission to nick command
This should allow users of wildcard permissions to be able to change their nicks as intended, without any changes to their current setup.
2016-01-04 21:32:19 +00:00
drtshock a669163196 Remove colour in permission checks.
As @supaham pointed out, this can cause issues with giving a player a wildcard permission and then negating the specific node if both nodes aren't negated.
2016-01-02 12:17:43 -08:00
Tux 87842a36ba Allow color-only nickname changes. 2016-01-02 12:11:17 -08:00
Matthew Steglinski 77eb430b0b [Fix] Fixes drtshock/Essentials#189, adds toggleable config option 'ignore-colors-in-max-nick-length' to exclude ChatColors from nickname length 2015-10-27 22:37:33 -04:00
vemacs 73ac6488ce Run IntelliJ IDEA inspections 2015-06-03 14:11:56 -06:00
drtshock dde0b20775 Reformat 2015-04-14 23:06:16 -05:00
md_5 465041b98b Optimize player / user iteration.
* Add a method for backwards compatability with unmapped code.
* Convert all getOnlinePlayers() calls to use this method, part of the IEssentials interface
* Add a new method getOnlineUsers() Ljava/lang/Iterable;
* Convert appropriate calls to use this method
* Update Bukkit to #1945
* Update CraftBukkit to #3103
2014-07-19 20:07:50 +01:00
KHobbits 093a1f677b Still give 'nickNoMore' message when removing a nickname. 2014-07-12 16:48:01 +01:00
KHobbits 8311da2653 Allow for changing of username casing without adding 'nickname' prefix. 2014-07-12 16:43:57 +01:00
FearFree 5724c0c8df Future Java versions may not support _ as identifier. 2014-03-22 16:08:11 +11:00
KHobbits 46691871ad Add permission: essentials.msg.multiple and essentials.pay.multiple
Message permission will allow rough nick matches and wildcards, while pay will only allow wildcards.
2013-12-28 22:37:36 +00:00
Chris Ward 1164bbd90d [Fix] Allow someone to change their nick to different case of the same thing 2013-10-19 12:19:40 +01:00
KHobbits 6f85761f7f Extract CommandSender to CommandSource, this should prevent Ess user object leaks. 2013-10-16 21:05:33 +01:00
KHobbits cf9d79d24c Strip nickname prefix when doing displayname comparison. 2013-10-16 20:54:23 +01:00
Iaccidentally 375caa6f9e implement GodStatusChangeEvent 2013-10-11 03:14:51 +01:00
KHobbits cfa367dfc3 Allow recolouring own name. 2013-10-05 05:34:33 +01:00
KHobbits 4951c204d2 Improve nick validation
Now matches nicks against userdata for conflicts
Now checks for empty string nicknames
2013-10-05 02:31:19 +01:00
KHobbits 122232a0e7 Add more API template and implement nick change event. 2013-10-05 02:11:39 +01:00
KHobbits 03368e45df Extract user match looping 2013-09-28 21:33:22 +01:00
KHobbits 8b11b870b1 General cleanup.
Add optional TL param for tempban/mute time in notify message
2013-08-11 21:34:26 +01:00
Iaccidentally 2ad346e84c [FEATURE] Add configurable max nick length 2013-07-10 10:48:14 -04:00
Iaccidentally f1eae9be6f Cleanup imports 2013-06-11 20:45:12 +01:00
KHobbits 09f67c9723 Split util classes. 2013-06-08 22:31:19 +01:00
KHobbits 353423efec Use correct getPlayer method to not match offline users. 2013-03-20 01:29:54 +00:00
KHobbits b1f427d52e [Fix] Allow /nick to change nickname case, without adding prefix character. 2013-03-09 14:24:19 +00:00
KHobbits 0dc1270aed Split colour permissions into 3: color/magic/format 2012-03-22 22:07:13 +00:00
snowleo 813e66b4f2 Fix /nick command colors 2012-01-16 20:38:53 +01:00
Khyperia a0d66ce230 New command: /find <item>
Test #278
Test #293
Test #348
2011-12-07 08:53:14 +08:00
KHobbits af456a73dd New permission essentials.nick.color
Allows control over who can use colour codes in nicknames.
2011-11-23 22:24:31 +00:00
snowleo 220d68f375 Switch to the new I18n class and format cleanup of all classes 2011-11-21 02:55:26 +01:00
snowleo 14cc499421 Fix long prefix breaking setPlayerListName(), because they are too long.
If Essentials detects, that the player name would be too long with prefix and suffix to fit in the player list, it will only update the name without prefix and suffix but with nickname and opcolor.
2011-11-20 16:43:38 +01:00
KHobbits e5a8cd88f0 Code cleanup continued. 2011-11-18 17:48:49 +00:00
KHobbits 51920420ce Allow proper escaping and use of & symbol in nicks (&& = &). 2011-11-03 22:19:33 +00:00
KHobbits d171cce45d Trim long nicknames for use in tab list
Colour Nicknames
Refactor /nick Command
Fix nickother validity checks.
2011-11-03 22:13:50 +00:00
KHobbits da337284e5 Adding list name to /nick support. 2011-10-04 07:21:09 +01:00
snowleo 6427a93d14 Correctly charge for the use of commands.
We now first test, if the user could pay it, do the stuff and then charge him. If the command throws an exception, the user will not be charged.
2011-08-27 23:14:49 +02:00
snowleo f18c3c7e1d Disable /nick if change-displayname is disabled
Some translations
2011-08-27 16:56:45 +02:00
snowleo 117d938ac5 Several bug fixes and cleanup.
Found using PMD and FindBugs.

git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1553 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-06-01 10:40:12 +00:00
snowleo 5ae48481bd Refactoring: New Charge class
user.canAfford(String), user.canAfford(EssentialsCommand), user.charge(String), user.charge(EssentialsCommand) have been removed.
Teleport class has been changed to use the Charge class.
This also fixes some bugs, like the one with warp signs.

git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1512 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-22 18:53:23 +00:00
ementalo 299be08d13 [trunk] translations
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1422 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-11 21:53:01 +00:00
snowleo 224c18348a This is a big refactoring of the user class and more.
Many commands have been cleaned.

File changes:
- all user data has been moved from users.yml to userdata folder
- all files in userdata folder are lower case
Both changes should be done automatically.

Class changes:
- Moved all user data functions to UserData class
- Moved all user teleport functions to Teleport class
- Moved the user list to Essentials class
- Less static functions for better testing
- EssentialsCommand now has ess Property (Essentials class)
- New NotEnoughArgumentsException, that will show command description and syntax

New commands:
- /seen, shows the last login or logout
- /tempban, temporarily ban someone
- /tjail and mute, temporarily option added

Other changes:
- ban reason is saved
- don't show "You have xxx mail" on login, if user doesn't have essentials.mail permission
-  time will be parsed: years, months (mo), weeks, days, hours, minutes (m), seconds, these can be shortened and combined, example: 2 days 5h 30m

git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1300 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-01 21:07:30 +00:00
ementalo 3a18f9bf33 [trunk] change the ability to nick others to permission node "essentials.nick.others"
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1202 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-15 23:21:40 +00:00
snowleo a3ebd254f2 Moving all files to trunk.
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@969 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-03-19 22:39:51 +00:00