Commit graph

3128 commits

Author SHA1 Message Date
Aikar
1a80507406 Close Plugin Class Loaders on Disable
This should close more memory leaks from /reload and disabling plugins,
by closing the class loader and the jar file.
2018-05-01 21:36:55 -04:00
Aikar
ca4b34856d fix inverted logic on enderman attack 2018-05-01 20:37:52 -04:00
Aikar
6f281bc19f EndermanAttackPlayerEvent
Allow control over whether or not an enderman aggros a player.

This allows you to override/extend the pumpkin/stare logic.
2018-05-01 20:19:47 -04:00
Aikar
c476e3abd1 Fix EndermanEscapeEvent RUNAWAY being cancelled should also keep target
This will allow you to keep the enderman attacking the player instead
of running away.
2018-05-01 17:03:12 -04:00
Aikar
c84c87f8b2 Expand World.spawnParticle API and add Builder
Adds ability to control who receives it and who is the source/sender (vanish API)
the standard API is to send the packet to everyone in the world, which is ineffecient.

This adds a new Builder API which is much friendlier to use.
2018-04-30 20:32:15 -04:00
Aikar
30e08681c8 Location.isChunkLoaded() API 2018-04-30 19:27:59 -04:00
Aikar
f4d5ad301c Additional world.getNearbyEntities API's
Provides more methods to get nearby entities, and filter by types and predicates
2018-04-30 18:27:42 -04:00
Aikar
a65cdccb5f Block Enderpearl Travel Exploit
Players are able to use alt accounts and enderpearls to travel
long distances utilizing the pearls in unloaded chunks and loading
the chunk later when convenient.

This disables that by not saving the thrower when the chunk is unloaded.

This is mainly useful for survival servers that do not allow freeform teleporting.
2018-04-30 17:21:59 -04:00
Aikar
c25c800a3c Enderman.teleportRandomly()
Ability to trigger the vanilla "teleport randomly" mechanic of an enderman.
2018-04-30 13:30:00 -04:00
Aikar
2c7a08b1df EndermanEscapeEvent
Fires an event anytime an enderman intends to teleport away from the player

You may cancel this, enabling ranged attacks to damage the enderman for example.

