Commit Graph

58 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
14c6c2a055
Fix spawner delay feature (#3239)
Closes #1332

The spawner delay feature has been broken in Essentials for as long as anyone can remember. The reasons for this are mentioned in the issue above.

This PR fixes this by changing the command to utilize new API for setting the minimum and maximum spawn delay on spawners. This API was added in 1.12.2, so all supported versions before that (1.8.8 thru 1.12.1) require NMS to function properly. I'm aware that Essentials avoids NMS for maintainability reasons, however that should not be of much concern here since all versions 1.12.2 and later are going to be using the Bukkit API. Hence, no NMS updates will be necessary.

Also let me know if you want the NMS code refactored somewhere else. I saw the net.ess3.nms packages, but I wasn't sure where this would fit into the organisation of that.

Tested on:
1.8.8, 1.9.4, 1.10.2, 1.11.2 (NMS)
1.12.2, 1.15.2 (Bukkit API)
2020-08-05 20:47:42 +01:00
pop4959
76e511a774
Implement random teleport command (#3418)
Adds `/tpr` and `/settpr` commands, which respectively allow you to teleport randomly or set teleportation parameters.

Server owners are expected to set the center with `/settpr` before players can use `/tpr`. They can also set the minimum and maximum range to be teleported from the center (default 0-1000).

Also includes an event where plugins can adjust or cancel the teleport.

Closes #3154.
2020-07-06 19:53:43 +01:00
MD
1be3daf0b5
Update bStats Metrics and add wrapper class for new graphs (#3451)
This PR updates the version of the bStats Metrics class to the latest version, supporting plugin IDs in place of just plugin names. It also adds the following graphs:
- Active permissions backend
- Active economy backend
- Whether or not a command has been used as a bar chart (pending bStats backend implementation)
- Version history graph as a multiline graph (also pending bStats impl)

It also removes the weird `getMetrics` and `setMetrics` APIs which should never have been API in the first place.
2020-07-05 19:30:01 +01:00
Josh Roy
4a471f0a93
Provider Rework (#3407)
Moved providers around, made them make sense, profit
2020-06-24 22:00:59 +01:00
triagonal
6f61010cf9
Allow toggling public broadcast of AFK messages (#2780)
(description from #2608)

So... I've implemented a system for toggling whether or not AFK messages are broadcasted to the entire server and also changed a few things along the way:

1. I added a config toggle broadcast-afk-message that will change whether AFK messages are broadcast globally or not.
2. In both cases the AFK target now recieves a "self-oriented" message instead of the global default. Basically just says "You are now/no longer AFK". This would be a change from the default behaviour.
3. I created a way to exclude certain IUsers from broadcastMessage messages using an IUser... varargs parameter. I wasn't too sure how to implement the exclusion, but this seemed like a fairly good option.

I'm not too sure if what I've come up with is an optimal solution, but it's been tested and confirmed to work as intended.

closes #2116, closes #959

---

* implement toggle for broadcasting afk message

* add "self-private" AFK messages, implement exclusion system for broadcastMessage

* remove rogue import, clarify config comment

* move excluded collection creation out of loop, use set instead

* use set instead of varargs

* ok but actually use the set this time

* address requested changes

* update missed message section

* move from Collection to Predicate for broadcast exclusion

* update Predicate variable name

* use identity comparison (cleanup)

* clean up unnecessary imports, remove extra spacing
2020-04-13 14:33:37 +01:00
md678685
61c1485083
Replace vanishedPlayers list with set (#1796)
* Replace vanishedPlayers list with set

Not sure if there is any particular reason to keep it ordered, but for now I've used a LinkedHashSet.

* Change return of new method from Set to Collection

Also makes return of old method an unmodifiable list, but this is just as breaking as just changing the method return type as far as I can see
2018-03-25 22:12:36 +01:00
Trent Hensler
cd43355d4c
Move kits to kits.yml (#1774)
* Move kits to kits.yml
We will now use a separate kits.yml file.
Any kits that were defined in the config.yml will be migrated over to the kits.yml file automatically on startup.
2018-01-18 00:25:00 -08:00
Pokechu22
4c0857fbb5
Implement tab completion framework (#1203) 2017-06-06 01:31:41 +01:00
vemacs
6e05327934 Ship full Metrics (might help fix our graphing issues) 2016-01-19 08:09:44 -07:00
vemacs
cf9c9f7073 Use metrics-lite, use global PluginMetrics config to control disable 2015-07-05 09:26:36 -06:00
vemacs
8793add589 [Untested] [Experimental] [Need @drtshock to fix build server] Fully support all versions of Spigot and CraftBukkit from 1.8+ 2015-06-17 10:25:46 -04:00
vemacs
2273329e29 Add SpawnerUtil with primary Spigot 1.8.3+ EntityType setting, legacy data fallback. Fixes #22 2015-06-02 11:28:38 -05: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
@ArkhamNetwork
4672e51806 Move the teleport timer to an async task. 2014-05-17 03:35:44 +01:00
KHobbits
9e9409da1e Essentials UUID conversion. 2014-04-13 21:40:15 +01:00
KHobbits
be31b1695d Restore getUser API 2013-10-18 00:07:34 +01:00
KHobbits
6f85761f7f Extract CommandSender to CommandSource, this should prevent Ess user object leaks. 2013-10-16 21:05:33 +01:00
KHobbits
00463a7899 Try to restore basic api functionality 2013-07-14 13:00:03 +01:00
KHobbits
5eb3d9fa42 Wrap ItemDb accessors and move Item string matching to itemdb class. 2013-07-13 18:52:53 +01:00
Iaccidentally
cd51d718ba [API] flip! (╯°□°)╯︵ ┻━┻ 2013-07-13 13:40:46 -04:00
Iaccidentally
dad348d3d0 [API] Move 2.x API to new package, create dummy classes for compatibility 2013-07-13 11:14:39 -04:00
KHobbits
aa6d85eacc Cleanup broadcast, allow limited keywords in. 2013-06-16 01:07:16 +01:00
KHobbits
f48ed6988d Essentials API cleanup and teleport possession fixing. (UNSTABLE) 2013-06-08 19:34:14 +01:00
KHobbits
6512a53a3f Reduce duplicated broadcast code. 2013-05-26 17:58:04 +01:00
Iaccidentally
4edc39360a Refactor name of ScheduleAsyncDelayedTask to RunTaskAsynchronously 2013-01-31 14:16:09 -05:00
Iaccidentally
cd126264e0 Update to 1.4.7 R1 :: remove calls to ScheduleAsyncDelayedTask, as it is deprecated :: cleanup :: WARNING: This commit may or may not be stable 2013-01-31 14:03:27 -05:00
KHobbits
8a9353fd09 Remove 3.x api migration code.
3.x development was moved to different code branch.
Removing deprecated warnings, since it would be silly to deprecate ALL classes.
2012-08-18 15:48:29 +01:00
md_5
cab40d7893 Keep track of vanished players and tweak lag meter. 2012-05-21 15:13:24 +10:00
md_5
3eac027ddb There is no need to start a second task to measure lag, it can in fact be measured with enough precision from the exisitng one. 2012-05-17 20:33:40 +10:00
md_5
1247401a5f Add a LagMeter (ticks per second) to the /gc command. This command can now be accessed with /lag as well. Also added a simple /vanish command, with the extra node essentials.vanish.see
If you require a more advanced vanish solution checkout VanishNoPacket from mbaxter.
2012-05-17 20:25:02 +10:00
KHobbits
d08ea5a650 Revert "Add option to disable jails entirely."
This reverts commit 34f5c19f99.
2012-04-14 23:18:20 +01:00
md_5
34f5c19f99 Add option to disable jails entirely. 2012-04-14 15:21:42 +10:00
KHobbits
d0d0117411 Add metric opt out toggle ingame. 2012-03-15 03:49:17 +00:00
KHobbits
6a9027da6d Adding starter/newbie kit to EssentialsSpawn
Optimization to EssentialsSpawn join event.
2012-03-04 20:09:25 +00:00
snowleo
72e187cd5c Updated Jails to use the new config classes 2011-12-06 17:28:48 +01:00
snowleo
58237a796a New Interfaces in api package (WIP) 2011-12-06 16:32:06 +01:00
snowleo
019b49ef11 Updated EssentialsSpawn to use the new config code
/spawn and /home now call the PlayerRespawnEvent to make it more compatible with other plugins.
2011-12-06 13:41:29 +01:00
Khyperia
746c80b0d6 Added many new MOTD possibilities + getI18n() to Essentials.java 2011-12-02 08:42:48 +08:00
snowleo
0bbc1e540b motd and rules are now configured in the files motd.txt and rules.txt, values from config.yml are copied automatically
New features:
Info command now understands the tags from motd and rules
motd and rules are now multipage
On join, only the first page of motd is shown.
2011-11-18 04:18:03 +01:00
snowleo
2a98734d22 Better solution for the alternative commands 2011-11-18 01:43:58 +01:00
snowleo
4c6cc5ced0 Updates for banning
Removing the ban workaround

We might remove the ban commands completely.
2011-09-07 22:34:53 +02:00
snowleo
fb211d722c Prevent that hidden players broadcast afk messages
Prevent that moving players triggers unafk too early, they can now move within a radius of 3 blocks from the position where they went afk.
2011-09-02 16:16:15 +02:00
snowleo
057c9cb3f5 Minor rewrite of Permissions package, all the stuff is now in one place. 2011-08-30 23:26:23 +02:00
snowleo
0c37e091c0 Adding support for two more permission systems. 2011-08-28 13:47:20 +02:00
snowleo
a085503c84 Users are now loaded async, so we have a new internal structure where they are saved.
I also did some cleanup on the classes that I worked on.

This needs testing, it might break, because it does not behave 100% identical like before.

it's possible that /balancetop now needs more time to finish, if not all users are loaded into memory.
2011-08-08 14:40:40 +02:00
snowleo
377f967dab Native support for PermissionsEx 2011-07-20 20:42:19 +02:00
snowleo
78c376af79 Created an interface for settings. 2011-07-16 02:38:22 +02:00
snowleo
a38fe6acd4 Heavy cleanup of all classes
ItemDb is not static anymore
Essentials.getStatic() removed
2011-07-16 01:33:22 +02:00