Commit Graph

38 Commits

Author SHA1 Message Date
Josh Roy
f6cb9ff470
Improve command codestyle (#3337)
Co-authored-by: MD <1917406+md678685@users.noreply.github.com>

Fixes #3579 (async `/skull` command)
Fixes #3336 (improve codestyle of commands)
Partially addresses #3339 (`/spawn` and `/setspawn` are now hidden from tabcomplete)
Closes #3087 (`/paytoggle` is now a loop command)
2020-08-11 19:09:22 +01:00
pop4959
db729241c9
Fix issue with eco reset requiring 3 args (#3340) 2020-05-28 11:44:46 -07:00
Crash Cringle
4b967a749b
Added a command to /eco that allows users to take percentages from pl… (#3080)
* Removed unnecessary formatting

* Fixed spacing around isPercent, removed unnecessary parenthesis, optimized conversion
2020-05-12 21:38:36 -07:00
Josh Roy
0ebd64d314 Add a cause enum to UserBalanceUpdateEvent (#2824)
Basically, I just needed this for one of my plugins; otherwise, this could be useful for people using this event who want to see where the user's balance is being updated from.

---

* Add UserBalanceUpdateEvent.Cause
* Add special cause enum
* Add API Cause
2019-12-23 13:16:34 +00:00
md678685
bad02729db Allow /eco take to subtract a user's exact balance 2018-08-24 15:42:17 +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
drtshock
dde0b20775 Reformat 2015-04-14 23:06:16 -05:00
KHobbits
889dde7549 Abort transaction before updating funds on balance overflow. 2014-05-25 17:03:23 +01:00
FearFree
5724c0c8df Future Java versions may not support _ as identifier. 2014-03-22 16:08:11 +11:00
KHobbits
882ebae257 [Breaking] Add exception when players have exceeded their account limit.
This might effect some plugins which hook Essentials for economy without using the API
2014-02-02 16:07:32 +00: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
KHobbits
6f85761f7f Extract CommandSender to CommandSource, this should prevent Ess user object leaks. 2013-10-16 21:05:33 +01:00
KHobbits
03368e45df Extract user match looping 2013-09-28 21: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
snowleo
6044cca54f ECONOMY MADNESS? THIS IS … FIXED 2013-05-05 11:41:19 +02:00
KHobbits
2d70bb19f7 Economy Madness 2013-05-05 05:12:17 +01:00
KHobbits
137d0df9dc Fix TL messages. 2013-04-30 00:18:53 +01:00
KHobbits
d425ab5f93 Fix Eco take bug and fix NPE 2013-04-30 00:07:28 +01:00
Iaccidentally
02df03a4b1 [CHANGE] Rewrite eco command with better logic :: the command will now attempt to do exactly what it is told, with respect to the minimum balance :: fix missing messages 2013-04-27 23:44:23 -04:00
KHobbits
353423efec Use correct getPlayer method to not match offline users. 2013-03-20 01:29:54 +00:00
KHobbits
1679790157 Fix eco take derp. 2013-01-20 19:43:59 +00:00
KHobbits
987b2ff4d5 Minor cleanup on /eco command. 2013-01-20 01:24:09 +00:00
GunfighterJ
a586edfd0b Cleanup /eco, fix reset broadcast 2013-01-19 17:58:12 -06:00
GunfighterJ
343c3a1bdd /eco overhaul, adds /eco set 2013-01-19 12:50:35 -06:00
KHobbits
c3fa56322b Adding option to modify all users balances (including offline) /eco reset ** <amount> 2012-03-04 09:20:03 +00:00
KHobbits
e277acf80e Display users new balance on /eco give/take. 2012-02-28 02:45:02 +00:00
KHobbits
9f893e68e9 Add Minimum Balance, to allow people to manage overdrafts. 2012-02-28 02:45:02 +00:00
snowleo
3c71ae4cd9 Locale.ENGLISH!!1! 2011-11-27 06:23:07 +01:00
KHobbits
e5a8cd88f0 Code cleanup continued. 2011-11-18 17:48:49 +00:00
KHobbits
e54d73704e Command cleanup 2011-11-18 12:06:59 +00:00
ementalo
aefbf921fe fixing eco command player argument. must be careful with c&p :/ 2011-07-08 12:38:54 +01:00
ementalo
962b6848c4 /balance offline players. Send message to initiator of eco commands 2011-07-08 12:24:32 +01:00
ementalo
343291b210 copy and paste argument fix 2011-07-08 10:39:49 +01:00
ementalo
7ed57bc291 /eco offline players 2011-07-08 10:37:40 +01: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
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