Resolves #1101
2018-04-30 13:16:42 -04:00
Aikar
4fd6aedac9 Upstream update 2018-04-30 12:20:46 -04:00
stonar96
165dddda84 Fix Anti-Xray ConcurrentModificationException 2018-04-30 15:21:07 +02:00
0x22
a6d057b113 Fix exploit that allowed colored signs to be created (#1098) 2018-04-26 04:51:54 -04:00
Aikar
582999642c Add Ban Methods to Player Objects
Allows a more logical API for banning players.

player.banPlayer("Breaking the rules");
2018-04-28 11:31:26 -04:00
Zach Brown
4e4f7912da Remove patches that got added back in merge
Fix build
2018-04-22 15:29:03 -04:00
stonar96
e2b2332062 Make Anti-Xray Update Radius configurable (#1094) 2018-04-22 16:45:56 +02:00
Aikar
5556eda6ba Configurable Allowance of Permanent Chunk Loaders
This disables the behavior that allows players to keep chunks permanently loaded
by default and allows server operators to enable it if they wish.
2018-04-22 10:40:49 -04:00
Aikar
46d4568f31 Update upstream 2018-04-22 10:40:36 -04:00
Brokkonaut
bfd81cc275 Configurable sprint interruption on attack (#1085)
If the sprint interruption is disabled players continue sprinting when they attack entities.
2018-04-18 15:46:48 +02:00
Shane Freeder
45f29dbd99 re-revert Better reloading of pending unload chunks 2018-04-18 13:03:59 +01:00
Aikar
ffe824b61b Revert SPIGOT-3894 to restore vanilla behavior
reporter of this issue was incorrect and did not verify vanilla logic

vanilla logic only skips ticks if the flag is set

spigots change causes bugs as it now skips ticking and processing
chunk teleportation, which was a bug I fixed many many years ago...
2018-04-18 01:44:24 -04:00
Zach Brown
c072993a5c Update upstream CB/S 2018-04-17 22:25:50 -04:00
Zach Brown
973fefe4e5 Be more specific with prior fix 2018-04-17 22:06:24 -04:00
Zach Brown
53c4a446eb Handle bad chunks more gracefully
Prior to this change the server would crash when attempting to load a
chunk from a region with bad data.

After this change the server will defer back to vanilla behavior. At
this time, that means attempting to generate a chunk in its place
(and occasionally just not generating anything and leaving small
holes in the world).

Should Mojang choose to alter this behavior in the future, this change
will simply defer to whatever that new behavior is.
2018-04-17 22:00:51 -04:00
Riley Park
0abd56b79e [ci-skip] Revert "Add Turqmelon to MIT file (#1089)" (#1091)
This reverts commit 934f4f2156.
2018-04-17 11:20:03 -07:00
Devon T
934f4f2156 Add Turqmelon to MIT file (#1089) 2018-04-17 13:02:49 -04:00
stonar96
fb92e490ad [CI-SKIP] Add stonar96 to MIT list (#1086) 2018-04-17 00:28:52 +02:00
Kyle Wood
f1924ad247 Track previous version and report in command
It is often difficult to diagnose new issues server admins get when
upgrading to a new server version because the only information they are
able to tell us regarding the server version they are running is
"latest". This commit attempts to mitigate this by keeping track of the
previous version of Paper they were running, which is then reported by
the `/version` or `/paper version` command. This gives us a better idea
of the commits included in the upgrade, which may help diagnose new
issues easier.
2018-03-01 19:57:22 -06:00
Zach Brown
40edc359b7 Make version command use the direct link
It was using a redirect, but apparently a small portion of systems,
networks, some mess, are having problems with that redirect.

Just use the direct link and skip the hassle.
2018-04-09 16:13:08 -04:00
Zach Brown
a1f968c8a6 Update BD to allow building on Java 10 2018-04-08 16:19:44 -04:00
Zach Brown
e121df5775 Update upstream CB 2018-04-08 16:15:23 -04:00
Aikar
0c446a7dd3 Fix profile requests being made on offline mode servers
Closes #1076
2018-04-08 12:28:04 -04:00
Shane Freeder
72bd990d87 Allow logger instances to be used across reloads 2018-04-08 02:02:48 +01:00
Shane Freeder
0ed67b50a3 remove warning for custom entities in precreaturespawn (closes #1069)
There can be no survivors.
2018-04-08 01:44:14 +01:00
Shane Freeder
492ed12781 revert "Better reloading of pending unload chunks"
This change by spigot ensures that many interactins with chunks,
e.g. getting a list of TEs will cause the chunk to be marked for not
unloading and will block their unload. This is especially true for
servers using Timings (it needs to access the TE list of chunks), or
any plugins which need to access entity/TE lists periodically.
2018-04-08 01:26:37 +01:00
Zach Brown
8f4f4bdb16 Merge pull request #1070 from mikroskeem/feature/open-placed-sign
Add method to open already placed sign
2018-04-05 21:08:27 -04:00
Zach Brown
a080350652 Update upstream CB 2018-04-04 20:33:43 -04:00
Zach Brown
36e3e1cffb Update CB 2018-04-02 16:33:04 -04:00
Zach Brown
2caf69d5ab Silly rabbits, eggs are for chickens 2018-04-02 16:30:24 -04:00
Zach Brown
3229f3b8b8 > not even using java8 time API
Gotta get this rocketship up to speed I guess...
2018-03-31 23:30:19 -04:00
Zach Brown
3b99722641 Easter and April Fools fall on the same day
¯\_(ツ)_/¯
2018-03-31 22:50:11 -04:00
Mark Vainomaa
50f348988d Add method to open already placed sign 2018-04-01 02:30:41 +03:00
Zach Brown
9bafd0634e Stop explicitly blocking Vanilla Method Profiler
At the time this was re-added, there was concern around how the JIT
would handle the system property that enabled it.

This shouldn't be a problem, and as such we no longer need to block
access to it.

The Vanilla Method Profiler will not provide much to most users however
there is no harm in providing it as an option. For most users, the
recommended and supported method for determining performance issues with
Paper will continue to be Timings.
2018-03-31 14:51:21 -04:00
Shane Freeder
4502a946d7 Flag to disable the channel limit
In some enviroments, the channel limit set by spigot can cause issues,
e.g. servers which allow and support the usage of mod packs.

provide an optional flag to disable this check, at your own risk.
2018-03-31 17:07:09 +01:00
Shane Freeder
75a9b9e07d Delay initial ping sent to the client 2018-03-31 15:27:41 +01:00
Shane Freeder
1872a94c83 Update CB/S 2018-03-31 10:34:25 +01:00
Minecrell
99efa104db Call PaperServerListPingEvent for legacy pings (#1057)
* Make the legacy ping handler more reliable

The Minecraft server often fails to respond to old ("legacy") pings
from old Minecraft versions using the protocol used before the switch
to Netty in Minecraft 1.7.

Due to packet fragmentation[1], we might not have all needed bytes
available when the LegacyPingHandler is called. In this case, it will
run into an error, remove the handler and continue using the modern
protocol.

This is unlikely to happen for the first two revisions of the legacy
ping protocol (used in Minecraft 1.5.x and older) since the request
consists of only one or two bytes, but happens frequently for the
last/third revision introduced in Minecraft 1.6.

It has much larger, variable packet sizes due to the inclusion of
the virtual host (the hostname/port used to connect to the server).

The solution[2] is simple: If we find more than two matching bytes,
we buffer the remaining bytes until we have enough to fully read and
respond to the request.

[1]: https://netty.io/wiki/user-guide-for-4.x.html#wiki-h3-11
[2]: https://netty.io/wiki/user-guide-for-4.x.html#wiki-h4-13

* Add legacy ping support to PaperServerListPingEvent

Add a new method to StatusClient check if the client is a legacy
client that does not support all of the features provided in the
event.
2018-03-30 19:00:01 +02:00
Minecrell
c37016f476 Avoid negative server ping player sample counts. Fixes #1067 (#1068) 2018-03-30 18:53:15 +02:00
Mark Vainomaa
bfa2eab01f Make player data saving configurable (#1063) 2018-03-27 17:45:54 +03:00
Minecrell
f556e7652a Improve backward compatibility of deprecated player sample API (#1065)
Some plugins (e.g. older builds of EssentialsX) assume that
ServerListPingEvent.getSampleText() returns a mutable copy of
the player sample list. This was the case until it was refactored
on top of the new API introduced in #980.

As a result, they may run into an error when trying to modify the
returned list directly. Modify getSampleText() to return a mutable
copy (a plain ArrayList) to mimic the old behavior.
2018-03-26 23:45:18 +02:00