Commit graph

37 commits

Author SHA1 Message Date
pop4959
9f384c71f3
Confirm home replacement when overwriting existing homes (#3338)
Co-authored-by: Josh Roy <10731363+JRoy@users.noreply.github.com>
Co-authored-by: MD <1917406+md678685@users.noreply.github.com>

Warns the player that they are trying to replace a home, if they try to set one with the same name, when `confirm-home-overwrite` is set to `true` in the config.

https://user-images.githubusercontent.com/17698576/83004206-3633eb00-9fc4-11ea-9317-fe245fed9cbb.png

Fixes #2038
Closes #2847
2020-07-01 22:03:22 +01:00
pop4959
d5ffed09b4
Fix home tab completions (#3206)
Fixes #1337 😎 

This PR fixes tab completions for all of the home commands in Essentials. Prior to this PR, the behavior is approximately as follows:

- `/sethome` has no implementation for completions, and so it provides player names, which isn't very useful, and in my opinion can cause more harm than good by confusing users.
- `/home` and `/delhome` fail to provide valid completions when a user has the `essentials.home.others` permission. The argument syntax is `[player:]<name>` but it tries to complete it as `<player> <name>`. Not only does it not show you suggestions for your own homes, but it proceeds to show you invalid suggestions!

This PR provides completions that accurately reflect the syntax and real behavior of the command, including suggesting homes for player names that are partially matched. It will provide suggestions for all of your own homes, as well as providing suggestions based on how far along you are in the command (players if you haven't specified `:` yet, otherwise a specific player's homes).
2020-04-30 20:26:27 +01:00
Josh Roy
23f0f98af3
Cleanup code (#3067)
Co-Authored-By: md678685 <1917406+md678685@users.noreply.github.com>

Basically cleans up a bunch of warnings that are easily suppressed.
2020-04-25 13:08:57 +01:00
drtshock
dde0b20775 Reformat 2015-04-14 23:06:16 -05:00
KHobbits
b5976a52e0 Prevent users from setting unsafe homes when teleport safety is disabled. 2014-07-12 16:34:18 +01:00
KHobbits
cbaf126a25 Stop using old string player lookup. 2014-05-17 02:47:10 +01:00
FearFree
5724c0c8df Future Java versions may not support _ as identifier. 2014-03-22 16:08:11 +11:00
KHobbits
23d2ffb134 Add {4} to homeSet TL key, this contains the name of the home being set. 2013-12-21 23:30:12 +00:00
KHobbits
3cfde70ec6 Use the correct name in /sethome if you don't have sethome.others permission. 2013-07-23 23:39:44 +01:00
KHobbits
52ba151b81 Clean up exception types. 2013-06-22 16:33:22 +01: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
48d04216a7 Reduce calls to bukkit getPlayer(); 2012-10-26 21:34:36 +01:00
KHobbits
732dc3bf34 Cleanup sethome 2012-10-01 20:32:10 +01:00
Chris Ward
d8b6742543 Blocking numeric home names, changing invalid home message 2012-10-02 02:32:52 +10:00
KHobbits
a2886d76d2 Fix Essentials /sethome to more strictly obey home limits. 2012-09-15 19:55:12 +01:00
KHobbits
8d6b864b5b Revert "Update home count..." This reverts commit 9b731cc39c.
On second thought, this would just lead to inconsistency....
2012-05-07 00:16:45 +01:00
KHobbits
9b731cc39c Update home count to include the bed home if set, this does not prevent people from setting a bed home if they are at max. 2012-05-07 00:05:02 +01:00
KHobbits
5a7d733cbf Added extra params to setHome TL key {0} world {1} x {2} y {3} z 2012-04-04 18:19:39 +01:00
KHobbits
292b7b0546 Stop users from using /sethome bed 2012-01-28 01:09:02 +00:00
KHobbits
2dc6f8c202 Command Cleanup 2011-12-01 13:42:39 +00:00
snowleo
220d68f375 Switch to the new I18n class and format cleanup of all classes 2011-11-21 02:55:26 +01:00
KHobbits
e5a8cd88f0 Code cleanup continued. 2011-11-18 17:48:49 +00:00
KHobbits
ea76161ba5 Allow different 'sets' of multiple homes, definable by permission.
- Not sure I like this, but it does seem to work
- changed config key for backwards compatibility (config node sets value on failure).
2011-10-01 10:08:58 +01:00
KHobbits
4abbbcb82b Throwing an error on /sethome if you cant set multiple homes. 2011-09-02 15:58:25 +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
KHobbits
8cc249c2d3 Essentials.sethome.others doesn't imply essentials.sethome.multiple.
Restore essentials.home.others permission check.
2011-08-24 02:48:38 +01:00
KHobbits
7df5098bf6 Homes tolower.
Max homes fix.
2011-08-23 15:37:09 +01:00
KHobbits
bb32ec9567 Adding delhome
Making sethome allow redefine
2011-08-23 07:04:33 +01:00
KHobbits
0592c1fe11 Added multiple homes.
Permissions currently: essentials.sethome.multiple and essentials.sethome.multiple.unlimited
New config setting: multiple-homes (default value 5)
2011-08-23 03:42:32 +01:00
KHobbits
300ee9c729 Fix sethome/seen for invalid players. 2011-08-11 03:33:45 +01:00
ementalo
39770cd46d Test #304 set the location using the setters location, not the players location.
Support for offlline players
2011-07-07 22:24:50 +01:00
ementalo
c530030e5d sethome for others, missed from commit 2011-06-28 10:13:18 +01:00
ementalo
48e0073b31 admin can set others homes. needs "essentials.sethome.others" permission 2011-06-28 10:10:29 +01:00
ementalo
92b34ec15f [trunk] translations = T's
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1424 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-11 22:42:48 +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
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