Commit Graph

17 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
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
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
FearFree
5724c0c8df Future Java versions may not support _ as identifier. 2014-03-22 16:08:11 +11:00
snowleo
220d68f375 Switch to the new I18n class and format cleanup of all classes 2011-11-21 02:55:26 +01:00
KHobbits
cd9ea163e4 Continuing code cleanup 2011-11-18 22:09:26 +00: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
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
snowleo
798cb319f9 More translation stuff
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1469 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-14 23:30:56 +00: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
ementalo
db191e3115 [trunk] test the svn bot
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1287 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-28 00:32:47 +00:00
ementalo
edc0904789 [trunk] fix /weather and /thunder args
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1281 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-26 22:46:34 +00:00
ementalo
aaee159fc9 [trunk] weather / thunder refactor, added /lightning. usage: /lightning [player] it will zap them and kill them. You can also zap yourself.
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1278 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-26 12:39:57 +00:00
ementalo
6a892fcfc1 [trunk] weather / thunder refactor
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1277 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-26 12:13:39 +00:00
ceulemansl
e4fcdaf4a9 added thunder,
usage: /thunder <true/false> [duration]

git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1266 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-23 00:43:27 +00:00