Commit Graph

35 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
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
montlikadani
a1719d651e
Update Commandlightning.java 2019-12-31 17:51:21 +01:00
Ali Moghnieh
51f2a04958
Fix import errors. 2017-08-04 16:26:57 +01:00
md678685
05d2b6ccda Fix 1.12.1+ NSME in /lightning 2017-08-04 12:08:55 +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
f8160c6318 1.8.3 update. 2015-04-16 09:08:22 -05:00
drtshock
dde0b20775 Reformat 2015-04-14 23:06:16 -05:00
KHobbits
36e580474f Converted emulated player class calls to use base class. 2014-04-13 01:01:49 +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
Iaccidentally
3e725ef060 Cleanup various aspects of code, fix some formatting, more netbeans 7.4 stuff 2013-11-06 21:22:32 -05:00
KHobbits
64e089e15b Cleanup 2013-10-18 00:07:35 +01: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
KHobbits
ffae86dd42 Use user object to send messages when possible. 2013-08-15 01:53:22 +01:00
KHobbits
52ba151b81 Clean up exception types. 2013-06-22 16:33:22 +01:00
KHobbits
162b67aaa6 Cleanup player argument matching in loops
Cleanup ess cleanup timestamp matching
2013-05-05 07:15:33 +01:00
KHobbits
8f6c61fa99 Try to unify player matching for hidden users:
kill, lightning and ptime still need cleanup
2013-03-19 23:17:34 +00:00
KHobbits
13da8c3adc Fix /lightning <player> <damage> to actually deal the proper set damage (5 or 25% by default). 2012-06-10 23:00:49 +01:00
KHobbits
a40c936bcf New Permission: essentials.lightning.others
With this permission you can use /lightning <player>, without only strike based on direction.
2012-03-11 20:58:54 +00:00
Khyperia
a0d66ce230 New command: /find <item>
Test #278
Test #293
Test #348
2011-12-07 08:53:14 +08:00
snowleo
220d68f375 Switch to the new I18n class and format cleanup of all classes 2011-11-21 02:55:26 +01:00
KHobbits
a05f730e76 Little more command cleanup. 2011-11-18 13:48:31 +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
1f23740832 Don't hurt god players with lightning.
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1516 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-22 19:23:03 +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
07e49c3fbb [trunk] translations - halfway there
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1416 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-10 21:52:07 +00:00
ementalo
a61c1591e8 [trunk] lightning <playername> from the console
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1336 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-04 10:01:31 +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
94774a32ac [trunk] add new config setting warn-on-smite: true setting this to false will not tell people they are smited when using /lightning
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1289 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-29 08:48:29 +00:00
ementalo
a267cef78a [trunk] remove chat spam from lightning
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1286 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-27 19:28:40 +00:00
ementalo
29869fa264 [trunk] lightning strikes where you look if you do not pass an arg. fixed health taking
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1282 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-27 00:16:23 +00:00
ementalo
530fc32515 [trunk] lightning, not as harsh, will take 5 hearts.
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1279 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-26 12:48:24 +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