Commit Graph

2830 Commits

Author SHA1 Message Date
Aikar 878e963fc6
Delete some dupe patches (should be fixed going forward) 2018-07-16 00:32:35 -04:00
Aikar 5b6dfb3463
NOT FINISHED!!! Current Progress on 1.13-pre7 update
This work is 100% unfinished. I am pushing it up so that we as a team
can work on this update.

Do not try to use this branch. You will fail.
2018-07-16 00:13:29 -04:00
Aikar 5d8b3d4969
Fix placement of chunk tracking - Fixes #1199
Spigot had code that returned early in chunk add/remove methods.

This was causing our code added to set current chunks and counts to
be skipped over if the entity was default not persistent but made persistent.

This was the source of many issues

Fixes #1208
2018-07-15 02:44:37 -04:00
Aikar 230bf934b5
Fix issue with entity activation range check - #1199 2018-07-14 00:12:42 -04:00
Minecrell 801e2ee3b1 Refresh player inventory when cancelling PlayerInteractEntityEvent (#1205)
When interacting with entities with an item, the client will assume
the interaction is successful, and update the held item on the
client. However, if the interaction is cancelled on the server side,
the client will still mistakenly remove/replace the item in hand.

Examples for this are milking cows with a bucket or dyeing sheep.
The bucket is replaced with milk and the dye removed from inventory.

Refresh the player inventory when PlayerInteractEntityEvent is
cancelled to avoid this problem.
2018-07-13 16:52:34 -04:00
Minecrell 778d4b24f3 Avoid visual issues for adjacent blocks when cancelling PIE (#1198)
The adjacent blocks of doors, double plants, pistons and beds need
to be updated manually from the server when cancelling a block break
from a player, as it otherwise causes the other parts to disappear
on the client.

This is already done for doors but only for the BlockBreakEvent,
not for PlayerInteractEvent. Move the code to a common method
and also handle the other blocks in similar ways.
2018-07-13 02:48:51 -05:00
Minecrell 81688d28d2 Avoid Netty buffer leak in LegacyPingHandler. Fixes #1200 (#1201)
The extra buffer used to decode the strings sent by the client
in the legacy ping protocol was never released. However, creating
an extra copy of the buffer just to decode it to a string isn't
actually necessary: We can just call toString() directly on the
original buffer.

Additionally, free the buffer in handlerRemoved() to handle cases
where the client never sends enough bytes to form a valid legacy
ping request.
2018-07-13 02:43:56 -05:00
Zach Brown 5b02e5736a
Update upstream B/CB 2018-07-13 02:39:44 -05:00
Aikar db4ecc9d9d
Multitude of changes to attempt to fix #1199 2018-07-12 16:50:17 -04:00
Shane Freeder 73b214a515
Don't send digged block updates for unloaded chunks 2018-07-12 15:19:33 +01:00
Aikar 7bb3f45ce1
don't use a stream for entity counts (performance) 2018-07-10 01:06:09 -04:00
Shane Freeder aa3751e974
hopefully fix entity issues - #1199
@Aikar
2018-07-09 19:48:49 +01:00
Aikar 6745297b05
Only use stored chunk ref if it matches current chunk registration
Closes #1197

While this really undoes a lot of the desired performance gains avoiding chunk lookups,
we sadly have to accept this because we are seeing lots of bugs with entities.
2018-07-08 22:39:46 -04:00
Aikar 18c1127fcd
Improve bed search pattern to go inwards out for bed search radius 2018-07-08 03:30:40 -04:00
Aikar 17525cd54b
Fix weird bugs with entities - Fixes #1195 2018-07-05 18:39:43 -04:00
Aikar 0ae8b2f893
Missed a case where to remove a chunk lookup on TE removal (performance, not bug fix) 2018-07-04 17:29:10 -04:00
Aikar e4b436a05d
[CI-SKIP] Remove paper tags - Fixes #1192 2018-07-04 17:26:54 -04:00
Aikar 5da42b1fb2
Fix Tile Entities - #1192 Fixed 2018-07-04 17:22:38 -04:00
Aikar 3d1f804a22
Vex#getOwner API
Get's the NPC that summoned this Vex
2018-07-04 15:32:30 -04:00
Aikar 467d4d463e
Configurable Bed Search Radius
Allows you to increase how far to check for a safe place to respawn
a player near their bed, allowing a better chance to respawn the
player at their bed should it of became obstructed.

Defaults to vanilla 1.
2018-07-04 15:23:15 -04:00
Aikar fcdc18e556
support plugins calling OBC directly for inventory close event 2018-07-04 12:33:38 -04:00
Aikar bbfb696f30
Avoid Chunk Lookups for Entity/TileEntity Current Chunk
In many places where we simply want the current chunk the entity
is in, instead of doing a hashmap lookup for it, we now have access
to the object directly on the Entity/TileEntity object we can directly grab.

Use that local value instead to reduce lookups in many hot places.
2018-07-04 03:58:56 -04:00
Aikar 18c3716c49
Current Chunk for Entity and Block Entities, counts by entity type
This enables us a fast reference to the entities current chunk instead
of having to look it up by hashmap lookups.

We also store counts by type to further enable other performance optimizations in later patches.
2018-07-04 03:58:56 -04:00
Aikar f534210885
InventoryCloseEvent Reason API
Allows you to determine why an inventory was closed, enabling plugin developers
to "confirm" things based on if it was player triggered close or not.
2018-07-03 21:57:33 -04:00
Brokkonaut e19ed02025
Add World.getEntity(UUID) API
This is the best way to get an entity when the world and its UUID are known.
It is faster than Server.getEntity(UUID) because it does not have to iterate all worlds
2018-07-03 14:53:28 -05:00
BillyGalbreath 8f1e26286f
Add config to disable ender dragon legacy check (#1167) 2018-07-03 14:48:54 -05:00
Brokkonaut 2ed792d699
Improve ProjectileHitEvent to include the BlockFace where the projectile has hit (#1182) 2018-07-03 14:34:42 -05:00
Shane Freeder aedf167268
Cleanup allocated favicon ByteBuf (fixes #1191)
Cleanups a bytebuffer which was allocated during the encoding of the
favicon to be sent to the client.
2018-07-03 19:19:47 +01:00
Shane Freeder a48b6064a8
Extend Player Interact cancellation to handle FlowerPots 2018-07-03 04:45:52 +01:00
Aikar 2adb879802
Add Critical missing Bukkit API - setTarget/getTarget moved down to SentientNPC
This fixes a CRITICAL missing part of the Bukkit API due to mistakes on upstream
refusing to implement the Sentient NPC baseclass of all NPC's.

Until now, the Bukkit API has not provided a way for accessing and setting
a non creature entities target.

Although Flying, Slime, Ambient, and Water mobs all supported targets internally,
you were unable to get/set it.

Now with the SentientNPC API and these API's moved down, every sentient NPC has
access to target data.
2018-07-01 22:10:21 -04:00
Aikar b922ff9886
Fix issues with getBlockState(false) not loading Tile Entity data
This only impacted people who used our useSnapshots new API in a plugin,
which obviously was no one as the data result was completely broken.

Merged the NPE check patch into mine since it has to handle it too.
2018-06-30 01:40:52 -04:00
Aikar 98555e9b90
LivingEntity Hand Raised/Item Use API
How long an entity has raised hands to charge an attack or use an item

Also aliased isHandsRaised for isChargingAttack in RangedEntity
2018-06-29 00:55:29 -04:00
Aikar 7abf2eeeac
RangedEntity API
Allows you to determine if an entity is capable of ranged attacks,
and to perform an attack.
2018-06-26 22:08:01 -04:00
Minecrell eb7341f821 Disable JLine event expansion. Fixes #1171 2018-06-25 17:40:35 +02:00
Aikar f0cb089a24
Fix another case where villages load chunks 2018-06-21 22:58:09 -04:00
Aikar 9b1e9b43ff
Update Upstream 2018-06-20 23:29:33 -04:00
Aikar 980d53d156
Expand Explosions API
Add Entity as a Source capability, and add more API choices, and on Location.
2018-06-20 23:19:46 -04:00
Brokkonaut a5285de480 Add EntityKnockbackByEntityEvent (#1162)
This event is called when an entity receives knockback by another entity. The knockback can be modified in the event. If the event is cancelled the entity is not knocked back.
2018-06-20 21:59:11 -04:00
Aikar d5817e9910
Fire EntityShootBowEvent for Illusioner 2018-06-18 22:19:59 -04:00
Zach Brown 384059607e
Tie PlayerList#moveToWorld safety to existing config
Also renames patch file to better express what it's doing.

It is presumed that those using this config option intend for
suffocation checks to be disabled in all instances. In doing so, they
inherently assume the advantages and issues associated with removing
said safety check.

If the community expresses a desire for more specific options regarding
the handling of this safety feature, we can investigate providing them.

Fixes GH-1149
2018-06-18 16:27:33 -05:00
Aikar c92fa14d36
PlayerReadyArrowEvent
Called when a player is firing a bow and the server is choosing an arrow to use.
Plugins can skip selection of certain arrows and control which is used.
2018-06-18 01:13:16 -04:00
Aikar 76d60b167f
EntityShootBowEvent consumeArrow and getArrowItem API
Adds ability to get what arrow was shot, and control if it should be consumed.
2018-06-18 00:39:04 -04:00
Aikar 9fee3b6963
accidently set the wrong collection on last commit
copy pasting...
2018-06-16 16:32:26 -04:00
Aikar 708d52ca03
Ignore Missing Recipes in RecipeBook to avoid data errors
This code was causing NPE's in saving player data, potentially related to reloads.
2018-06-16 16:30:29 -04:00
BillyGalbreath 1ae07ecf52 Make shield blocking delay configurable (#1154)
Resolves #1153
2018-06-16 15:54:35 -04:00
Aikar 4f29a0ce0a
Print Error details when failing to save player data 2018-06-15 20:40:39 -04:00
Aikar 50a23d5ea3
Configurable Alternative LootPool Luck Formula
Rewrites the Vanilla luck application formula so that luck can be
applied to items that do not have any quality defined.

See: https://luckformula.emc.gs for data and details
-----------

The rough summary is:
My goal was that in a pool, when luck was applied, the pool
rebalances so the percentages for bigger items is
lowered and smaller items is boosted.

Do this by boosting and then reducing the weight value,
so that larger numbers are penalized more than smaller numbers.
resulting in a larger reduction of entries for more common
items than the reduction on small weights,
giving smaller weights more of a chance

-----------

This work kind of obsoletes quality, but quality would be useful
for 2 items with same weight that you want luck to impact
in varying directions.

Fishing still falls into that as the weights are closer, so luck
will invalidate junk more.

This change will result in some major changes to fishing formulas.

-----------

I would love to see this change in Vanilla, so Mojang please pull :)
2018-06-15 00:32:35 -04:00
Aikar 1127a49ced
If we remove a corrupt TE, ensure we save the chunk 2018-06-15 00:11:39 -04:00
Black Hole ea8801ce28 Actually call EntityTeleportEndGatewayEvent (#1147) 2018-06-13 16:29:49 -05:00
Brokkonaut 8b371226fb Avoid int overflow in lootable refill time calculations (#1146)
Fixes https://github.com/PaperMC/Paper/issues/1141
2018-06-13 14:15:31 -04:00
Shane Freeder 179439e48e
[CI-SKIP] Fix comment on unlit chunk sending patch 2018-06-12 15:46:08 +01:00
Aikar 84d350c24c
Fix CraftEntity hashCode
hashCodes are not allowed to change, however bukkit used a value
that does change, the entityId.

When an entity is teleported dimensions, the entity reference is
replaced with a new one with a new entity ID.

For hashCode, we can simply use the UUID's hashCode to keep
the hashCode from changing.

equals() is ok to use getEntityId() because equals() should only
be true if both the left and right are the same reference.

Since entity ids can not duplicate during runtime, this
check is essentially the same as this.getHandle() == other.getHandle()

However, replaced it too to make it clearer of intent.
2018-06-10 20:29:15 -04:00
Aikar ca0ec24d64
Properly remove entities on dimension teleport
To teleport an entity between dimensions, the server makes a copy
and puts the copy in the new location, and marks the old one dead.

If this method got called for the same world in the same tick,
the entity would not have been removed from the UUID map, and the
world readd would fail.

This can be triggered even with a plugin if the entity is teleported
twice in the same tick, from world A to B, then back from B to A.

The re-add to A will fail to add the entity to the world. It will
actually be there, but it will not be visible on the client until
the server is restarted to re-try the add to world process again.

This bug was unlikely to be seen by many due to the double teleport
requirement, but plugins (such as my own) use this method to
trigger a "reload" of the entity on the client.
2018-06-10 20:09:56 -04:00
Shane Freeder 939ca17007
Fix missed change inside of CraftSkullMeta 2018-06-10 12:45:04 +01:00
Aikar 4fbed1adab
Unset Ignited flag on cancel of Explosion Event
Otherwise the creeper infinite explodes
2018-06-10 01:29:20 -04:00
Shane Freeder 5913a2cc1a
Add EntityTeleportEndGatewayEvent for entities (closes #1124) 2018-06-09 14:21:40 +01:00
Shane Freeder ecc9347238
Allow plugins to replace texture if already set on skulls 2018-06-09 12:09:21 +01:00
Aikar 2e423c8954
ItemStack#getMaxItemUseDuration
Allows you to determine how long it takes to use a usable/consumable item
2018-06-05 23:01:16 -04:00
Aikar b97e5124e4
WitchReadyPotionEvent
Control what potion the witch readies to use
2018-06-05 22:48:48 -04:00
Aikar 1e3de9e936
Don't load chunks for villager door checks
This avoids villages spam loading chunks sync
2018-06-05 00:33:24 -04:00
Aikar a082f773cb
Allow spawning Item entities with World.spawnEntity
This API has more capabilities than .dropItem with the Consumer function

Item can be set inside of the Consumer pre spawn function.
2018-06-04 20:48:14 -04:00
Kyle Wood df8f9f0f30
Report issues to the issue tracker 2018-06-04 01:54:22 -05:00
Aikar 0570490d2a
Closes #1138 2018-06-04 01:54:38 -04:00
Aikar 727f932d05
add Escape Reason Drown for EndermanEscapeEvent
to detect rain specifically from every other armor ignoring hit
2018-05-31 18:16:26 -04:00
Zach Brown 7fea752ffc
Fix config key on last commit 2018-05-30 15:38:27 -05:00
Mark Vainomaa e74e4584d6 Skip Entity and Tile Entity ticking in chunks scheduled for unload (#1132)
Fixes #1131
2018-05-30 15:31:55 -05:00
Aikar 3eb1cdef72
Fix Witch Throw Potion error - Resolves #1129 2018-05-23 23:08:04 -04:00
Aikar 340908d328
Fix Reason = Player for Experience Orb drop 2018-05-18 19:40:33 -04:00
Aikar 5e644e2637
WitchThrowPotionEvent
Fired when a witch throws a potion at a player
2018-05-16 20:49:47 -04:00
Aikar dc7680211c
WitchConsumePotionEvent
Fires when a witch consumes the potion in their hand
2018-05-16 20:49:43 -04:00
Aikar 390f9bb913
Improve Profile API to directly extend Yggdrasil, Resolves #1117
This improves plugins like Citizens that rely on direct instance of Yggdrasil implementations.

Instead of wrapping, directly extend and override the methods.

Went ahead and wrapped all of the services in prep in the base patch, then features modify what they need
2018-05-10 23:01:52 -04:00
Zach bd0335acaa
Merge pull request #1105 from stonar96/hotfix/anti-xray-cme
Fix Anti-Xray ConcurrentModificationException
2018-05-03 17:37:57 -04:00
Aikar ef8ad1941f
fix inverted logic on enderman attack 2018-05-01 20:37:52 -04:00
Aikar bd603371bf
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 f69fabeb55
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 00f24317ff
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 9c7cc4bfb2
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:23:58 -04:00
Aikar d38e9dcf0e
Enderman.teleportRandomly()
Ability to trigger the vanilla "teleport randomly" mechanic of an enderman.
2018-04-30 13:30:00 -04:00
Aikar 30bc4df0a9
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
stonar96 fba6addb82 Fix Anti-Xray ConcurrentModificationException 2018-04-30 15:21:07 +02:00
0x22 f7166948d8
Fix exploit that allowed colored signs to be created (#1098) 2018-04-28 20:19:29 +01:00
Aikar 33a6de0f13
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 2120696fcf
Remove patches that got added back in merge
Fix build
2018-04-22 15:29:03 -04:00
stonar96 3340e81425 Make Anti-Xray Update Radius configurable (#1094) 2018-04-22 10:45:56 -04:00
Aikar 4316e8f59d
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 a72fc26fc1
Update upstream 2018-04-22 10:40:36 -04:00
Brokkonaut a144c203fc Configurable sprint interruption on attack (#1085)
If the sprint interruption is disabled players continue sprinting when they attack entities.
2018-04-18 09:46:48 -04:00
Shane Freeder bacc2bbec0
re-revert Better reloading of pending unload chunks 2018-04-18 13:03:59 +01:00
Aikar bbc31e2bd8
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 d49c6a296e
Update upstream CB/S 2018-04-17 22:25:50 -04:00
Zach Brown 52befd0a68
Be more specific with prior fix 2018-04-17 22:06:24 -04:00
Zach Brown e1c412846a
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
Kyle Wood 35b4136815
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-04-11 23:02:20 -04:00
Aikar dc772289f8
Fix profile requests being made on offline mode servers
Closes #1076
2018-04-08 12:28:04 -04:00
Shane Freeder 8cca54c0e3
remove warning for custom entities in precreaturespawn (closes #1069)
There can be no survivors.
2018-04-08 01:44:14 +01:00
Shane Freeder 280e8b14ca
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
Mark Vainomaa c6ac33816b
Add method to open already placed sign 2018-04-05 06:48:24 +03:00
Zach Brown c178b3931a
Update upstream CB 2018-04-04 21:05:09 -04:00
Zach Brown 4e98da175b
Silly rabbits, eggs are for chickens 2018-04-02 16:30:24 -04:00
Zach Brown 594b647cce
> 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 5bad6ba5b6
Easter and April Fools fall on the same day
¯\_(ツ)_/¯
2018-03-31 22:50:11 -04:00
Zach Brown 6f2009754d
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:55:42 -04:00
Shane Freeder d09826faf2
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 18:56:49 +01:00
Shane Freeder ad2cf784b0
Delay initial ping sent to the client 2018-03-31 15:27:41 +01:00
Shane Freeder fad15a6acc
Update CB/S 2018-03-31 14:30:29 +01:00
Minecrell 16869992a8 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 13:00:01 -04:00
Minecrell 604192da0c Avoid negative server ping player sample counts. Fixes #1067 (#1068) 2018-03-30 12:53:15 -04:00
Mark Vainomaa aa6c4f29fd Make player data saving configurable (#1063) 2018-03-27 10:45:54 -04:00
Aikar 658eca0c22
Add Setters for ID/Name and add completeByCache for Profile API 2018-03-25 21:50:46 -04:00
Aikar 9b12f54b69
Update upstream 2018-03-25 20:06:44 -04:00
Aikar c00a8a7a2b
Don't try to complete profile on creation from cache, only on complete()
For one, the wrong API was used that would trigger a network call.
2018-03-25 20:05:30 -04:00
Aikar cff8ae9644
Use copies for PlayerProfile in PaperServerList and SkullMeta
Don't want to risk mutating players properties in server list (unlikely, but lets be proper)

and Skull also has a setter API, so that should be used too.
2018-03-22 23:32:55 -04:00
Minecrell e15167251b Add extended PaperServerListPingEvent (#980)
* Drop original implementation for old player sample API

* Add extended PaperServerListPingEvent

Add a new event that extends the original ServerListPingEvent
and allows full control of the response sent to the client.

* Implement deprecated player sample API
2018-03-22 23:19:59 -04:00
Aikar 3f4fa0e839
More improvements to PlayerProfile code
.equals() was wrong
clean up createPlayerProfile code
don't set profile to null if the complete call fails
2018-03-22 21:57:11 -04:00
Aikar b8a672dd94
Fix Profile Textures and expand PlayerProfile .complete() API
I mistakenly thought .complete() also checked for textures, which was not the case

So the logic was not working as desired.

Also some undesired logic paths lead to textures of the logging in player being dropped, forcing
us to always load the textures immediately again on login, leading to rate limits.

Everythings now good

the .complete() api now will default specify to also complete textures, but you may
pass false to it to skip loading textures.
2018-03-22 21:40:57 -04:00
Aikar b29f5c05c1
getPlayerUniqueId API
Gets the unique ID of the player currently known as the specified player name
In Offline Mode, will return an Offline UUID

This is a more performant way to obtain a UUID for a name than loading an OfflinePlayer
2018-03-22 01:41:44 -04:00
Aikar b63ac711e0
Check Profile Cache for PlayerProfile API
This ensures we look up the name for ID only Profiles

If the profile is in the UserCache, we can get those details quickly

This should avoid some unnecessary round trips.

Additionally, handle profiles for offline mode to use offline UUID's
2018-03-22 01:28:22 -04:00
Aikar 75640df894
Fix Dragon Server Crashes
If the dragon tries to find "ground" and hits a hole, or off edge,
it will infinitely keep looking for non air and eventually crash.
2018-03-21 20:55:46 -04:00
Aikar fd54eb21e9
Configurable Unrestricted Signs - Resolves #1054
Bukkit restricts command execution of signs to test if the sender
has permission to run the specified command. This breaks vanilla
maps that use signs to intentionally run as elevated permission.

Bukkit provides an unrestricted advancements setting, so this setting
compliments that one and allows for unrestricted signs.

We still filter sign update packets to strip out commands at edit phase,
however there is no sanity in ever expecting creative mode to not be
able to create signs with any command.

Creative servers should absolutely never enable this.
Non creative servers, enable at own risk!!!
2018-03-21 19:59:54 -04:00
Aikar 723109fa84
Only complete incomplete profiles - Resolves #1053 2018-03-21 19:12:02 -04:00
MiniDigger 9aa5d9ec9b Call PortalCreateEvent for exit portals (#1047) 2018-03-20 14:56:44 -04:00
Brokkonaut 056e5d5953 Add missing registerPlayer in CraftPlayer.showPlayer0 (#1051) 2018-03-20 12:27:00 -04:00
Aikar b4b649122a
Remove the immediate dispatch optimization and adjust thread executors
hopefully will resolve #1049
2018-03-18 20:09:12 -04:00
Aikar c2933f8106
Player.setPlayerProfile API
This can be useful for changing name or skins after a player has logged in.
2018-03-18 12:32:09 -04:00
Aikar fb02c91835
Ability to change PlayerProfile in AsyncPreLoginEvent
This will allow you to change the players name or skin on login.
2018-03-18 11:46:14 -04:00
Aikar e3e257562f
Add PlayerProfile.complete() API to trigger skin lookup 2018-03-18 11:31:32 -04:00
Aikar 242e82f25b
Fix more issues with async scheduler and cancelling pending task
was a race condition, so do need to use the head/parsePending logic still
2018-03-17 14:59:03 -04:00
Aikar 09d1277482
Fix isCurrentlyRunning for sync tasks
Not sure where this would of ever been used, but for correctness sake.
2018-03-17 13:14:44 -04:00
Aikar 26b1519733
check that a task is valid before executing incase it was cancelled elsewhere
also set runners in the short circuit path so we know of the pending task incase its long running
2018-03-17 12:58:27 -04:00
Aikar 7dfbe44247
Improved Async Task Scheduler
The Craft Scheduler still uses the primary thread for task scheduling.
This results in the main thread still having to do work as part of the
dispatching of async tasks.

If plugins make use of lots of async tasks, such as particle emitters
that want to keep the logic off the main thread, the main thread still
receives quite a bit of load from processing all of these queued tasks.

Additionally, resizing and managing the pending entries for all of
these asynchronous tasks takes up time on the main thread too.

This commit replaces the implementation of the scheduler when working
with asynchronous tasks, by forwarding calls to the new scheduler.

The Async Scheduler uses a single thread executor for "management" tasks.
The Management Thread is responsible for all adding and dispatching of
scheduled tasks.

The mainThreadHeartbeat will send a heartbeat task to the management thread
with the currentTick value, so that it can find which tasks to execute.

Scheduling of an async tasks also dispatches a management task, ensuring
that any Queue resizing operation occurs off of the main thread.

The async queue uses a complete separate PriorityQueue, ensuring that resize
operations are decoupled from the sync tasks queue.

Additionally, an optimization was made that if a plugin schedules
a single, non repeating, no delay task, that we immediately dispatch it
to the executor pool instead of scheduling it. This avoids an unnecessary
round trip through the queue, as well as will reduce the size growth of the
queue if a plugin schedules lots of asynchronous tasks.
2018-03-16 23:09:51 -04:00
Aikar 87c48cf19d
explicit, not implicit... oops 2018-03-11 14:21:03 -04:00
Aikar c8027cd453
Disable Implicit Network Manager Flushing
This seems completely pointless, as packet dispatch uses .writeAndFlush.

Things seem to work fine without implicit flushing, but incase issues arise,
provide a System property to re-enable it using improved logic of doing the
flushing on the netty event loop, so it won't do the flush on the main thread.

Renable flushing by passing -Dpaper.implicit-flush=true
2018-03-11 14:15:38 -04:00
Aikar 6b04f82e90
Prevent Frosted Ice from loading/holding chunks 2018-03-10 16:33:49 -05:00
Shane Freeder ddc8a0ae88
Return null instead of players location on EnderChests opened by plugins 2018-03-10 20:26:05 +00:00
Shane Freeder 77229ce7ab
Add OBFHELPER - InventoryEnderChest#getTileEntity 2018-03-10 17:11:51 +00:00
Shane Freeder 9daa9cec93
Fix NPE when getting location from players EnderChest (fixes #1041) 2018-03-10 13:26:49 +00:00
MiniDigger 09692269ca Toggleable player crits, helps mitigate hacked clients. (#1040)
This is a port of https://github.com/PaperMC/Paper/blob/ver/1.8.8/Spigot-Server-Patches/0040-Toggleable-player-crits-helps-mitigate-hacked-client.patch
Also adds me to the MIT list.
2018-03-09 23:14:47 -05:00
Shane Freeder af94fec5af
Fix ItemStack.damage OBFHelper (fixes #1036) 2018-03-08 19:41:00 +00:00
Shane Freeder cdc1dcf02e
Update CB/S 2018-03-08 19:36:35 +00:00
Minecrell ce30be9781 [CI-SKIP] Add Minecrell to MIT list (#1035)
Change email address for some older patches to make it clear that
they are MIT licensed too.
2018-03-08 07:08:21 -08:00
Aikar 933c0ed1af
Fix ProfilePropertyIterator#remove() recursion bug 2018-03-07 21:03:01 -05:00
Gabscap ce16fd74ca [CI-SKIP] Add me (Gabscap) to MIT list
And change my used mail address in patch
2018-03-07 13:58:17 +01:00
Aikar 709d95ae00
Add max-player-auto-save-per-tick setting to spread out saves more
This will force the saves to spread over multiple ticks even when many
players auto save interval is aligned, avoiding spikes on large servers.

Closes #1021
2018-03-04 20:20:27 -05:00
Aikar 34e91b6e40
Rename getOwnerUUID to Tameable#getOwnerUniqueId for consistency
for the @kashike, thanks for adding a server diff to use this name!
2018-02-24 01:17:05 -05:00
Shane Freeder fab6cbe7e7
Update B/CB 2018-02-24 04:03:32 +00:00
Shane Freeder 17e57eb6ce
Extend Player Interact to cover CommandBlocks (@Phoenix616) 2018-02-18 14:39:02 +00:00
Aikar a64aa09862
Ignore AsyncCatcher setting for Command Dispatch, always force sync
Plugins were abusing this to dispatch commands async anyways.

We will no longer check that flag, and force all commands to be ran sync.

Use a different boolean for allowing things go to through on shutdown/restart instead.

Resolves #1004
Resolves #1005
2018-02-15 00:34:58 -05:00
Aikar 84b0287c54
Fix bug with hopper optimizations when amount > 3 - Closes #1011 2018-02-14 21:30:12 -05:00
Aikar 094bb03a37
Optimize Hoppers
- Lots of itemstack cloning removed. Only clone if the item is actually moved
- Return true when a plugin cancels inventory move item event instead of false, as false causes pulls to cycle through all items.
  However, pushes do not exhibit the same behavior, so this is not something plugins could of been relying on.
- Add option (Default on) to cooldown hoppers when they fail to move an item due to full inventory
- Skip subsequent InventoryMoveItemEvents if a plugin does not use the item after first event fire for an iteration
2018-02-12 23:26:02 -05:00
Nikita Rudy 91bd6a049c Added options to disable additional ore generation in Mesa and Extreme Hills (#1006) 2018-02-12 19:44:50 -05:00
Shane Freeder c66212c3ce
Update B/CB 2018-02-12 18:04:05 +00:00
Shane Freeder 19b309f63f
Close Structure Window when PlayerInteractEvent is cancelled
This is opened on the client, and so we send a CloseWindow packet
2018-02-12 17:47:26 +00:00
Shane Freeder 89a61a21ef
Update B/CB 2018-02-12 17:37:33 +00:00
Zach Brown 731eab80ed
Fix ArmorStand Item serialization
Broken in 09182f737d
2018-02-01 22:24:37 -05:00
Aikar 9b1ada78c9
Remove warning for custom entities in precreaturespawn, add note to event
We can't fix this. The event will simply not fire for hacky plugins replacing
entity registrations.
2018-01-28 22:50:35 -05:00
Aikar a485501ce4
improve Profile Fill Events early return logic - #997 2018-01-28 19:40:19 -05:00
Zach Brown 09182f737d
Add ArmorStand Item Meta
This is adds basic item meta for armor stands. It does not add all
possible metadata however.

There are armor, hand, and equipment types, as well as position data
that can also be added here. This initial implementation should serve as
a starting point for future additions in this area.

Fixes GH-559
2018-01-27 20:40:42 -05:00
Zach Brown f28f199099
Make push based hoppers imitate vanilla bounds
This is vanilla behavior https://i.imgur.com/zMIpRcQ.png
So we have to allow that sort of thing.

Fixes GH-993
2018-01-26 21:28:34 -05:00
Aikar 388f0e1001
MC-99321 - Dont check for blocked double chest for hoppers etc
This is a source of MAJOR lag for hoppers, as well as a gameplay bug.

This removes the necessity to disable the cat on chest behavior to improve performance.

now performance will be improved even if you have cat chest detection on.
2018-01-24 20:08:58 -05:00
Shane Freeder 212a6811db
Update B/CB 2018-01-24 17:31:43 +00:00
Aikar 845fcb7bd7
Fix build due to IDE inserting bad import 2018-01-21 14:12:54 -05:00
Aikar 8173d569d6
Make PlayerProfile.getProperties mutable
Most other collections returned like this is mutable, lets be consistent.
2018-01-21 14:09:41 -05:00
BillyGalbreath 4d7c516cb4 PlayerAdvancementCriterionGrantEvent (#978) 2018-01-21 13:23:34 -05:00
Aikar 5b72a03bcf
Fill Profile Property Events
Allows plugins to populate profile properties from local sources to avoid calls out to Mojang API
to fill in textures for example.

If Mojang API does need to be hit, event fire so you can get the results.

This is useful for implementing a ProfileCache for Player Skulls
2018-01-19 00:55:38 -05:00
Aikar f193fdb1ab
Add SkullMeta.setPlayerProfile API
This allows you to create already filled textures on Skulls to avoid texture lookups
which commonly cause rate limit issues with Mojang API
2018-01-19 00:38:49 -05:00
Aikar 531981a1cc
Move ProfileWhitelistVerifyEvent to use new PlayerProfile API
Also update javadocs on lookup events to link the new methods to use
2018-01-19 00:12:03 -05:00
Aikar 18e3bf685c
Update Profile Lookup Events to use new PlayerProfile API 2018-01-19 00:03:09 -05:00
Aikar 71c18fd5c9
Add PlayerProfile API to replace GameProfile
This simply provides the base API to create the objects. Further commits will come that adds
adds usage of this API to existing GameProfile based API's, as well as new API's.
2018-01-18 23:19:30 -05:00
Aikar 2f0e48c89a
Check for missing EntityType for PreCreatureSpawnEvent - Resolves #973 2018-01-15 23:44:21 -05:00
Aikar d5023110eb
Fix "unlimited" max chunk gens per tick setting
hopefully tried to set it to be unlimited in the first place....
2018-01-15 23:43:46 -05:00
Aikar 6068eb129f
PlayerNaturallySpawnCreaturesEvent
This event can be used for when you want to exclude a certain player
from triggering monster spawns on a server.

Also a highly more effecient way to blanket block spawns in a world
2018-01-14 17:36:24 -05:00
Aikar b98f8232e8
Move definition of fields up 2018-01-14 17:15:27 -05:00
Aikar 6a5948b316
PreCreatureSpawnEvent - Closes #917
Adds an event to fire before an Entity is created, so that plugins that need to cancel
CreatureSpawnEvent can do so from this event instead.

Cancelling CreatureSpawnEvent rapidly causes a lot of garbage collection and CPU waste
as it's done after the Entity object has been fully created.

Mob Limiting plugins and blanket "ban this type of monster" plugins should use this event
instead and save a lot of server resources.

See: https://github.com/PaperMC/Paper/issues/917
2018-01-14 17:12:13 -05:00
Aikar 7c60dbe814
update upstream for spigot-3764 fix 2018-01-14 16:15:56 -05:00
Aikar 4886fbd3cc
Fix SPIGOT-3764 - Fixes deadlock with Skull Owner changes 2018-01-13 12:29:50 -05:00
Zach Brown e6f92aecf3
Re-add config option for max squid spawn height
Apparently not only do people actually use it, but upstream missed it.
2018-01-11 16:50:27 -06:00
Zach Brown d8c81d20d8
Update upstream B/CB/S 2018-01-10 23:31:19 -06:00
Zach Brown 7c27a2af9c
Update patches that slipped through last 2018-01-05 01:30:03 -06:00
Zach Brown 06818d2dd7
Update upstream CB/S 2018-01-05 00:46:00 -06:00
Zach Brown fc911a20f5
Update upstream B/CB/S 2018-01-04 02:04:31 -06:00
Aikar 13b35536ce
Configurable Max Chunk Gens per Tick
Limit the number of generations that can occur in a single tick, forcing them
to be spread out more.

Defaulting to 10 as an average generation is going to be 3-6ms, which means 10 will
likely cause the server to lose TPS, but constrain how much.

This should result in no noticeable speed reduction in generation for servers not
lagging, and let larger servers reduce this value according to their own desires.
2018-01-01 16:38:34 -05:00
Aikar baeb737366
Configurable Chunks Sends per Tick setting
Vanilla already had this limited, make it configurable.

Limit how much exploration lags the server
2018-01-01 16:36:23 -05:00
Aikar c3432c8d29
Update Upstream 2018-01-01 16:29:33 -05:00
Zach Brown eb0f5adfdc
Update upstream B/CB/S 2017-12-27 22:45:33 -06:00
Shane Freeder c79d824fcd
Provide a system property to set the keepalive limit
add a system property to allow people to tweak how long the server
will wait for a reply. There is a compromise here between lower and higher
values, lower values will mean that dead connections can be closed sooner,
whereas higher values will make this less sensitive to issues such as spikes
from networking or during connections flood of chunk packets on slower clients,
at the cost of dead connections being kept open for longer.
2017-12-24 13:44:41 +00:00
Zach Brown 34731dd04e
Restructure lighting queue runnable handling
Instead of overriding add within the queue, never add runnables to the
queue if the light queue is disabled.

This change is made to make timings reports and stacktraces less
confusing for administrators, who prior to this change, would have seen
the lighting queue referenced in both, regardless of whether or not it
was enabled.

This change should not affect performance, nor is it made with the
intent to.
2017-12-22 15:25:01 -06:00
Aikar fc194dfaae
Ability to apply mending to XP API
This allows plugins that give players the ability to apply the experience
points to the Item Mending formula, which will repair an item instead
of giving the player experience points.

Both an API To standalone mend, and apply mending logic to .giveExp has been added.
2017-12-20 17:50:26 -05:00
Aikar 46394cb8b0
ExperienceOrbMergeEvent
Fired when the server is about to merge 2 experience orbs
Plugins can cancel this if they want to ensure experience orbs do not lose important
metadata such as spawn reason, or conditionally move data from source to target.
2017-12-19 22:57:46 -05:00
Aikar 9f204c2a91
PlayerPickupExperienceEvent
Allows plugins to cancel a player picking up an experience orb
2017-12-19 22:05:16 -05:00
Aikar 2603e833f7
Auto sort enchants on items - Fixes #915
This ensures that enchants are never added in inconsistent order.
The client shows the enchants in a sorted order already

This will auto fix previously created items too on load.
2017-12-19 17:56:13 -05:00
Aikar c208d652b4
ExperienceOrbs API for Reason/Source/Triggering player
Adds lots of information about why this orb exists.

Replaces isFromBottle() with logic that persists entity reloads too.
2017-12-19 16:46:27 -05:00
Shane Freeder fa204e45f9
Don't blindly send unlit chunks when lighting updates are allowed
Spigot, by default, disables several mechanisms around how chunks are
lit, if ever, which has forced them to always send chunks before vanilla
would consider them ready to send, causing for lots of issues around
lighting glitches.

Shamefully, the amount of work to relight chunks can be detremental
to some servers, meaning that forcibily disabling light updates can
cause major performance issues.

as such, we make a compromise; if this "feature" is disabled, we will
only send chunks which are actually ready to be sent, otherwise, we
will always send chunks.
2017-12-18 07:37:50 +00:00
Shane Freeder 0f97922ebd
Restore broken lighting logic from spigot 2017-12-18 07:35:42 +00:00
Aikar 099911fbd1
Update upstream 2017-12-17 01:34:54 -05:00
Aikar b8833f477c
SPIGOT-3699: Fix cloning banner itemstacks
the banner meta would end up with a shared reference to the patterns
2017-12-15 15:57:15 -05:00
Aikar ad40e694a3
Update upstream 2017-12-09 12:37:09 -05:00
Shane Freeder a693cb21ab
Update B/CB/S 2017-12-05 01:34:10 +00:00
Aikar 70caa048a8
Fix AsyncTabCompleteEvent not setting isCommand 2017-11-29 23:36:31 -05:00
Aikar b02a8b65df
Avoid NPE in PathfinderGoalTempt 2017-11-29 22:19:24 -05:00
Shane Freeder f0e225b526
Fix ClassCastException in tabCompletor (fixes #942) 2017-11-27 16:52:32 +00:00
Aikar 147081d0ff
AsyncTabCompleteEvent
Let plugins be able to control tab completion of commands and chat async.

This will be useful for frameworks like ACF so we can define async safe completion handlers,
and avoid going to main for tab completions.

Especially useful if you need to query a database in order to obtain the results for tab
completion, such as offline players.

Also adds isCommand and getLocation to the sync TabCompleteEvent
2017-11-26 22:05:48 -05:00
Shane Freeder f4e9f4737f
Do not use a snapshot for hoppers
In 1.12, Spigot improved their blockstate implementation to take a full
copy of the TE, this allows for a much better snapshot in that it will
actually retain all of the TE's state, it is a much more expensive
implementation. This is also implicated with their backwards compat
for inventories meaning that accessing of a snapshots inventory of a
placed block will actually access the inventory of the live TE, making
creation of a snapshot redundant if the only intent is to interact with
the TEs inventory.

Hoppers are a horrible hit, every attempt to transfer an ItemStack will
result in two TileEntity snapshots, with two hoppers and a double chest
ontop, I managed to log 380 cases per second where a snapshot would have been
taken in cases where the snapshot is redundant.
2017-11-25 17:39:31 +00:00
Aikar 79f57aa18c
API to get a BlockState without a snapshot
This allows you to get a BlockState without creating a snapshot, operating
on the real tile entity.

This is useful for where performance is needed
2017-11-24 07:28:57 +00:00
Shane Freeder 1912d06613
Update B/CB 2017-11-24 07:14:38 +00:00
Shane Freeder 6c5d4f75ee
Update B/CB 2017-11-20 14:50:30 +00:00
Zach Brown e90dd1b684 Fix view distance API handling on negative values
Prior to this change, if a player was ever set to have a negative view
distance, an attempt to set them back to the default would fail, leading
to them appearing to be stuck in that state.

Now we just interpret that negative value as a "reset" to default.
2017-11-18 21:45:22 -05:00
Shane Freeder 7f12781017
Update B/CB/S 2017-11-18 03:04:21 +00:00
Shane Freeder caec68907d
Update B/CB/S 2017-11-17 09:55:26 +00:00
Shane Freeder 5980496556
use CB BlockState implementations for captured blocks (Fixes #868) 2017-11-16 12:37:52 +00:00
Zach b1c21f10da
Merge pull request #935 from avatarmc/prevent-disconnected-logins
Prevent logins from being processed when the player has disconnected
2017-11-15 22:36:56 -05:00
Zach Brown ac880e00b4
Fix logic for unconditional xp orb merging
Fixes GH-936
2017-11-13 20:30:45 -05:00
killme 6aa7d59b7b Prevent logins from being processed when the player has disconnected 2017-11-13 15:32:20 +01:00
Aikar 7ba9baadca Use <= instead of < for structure patch
Thankfully I randomly think about code and randomly wondered if I used <= or < here, and caught this!

This would of missed some chunks for the structure at the highest X/Z
2017-11-12 18:51:10 -05:00
Aikar 0f2c274998 Improve Structures Checking
Improves performance by keying every chunk thats part of a structure to a hashmap
instead of only the first one.

This allows us to avoid iterating the entire structures value set to see
if a block position is inside of a structure.

This should have pretty decent performance improvement to any standard world
that has been around for a whilewith lots of structures due to ineffeciencies
in how MC stores structures (even unloaded chunks has structured data loaded)
2017-11-11 19:06:45 -05:00
Zach Brown e04bef9785
Add Obfuscation helper for armor change impl
Also alphabetize the importmcdev script... heathens, all of you
2017-11-11 00:07:45 -05:00
pkt77 3438e96192
Add PlayerArmorChangeEvent
Closes GH-928
2017-11-10 23:49:34 -05:00
BillyGalbreath 072d6ec8cb Add configurable max exp value when merging orbs 2017-11-10 23:04:06 -05:00
BillyGalbreath d7039347b0 PlayerAttemptPickupItemEvent additions 2017-11-10 22:49:53 -05:00
Shane Freeder f1e583753f
Merge pull request '#925' from Brokkonaut/NoAttackSoundsFromVanishedPlayers
Send attack SoundEffects only to players who can see the attacker
2017-11-08 16:27:17 +00:00
Shane Freeder 1d03f56bd6
Update B/CB/S 2017-11-08 16:13:57 +00:00
Shane Freeder d1d4f3b465
Revert maven-surefire to prevent a build regression
In some environments, the 2.20.1 version of the maven surefire plugin
can cause builds to fail due to changes in surefire in how it detects
that the forked JVM used for testing is still alive or not.
2017-11-06 23:58:32 +00:00
Brokkonaut d90528ab64 Send attack SoundEffects only to players who can see the attacker 2017-11-02 21:27:29 +01:00
Shane Freeder 4c71520375
allow nerfed mobs to jump again
Entity AI tasks are initialized earlier in recent versions
of MC, this means that the fromMobSpawner has not been set
at the point where AI tasks are initilazed and so the goalFloat
will never be populated.

To rectify this, we can rely on the entity tick checking if
the mob is from a spawner each tick, and just initialize the
field should the paper option be enabled. This saves us from
having to modify the call chain in order to pass the fact that
it was created by a mobSpawner earlier.
2017-10-31 15:35:05 +00:00
Shane Freeder 8381709166
rectify Configurable Cartographer Treasure Maps patch 2017-10-30 13:06:35 +00:00
Brokkonaut 8835dcc6f4
Replace HashSet with fastutil's ObjectOpenHashSet in HashTreeSet
HashSet sometimes uses compareTo() instead of equals() and this breaks the comparison of net.minecraft.server.NextTickListEntry (the only place where HashTreeSet is used).

In this cases duplicate entries could be added to the HashSet of HashTreeSet, because NextTickListEntry.compareTo() does not return 0, even if NextTickListEntry.equals() returns true.

ObjectOpenHashSet never uses compareTo(), so the inconsistencies of NextTickListEntry cause no problems.

Fixes https://github.com/PaperMC/Paper/issues/588
2017-10-29 15:35:16 +00:00
Shane Freeder 23fa02d399
Update B/CB/S 2017-10-29 15:19:21 +00:00
Shane Freeder cdce4486d8
Don't send keepalive logger message if we've already disconnected 2017-10-17 21:40:53 +01:00
kashike 1f2e01ba79 Merge pull request #914 from Minecrell/expose-client-protocol-host
Expose client protocol version and virtual host
2017-10-17 11:03:58 -07:00
Shane Freeder 64ef6a6233
allow keepalive to wait longer for a client response
and also provide a bit more information in the server
logs so we can work out what is going on.
2017-10-16 15:37:17 +01:00
Zach Brown a1ea3785ca
Add command for listing entities in a world
Port of 303a775fc3

Will display a list of all entities in a world, as well as which chunks
they are in. Hopefully, this will make tracking down chunks with lots of
entities easier.

Only real change from the forge version is that instead of dimension
IDs, we accept world names in the form of a string.

/paper entity list - Lists all entities in the player's current world
/paper entity list minecraft:zombie - Lists all zombies in the player's
current world

/paper entity list * world_nether - Lists all entities in the nether
/paper entity list minecraft:ghast world_nether - Lists all ghasts in
the nether
2017-10-15 17:53:49 -04:00
Shane Freeder e9eb9ec7eb
Update CB 2017-10-13 22:07:48 +01:00
Minecrell 1f4d3af169 Expose client protocol version and virtual host 2017-10-12 17:31:36 +02:00
Shane Freeder a6f9074647
Remove lighting patches from spigot that cause more harm than good.
This commit removes two patches from spigot:
please review the patch messages for more information, however;

"Allow Disabling of Random Lighting Updates" potentially leaves chunk light maps in an invalid state, with
how often the server looks at these anyways, this patch really serves a questionable nature, the work is
going to be done, only it's being delayed and allowing the light map to be left in a potentially outdated
state.

"Fix some chunks not being sent to the client" sends chunks before their lighting has been calculated, this
means that the client will recieve chunks before they lighting has been calculated which can cause rendering
artifacts. The original issue around this patch appears to have already been fixed years ago.
2017-10-10 23:27:47 +01:00
Shane Freeder 599d18420d
Update B/CB 2017-10-09 10:15:17 +01:00
Shane Freeder 5d722d4080
Revert keepalive back to 15 seconds 2017-10-09 09:49:12 +01:00
Shane Freeder 4e44c2b38c
Update CB/S 2017-10-07 09:57:38 +01:00
stonar96 524ebe97d7
Anti Xray v2 (#858) 2017-10-06 04:39:34 +01:00
Shane Freeder 0bff7a667d
Fix patch message (off the main thread!)
Don't tired and push!
2017-10-06 04:27:26 +01:00
Shane Freeder 8683f2dbb0
rectify comment derp somebody just to point out 2017-10-05 03:39:51 +01:00
Shane Freeder 45a9b3c847
handle PacketPlayInKeepAlive async
In 1.12.2, Mojang moved the processing of PacketPlayInKeepAlive off the main
thread, while entirely correct for the server, this causes issues with
plugins which are expecting the PlayerQuitEvent on the main thread.

In order to counteract some bad behavior, we will post handling of the
disconnection to the main thread, but leave the actual processing of the packet
on the main thread.
2017-10-05 02:25:41 +01:00
Shane Freeder 30b9b403e2
Update craftbukkit 2017-10-01 01:57:01 +01:00
Zach Brown a8c503b86f Update documentation around PlayerJumpEvent 2017-09-29 14:58:24 -04:00
Zach Brown 7b9c5a7c49 Fix build 2017-09-28 18:55:01 -04:00
Zach Brown 56e3c7f06c Patch files need headers, weird isn't it 2017-09-28 18:43:36 -04:00
Zach Brown 83c7399962 Add PlayerJumpEvent 2017-09-28 17:38:17 -04:00
Shane Freeder 1875fb559b
Update metrics to support java 9
http://openjdk.java.net/jeps/223
Java decided to change their versioning scheme and in doing so modified the
java.version system property to return $major[.$minor][.$secuity][-ea], as
opposed to 1.$major.0_$identifier we can handle pre-9 by checking if the "major"
is equal to "1", otherwise, 9+

of course, it really wouldn't be all that simple if they didn't add a quirk, now would it.
valid strings for the major may potentially include values such as -ea to deannotate a pre release
2017-09-26 06:04:00 +01:00
Minecrell a4ed512a93 Disable logger prefix for various plugins bypassing the plugin logger
Some plugins bypass the plugin logger and add the plugin prefix
manually to the log message. Since they use other logger names
(e.g. qualified class names) these would now also appear in the
log. Disable the logger prefix for these plugins so the messages
show up correctly.
2017-09-23 21:45:34 +02:00
Minecrell ce34fd1ade Allow plugins to use SLF4J for logging
SLF4J is a commonly used abstraction for various logging frameworks
such as java.util.logging (JUL) or Log4j. Currently, plugins are
required to do all their logging using the provided JUL logger.
This is annoying for plugins that target multiple platforms or when
using libraries that log messages using SLF4J.

Expose SLF4J as optional logging API for plugins, so they can use
it without having to shade it in the plugin and going through
several layers of logging abstraction.
2017-09-23 21:45:27 +02:00
Minecrell bbfc0c8ee3 Handle plugin prefixes in Log4j configuration 2017-09-23 21:30:35 +02:00
Minecrell 10893fea38 Use Log4j IOStreams to redirect System.out/err to logger
Log4j2 provides an optimized implementation of PrintStream that
redirects its output to a logger. Use it instead of a custom
implementation for minor performance improvements and some fixes.

With the old implementation, each call to System.print()
results in a separate line, even though it should not result in
a line break. Log4j's implementation handles it correctly.
2017-09-23 20:42:15 +02:00
Minecrell 72eaa08320 Update TerminalConsoleAppender to 1.0.0 (updates JLine)
Fixes #879
2017-09-23 19:57:16 +02:00
kashike 5a42891c48 Avoid NPE in AdvancementDataWorld thanks to Spigot being dumb 2017-09-21 07:01:40 -07:00
Zach Brown 88ba5fcaac
Update upstream CB
Fixes GH-887
2017-09-18 22:01:43 -04:00
Aikar dfe2b00874 World can be null for sign conversion, fixes #886 2017-09-18 21:03:45 -04:00
kashike 60cdf86b8a Avoid NPE during CraftBlockEntityState load 2017-09-18 13:39:40 -07:00
Shane Freeder d934dcc1e3
Update to 1.12.2, May the Tacos be with you 2017-09-18 12:04:01 +01:00
Shane Freeder 836db0ec9c
Update CB, refactor 0229-Fix-this-stupid-bullshit
Refactored 0229-Fix-this-stupid-bullshit in order to prevent merge conflicts
when spigot decides to update the timer and to provide some form of hint in the
console/log on startup.
2017-09-15 15:37:05 +01:00
Zach Brown 6d9375d222 Fix race condition with chunks, dead tile entities
Fixes PaperMC/Paper#883 same issue as MinecraftForge/MinecraftForge#4386

A more detailed anaylsis of what is probably going on, courtesy of
@bs2609 and the MCForge Issue Tracker is:

When a chunk is unloaded, the entities and tile entities it contains are
marked for removal. The actual removal (from the world) occurs later,
when the world ticks its entities.
Conversely, when a chunk is loaded, it generally adds its entities to
the world promptly, without queuing.

Here's the normal sequence of events:

Chunk unloaded
Old entities removed
Chunk loaded
New entities added

However, what can happen:

Chunk unloaded
Chunk loaded
New entities added
Old entities removed

This occurs when an unloaded chunk is reloaded before its corresponding
entities have been removed.
2017-09-11 22:21:57 -04:00
Zach Brown a0cd14a34c
Rebuild patches 2017-09-06 22:59:08 -04:00
Shane Freeder 3baf14a8ec
Rebuild patches 2017-09-03 01:09:35 +01:00
BillyGalbreath 75cb198fd2
LivingEntity#setKiller 2017-08-24 15:19:29 -04:00
kashike d43da9fc70 Allow specifying a custom "authentication servers down" kick message
Thanks to @phenomax in #855
2017-08-17 16:16:44 -07:00
Shane Freeder 4368f412c6
Update CB 2017-08-16 16:47:06 +01:00
Shane Freeder d77731eee2
Update S 2017-08-12 22:51:29 +01:00
Zach b22423be8b Merge pull request #853 from Brokkonaut/dragon-egg-falling
I forgot the // Paper comment
2017-08-11 21:39:54 -05:00
Brokkonaut fe8ce33ef5 I forgot the // Paper comment 2017-08-12 02:23:35 +02:00
Zach Brown bab98cf5ff
Don't let Player#getLocale return null
Thanks for reporting @MatrixTunnel
2017-08-11 18:16:00 -05:00
Zach Brown a8508dc5df
Remove null values in TileEntity tick list
Because who wouldn't want to tick a null tile entity right?
Fixes GH-851
2017-08-11 17:59:44 -05:00
Shane Freeder 912ee23e25
Update CB 2017-08-11 13:05:23 +01:00
Zach Brown 0181286eb9
Fix MC-117075: TE Unload Lag Spike
PaperMC port of https://github.com/MinecraftForge/MinecraftForge/pull/4281
2017-08-10 21:06:53 -05:00
Brokkonaut c84dd9edfe MC-94186 Fix dragon egg falling in lazy chunks
Fixes falling dragon eggs in lazy chunks fall to the block below the last empty block and replacing that block with them.

See also https://bugs.mojang.com/browse/MC-94186
2017-08-11 03:36:59 +02:00
Shane Freeder 42faa9e529 Update CB (#846) 2017-08-09 14:44:28 -04:00
BillyGalbreath 6f32c51336 Ocelot despawns should honor nametags and leash (#821) 2017-08-07 23:26:44 -04:00
BillyGalbreath 128c35000b Reset spawner timer when spawner event is cancelled (#819) 2017-08-07 23:25:59 -04:00
chickeneer 52c8fc7633 Fix Nether Portal Creation on cancelled event
Spigot is manipulating the Travel Agents canCreatePortal, but forgot to reset it on cancel

This causes nether portals to not be generated if the event is ever cancelled
2017-08-07 23:08:50 -04:00
Aikar ff5bd7b03b Upstream update 2017-08-07 23:05:16 -04:00
DemonWav 1ff893abe1
Fix this stupid bullshit 2017-08-06 17:18:20 -05:00
Shane Freeder efe49baecf
fix construction order in CraftBanner 2017-08-06 16:36:48 +01:00
Shane Freeder bec1253aa9
Update B/CB/S 2017-08-06 00:08:21 +01:00
Zach Brown f7e23ba7fa
Update upstream CB 2017-08-04 22:10:30 -05:00
Minecrell 9f3f6e02a6 Update JLine to 3.4.0. Fixes #736 2017-08-04 09:15:09 +02:00
BlackHole 6879328bf6 Update to 1.12.1 2017-08-03 17:27:54 +02:00
Aikar cdd6d8562a Update Upstream 2017-07-30 18:41:08 -04:00
Shane Freeder fed4815fff
Update B/CB 2017-07-28 15:51:46 +01:00
Aikar d841b8a345 Further refine logic 2017-07-28 00:04:01 -04:00
Aikar 5b6dfbc428 ProfileWhitelistVerifyEvent
Fires when the server is validating if a player is whitelisted.

Allows you to do dynamic whitelisting and change of kick message
2017-07-27 23:42:19 -04:00
Zach Brown 5c5e998cde
There is no reason to continue if we DC a player during shutdown
Thanks Ice
2017-07-27 21:40:07 -05:00
Aikar 7afc930c25 Fix a bug in recipe books that prevented them from working as they should 2017-07-27 09:38:21 -04:00
Aikar 11f2794bbe Remove use of FastUtil for unload queue, very bad performance 2017-07-27 00:25:13 -04:00
Aikar fabe552ae9 Resolves GH-806: Respect saving disabled before unloading all chunks in a world
This behavior causes a save to occur even though saving was supposed to be turned off.

It's triggered when Hell/End worlds are empty of players.
2017-07-27 00:09:24 -04:00
Aikar 7a8cce428f Rebuild patches (forgot to pull :() 2017-07-26 23:45:03 -04:00
Aikar 9a7cdcec39 Add getI18NDisplayName API
Gets the Display name as seen in the Client.
Currently the server only supports the English language. To override this,
You must replace the language file embedded in the server jar.
2017-07-26 23:44:29 -04:00
Aikar 8e78124e46 Implement ensureServerConversions API
This will take a Bukkit ItemStack and run it through any conversions a server process would perform on it,
to ensure it meets latest minecraft expectations.
2017-07-26 23:44:29 -04:00
Aikar 4a35e438e9 Improve the Saddle API for Horses
Not all horses with Saddles have armor. This lets us break up the horses with saddles
and access their saddle state separately from an interface shared with Armor.
2017-07-26 23:44:29 -04:00
Shane Freeder 6177f2d61e Add missing coverages for getTileEntity in order to attempt to avoid exeptions when calling getTileEntity (#797) 2017-07-26 23:11:09 -04:00
willies952002 c86f61f8af Allow Changing of Player Sample in ServerListPingEvent 2017-07-26 23:06:56 -04:00
Zach Brown c6c6b4f69a
JDK-8176055: Fix heap dumps on Java 8u141+
In Java 8u141 (1.8.0_141-b15) and newer, the
com.sun.management.HotSpotDiagnostic::dumpHeap API has changed and now
requires all heap dumps to end with the .hprof file extension.

Before this change, servers running 8u141 would be unable to perform a
heap dump.

For more information, please see the official release notes of Java 8
Update 141, linked below.
http://www.oracle.com/technetwork/java/javase/8u141-relnotes-3720385.html
2017-07-26 20:28:56 -05:00
Aikar dcd4f3710f Upstream update 2017-07-26 21:12:40 -04:00
Zach Brown 43543c78c4
Update upstream CB 2017-07-24 06:47:43 -05:00
Zach Brown c9b00ce95d
Update upstream CB 2017-07-22 20:16:06 -05:00
Aikar cba0fa09d1 Remove last patch, didn't resolve issue. 2017-07-16 20:59:39 -04:00
Aikar 05a8914e8c SPIGOT-3427: Recalculate ConsoleSender permissions after plugins have loaded
Resolves a really weird race condition where the console sender could lose permission to execute
commands defined in plugin.yml with default=op
2017-07-16 20:41:30 -04:00
Aikar a7cb000633 Update upstream (memory leak fix) 2017-07-16 20:36:27 -04:00
Zach Brown 5938592845
Port Sponge's heap dump command feature to Paper
To dump the server heap, run the following command:
`/paper heap`

This is added with the intent that it is useful for administrators and
developers to more easily identify and resolve memory leaks. Both by examining
these dumps themselves and by more easily allowing them to send them to
knowledgable parties.

This is a nearly line-for-line port of the same Sponge feature. So all
credit for the idea and implementation belongs to the that team.

Specifically the following commits:
be08be04b0
5e10a1b795
2017-07-15 18:59:18 -05:00
Zach Brown fd624f502d
Clear plugin metadata only after onDisable()
Fixes GH-776
2017-07-15 14:38:16 -05:00
Aikar 00c64f7fb7 Fix Anvil Level sync to client
763827668e

Was done incorrectly and is now causing level desyncs to client.

Always send current level to the client, and instead make setWindowProperty set the level.
2017-07-11 23:23:17 -04:00
Shane Freeder 18be9d24e4
Update B/CB 2017-07-10 14:04:41 +01:00
Shane Freeder 1e4d3c3106
Update C 2017-07-09 10:56:36 +01:00
BillyGalbreath e0e23db485
Add Entity#fromMobSpawner API
Merges and closes GH-752
2017-07-09 01:39:09 -05:00
Shane Freeder 18c16a6111
Fix javadoc warnings 2017-07-03 19:54:40 +01:00
Zach Brown 9aae84ea43
Block player logins during server shutdown
Adds GH-765
2017-07-02 21:37:56 -05:00
Aikar a92bce595d Update upstream 2017-06-30 18:13:06 -05:00
Aikar 3244d917f3 Update upstream 2017-06-25 20:26:00 -04:00
Zach Brown b61aec52a4
Update upstream B/CB 2017-06-25 18:00:32 -05:00
Minecrell 816fa83734 Avoid using System.out for colored messages. Fixes #757
Messages written to System.out are automatically redirected to the
root logger by CraftBukkit. However, before the messages reach the
logger, they are encoded and later decoded again using the standard
system encoding.

On some systems (e.g. FreeBSD), the standard system encoding is
US-ASCII by default, which doesn't support the section sign (§) that
is used for the color codes. Consequently, they will never reach
the formatter that translates them into ANSI escape codes.

There is no reason to write these messages to System.out - it just
adds additional overhead and the encoding problems. We can just log
the messages directly with the root logger.
2017-06-21 11:04:28 +02:00
Aikar eb67c684d9 Fix Lootable bug 2017-06-20 18:59:18 -04:00
Aikar 825834273c update upstream 2017-06-20 18:53:55 -04:00
Zach Brown 272f130b5a
Update upstream CB/S 2017-06-18 20:37:08 -05:00
Aikar 1ebe37e5a3 Profile Lookup Events
Adds a Pre Lookup Event and a Post Lookup Event so that plugins may prefill in profile data, and cache the responses from
profiles that had to be looked up.
2017-06-17 20:57:29 -04:00
sweepyoface a88fd61a23 Add UnknownCommandEvent (#746) 2017-06-17 20:53:31 -04:00
Aikar 68e8778890 Shoulder Entities Release API
Let's you eject the Parrot naturally and get the newly spawned Parrot.
2017-06-17 15:21:39 -04:00
Zach Brown 76cede4391
Update upstream CB 2017-06-17 14:18:29 -05:00
Minecrell ca2b4c592f Continue reading from console input after EOT
There is usually no reason to stop reading from the console, so
preventing console input after EOT can be extremely confusing.

To prevent this, we can simply ignore the exception thrown by
JLine and continue reading normally.
2017-06-14 09:47:10 +02:00
Minecrell 56dcc3fcc7 Remove unneeded WINDOWS_COMPAT ConsoleAppender
It was originally added in Bukkit/CraftBukkit@6aafe7c5a1 as a
workaround for BUKKIT-4956 to fix console output on Windows.

I believe the original issue was related to LOG4J2-965 and fixed
in apache/logging-log4j2@d04659c. Minecraft 1.12 finally updated
the Log4J version so this issue is no longer present.

Console output is still working fine on Windows after removing this.
2017-06-13 10:36:35 +02:00
Zach Brown 2b51986c25
Update upstream B/CB/S 2017-06-12 22:28:09 -05:00
Zach Brown cb887bb4f4
Renumber patches, fix conflicts, update for 1.12 2017-06-11 20:02:57 -05:00
BillyGalbreath d6358a6ac1 PlayerAttemptPickupItemEvent (#732) 2017-06-11 19:46:11 -05:00
BillyGalbreath 209b70caab PlayerPickupItemEvent#setFlyAtPlayer (#683)
* PlayerPickupItemEvent#setFlyAtPlayer
2017-06-11 19:43:59 -05:00
BillyGalbreath 8ad4216e18 EntityPickupItemEvent (#679)
EntityPickupItemEvent
2017-06-11 19:42:01 -05:00
BillyGalbreath 1ca53dcefe Item#canEntityPickup (#680)
Item#canEntityPickup
2017-06-11 19:40:42 -05:00
Shane Freeder 06a34ec40a
Provide a configurable option to disable creeper lingering effect spawns 2017-06-11 21:29:04 +01:00
Zach 4eff799e80 Merge pull request #728 from Minecrell/terminalconsoleappender
Improve console implementation
2017-06-11 15:12:27 -05:00
Zach Brown 263bd3f539
Update upstream CB/S 2017-06-11 12:03:07 -05:00
Minecrell de2af506f3 Improve console implementation
Rewrite console improvements (console colors, tab completion,
persistent input line, ...) using JLine 3.x and TerminalConsoleAppender.

New features:
  - Support console colors for Vanilla commands
  - Add console colors for warnings and errors
  - Server can now be turned off safely using CTRL + C. JLine catches
    the signal and the implementation shuts down the server cleanly.
  - Support console colors and persistent input line when running in
    IntelliJ IDEA

Other changes:
  - Update JLine to 3.3.1 (from 2.12.1)
  - Server starts 1-2 seconds faster thanks to optimizations in Log4j
    configuration
2017-06-11 14:31:21 +02:00
kashike 90b2d02091 Add configuration option to prevent player names from being suggested 2017-06-09 07:32:12 -07:00
Aikar 19e9e0d647 Update upstream 2017-06-09 08:29:44 -04:00
Shane Freeder c829f34e0c
Re: Actually exit the JVM after stopping the server when /restart is ran 2017-06-09 01:46:54 +01:00
Shane Freeder 1f626a5ed9
Do not relocate fastutil 2017-06-08 19:07:00 +01:00
Shane Freeder 3c9f2a0a20
Update Paper to MC 1.12 2017-06-08 15:17:11 +01:00
Zach Brown 04d2d38581
Update upstream B/CB 2017-06-02 23:41:05 -05:00
Shane Freeder adab11a1f7
Update to 1.12-pre6 2017-05-31 22:12:46 -05:00
Zach Brown d032cd0568
Add more info, triggers to watchdog velocity warn
Adds entity name to exception message
Checks that the velocity to be set is NaN
2017-05-28 00:06:26 -05:00
Zach Brown 066f383b95
Update upstream B/CB/S 2017-05-27 23:25:17 -05:00
Zach Brown 9d6bb9d4c8
Bump outdated build notification back out to norm
Merge outdated notification patch into existing branding patch
2017-05-26 22:46:27 -05:00
Zach Brown 720769bf30
Update upstream B/S 2017-05-23 17:11:28 -05:00
Zach Brown c1d0b4b4c6
Update Paper to MC 1.12-pre5 2017-05-20 23:49:56 -05:00
Zach Brown 7ff16c0197
Merge branch 'master' into pre/1.12 2017-05-18 18:43:21 -05:00
Shane Freeder ee2ec9feac
Actually exit the JVM after stopping the server when /restart is ran 2017-05-18 21:15:47 +01:00
Zach Brown 210ef18495
Merge branch 'master' into pre/1.12 2017-05-17 17:53:13 -05:00
Shane Freeder ca6254067f
Workaround a jansi bug with Windows
Update Paperclip too while we're here
2017-05-17 17:51:54 -05:00
Zach Brown c6e0ceabd7
Add an option to make parrots stick to shoulders
When enabled, Parrots will not fly off of a player's shoulder everytime
they change Y level, touch water, sneeze, etc.
Instead, a player must toggle shift to "shake" the parrots off.
2017-05-16 21:34:47 -05:00
Zach Brown baf762a2c1
Update upstream B/CB/S 2017-05-15 11:25:20 -05:00
Zach Brown 8e610af635
Merge branch 'master' into pre/1.12 2017-05-15 10:57:42 -05:00
Shane Freeder a2459e30fd
Allow the watchdog to try sanely stopping the server 2017-05-15 16:36:15 +01:00
Zach Brown 6e2332a592
Switch 1.12-pre2 to its own version checks
Fix stream formatting issue that had been bugging me
2017-05-15 10:28:28 -05:00
Zach Brown 491286def4
Update to MC 1.12-pre2 2017-05-14 16:06:27 -05:00
Zach Brown 3052144be8
Update upstream CB 2017-05-13 20:37:46 -05:00
Zach Brown a76ba5c118
Add system property to disable book size limits 2017-05-13 20:26:19 -05:00
Zach Brown 2103c75247
Publicly execute the main thread at dawn
GH-684

Better handles most true deadlock situations
2017-05-13 06:08:09 -05:00
Zach Brown b0d78d461b
Properly handle async calls to restart the server
GH-681
2017-05-12 23:49:59 -05:00
Zach Brown 6c3faf6aa3
Update upstream B/CB/S 2017-05-04 18:08:52 -05:00
Zach Brown e9abb69799
Raise book max title length to 32 2017-04-29 20:43:14 -05:00
Zach Brown 974b0afca9
Remove last bit of chunk exists region file fix
CraftBukkit removed their implementation that caused this issue,
switching to Mojang's implementation which doesn't appear to share it. I
already removed the important bit in the last upstream merge, this is
just unused and unnecessary now. So we remove it.
2017-04-29 05:27:31 -05:00
Zach Brown 8b2122a291
Update upstream B/CB/S 2017-04-28 19:25:52 -05:00
Zach Brown 5f3d5d8170
Fix patch conflict with upstream 2017-04-22 17:49:47 -05:00
Zach Brown f68b2ab95e
Update upstream CB/S 2017-04-22 17:41:28 -05:00
Shane Freeder ffb572ce9a
Remove Ignore invalid Marker Icon ID's in maps
Spigot has patched this issue inside MapIcon, meaning that we no longer need to maintain this patch; Spigots patch also fixes #668 in that it will verify the length of the array, as well as protect against a negative type value being fetched from the array. Only real change is that Spigots patch returns a MapIcon.Type.PLAYER, instead of the RED_MARKER as originally PR'd by Aikar.
2017-04-22 15:52:56 +01:00
Shane Freeder 7afde8f75f
Use lastIndexOf in Metrics class to futureproof
Because who's going to remember to change that line...
2017-04-22 02:37:58 -05:00
Zach Brown 2db4e57e4d
Update bStats implementation 2017-04-22 01:16:45 -05:00
Zach Brown 9db28f00db
Update upstream B/CB 2017-04-21 23:42:59 -05:00
Zach 56ba57b210 Merge pull request #663 from electronicboy/player-death-passenger-bug
Call stopRiding() on a Players death
2017-04-21 18:06:53 -05:00
Zach Brown d5cf14188a
Update upstream B/CB 2017-04-20 08:22:40 -05:00
Shane Freeder 674913df0a
Call stopRiding() on a Players death
Currently, when a player dies they are not automatically ejected from the entity they are riding, which allows
for the ridden entity to affect the players location on respawn (we're still riding it for a part of a tick), as well as allows a dupe to occur with the ridden entity teleporting to the new world with the player
2017-04-18 15:17:54 +01:00
Zach Brown 63beca49fe
Update upstream B/CB/S
Closes GH-658
2017-04-16 17:12:14 -05:00
Zach Brown 362e425271
Update upstream CB/S 2017-04-10 22:11:26 -05:00
kashike 19b5d5b124 Fix NFE caused by attempting to read an EMPTY ItemStack
Thanks @gabizou
2017-04-09 23:52:14 -07:00
Zach Brown e4a071f6e4
Update upstream B/CB 2017-03-31 23:24:42 -05:00
Zach Brown e6a7d357ce
Update upstream CB 2017-03-30 18:26:00 -05:00
Zach Brown ae17d2c28c
Switch metrics impl to use thread executor service 2017-03-26 18:29:38 -05:00
Zach Brown 5e2784e941
Switch to a bStats based Metrics system 2017-03-25 00:22:02 -05:00
Zach 246712ed92 Merge pull request #628 from willies952002/feature/reloadCommands
Don't Display Success Message on Alias Reload Fail
2017-03-24 22:34:13 -05:00
Zach Brown 07d0098a9e
Update upstream B/CB/S
Adds /paper command for reloading the paper config.
Closes GH-639

Per-world config logging has been removed in favor of all or nothing
logging for all paper settings. I don't believe it was used enough to
warrant maintaining. If this is not the case it should be possible to
re-add it.
2017-03-24 22:27:43 -05:00
Zach Brown 1d87ea2179
Remove unnecessary blocking of chest minecarts
This is already covered by recent changes.
Closes GH-373
2017-03-19 16:17:24 -05:00
Zach Brown dbabbdbdbe
Update upstream B/CB 2017-03-18 21:01:13 -05:00
Shane Freeder 02afedb602
Ensure that the world of a dead entity is not changed in a portal 2017-03-19 01:33:31 +00:00
Shane Freeder 09e52007e3
Only set the location of the newly spawned entity 2017-03-17 13:17:52 +00:00
Zach Brown 60182fd473
Just make sure an entity's exit is set properly
Don't re-add, it's redundant and you end up with inconsistent
inconsistencies inconsistently
2017-03-17 00:50:43 -05:00
Zach Brown 08aa6e5f49
Make sure the entity is still added to the world 2017-03-17 00:09:26 -05:00
Shane Freeder 45ad47717e Fix a duplicate alive entity on second world 2017-03-16 22:31:53 -05:00
Zach Brown 7f3aa1ed29
Update upstream B/CB/S
Closes GH-631
2017-03-15 09:32:50 -05:00
willies952002 77fdfd6de1
Don't Display Success Message on Alias Reload Fail
Also add "commands" to Tab Completion
Note: This required a signature change to Bukkit#reloadCommandAliases() so that it returns a boolean based on if the command aliases reloaded or not.
2017-03-12 13:52:04 -04:00
chickeneer ff73ad6dde Fix tick loop bug - Fixes #624
We were not calculating time after the sleep ,resulting in wrong
calculations. This caused us to go 100ms, 0ms, 100ms, 0 ms repeatedly.
2017-03-10 03:03:49 -05:00
Zach Brown 4b25be6d1f
Alter furnace cookTime based on total cook time
Fixes GH-613
2017-03-02 20:57:20 -06:00
Zach Brown 85aa230650
Do not let ArmorStands drown under water 2017-02-18 19:34:46 -06:00
Zach Brown ae98591b8c
Update upstream B/CB/S 2017-02-17 20:03:38 -06:00
Zach Brown 5031a31da5
Update upstream B/CB/S 2017-02-10 18:12:58 -06:00
Brokkonaut 6b3c0bb3c6
Make chunk unload targetSize more aggressive
Re: GH-597
2017-02-08 15:16:36 -06:00
Zach Brown 03f1f9b06b
Disable Spigot's chunk unload queue throttling
Seems to be causing more problems than it's solving
Closes GH-597
2017-02-07 17:21:37 -06:00
Zach Brown 919cb9d19a
Update upstream CB, reduce version cache time
Closes GH-602
2017-02-07 16:29:26 -06:00
Aikar ec31ab32af Shame on you Mojang
Someone wrote some horrible code that throws a world accessing task
onto the HTTP DOWNLOADER Thread Pool, for an activity that is not even
heavy enough to warrant async operation.

This then triggers async chunk loads!

What in the hell were you thinking?
2017-02-05 19:19:35 -05:00
Aikar c7d8bd43fb Remove CraftScheduler Async Task Debugger
I have not once ever seen this system help debug a crash.
One report of a suspected memory leak with the system.

This adds additional overhead to asynchronous task dispatching
2017-02-05 00:13:28 -05:00
Aikar d49de13c00 Add more timings to Scheduler and other improvements 2017-02-05 00:13:16 -05:00
Aikar d033b57b47 More improvements to Timings, RCON now is no longer blocking!
Finally made timings accept "Callback style" reports, so plugins
can listen for when the report is done.

Added new Util interfaces, MessageCommandSender and BufferedCommandSender

This restores and improves using RCON to generate timings reports
2017-02-04 22:47:39 -05:00
Zach Brown d3544dad18
Update upstream S 2017-02-04 03:59:44 -06:00
Zach Brown 8878ecc5f3
Update upstream CB
Closes GH-596
2017-02-01 22:48:16 -06:00
Zach Brown 1e1541a2e9
Update upstream S 2017-01-30 22:33:54 -06:00
Zach Brown e08ef5457a
Update upstream CB 2017-01-28 17:36:03 -06:00
Zach Brown 88205cd8fe
Update upstream B/CB/S 2017-01-25 22:27:42 -06:00
Zach Brown 327535741d
Do not allow a zero max height in BiomeJungle
Fixes GH-592

Thanks to the forge team who noticed this issue long ago
2017-01-23 15:11:07 -06:00
Aikar c9759766a3 Cap Entity Collisions - Resolves #577
Limit a single entity to colliding a max of configurable times per tick.
This will alleviate issues where living entities are hoarded in 1x1 pens

This is not tied to the maxEntityCramming rule. Cramming will still apply
just as it does in Vanilla, but entity pushing logic will be capped.

You can set this to 0 to disable collisions.
2017-01-22 18:24:22 -05:00
Zach Brown 1928933a96
Yank import from last 2017-01-21 17:12:25 -06:00
Zach Brown 3f88bc1ec7
Expose WorldBorder@isInBounds(Location) check 2017-01-21 17:06:28 -06:00
Aikar 10b1631d59 Remove the Vanilla Method Profiler
Spigot rebrought this back after it was removed for years due to the performance hit.

It is unknown if the JIT will optimize it out as effeciently with how it was
added, so we do not want any risk of performance degredation.

Paper has a proper Timings system that makes the Vanilla Method profiler obsolete and inferior.
2017-01-21 02:03:17 -05:00
Zach Brown 2a16ff905f
Fixup patch file 2017-01-20 09:12:47 -06:00
BillyGalbreath 36078e1a3d Add fromBottle flag to Experience Orbs (#584)
* Add fromBottle flag to Experience Orbs
2017-01-20 09:01:53 -06:00
Zach Brown c1641b8e0c
Update upstream B/CB/S 2017-01-20 05:21:44 -06:00
Zach 099b85f54d Merge pull request #582 from prplz/player-count
Add World.getPlayerCount
2017-01-14 16:07:01 -06:00
Zach Brown c141e3adf3
Now I am become Death, the destroyer of newlines 2017-01-14 02:12:59 -06:00
Zach Brown 28c0441d02
Update upstream B/CB 2017-01-14 02:11:12 -06:00
Zach Brown aa86f4829a
Assign the World in WorldGenStronghold
Fixes GH-580
2017-01-14 01:31:38 -06:00
Michael Himing 9606774ee6 Add World.getPlayerCount 2017-01-13 23:00:33 +11:00
Michael Himing 0515329c1a Fix block break desync 2017-01-09 10:19:10 +11:00
Zach Brown 50f2e124a1
Compromise on warning of excessive velocity sets
We have long been receiving feedback about our warning messages when
excessive velocities are set on entities. We have, for the most part,
ignored much of this feedback because these warnings can be vital in
identifying the cause of a watchdog crash. These crashes would otherwise
be more difficult to identify without this information.

However, in many cases these warnings are unnecessarily verbose as the
server handles these excessive sets itself without user intervention.

As a compromise, we will only warn the user as part of a watchdog crash
log, and we will only include the most recent occurrence. This commit
represents a first effort on this front. It may need to be tweaked later
to provide more relevant information, such as the time it occurred,
and/or not printing the warning at all if the occurrence was a certain
time period ago.
2017-01-08 16:48:37 -06:00
Alfie Cleveland 4a6c4f0dc3 Don't allow entities to ride themselves - #572 2017-01-08 04:32:04 +00:00
Zach Brown 3e3743eb0c
Revert "Set head rotation pitch in addition to yaw in TPs"
This reverts commit b6c1b2d3e7.
2017-01-07 22:15:01 -06:00
Zach Brown b6c1b2d3e7
Set head rotation pitch in addition to yaw in TPs 2017-01-07 21:32:11 -06:00
Aikar e4ef645032 Enforce Sync Chunk Unloads
Unloading Chunks async is extremely dangerous. This will force it to main
the same way we handle async chunk loads.
2017-01-07 16:10:56 -05:00
Aikar 2e3081d45c Enforce Sync Player Saves
Saving players async is extremely dangerous. This will force it to main
the same way we handle async chunk loads.
2017-01-07 15:48:22 -05:00
Aikar 7e06f2145e Provide E/TE/Chunk count stat methods
Provides counts without the ineffeciency of using .getEntities().size()
which creates copy of the collections.
2017-01-07 15:27:46 -05:00
Zach Brown 63130fd2aa
Update upstream B/CB
Closes GH-569
2017-01-06 15:45:59 -06:00
Aikar 849653ebac SPIGOT-2989: Use correct Horse Inventory 2017-01-04 21:23:16 -05:00
prplz 9b9a43e472 Better container checks (#564) 2017-01-02 17:16:57 -05:00
Aikar 13ac2d8ff8 ShulkerBox Dupe Prevention - Fixes #488
This ensures that Shulker Boxes can never drop their contents twice, and
that the inventory is cleared incase it some how also got saved to the world.
2017-01-02 16:49:08 -05:00
Aikar 6d06f31c10 Defensive copy chunk list to avoid "effective CME" - Fixes #313
Lighting operations apparently can load chunks, which will cause an NPE
in the same fashion you would trigger a CME during the chunk iteration.
2017-01-02 14:08:55 -05:00
Aikar bd7c76a1cf Use alternate constructor for EndGateway - Fixes #563 2017-01-02 11:49:36 -05:00
Aikar 7a1b393715 MC-112017: Allow 31 instead of 30 for item names 2017-01-02 02:43:50 -05:00
Aikar 0c4ef7349f MC-111699: Ignore Improper Anvil Item Name Packets
The client is improperly sending Item Name Packets to the server BEFORE
the click event. This causes the server to reset before the click event is processed

This breaks the ability to rename more than 1 item at a time.

See: https://bugs.mojang.com/browse/MC-111699
2017-01-02 02:09:31 -05:00
Aikar 61d4b9e2ab Fix build
I totally didn't notice that the patch had a conflict >_>
2017-01-02 02:05:02 -05:00
Aikar 86e5224d94 Update upstream - fixes more Spawn Egg issues 2017-01-02 01:58:15 -05:00
Aikar 16b99d6dab PlayerTeleportEndGatewayEvent
Allows you to access the Gateway being used in a teleport event
2016-12-31 21:46:34 -05:00
Aikar 067c5c3f70 Fix String based Action Bar to use ChatComponent to handle proper escaping 2016-12-29 08:29:09 -05:00
Aikar ef781648ef Fix ItemStack Data Conversion
Spigot did not copy our version, and their version is not 100% correct.

The current state results in item meta and damage data value conversions clashing for control

For example on a horse egg, on itemstack creation, the 100 Damage is converted to 0 and sets EntityTag

SetItemMeta then drops the previous NBTTagCompound and makes a new one, which has no EntityType associated
to it as the previous stack had no metadata.

This change makes it so that itemstack conversion is delayed until after meta applies

Pretty much restores our previous implementation before Spigot tried to resolve it.
2016-12-29 07:58:49 -05:00
Aikar cd8f388582 Change Outdated Build Download URL to Paper CI 2016-12-29 00:57:26 -05:00
Aikar c148342731 Vehicle Dismount Event Improvements
player.getVehicle() was returning null during the event. Paper had added lots of code to
cause the player to remount the entity on cancel.

I've simplified the diff and made player.getVehicle() work during the event by setting the
vehicle back during the event, and only set it to null if the event is not cancelled.
2016-12-29 00:53:02 -05:00
Aikar 49aca0c04d New Firework API's
Get the launcher of a Firework and who it is boosting
2016-12-28 02:25:35 -05:00
Aikar 4bf7275588 Activation Range Improvements
Fixes and adds new Immunities to improve gameplay behavior
2016-12-28 00:19:58 -05:00
Zach Brown 373e390735
Make invalid stat removal use proper config key
Server-wide static config values should always be prefixed by
`settings.`. Get it right @Zbob750, geez

Issue introduced in a81ad3d8a8
2016-12-27 19:23:18 -06:00
Zach Brown 1870320545
Update upstream CB
Closes GH-556
2016-12-27 18:46:41 -06:00
Aikar d231cef8cd Incremental Auto Save Players
Take same approach we did for chunks, and only save player if its been X time since last save,
instead of doing it all in 1 tick.

This is even more helpful considering Player Saving is done sync for File IO.
2016-12-27 16:11:25 -05:00
Aikar fc6f3510a2 Change implementation of String based Action Bar API
Appears colors did not work for Bungee version, as Action Bar is stricter
2016-12-27 15:06:14 -05:00
Aikar 64f6edc759 Upstream update 2016-12-27 13:07:43 -05:00
AlfieC d8b42d5a7a Properly fix item duplication bug (#557)
Credit to prplz for figuring out the real issue
2016-12-27 11:03:37 -05:00
Aikar c655b3caf3 Respect AsyncCatcher for Async Command Detection - Fixes #555 2016-12-27 11:00:15 -05:00
Alfie Cleveland 043859300f Further optimise hoppers 2016-12-27 10:31:58 -05:00
Zach Brown fe913c51c4
Update upstream CB 2016-12-22 15:06:59 -06:00
Aikar d9a999639c continue instead of break for treasure map bounding
per: 01cf3186bd (commitcomment-20268968)

The break may of been skipping attempts at valid chunks. I thought break was the right abort, but maybe it is not.
2016-12-21 21:28:01 -05:00
Aikar 23236ef8aa IllegalPacketEvent - Resolves #419
Fire an event when an illegal packet is received to let plugins handle it

Lets plugins change the kick message and if it should kick or not.
2016-12-21 21:22:02 -05:00
Zach Brown a4152b2ad1
Fix missed diff causing lava to move too quickly
Missed diff from old patch file was causing lava to always move at the
faster 'nether' speed, ignoring the slower overworld speed entirely.
This is why we use obfuscation helpers now.

Fixes GH-521
2016-12-21 15:29:50 -06:00
Zach Brown a81ad3d8a8
Add option to remove invalid statistics
Closes GH-550
2016-12-21 12:41:30 -06:00
kashike c8fb4667af
API for ArmorStand movement and option for entity lookups 2016-12-21 11:56:09 -06:00
Zach Brown cae453c16b
Update to Paper to MC 1.11.2 2016-12-21 11:21:40 -06:00
Aikar 98e7d01ce8 Optimize isEmpty() to remove Map lookup
Every call to .isEmpty() made a horribly wasteful map lookup just to get the
reference to the Air Item for checking.

We will now cache a copy of that item
2016-12-21 04:21:42 -05:00
Aikar a18f763412 Revert "Optimize ItemStack.isEmpty()"
This reverts commit 257c591391.

See a bug
2016-12-21 03:51:48 -05:00
Aikar 257c591391 Optimize ItemStack.isEmpty()
Remove hashMap lookup every check, simplify code to remove ternary
2016-12-21 03:50:43 -05:00
Zach Brown 748d86a540
Cleanup 'nerfed spawner mobs can float' patch 2016-12-20 21:57:07 -06:00
Zach Brown f099ddc99e
Fix a merge conflict that was resolved improperly 2016-12-20 18:01:37 -06:00
Zach Brown 33163525f3
Update Paper to MC 1.11.1 2016-12-20 17:45:00 -06:00
Aikar 99ffe80ebc Configurable Cartographer Treasure Maps
Allow configuring for cartographers to return the same map location

Also allow turning off treasure maps all together as they can eat up Map ID's
which are limited in quantity.
2016-12-20 15:28:32 -05:00
Aikar 01cf3186bd Bound Treasure Maps to World Border
Make it so a Treasure Map does not target a structure outside of the
World Border, where players are not even able to reach.

This also would help the case where a players close to the border, and one
that is outside happens to be closer, but unreachable, yet another reachable
one is in border that would of been missed.
2016-12-20 15:17:18 -05:00
Aikar 2c0075031c Ignore invalid Marker Icon ID's in maps - Fixes #497
Replace with the red marker. Should of only happened by creative abuse.
2016-12-19 23:39:52 -05:00
Aikar a9f87fd8fe Prevent Pathfinding out of World Border - Fixes #547
This prevents Entities from trying to run outside of the World Border
2016-12-19 23:08:31 -05:00
Aikar c222ffd4cd Update upstream 2016-12-19 22:58:12 -05:00
Aikar 4ac2cac9f9 Fix worldborder bug
typo in variable name
2016-12-19 01:23:59 -05:00
Zach Brown d850fc67db
Add obfhelper to vanish patch 2016-12-16 23:02:33 -06:00
Zach Brown 5ff732798d
Update upstream B/CB 2016-12-16 22:23:03 -06:00
Zach Brown 0728696e06
Add ProjectileCollideEvent
Base our vanish changes on top of that event.
2016-12-16 22:13:46 -06:00
Techcable bf86516043
Change base variables in BlockPos to force diff 2016-12-16 20:02:46 -06:00
Zach Brown 7c567d6ed4
Don't let FishingHooks use portals
Closes GH-531
2016-12-16 16:03:56 -06:00
Zach Brown 1d8b7e2ecc
Update upstream B/CB 2016-12-16 15:00:16 -06:00
Zach Brown 7c210e35b4
Update upstream CB 2016-12-10 17:50:31 -06:00
Zach Brown b41a5ab566
Update upstream B/CB 2016-12-09 18:07:35 -06:00
Zach Brown 57c2b8de43
Update upstream B/CB 2016-12-06 17:12:19 -06:00
Zach Brown 6c7152dbfe
Update upstream, fix accidental removal from last 2016-12-02 21:11:39 -06:00
Zach Brown 7e6d4b54e1
Don't remove random diffs in update 2016-12-02 21:06:21 -06:00
Zach Brown f986ebbae5
Update upstream CB 2016-12-02 18:07:07 -06:00
Aikar 4de83c79ab Optimize World.isLoaded(BlockPosition)Z
Reduce method invocations for World.isLoaded(BlockPosition)Z
2016-12-02 00:20:34 -05:00
Aikar 5d1cc02e6a Ignore "Unable to resolve BlockEntity" debug messages - Fixes #489 2016-12-02 00:02:18 -05:00
Techcable 33e453fcfd
Speedup BlockPos by fixing inlining 2016-11-30 21:03:50 -06:00
AlphaBlend dfdd4e3334
Add source to PlayerExpChangeEvent 2016-11-30 17:33:06 -06:00
Zach Brown 2bfdbc4afa
Update upstream CB 2016-11-29 18:02:20 -06:00
Jamie Mansfield b4c00f4b27
Resolve previous pr 2016-11-29 19:58:13 +00:00
willies952002 6d966ed034 Allow Reloading of Command Aliases
Use "/reload commands" to reload the aliases stored in commands.yml
2016-11-28 21:54:19 -05:00
Zach Brown ed6bd4ea4a
Update upstream B/CB - hitEntity added upstream 2016-11-28 17:16:07 -06:00
Jamie Mansfield b45c0327c8
Update inventory. Fixes #505 2016-11-28 21:32:05 +00:00
Zach Brown 9571357cce
Rebuild patches 2016-11-27 17:39:16 -06:00
Zach Brown 2807fdcf84
Update patch number 2016-11-27 16:54:10 -06:00
Zach 3f5dffc4e5 Merge pull request #517
Don't process packets from offline players
2016-11-27 16:23:17 -06:00
Alfie Cleveland a2301816d0 Don't process packets from offline players 2016-11-27 22:17:55 +00:00
Alfie Cleveland a0fce85086
Optimise removeQueue 2016-11-26 22:36:10 -06:00
Alfie Cleveland ed90e5b3a6
Fix double lock in ServerConnection 2016-11-26 22:06:39 -06:00
Zach Brown 8c27c1fd27
Alter last to force conflicts but keep contents 2016-11-26 22:02:19 -06:00
Alfie Cleveland 324acd64b4
Optimise NetworkManager 2016-11-26 21:48:09 -06:00
Zach Brown a68f5fbec0
Update upstream B/CB/S 2016-11-24 21:12:18 -06:00
vemacs ddbf7318b2 Optimize network queue by making size() constant-time
Idea from @AlfieC
2016-11-23 13:20:16 -05:00
Aikar 8d4d85ccb8 Merge branch 'vemacs-cachedthreadpool-login'
* vemacs-cachedthreadpool-login:
  Cache user authenticator threads Idea from @AlfieC
2016-11-23 12:03:34 -05:00
vemacs 4eaa6f6dbc Cache user authenticator threads
Idea from @AlfieC
2016-11-23 08:48:47 -05:00
Zach Brown 4ea87e5378
Update upstream B/CB/S 2016-11-22 18:06:14 -06:00
AlphaBlend 5eebb50cf2 Relocate bad call to ProjectileHitEvent 2016-11-22 01:47:43 -05:00
Aikar 2290e5f85d Update upstream 2016-11-21 18:00:40 -05:00
Zach Brown 97e0eac6e7
Update upstream B/CB 2016-11-21 15:51:27 -06:00
Zach Brown cb66c8dce7
Add ShulkerBoxes to the LootTable API 2016-11-19 11:31:01 -06:00
Aikar 9725050889 Update Upstream 2016-11-18 23:58:56 -05:00
Aikar ae5a66ed1b Re-add dependency reduced pom
Learned the correct way to handle that file
2016-11-18 21:09:03 -05:00
Zach Brown 7e37e54053
Simplify the affects spawning API implementation
Get the hell away from EntitySelectors, not that that one right anyway
Fixes GH-482
2016-11-18 18:55:14 -06:00
Zach Brown a6d146a939
Update Paper to MC 1.11 2016-11-18 16:21:06 -06:00
Black Hole 6c1880847f
@Z750 There are other command block types
Blocks.dc and .dd (don't know why they ain't renamed yet).
cc GH-478
2016-11-13 20:21:37 -06:00
Zach Brown bd503d35b0
Expand NBT filtering from last commit
cc GH-478
2016-11-13 19:36:23 -06:00
Zach Brown dec715e07b
Filter bad data from ArmorStand and SpawnEgg items
Fixes GH-478
2016-11-12 23:32:40 -06:00
Zach Brown 65538782cd
Update upstream B/CB/S 2016-11-12 20:21:46 -06:00
Zach Brown d7276f6ffd
Always cleanup collideRule teams at startup
Fixes GH-463
2016-11-05 13:34:18 -05:00
Zach Brown f0acdb8df6
Raise packet tolerance in spam threshold patch
Fixes GH-462
2016-11-04 22:35:59 -05:00
Aikar c0aeab4cf9 Chunk Save Stats Debug Option
Adds a command line flag to enable stats on how chunk saves are processing.

Stats on current queue, how many was processed and how many were queued.
2016-11-04 02:21:33 -04:00
Aikar 4f39daf70a Rework that save cap patch and make it configurable 2016-11-04 01:55:36 -04:00
Aikar ab7b7d8072 Don't process auto save if the save queue is filled
This avoids ever growing pending NBT objects which eat up memory.
2016-11-04 01:33:08 -04:00
Aikar 4f5d91198f Prevent Hoppers from loading chunks by double chest 2016-11-04 01:32:53 -04:00
Aikar 3725f9d940 Fix faulty logic in Auto Save check - Fixes #443 2016-11-04 01:31:49 -04:00
AlphaBlend 02006e6b24
Add EntityZapEvent 2016-10-30 21:31:02 -05:00
Zach Brown 88e1379b38
Update upstream CB 2016-10-23 01:32:04 -05:00
Zach Brown 557c26bec4
Revert CB's SPIGOT-1903 fix in favor of ours
Fixes GH-453
2016-10-22 15:36:19 -05:00
Zach Brown 812618deba
Remove changes to lava/water cobblestone gen
Unintended side effects in recent versions, this patch has likely
outlived its usefulness.

Closes GH-452
2016-10-21 16:08:34 -05:00
Zach Brown 28d9568ed5
Properly update patches for upstream merge 2016-10-21 15:43:40 -05:00
Zach Brown 92567cc43a
Update upstream B/CB 2016-10-21 15:28:44 -05:00
Aikar 874c7a2ef8 Updated Timings to better detail saves 2016-10-20 00:21:35 -04:00
Aikar 64e537e63c Revert "Option to hide plugins from the Query Protocol"
This already exists

This reverts commit 3407aa3285.
2016-10-19 23:38:18 -04:00
Aikar 3407aa3285 Option to hide plugins from the Query Protocol 2016-10-19 23:37:14 -04:00
Zach Brown 2645ee04ae
Update upstream CB 2016-10-16 15:35:34 -05:00
Zach Brown 8377df063a
Update upstream CB/S 2016-10-13 17:29:38 -05:00
Zach Brown b2c262e382
Update upstream CB 2016-10-10 21:29:08 -05:00
Zach Brown 5ecb6f1358
Add option to remove corrupt tile entities
Closes GH-437
2016-10-05 16:28:17 -05:00
AlphaBlend 96b534f1f1
Add hit entity to ProjectileHitEvent 2016-10-05 16:07:58 -05:00
Zach Brown 10469dfd46
Remove TE Fixer changes
Ultimately they should be unnecessary now that upstream's fix has been
in place for a while. Removing this reduces our own footprint, and gets
rid of any possible unintended behavior.
2016-10-05 15:46:44 -05:00
Zach Brown 18799efd0d
Update upstream B/CB/S 2016-10-01 11:47:56 -05:00
Aikar 9e6cbc5203 Disable Vanilla Chunk GC in favor of Bukkits 2016-09-26 01:52:01 -04:00
Aikar a57cf220e8 don't save level every tick for auto save. whoops 2016-09-26 01:50:26 -04:00
Zach Brown 3d2be415cc
Raise bad Y auto fix to avoid gameplay issues
Per discussion here, d3eb13d60d (commitcomment-19153154)
2016-09-23 17:26:14 -05:00
Aikar f71ef566df Raise string limit for packet serialization
The default limit is possible to hit with 50 page books with color codes, causing clients to disconnect.

Bump the limit up a hair to above currently seen sizes.
2016-09-21 23:56:47 -04:00
Aikar d3eb13d60d Auto fix bad Y levels on player login
Bring down to a saner Y level if super high, as this can cause the server to crash
2016-09-21 23:49:27 -04:00
Aikar bd4ececc82 Remove FishingHook reference on Craft Entity removal
This caused some bugs chickeneer reported to me, with fishing.
2016-09-21 23:45:05 -04:00
Aikar 501695c26a Process NMS Data Conversion post ItemMeta on Copy
ItemMeta apply is a destructive process that expects to be the authority on
what the items NBT data is.

When CraftItemStack.asNMSCopy was called, the conversion ran, potentially setting
the converted data into the ItemStacks tag.

Then if that item had ItemMeta, it would completely undo that conversion by
erasing the NBT Tag.

On copy, run conversion post ItemMeta apply.
2016-09-21 23:42:13 -04:00
Aikar 6a4c510df4 add a chunk registration fix
World checks and the Chunk Add logic are inconsistent on how Y > 256, < 0, is treated

Keep them consistent
2016-09-21 22:56:19 -04:00
Aikar 1de58ca308 Log chunk save failures as ERROR level 2016-09-21 22:33:09 -04:00
Aikar 0fc642a189 Auto Save Improvements
Makes Auto Save Rate setting configurable per-world. If the auto save rate is left -1, the global bukkit.yml value will be used.

Process auto save every tick instead of once per auto tick interval, so that chunk saves will distribute over many ticks instead of all at once.

Re-introduce a cap per tick for auto save (Spigot disabled the vanilla cap) and make it configurable.
2016-09-21 22:12:56 -04:00
Aikar 56857ae801 Don't save players every tick, oops 2016-09-19 23:39:21 -04:00
Aikar a63d6e9ea8 Incremental Auto Saving
Process auto save every tick instead of once per auto tick interval, so that chunk saves will distribute over many ticks instead of all at once.
2016-09-19 23:31:42 -04:00
kashike 53997ebf2c Configurable flying kick messages
Closes #423
2016-09-20 00:59:36 +00:00
Zach Brown 14c974629c
Stop collideRule team from seeing invis 'friends'
More appropriately aligns ourself with the no team option, because the
collideRule team is only a team because it has to be, not because we want
anyone to have any sort of gameplay based relationship.

Also block any options from being set on this team to further enforce that
it is not a persistent team and should not be treated as such.
2016-09-15 16:36:57 -05:00
Zach Brown eb3ff14afd
Block minecart portal teleports in some instances
Mitigates GH-373
Technically a workaround rather than a true fix
2016-09-14 18:52:41 -05:00
Zach Brown 2b244fb51e
Update upstrean CB/S 2016-09-11 14:55:02 -05:00
Zach Brown 2e880e7676
Make UseItem rate limiting stricter, configurable 2016-09-10 23:27:07 -05:00
Zach Brown 5626ad5f58
Fix patch, need to investigate build issues 2016-09-10 22:45:09 -05:00
Zach Brown 8a8fc89534
[ WHITESPACE ] 2016-09-10 22:09:14 -05:00
Zach Brown c02c01b2c5
Add rate limiting to PacketPlayInUseItem as well
Also removes our toggle for Spigot's option, I doubt anyone uses it.
2016-09-10 21:44:06 -05:00
Zach Brown 3a128de0c1
Further safety for player collision setting
Hopefully the end of similar problems
Fixes GH-415
2016-09-08 12:39:40 -05:00
Zach Brown feccc25412
Make collide team removal more patient, safer
Fixes GH-414
2016-09-06 12:33:47 -05:00
Zach Brown d26051ef63
Create a team as needed for disabling collisions
Fixes GH-383
2016-09-04 17:29:25 -05:00
Zach Brown eb7e4424fa
Update upstream B/CB 2016-09-04 16:59:06 -05:00
Brokkonaut e153f46603
Fix an AIOOBE in inventory handling
Closes GH-404
2016-09-04 16:49:29 -05:00
Zach 8d5cd3f054 Merge pull request #408 from kashike/feature/health-conversion
Convert new health to a float
2016-09-04 16:05:38 -05:00
kashike 8f91416dcb @Zbob750 missed a few name changes 2016-09-04 06:35:42 +00:00
Zach Brown f9f96ea3a5
Update upstream B/CB/S 2016-09-02 22:44:52 -05:00
kashike e44b71a6b4 Convert new health to a float during set
Convert the new health value to a float before doing any validation logic
2016-09-01 23:32:32 +00:00
Zach Brown 8eb7f073d6
Revert team creation for player collision setting
Needs more work, have redone it locally but its not quite ready for
prime time.
2016-08-31 19:22:43 -05:00
Zach Brown d8acf96e94
Rename patch file to be more specific 2016-08-31 17:18:54 -05:00
killme 078b6fb1e0 Disable ticking of snow blocks 2016-08-30 23:45:59 +02:00
Zach Brown 8e220b8ef9
Make getEntity dead check more specific 2016-08-28 00:46:21 -05:00
Zach Brown ba4aaaa607
Restore some timings functionality lost in last 2016-08-27 19:36:26 -05:00
Zach Brown b170e8cedb
Update upstream B/CB/S
Remove two features added upstream
2016-08-27 18:41:58 -05:00
Aikar 173d0fa33f Timings v2 updates for more chunk related timings (generations) 2016-08-20 00:07:26 -04:00
Alfie Cleveland d9afd08cee
Optimise BlockStateEnum 2016-08-19 13:06:37 -05:00
Zach Brown 17c9d7d9da
Kick git and rebuild patches 2016-08-15 19:22:10 -05:00
Zach Brown f80163c4ab
More changes to view distance API implementation
Should fix GH-381
2016-08-13 15:26:40 -05:00
Gabriele C e51a3a332e
Introduce a setting to handle offline proxies
Servers behind a bungeecord proxy in offline mode
will now properly pull offline mode UUIDs and data
when this setting is set to false. Default is unchanged.
2016-08-12 18:22:58 -05:00
Zach Brown 997fa37ee7
Update upstream B/CB 2016-08-11 15:07:07 -05:00
Zach Brown 15f3ca7ecb
Update upstream B/CB 2016-08-07 00:01:31 -05:00
Zach Brown 9f95fbcd24
Send Bukkit scoreboards as well as vanilla boards
Fixes GH-384
2016-08-04 19:46:35 -05:00
Zach Brown ae77393ad9
Re-track players that dismount from other players
Fixes GH-265
2016-07-31 16:33:25 -05:00
Zach Brown af70722300
Fix entity tracking when the player is the vehicle
Fixes GH-378
2016-07-31 15:22:25 -05:00
Zach Brown 2763f8fe5e
Randomly generate team names for earlier commit
[17:17] _MylesC: the biggest issue you run into is bungee not handling
2 teams with same name :(
http://i.imgur.com/jbDigxW.png
2016-07-30 18:13:56 -05:00
Zach Brown 8f6208b1d3
Send a fake team as needed for the collision rule 2016-07-30 17:04:39 -05:00
Zach Brown 46bfd418a8
Update upstream B/CB/S 2016-07-30 18:02:34 -05:00
Zach Brown c62efac3eb
Default configuration changes
Disable push based hoppers by default
Set chunk unload delay to 15s by default
Neither of these changes are retroactive for old users
2016-07-28 20:57:36 -05:00
Zach Brown 7dcb9b67ea
Make alternative falling block ground detection configurable
Workaround for GH-336
2016-07-28 20:54:48 -05:00
Zach Brown dff26d883a
More informative vehicle moved wrongly log message 2016-07-28 19:17:26 -05:00
Zach Brown f9f1a2e97e
Cleanup obfuscation helper comment format 2016-07-28 19:09:54 -05:00
Zach Brown e30fab8ee6
Update upstream B/CB 2016-07-26 19:30:03 -05:00
Zach Brown 56d669ca52
Push based hoppers cleanup 2016-07-22 18:54:48 -05:00
Zach Brown 9918f90710
Update upstream CB 2016-07-22 17:24:30 -05:00
Zach Brown 4a551284a5
Fix TNTPrimed head hight calculation
Fixes GH-370
2016-07-19 18:48:08 -05:00
Zach Brown 11fabc9552
Less strict skull validation
Fixes GH-367
2016-07-18 18:07:48 -05:00
Gabscap a6ef4fa064 Fix-Banner Patch: Display correct time in F3 2016-07-17 19:56:16 +02:00
Zach Brown 29e16baccb
Don't try and lookup profiles that have no UUID and no name
Closes GH-347
2016-07-16 20:19:25 -05:00
Zach Brown c03e56be67
Remove use-hopper-check functionality that we restored
Our improved hopper checking system should provide a better benefit without
as many vanilla behavior issues.
2016-07-16 20:18:38 -05:00
Zach Brown f1691b34c5
Update upstream B/CB/S 2016-07-15 17:36:53 -05:00
Zach Brown d67763d7a3
Update upstream B/CB/S 2016-07-12 23:22:58 -05:00
Zach Brown aea3ab11ab
Block sketchy head items and blocks 2016-07-10 10:45:05 -05:00
Zach Brown 2e2f401132
Update upstream tacos B/CB/S 2016-07-04 18:49:14 -05:00
Zach Brown 97d0490c4a
Disable delayed chunk unloads by default
While the option remains a powerful tool we recommend everyone use, 30s is
proving to be a bit much for certain gametypes and many admins are confused
that after updating they are now facing extreme loaded chunk counts.

We do recommend experienced users configure this value as needed, but we
cannot keep it as a default option given the variety of gametypes, the
potential inexperience of new users, and previous users upgrading and
now facing extreme chunk counts that offer little benefit.
2016-06-30 21:41:10 -05:00
Aikar 2e2842032f More Upstream tacos 2016-06-30 01:38:53 -04:00
Aikar 22f2c98375 Upstream tacos 2016-06-30 01:23:30 -04:00
Zach Brown 66bfe72181
Update upstream CB
It seems they've gotten their own workaround figured out, we'll keep our own fix for TE removal in but let them try theirs and see if it's better now.
2016-06-26 22:51:20 -05:00
Zach Brown 36f28b9cae
Stop overwriting block locations, root issue looks to be the TE fixer itself
Fixes GH-352
2016-06-26 18:39:33 -05:00
Zach Brown bb3c7b16e5
Move setBlock tile->tile transition workaround into TE removal 2016-06-26 14:13:27 -05:00
Zach Brown 92195ceb57
Update upstream CB
Doesn't change anything except puts the last commit upstream, where it belongs
because we're nice like that, or something
2016-06-25 21:34:09 -05:00
Zach Brown 51e2a4f6d6
Update clients when setting blocks to air 2016-06-25 21:09:08 -05:00
Zach Brown 45d9b4c497
Update to MC 1.10.2 2016-06-25 12:21:26 -05:00
Aikar 18433121dc Fix Old Sign Conversion
1) Sign loading code was trying to parse the JSON before the check for oldSign.
       That code could then skip the old sign converting code if it triggers a JSON parse exception.
    2) New Mojang Schematic system has Tile Entities in the new converted format, but missing the Bukkit.isConverted flag
       This causes Igloos and such to render broken signs. We fix this by ignoring sign conversion for Defined Structures
2016-06-22 22:56:57 -04:00
Aikar 1f940b2ffa Fix Double World Add issues - Fixes #328
Vanilla will double add Spider Jockeys to the world, so ignore already added.

Also add debug if something else tries to, and abort before world gets bad state
2016-06-22 22:50:19 -04:00
Aikar 3faaaab75d Optimize isInvalidYLocation, getType and getBlockData
Some pretty micro optimizations, but this is the hottest method in the server....

This will drastically reduce number of operations to perform getType

the 2 previous patches was squashed into 1
2016-06-22 22:43:02 -04:00
Aikar 0973e46de1 Update upstream 2016-06-22 22:18:41 -04:00
Zach Brown a656161705
Update upstream B/CB 2016-06-19 21:41:46 -05:00
Jadon Fowler d61f37c0b2
Toggleable Elytra Wall Damage
Instead of calculating the damage taken from hitting a wall, you can
disable it in the config.
2016-06-18 23:14:58 -07:00
Aikar 0aa71fbf41 Delay Chunk Unloads based on Player Movement
When players are moving in the world, doing things such as building or exploring,
they will commonly go back and forth in a small area. This causes a ton of chunk load
and unload activity on the edge chunks of their view distance.

A simple back and forth movement in 6 blocks could spam a chunk to thrash a
loading and unload cycle over and over again.

This is very wasteful. This system introduces a delay of inactivity on a chunk
before it actually unloads, which is maintained separately from ChunkGC.

This allows servers with smaller worlds who do less long distance exploring to stop
wasting cpu cycles on saving/unloading/reloading chunks repeatedly.
2016-06-18 23:33:57 -04:00
totokaka 4d7917a87d
Fix issue with setting player view distance 2016-06-18 20:52:18 -05:00
Aikar c8643cef2e Remove the item from the correct hand when spawn egg depletes 2016-06-18 03:44:11 -04:00
Techcable bf40dd5557
Make entities look for hoppers
Cherry-pick of PR GH-319
2016-06-18 01:06:44 -05:00
Zach Brown fab2a52fe1
Fix missed case in top of nether void damage patch
General cleanup, etc.
Closes GH-343
2016-06-18 01:06:37 -05:00
Jadon Fowler f9837e4068
Fix infinite loop when saving chunks
Running `/save-all flush` would start an infinite loop that prints:
    ThreadedAnvilChunkSotrage (world): All chunks are saved
2016-06-17 02:29:57 -07:00
Zach Brown d73cd6a4bc
Update upstream B/CB/S 2016-06-16 20:27:47 -05:00
Zach Brown cabb2450ed
Remove timings addition that was fixed upstream 2016-06-15 17:51:30 -05:00
Zach Brown cd6dadb8bc
Update upstreams 2016-06-15 17:43:51 -05:00
Zach Brown 98d1d2ac57
Update upstream B/CB
Merges fixes for SPIGOT-2404 and SPIGOT-2408 into Paper
2016-06-13 18:42:08 -05:00
Zach Brown 5bad141169
Update upstream CB/S 2016-06-12 12:00:07 -05:00
Zach Brown 14ffaf5d2c
Update upstream B/CB 2016-06-11 22:22:27 -05:00
Jedediah Smith 83191ef7a1
Resolve an ISE in MagmaBlock damage handling 2016-06-11 19:10:37 -05:00
Zach Brown 4924e9398f
MC-80966 - Always send chunk sections 2016-06-11 14:59:28 -05:00
Zach Brown 47db868df1
Update upstream and rebuild 2016-06-11 14:58:54 -05:00
Zach Brown b864322a18
Simplify getEntity by UUID patch, misc readme changes 2016-06-09 21:43:32 -05:00
Zach Brown c442e96eb9
Update to Minecraft 1.10 2016-06-08 23:42:46 -05:00
chickeneer 171a079cd2 Fix Potion Equals Bug
Will be in Spigot 1.10, but getting it in for 1.9 users
2016-06-08 20:41:10 -04:00
Aikar 3201cfe07a Fix issue with chests being erased - #322 Fixed 2016-06-07 03:03:51 -04:00
Aikar a9d8237509 more chunk unload queue fixes, hopefully fix various odd bugs 2016-06-07 02:08:59 -04:00
Aikar 092733e8ff Fix bug with lootable refresh not saving inventory if on 2016-06-06 19:56:51 -04:00
Martin Panzer cf65e06d96
Make falling block height nerf respect doEntityDrops 2016-06-06 21:14:35 +02:00
Aikar b394ec0472 Add sub timings to chunk map 2016-06-05 00:10:50 -04:00
Zach c2fd63eebf Merge pull request #317 from MyPlayPlanet/fix-fence-fallblock
Fix fallingblocks getting stuck on fences
2016-06-04 18:24:27 -05:00
Zach Brown dbbf2eb27b
Fix a few global configuration options being unavailable 2016-06-04 17:26:11 -05:00
Aikar e483da14b5 remove part of my hopper patch, not sure its doing what I intended 2016-06-04 11:52:25 -04:00
Aikar f4a43ec92d Update Upstream 2016-06-04 11:41:04 -04:00
Martin Panzer 96a263cddf
Fix fallingblocks getting stuck on fences 2016-06-04 10:11:03 +02:00
Aikar 4becba32a6 Only send Dragon/Wither Death sounds to same world
Also fix view distance lookup
2016-05-31 23:56:19 -04:00
Aikar 1aef85c2bb Fix skeleton horse spawn chance ignoring difficulty modifier if custom set
Also reduce diff
2016-05-30 12:50:57 -04:00
Zach a272c3c0cb Merge pull request #310 from MyPlayPlanet/server-name-param
Add server-name as server parameter
2016-05-29 18:35:03 -05:00
Zach Brown 0ae5768736
Update upstreams 2016-05-29 18:32:21 -05:00
Zach Brown 0a98d670fe
Stop relocating jopt-simple
Workaround for GH-189
Relocation breaks the lookup of a resource bundle, and this is easier than forking and maintaining our own version
 AFAIK this should be fine to do. Guess we'll see
2016-05-29 18:26:35 -05:00
Martin Panzer 7add3186a7
Add server-name as server parameter 2016-05-28 16:56:55 +02:00
Aikar a8d326f367 re-add timing that spigot missed 2016-05-27 22:29:09 -04:00
Aikar dfd19063f9 Ensure chunks never load async
Force operation to main thread if it occurs async
2016-05-27 22:28:23 -04:00
Zach Brown 06a6c422b4
Update upstreams 2016-05-27 21:22:18 -05:00
Aikar fe18b38aea Remove unneeded mob spawn cap patch - Fixes #235
I misread the code and thought the code kept looping until the mob spawn cap was hit.

Upon furthur review, this is not true, so this patch doesn't do anything sane.
2016-05-27 21:35:28 -04:00
Aikar 13492455a1 Update Upstream 2016-05-25 12:37:17 -04:00
Martin Panzer 391d0c04f8
Optimize Redstone torch list removal 2016-05-24 20:08:40 -05:00
Zach Brown b71c0e6f49
Remove comment and fix build }}}}} 2016-05-22 21:20:15 -05:00
Zach Brown 3ab1f229c5
Re-add some method synchronization and move to a SingleThreadedExecutor in MCUtils 2016-05-22 21:17:19 -05:00
Zach Brown aaf6c3f329
Temporarily remove synchronization from UserCache optimizations
In regards to GH-301
2016-05-22 21:07:45 -05:00
Zach Brown be3daf857b
Update old TNT cannon mechanics patch to 1.9.4
Behavior may be buggy or otherwise broken, testing with the option is needed.
`fix-cannons` has been removed in favor of `enable-old-tnt-cannon-behaviors`
2016-05-22 20:26:15 -05:00
Zach Brown 08701a47f7
Update upstream CB
Closes GH-303
2016-05-21 22:07:14 -05:00
Zach Brown df1df5d4b4
Update B/CB/S
Closes GH-288
2016-05-20 17:32:50 -05:00
Aikar d22f9071ff Avoid blocking on Network Manager creation
Fixes #294

Use a pending list to handle new connections so that the netty threads
do not block waiting for the main thread to finish ticking
2016-05-16 23:21:26 -04:00
Aikar 2c6feab963 MC-99914 - ensure EntityItem loads before EntityPotion 2016-05-16 22:54:48 -04:00
Aikar 18b4817a33 bump the default maxMobSpawns default to 250, and add support for unlimited
Use -1 to represent vanilla/unlimited.
Updated PaperWorldConfig to also update the individual worlds limit if it was set
to the new default value.

Should hopefully help #235
2016-05-16 22:07:12 -04:00
Aikar a8271cdc05 Optimize UserCache / Thread Safe
Because Techable keeps complaining about how this isn't thread safe,
easier to do this than replace the entire thing.

Additionally, move Saving of the User cache to be done async, incase
the user never changed the default setting for Spigot's save on stop only.
2016-05-16 21:14:28 -04:00
Aikar 484a23f437 Add Async Helper method to MCUtil 2016-05-16 20:50:09 -04:00
Aikar e56bbcdcda Refactor Lighting Queue System
may help #284

Cleans up the lighting queue system, reducing diff and improving implementation.

We no longer stop chunk unloads due to lighting updates, and instead simply flush the lighting queue.
The cost of forcing the chunk (and its neighbors!) to stay loaded waiting for its
lighting work to finish is much greater than simply taking the hit and doing the work.

This change also helps reduce the diff and avoid bugs with missed diffs by removing
duplicated logic.

Also switches to a more effecient data structure (ArrayDeque instead of LinkedList) for the queue itself.
2016-05-15 18:48:39 -04:00
Zach Brown 613655eae6
TileEntityLootable can call processRefill with a null player
Seems specific to EntityMinecartChest
Fixes GH-290
2016-05-15 01:41:36 -05:00
Aikar 024bc323bc More cases of avoiding marking active for chunks, to stop potential leaks 2016-05-13 22:27:20 -04:00
Aikar db83abe17d Bring back an EAR optimization from 1.9.2 2016-05-13 01:39:03 -04:00
Aikar bf2ed8af45 Fix chunk leak issue with queued light updates 2016-05-13 01:34:37 -04:00
Zach Brown 4cfcd525c4
Make watchdoge disabler its own patch file
Change implementation, smaller diff, less NPE
2016-05-12 23:05:46 -05:00
BlackHole ad63fd7d6a
Override BlockPosition.MutableBlockPosition.isValidLocation()
Fixes GH-281
2016-05-12 12:58:45 -05:00
Aikar 74a73b7223 Fix T/TE removal list bug
Thanks @Cat6363
2016-05-12 08:55:35 -04:00
Aikar dba25d1e86 unmark chunk as unloading when unload is cancelled
no obviousy bugs caused by this at the moment, but we may need to clean up process to be like
how I use to have it before vanilla did it, and we shouldn't leave this boolean in an invalid state.
2016-05-12 02:07:39 -04:00
Aikar 8e57fdd12b Fix chunk unload leak issues due to neighbor updates 2016-05-12 01:55:53 -04:00
Aikar b59e2a51de Paper 1.9.4 Update 2016-05-12 01:01:13 -04:00
Zach Brown 442d190103
Make beacons force secondary potion effect application
Fixes GH-273
Missed case from earlier fix 52f462d52d
2016-05-08 15:34:40 -05:00
Aikar c10df228a7 Don't save empty scoreboard teams to scoreboard.dat - Fixes #244
While I can't think of any reason to do this except some REALLY weird workflow, I still added a config
to let you save them incase someone runs into issues.
2016-05-07 23:39:22 -04:00
Aikar 0494f36efe fix bug with lootable API
was returning the NMS instance of objects instead of the Bukkit API objects
2016-05-07 21:16:38 -04:00
Gabscap abd098642a Add null-check to "Entity Tracking Improvement" 2016-05-06 16:42:09 +02:00
Zach Brown fa24cff5ba
Move this somewhere sane 2016-05-05 20:18:20 -05:00
Zach Brown 32ecc21162
Revert "Add debug property to disable the watchdog"
This reverts commit d1c470756f962801e7d3bc19bee9440f33a4706e.
2016-05-05 20:10:32 -05:00
Zach Brown 4f73ddb766
Add debug property to disable the watchdog
Use at your own risk, we will not waste our time with support
if your server times out and you cant put 2+2 together to
figure out that its because you killed the watchdoge
2016-05-05 20:04:28 -05:00
Aikar 9dffc43aec Fix hopper suck in patch bug
was checking for ItemStack's instead of EntityItem
2016-05-05 20:22:01 -04:00
Aikar f4a62ba294 Implement getNMSWorld on EntityMinecartContainer
Was missed because the class is abstract and nothing implementing the class was imported in Paper
2016-05-04 20:33:16 -04:00
Aikar 53abbfdc4c Entity Tracking Improvements
If any part of a Vehicle/Passenger relationship is visible to a player,
send all passenger/vehicles to the player in the chain.
2016-05-04 20:10:22 -04:00
Aikar 3f0e24eaf3 Do not load chunks for pathfinding 2016-05-04 19:53:33 -04:00
Aikar 211cba970b LootTable API & Replenishable Lootables Feature
Provides an API to control the loot table for an object.
Also provides a feature that any Lootable Inventory (Chests in Structures)
can automatically replenish after a given time.

This feature is good for long term worlds so that newer players
do not suffer with "Every chest has been looted"

API and Event added to control the Auto Replenish feature for players.
2016-05-04 19:46:28 -04:00
Aikar 368a822c47 Rename a Timings class and split up Tracker timings 2016-04-29 21:23:40 -04:00
Aikar 5aa3237a21 Improve Maps (in item frames) performance and bug fixes
Maps used a modified version of rendering to support plugin controlled
imaging on maps. The Craft Map Renderer is much slower than Vanilla,
causing maps in item frames to cause a noticeable hit on server performance.

This updates the map system to not use the Craft system if we detect that no
custom renderers are in use, defaulting to the much simpler Vanilla system.

Additionally, numerous issues to player position tracking on maps has been fixed.
2016-04-29 20:04:12 -04:00
Aikar 242ddc939b comment out the other update call instead
otherwise might break stuff
2016-04-27 22:22:35 -04:00
Aikar 28bf70ee16 Improve Minecraft Hopper Performance
Removes unnecessary extra calls to .update() that are very expensive
Also reset cooldown each hopper tick that a hopper is full.
2016-04-27 22:15:57 -04:00
willies952002 02494f5be7
Reimplement PlayerEditBookEvent 2016-04-26 23:04:20 -04:00
kashike db8f9e663c
Add ability to disable, and to set min/max next tick delay, of frosted_ice. Resolves #172 2016-04-25 13:36:21 -07:00
kashike 0cfd3c0dc6 Merge pull request #230 from kashike/feature/arrow-pickup
Arrow pickup rule API
2016-04-25 13:27:51 -07:00
Zach Brown ef64712c6c
SPIGOT-1401: Fix dispenser/dropper/furnace placement being different from SP 2016-04-24 19:56:04 -05:00
Aikar 9381554475 update upstream 2016-04-23 22:41:46 -04:00
Aikar 2cbd400e17 Fix Player View Distance API corrupting Chunk Sending - Fixes #207
The Player View Distance patch has been screwing with the configured world view distance.

The world a player was created in would set the players view distance, which would be locked to that distance.

Then switching worlds would not give you an updated view distance.

This then caused issues with what view distance the player should have in the chunk map and did not send chunks to the client correctly during movement.

This patch has now been changed to use a -1 default for "default" and will not override view distance until someone has actually used the API to change it.
2016-04-23 21:39:22 -04:00
Aikar 422f32484b remove potentially bad check 2016-04-23 13:10:55 -04:00
Aikar 55afa33cbc Fix a vanilla bug thats likely causing the mob spawn issues 2016-04-23 12:27:46 -04:00
Aikar 485ad4238b improve the jackass test 2016-04-23 11:57:39 -04:00
Zach Brown 3591fb7ed9
Update upstream Spigot and rebuild 2016-04-22 22:21:10 -05:00
kashike 784ba17340
Fix wrong variable being checked. Fixes #233 2016-04-22 19:02:57 -07:00
Zach Brown a1e3c0b12b
Check entity count adds and mark entities removed as needed 2016-04-22 20:35:24 -05:00
Zach Brown e9ffa94994
More involved workaround for vehicle event cancellation 2016-04-22 18:43:22 -05:00
Zach Brown 4f7b7bb31a
Fix EntityDismountEvent and VehicleExitEvent cancellation
Perhaps "workaround" would be the better term
2016-04-22 15:45:22 -05:00
kashike 7ac2b8139e Arrow pickup rule API 2016-04-22 00:07:58 -07:00
Zach Brown a6536804fd
EntityHealthRegain isFastRegen API 2016-04-22 01:48:49 -05:00
Zach b3a6b5d2a1 Merge pull request #212 from willies952002/feature/permReload
Also Reload Plugin-Defined Permissions
2016-04-22 00:58:32 -05:00
Zach Brown 9abe6f6882
Update upstream CB and rebuild 2016-04-20 11:58:49 -05:00
willies952002 a313078d97 Also Reload Plugin Defined Permissions
Closes https://github.com/PaperMC/Paper/issues/210
2016-04-19 17:29:33 -04:00
Zach Brown c08f771081
Re-add PlayerLocaleChangeEvent implementation
Apparently this was missed at some point, likely during the 1.9 update"
2016-04-19 14:25:05 -05:00
Zach Brown 1bce5c2438
Here have a rebuild while we're at it 2016-04-18 09:43:19 -05:00
Zach Brown 68cdc4fa90
Remove non-zero BlockIterator block and Loading chunks earlier in player TP patches
Allowing only non-zero BlockIterators breaks an API contract explicitly allowing them
(*eyeroll*)

And loading chunks earlier in the TP patch did not resolve the original issue, and now
that it is resolved, shouldn't actually provide any tangible benefits
2016-04-18 09:41:11 -05:00
Aikar ce9e19cfed Prevent Fire from loading chunks
This causes the nether to spam unload/reload chunks, plus overall
bad behavior.
2016-04-17 17:28:16 -04:00
Zach Brown 2e57c5774e
Don't check velocities on Projectiles
Closes GH-217
2016-04-17 13:32:19 -05:00
Aikar 8ba4b64739 Configurable RCON IP address to bind to 2016-04-16 00:46:01 -04:00
Aikar ba9266a37b Allow capping number of attempts at spawning mobs
By default, this logic would loop endlessly trying to fill the world
with entities until it hits the worlds spawn.

This patch will cap the # of attempts to so that the tick does not spend
extra long time on mob spawning
2016-04-15 22:35:03 -04:00
Aikar 845090e570 Ensure we actually removed entity from chunk before decrementing counts
If a plugin hacks into NMS and triggers entity removal, it could
result in an entity being attempted to remove from the chunk twice.

The 2nd pass will return false, as it did not find the entity in the list.

We should not touch entity counts if the entity was not removed, to avoid
going negative.
2016-04-15 21:31:12 -04:00
Zach Brown 8672653871
Check the block water mobs spawn in, not the block under 2016-04-15 15:49:39 -05:00
Aikar 77cdcc281b Fix Bugs with Spigot Mob Spawn Logic - Fixes #138
Spigot drastically altered vanilla mob spawn logic and caused a few issues.
1) Used only spawnable chunks vs entire world for entity counting, resulting in ignoring
other entities in the world, and causing the world to go over its intended limit.

Specially with servers using smaller mob spawn ranges than view distance, as well as affects spawning API

2) Spigot was using 16x16 division instead of vanilla 17x17 division.

Issues got worse in 1.9 due to more chunks being loaded due to 1.9 changes, that fall out
of the monster spawn radius.

This patch returns mob counting to use all loaded chunks, and 17x17 division.
2016-04-14 21:03:57 -04:00
Zach Brown 794a848857
Revert "Only check for async callers, do not remove potentially used variables"
This reverts commit da7320fc42.
2016-04-14 19:26:57 -05:00
Zach Brown 8ccd31ed38 Water mobs should only spawn in the water
Closes GH-199
2016-04-14 18:06:29 -05:00
Zach Brown da7320fc42 Only check for async callers, do not remove potentially used variables
Potentially resolves GH-138
2016-04-14 16:48:52 -05:00
Zach 2924ae631e Merge pull request #205 from kashike/feature/handshake
Add handshake event
2016-04-13 23:10:34 -05:00
kashike 66d3688b39
Add handshake event to allow plugins to handle client handshaking logic themselves 2016-04-13 21:12:57 -07:00
Zach Brown d07eac31bc
Update bungeecord chat API graduations 2016-04-13 22:21:42 -05:00
Zach Brown 0084b02703
Re-add Configurable Player Collision
Nothing to see here, move along
2016-04-13 16:12:44 -05:00
Jedediah Smith 7ab9a51731 Fix some players not being kicked on shutdown
Closes GH-8
2016-04-13 16:04:21 -05:00
Jedediah Smith 15cdfc7472 Update SB's affectsSpawning API to use filters
Closes GH-169
2016-04-13 16:03:49 -05:00
Aikar 4ee5d3eb31 Configurable Player Collision - Resolves #161 2016-04-13 02:11:40 -04:00
Aikar d98f9cc5ae Don't tick Skulls - unused code - Fixes #202 2016-04-13 00:32:05 -04:00
Aikar e177666bfb Remove unused World Tile Entity List
Massive hit to performance and it is completely unnecessary.
2016-04-13 00:27:38 -04:00
Aikar 3f68b7f930 Update PlayerConnection for all teleportation of players
Previous fix for SPIGOT-1903 only applied to world changes, but many other
cases of players been teleporting can cause that same bug. So call it any time
setPosition is called to ensure we never falsely trigger "moved too quickly"

And this commit may be considered evil to some people.
2016-04-12 23:26:42 -04:00
Zach Brown 189235906d
Update upstream 2016-04-12 11:31:54 -05:00
Zach Brown ef3f6a481a
Update upstreams 2016-04-11 10:30:12 -05:00
Aikar a0d38c0b55 update MCUtil.cmpFromMessage to use proper JSON 2016-04-11 01:06:28 -04:00
Aikar 8f89e0f84c SPIGOT-1903: Update PlayerConnection on world change - Fixes #120 2016-04-10 22:36:56 -04:00
Zach Brown a3358b1915
Ugly workaround for SPIGOT-1915 & GH-114
Closes GH-114
2016-04-10 03:24:54 -05:00
Zach Brown 6fc0a013a5
Apply the Ensure inv drag is in bounds patch properly
Closes GH-174
2016-04-09 21:33:29 -05:00
Zach Brown a97fe29d9d
Can't expect others to follow formatting if I don't 2016-04-09 13:54:47 -05:00
Zach Brown 4ed5672cd9
Backport a memory cleanup change from 16w14a 2016-04-09 13:50:56 -05:00
Zach Brown 38d2939ff1
Update upstreams and rebuild 2016-04-08 17:24:26 -05:00
Zach Brown 44a1d43781
Simplify vanilla scoreboard nickname coloring patch
Closes GH-195
2016-04-07 17:31:09 -05:00
Zach Brown 6b75dac6f4
Add basic support for using vanilla style, world-based, scoreboard name coloring
Closes GH-188
2016-04-06 01:10:26 -05:00
Aikar 11d1937145 Include Redstone Torches in the redstone physics event optimization 2016-04-05 23:20:46 -04:00
Aikar 539e1e024c Remove Debug checks from DataBits
These are super hot and causing noticeable hits

Before: http://i.imgur.com/nQsMzAE.png
After: http://i.imgur.com/nJ46crB.png
2016-04-05 21:55:07 -04:00
Aikar cdd926c1e9 Re-add fastutil map to Chunk map. Amaranth confirmed its faster by 3x 2016-04-05 20:43:11 -04:00
Aikar 8e68f444f1 Fix Nether/End world unloading spawn chunks - Fixes #92 2016-04-05 19:53:30 -04:00
Zach Brown bce92696c6 Update upstream and rebuild 2016-04-04 09:53:03 -05:00
Aikar 94fd16aa4a fix keep spawn loaded config 2016-04-03 23:08:13 -04:00
Aikar 62071aad36 Fix errorneous call of EntityDismountEvent 2016-04-03 19:11:25 -04:00
Aikar d46dec88b4 Fix Cancelling BlockPlaceEvent triggering physics 2016-04-03 17:49:31 -04:00
Aikar e11a8f0bd5 Configurable Keep Spawn Loaded range per world
This lets you disable it for some worlds and lower it for others.
2016-04-03 17:34:38 -04:00
Aikar 47221671ba Configurable Grass Spread Tick Rate
Raise this value to make grass spread slower. Set to 0 to turn off grass spreading all together.
2016-04-03 16:29:39 -04:00
kashike 73fc582824 Fix reducedDebugInfo not initialized on client 2016-04-03 05:09:42 -05:00
Zach Brown f6782d5738 Rebuild 2016-04-03 05:06:48 -05:00
Zach Brown d463cc6139 Merge branch 'feature/unknown-use' of https://github.com/kashike/Paper into kashike-feature/unknown-use 2016-04-03 04:52:36 -05:00
Zach Brown 2f79610112 Mark chunk as active if ChunkUnloadEvent is cancelled
Potentially related to GH-169
2016-04-03 02:02:06 -05:00
Zach Brown bb265b967d We don't need to go fast anymore 2016-04-03 02:00:35 -05:00
kashike 871920f2f5 Add PlayerUseUnknownEntityEvent 2016-04-02 18:10:41 -07:00
Aikar cd3d8fb27e Update upstream 2016-04-01 22:08:40 -04:00
DemonWav 2b99b1095e <~Z750> sex it up for me 2016-04-01 01:59:59 -05:00
Zach Brown d8c6c41507 gottagofast 2016-04-01 01:33:12 -05:00
Aikar 081420d738 improve implementation of chunk access patch 2016-04-01 00:35:44 -04:00
Aikar c0e1410682 Fix pom to be compile instead of provided for fastutil 2016-04-01 00:35:21 -04:00
Aikar c92ce02363 Move fastutil from a patch file to a library, and improve EAR 2016-04-01 00:18:18 -04:00
Aikar 78202f87b7 Remove Long2ObjectHashMap for Chunks
Speaking with Amaranth, his point of his implementation was that most
of the lookups are on loaded chunks, so that code is optimized for that case.

While Long2Object should be faster as a general purpose map,
for MC uses, Amaranth's version should be faster. Will try to benchmark
the 2 at some future.
2016-03-31 22:17:33 -04:00
Aikar d03da137f2 Fix isEdgeOfChunk check for MCUtils 2016-03-31 22:17:33 -04:00
Aikar 578af64827 Update upstream for memory leak patch 2016-03-31 21:47:17 -04:00
Aikar dea2d41b86 Do not load chunks for light checks
Should only happen for blocks on the edge that uses neighbors light level
(certain blocks). In that case, there will be 3-4 other neighbors to get a light level from.
2016-03-31 19:29:06 -04:00
Aikar 0ba94906ad Fix Massive Memory Leak
Pathfinder objects are storing references to ChunkCache's, and never cleaning up.

These ChunkCache's then leak other entity objects. Those entity objects then have leaks to their
own chunk cache. A recursive problem....

Clean up the ChunkCache reference after it is done being used.
2016-03-31 19:08:27 -04:00
Zach Brown fb52abdf7e Upstream merge CB, rebuild patch 2016-03-31 12:58:20 -05:00
Zach Brown 582ad801b5 Missed diff, unused config entry, general cleanup
cc GH-170
2016-03-30 22:56:30 -05:00
Aikar 3b2d6fd59e add null check to getEntity API 2016-03-30 21:56:07 -04:00
Aikar fb74f6dbfd Use paperclip.properties so CI can work 2016-03-30 21:27:13 -04:00
Aikar 38df6e505c Paper 1.9.2 Update 2016-03-30 20:50:23 -04:00
Aikar f051ea2ab3 Use FastUtil Long/Int HashMap's
For DataWatcher, swap out plain Integer key HashMap for a Int2ObjectOpenHashMap
For ChunkProviderServer, swap out CB's custom LongHashMap with Long2ObjectOpenHashMap

These collections are super fast as seen
http://java-performance.info/hashmap-overview-jdk-fastutil-goldman-sachs-hppc-koloboke-trove-january-2015/
2016-03-30 09:43:11 -05:00
Zach Brown a785a9460e Skip dead entities in getEntity(UUID) API 2016-03-30 09:41:12 -05:00
DemonWav 4bf9c3c177 Add getEntity by UUID API 2016-03-30 01:20:36 -05:00
Zach Brown d46c56abf0 Put this patch in the patches folder, so it's actually used 2016-03-29 13:56:19 -05:00
Antony Riley af65eaaa3b Sanitise RegionFileCache and make cache size configurable. 2016-03-29 19:09:43 +03:00
Fabse d71444f966 Add a workaround for bugged Minecart drop names 2016-03-28 22:41:27 -05:00
Aikar 48dff29f31 Remove, not invalidate, Metadata on reload
Objects loaded over different class loaders are not the same. Nasty dragons lie here.

Also clean up the previous patch to no longer butcher imports.
2016-03-28 22:43:05 -04:00
Aikar c09424fd33 Prevent Waterflow BlockFromToEvent from loading chunks
Many protection plugins would unintentionally trigger chunk loads
by calling .getToBlock() on an unloaded chunk, killing performance.

Simply skip the event call. as CraftBukkit blocks changing the block
of unloaded chunks anyways.

This keeps behavior consistent, vs inconsistent flowing based on plugin triggered loads.
2016-03-28 22:05:22 -04:00
Aikar b99e8381ab EntityPathfindEvent
Fires when an Entity decides to start moving to a location.

This is not the same as a move event. This only fires when an entity chooses
to start moving to a location, and allows cancelling that pathfind.

Additionally, only get is supported for now. Unsure if changing target location
is safe to do.
2016-03-28 21:24:45 -04:00
Aikar 9ff01b16ab Add MCUtils helper
This will be used by my next commit. But trying to get the build going
since CI blew up
2016-03-28 21:01:42 -04:00
Aikar fb3834f805 And AddTo is a different event than RemoveFrom 2016-03-28 20:58:42 -04:00
Aikar 53309e9172 Actually fire those events 2016-03-28 20:57:15 -04:00
Aikar 89c912061b Configurable Chunk Inhabited Timer
Vanilla stores how long a chunk has been active on a server, and dynamically scales some
aspects of vanilla gameplay to this factor.

For people who want all chunks to be treated equally, you can disable the timer.
2016-03-28 20:47:46 -04:00
Aikar 22b248d631 Entity AddTo/RemoveFrom World Events
These events will give plugins a reliable way to track every entity that is added
or removed from a world, so that one may always ensure they are in a desired state.
2016-03-28 20:33:10 -04:00
Aikar 030de0f42a Update upstream 2016-03-28 20:27:56 -04:00
Aikar d52a49cfa1 Option to disable BlockPhysicsEvent for Redstone
Not sure of any reason a plugin would need to act on a Physics event
for redstone. There is a BlockRedstoneEvent that plugins can also use
for accessing redstone activity.

Defaulting this to false will provide substantial performance improvement
by saving millions of event calls on redstone heavy servers.
2016-03-28 19:57:13 -04:00
Zach Brown 0363644455 Don't set spawn world in PlayerInitialSpawnEvent
Fixes GH-85 and GH-157
2016-03-28 13:00:47 -05:00
Zach Brown 249e52e7a8 Fix player tab list API 2016-03-28 10:41:04 -05:00
Zach Brown b210aa7dfe Update upstream B/CB/Spigot and rebuild 2016-03-27 20:48:50 -05:00
Zach Brown bf877b9a72 Check async spawn chunk check, remove unused variables, GH-159 2016-03-27 20:31:23 -05:00
DemonWav 34973fe898 Add same infi-loop fix to other identical block of code I missed earlier 2016-03-27 05:42:02 -05:00
Zach 5108183346 Merge pull request #153 from kashike/feature/slot
Access items by EquipmentSlot
2016-03-27 02:24:12 -05:00
Zach Brown 85ee80938b Update upstream and rebuild 2016-03-27 01:40:17 -05:00
kashike eeb64630cd Access items by EquipmentSlot 2016-03-26 22:23:42 -07:00
DemonWav ef3d40bf2a Prevent possible infinite loop in BlockPosition iterator 2016-03-26 22:06:33 -05:00
Gabscap f356b447b7 Load chunk before player teleport - Fixes #147 2016-03-26 19:05:31 +01:00
Zach Brown 79c54e4434 Pull in ArrowPickupItemEvent and legacy dataconverter fix from SportBukkit 2016-03-26 03:38:02 -05:00
Zach Brown 47b71ea411 Update upstream CB/Spigot
cc GH-146
2016-03-26 01:38:02 -05:00
Zach Brown 451ede36cf Merge upstream changes and rebuild patches 2016-03-25 18:21:38 -05:00
Byteflux 8b76c66f4b Entity#getOrigin() should return a cloned Location 2016-03-25 09:39:58 -07:00
Byteflux 5bd7a9ab62 Always try to load entity origin location from new NBT tag 2016-03-25 09:32:20 -07:00
Byteflux ced183982a Add Entity Origin API
This replaces the TNT and Falling Block Source Location API with a more
general purpose API that works with all entities.
2016-03-25 02:24:27 -07:00
Zach Brown a6a5b12b9e Re-add TileEntity removal list, fix build 2016-03-25 02:50:56 -05:00
Zach Brown dab9d40bfd Update upstream CB 2016-03-25 02:30:39 -05:00
Byteflux 074838e0f3 Fix timings config being removed by another patch 2016-03-24 23:46:53 -07:00
Byteflux 3fd3544a36 Add Lighting Queue
The lighting queue spreads out the processing of light updates across
multiple ticks based on how much free time the server has left at the end
of the tick.
2016-03-24 23:38:38 -07:00
Byteflux 1d88720b2c Relocate Timings v2 patch 2016-03-24 22:04:44 -07:00
Byteflux 2f0866fef0 Fix decompile errors in mc-dev imports patch 2016-03-24 19:57:01 -07:00
Gabscap a897a66edf rebuild 2016-03-25 02:23:23 +01:00
Aikar f5eb0e04bc rebuild 2016-03-24 20:29:40 -04:00
Zach Brown 7d084c8b67 Update upstream B/CB
Remove patch 0099: Pulled into upstream CraftBukkit
2016-03-24 01:39:29 -05:00
Aikar 4b35a6d530 remove blockstate cache patch 2016-03-23 21:19:45 -04:00
Zach Brown 6c16a295b5 Clean up title and tab list patch
Remember kids, the Ballmer peak is hard to hit https://xkcd.com/323/
Finally fixes #126 and #94 (I tested, it does, please, really, promise)
2016-03-23 01:05:09 -05:00
Aikar f794ca4eca Optimize isValidLocation for inlining - Resolves #123 2016-03-22 23:44:46 -04:00
Aikar 30748518b4 Setting the cache is important to access a cache 2016-03-22 23:44:35 -04:00
Zach Brown 222a306fb9 How does typing work?
Closes GH-125
2016-03-22 14:55:42 -05:00
Zach Brown 3f3fc8b6dc Configurable spawn chances for skeleton horses
Closes feature request GH-111
2016-03-22 12:07:34 -05:00
Aikar 06e453017f rebuild patches 2016-03-22 01:49:52 -04:00
Aikar e11c563e9f Optimize Chunk Access
getting a loaded chunk is one of the most hottest pieces of code in the game.
Often, getChunkAt is called for the same chunk multiple times in a row, often
from getType();

Optimize this look up by using a Last Access cache.
2016-03-22 01:48:05 -04:00
Aikar 15dd8f0692 Don't teleport dead entities
Had some issue with this in past, and this is the vanilla logic.
Potentially an old CB change that's no longer needed.
2016-03-22 01:48:05 -04:00
Aikar 2e29af3df0 Use a Shared Random for Entities
Reduces memory usage and provides ensures more randomness, Especially since a lot of garbage entity objects get created.
2016-03-22 01:48:05 -04:00
Gabscap 6b4b7d300c Add "Waving banner workaround" 2016-03-22 00:37:00 -05:00
Aikar 17a08203ed Make Chunk IO Thread Base count configurable 2016-03-21 23:53:04 -04:00
Aikar 816fccea08 Fix skull cache case bug
missing cache hits on players with uppercase letters in name
2016-03-21 23:38:24 -04:00
Aikar 9a2f82feca Cache BlockState for Blocks
Improve performance for many plugins that call .getState() multiple
times for things like signs that have to "build" sign data.
2016-03-21 23:38:19 -04:00
Aikar 8d0fbc5c1d Another attempt at unload queue, including EAR improvements.
should be fully working now as I pretty much fell back to existing
methods so anything touching the unloadQueue set should behave correctly.

And maintained NMS Reflection safe change too
2016-03-21 23:04:38 -04:00
Aikar 646b62a220 Make /reload require typing confirm to actually reload 2016-03-21 21:40:29 -04:00
willies952002 62580304f4 Add Bukkit#reloadPermissions()
Fix issues with Paper build #544
2016-03-21 21:29:41 -04:00
Aikar def021fb9b fix rebuild patches and rebuild current patches 2016-03-21 20:46:54 -04:00
Daniel Ennis 8616dc012c Merge pull request #91 from willies952002/feature/permReload
Allow Reloading of Custom Permissions - resolves #49
2016-03-21 20:24:27 -04:00
William 869ab5202e Allow Reloading of Custom Permissions
Add the ability to reload the custom permissions file by doing "/reload permissions"

Implements Feature Request: https://github.com/PaperMC/Paper/issues/49
2016-03-21 19:28:52 -04:00
Zach Brown ca7c627ded Use singleton in Village class to work around null issue that evades 2016-03-21 10:28:45 -05:00
Zach Brown 836ec9dc1a Upstream merge Bukkit, update Paperclip 2016-03-21 09:04:19 -05:00
Zach Brown e2bbf2228d Support offline mode from the whitelist command
Closes GH-79
2016-03-21 00:53:32 -05:00
Zach Brown ef3a9f1286 Also handle original end case that spawned the issue
Final commit for GH-96 if there's any justine in the world
2016-03-20 23:15:37 -05:00
Zach 082e07406f Merge pull request #118 from Techcable/fix/spigot-title-compatibility
Fix backwards compatibility with spigot title api
2016-03-20 22:53:57 -05:00
Techcable a96fcc9206 Fix backwards compatibility with spigot title api
I shouldn't have assumed their api was anything other but a thin (and incomplete) wrapper over the packets.

Fixes #94
2016-03-20 20:46:31 -07:00
Zach Brown 84b54438c1 Only mark player as invulnerable if they're actually changing worlds
Fixes GH-96
2016-03-20 22:39:00 -05:00
Zach Brown 537c4994db Only mark player as invulnerable if they're going to the end
cc GH-96
2016-03-20 19:44:49 -05:00
Zach Brown f01982bf4c Upstream merge 2016-03-20 16:05:42 -05:00
Daniel Ennis aa054b6838 Catch Async PlayerChunkMap operations - Fixes #113 2016-03-20 15:25:30 -04:00
Aikar a1651ffd8e Disable Chunk Unload Queue Patch for now 2016-03-20 00:54:23 -04:00
Aikar 532e229c28 handle NaN health/absorb values and repair bad data
Undoes damage from Damage API bugs
2016-03-20 00:35:02 -04:00
Aikar 480a87933a Improve chunk unload queue to maintain some previous expectations
While the previous logic was logically correct, some CB API's before
would request a chunk without removing it from the unload queue.

While this is logically wrong, some plugins seem to be causing unload issues.

This change will make anything using that one API that use to not remove from
queue, no longer remove from queue.

Hopefully other activities on the server will touch the chunk if it REALLY is in use.
2016-03-20 00:13:20 -04:00
Zach Brown 6760f394ef Update upstream and rebuild patches 2016-03-19 20:20:25 -05:00
Zach Brown 924ce8be30 Remove patch pulled upstream and rebuild patches 2016-03-19 17:52:09 -05:00
Zach Brown 9d4a2cf8b3 Patch rebuild 2016-03-19 17:36:53 -05:00
kashike 918e177370 Set health before death event 2016-03-19 17:31:55 -05:00
kashike 3b15da52db Custom replacement for eaten items 2016-03-19 17:31:06 -05:00
Aikar ea051e14d1 Fixes #95 - Vanilla bug with Villages 2016-03-19 15:21:39 -04:00
Zach 57aa8b7451 Merge pull request #101 from DemonWav/master
Revert Spigot changes to blocking damage code
/me glances at imports
/me will fix later
2016-03-19 12:25:22 -05:00
DemonWav ba0da2d2dd Revert Spigot changes to blocking code, fix issue where entities cannot die 2016-03-19 12:20:27 -05:00
Aikar c331e8978a Fix chunk unload issues - Resolves #97 2016-03-19 11:29:46 -04:00
Aikar 027eb66188 forgot to rebuild after last light change, another fix 2016-03-19 10:57:22 -04:00
Aikar afd40e5d12 fix light level check on monsters 2016-03-19 10:45:28 -04:00
Aikar 7c7f8b83ab Optimized Light Level Comparisons
Use an optimized method to test if a block position meets a desired light level.

This method benefits from returning as soon as the desired light level matches.

Also Optimize Grass more
2016-03-18 23:55:31 -04:00
Zach Brown 148f3809ca Re-add comment to navigation patch 2016-03-18 21:41:50 -05:00
Zach Brown c19e52a63f Update upstream and rebuild patches 2016-03-18 21:37:58 -05:00
Zach Brown c909c3b884 Fix furnace cook time bug 2016-03-18 21:32:31 -05:00
Zach Brown fa8f621d56 Make spawner nerfed mobs float AI toggleable
closes GH-57
2016-03-18 21:10:20 -05:00
Zach Brown 52f462d52d Force potion effect application in BeaconEffectEvent 2016-03-18 20:45:22 -05:00
Aikar c51bf9d9f3 Optimize BlockStateList/BlockData
Mojang included some sanity checks on arguments passed to the BlockData.
This code results in the Hash look up occuring twice per call, one to test if it exists
and another to retrieve the result.

This code should ideally never be hit, unless mojang released a bad build. We can discover bugs with this as furthur code that never expects a null
would then NPE, so it would not result in hidden issues.

This is super hot code, so removing those checks should give decent gains.
2016-03-18 19:25:43 -04:00
Aikar e546c55b6e Optimize Chunk Unload Queue
Removing chunks from the unload queue when performing chunk lookups is a costly activity.

It drastically slows down server performance as many methods call getChunkAt, resulting in a bandaid
to skip removing chunks from the unload queue.

This patch optimizes the unload queue to instead use a boolean on the Chunk object itself to mark
if the chunk is active, and then insert into a LinkedList queue.

The benefits here is that all chunk unload queue actions are now O(1) constant time.

A LinkedList will never need to resize, and can be removed from in constant time when
used in a queue like method.

We mark the chunk as active in many places that notify it is still being used, so that
when the chunk unload queue reaches that chunk, and sees the chunk became active again,
it will skip it and move to next.
2016-03-18 18:03:44 -04:00
Zach Brown 310448d4ce Move config change into config patch 2016-03-18 16:41:26 -05:00
Aikar fec4578d74 Add comment to Navigation patch on why its done that way
to avoid accidently changing it in future and breaking things
2016-03-18 17:12:30 -04:00
Aikar ef251a8f81 Remove checkIfActive timings
Unneeded and adds extra timings cost to every entity tick
2016-03-18 17:11:53 -04:00
Aikar 6c5117b21c Configurable Non Player Arrow Despawn Rate
Can set a much shorter despawn rate for arrows that players can not pick up.
2016-03-18 15:13:03 -04:00
Aikar e9222c0be7 Handle Item Meta Inconsistencies
First, Enchantment order would blow away seeing 2 items as the same,
however the Client forces enchantment list in a certain order, as well
as does the /enchant command. Anvils can insert it into forced order,
causing 2 same items to be considered different.

This change makes unhandled NBT Tags and Enchantments use a sorted tree map,
so they will always be in a consistent order.

Additionally, the old enchantment API was never updated when ItemMeta
was added, resulting in 2 different ways to modify an items enchantments.

For consistency, the old API methods now forward to use the
ItemMeta API equivalents, and should deprecate the old API's.
2016-03-18 14:56:16 -04:00
Aikar dc477811ed Fix Furnace cook time bug
If the server lags out and skips multiple ticks, Furnace cooking behavior would not
cook in the expected amount of time as the cook time was not decremented correctly.

This patch ensures that furnaces cook to the correct wall time expectation.
2016-03-18 14:27:53 -04:00
Aikar 8fea9b93ce Undead horse leashing
default false to match vanilla, but option to allow undead horse types to be leashed.
2016-03-18 14:20:11 -04:00
Aikar b41bd5a1e2 Invalidate Metadata on reload
Metadata is not meant to persist reload as things break badly with non primitive types
This will invalidate metadata on reload so it does not crash everything if a plugin uses it.
2016-03-18 13:50:33 -04:00
Aikar 6e76be51bb reduce sleep rate if file io thread sleep is enabled
so we will still give it time to sleep to avoid the issue, but reduce the
known negative effects of that sleeping.
2016-03-18 13:41:18 -04:00
Aikar 460104c3fe Default loading permissions.yml before plugins
Under previous behavior, plugins were not able to check if a player had a permission
if it was defined in permissions.yml. there is no clean way for a plugin to fix that either.

This will change the order so that by default, permissions.yml loads BEFORE plugins instead of after.

This gives plugins expected permission checks.

It also helps improve the expected logic, as servers should set the initial defaults, and then let plugins
modify that. Under the previous logic, plugins were unable (cleanly) override permissions.yml.

A config option has been added for those who depend on the previous behavior, but I don't expect that.
2016-03-18 13:23:48 -04:00
Aikar 82db846be6 set default goals on all pom poms </cheer> 2016-03-18 02:13:51 -04:00
Aikar 7e81240343 patch rebuild 2016-03-18 01:47:31 -04:00
Aikar 98b86017fa Chunk Save Reattempt
Sometimes a chunk region file is closed prematurely, resulting in a "Stream Closed" error on chunk saving.
Ultimately there is a race condition that causes it, but re-trying the save will avoid the issue.

Retry the save 5 times to try our best to avoid rollbacks due to chunk save failures.
2016-03-18 01:37:16 -04:00
Zach Brown ca2ddce0ac Upstream changes 2016-03-17 23:31:20 -05:00
Techcable c2c40a2562 Don't pass null title to constructor
Fixes #83
Fix resetTitle()
@Zbob750 shouldn't be doing these updates in the middle of the night
2016-03-16 18:59:34 -07:00
Zach Brown 4209e6184c Someone questioned my professionality today 2016-03-16 03:16:12 -05:00
Zach Brown 30f02fe6e5 Fix the end credits toggle
I think its pretty clear that no one uses this given that it didn't work at all before
2016-03-16 02:41:38 -05:00
Aikar 06def38a47 Re-add chunk save queue improvements 2016-03-12 14:23:17 -06:00
Zach Brown bdb9292082 Re-add Spigot's hopper-check feature
Closes GH-77
2016-03-12 13:41:26 -06:00
Techcable 752452373d Handle static methods 2016-03-12 09:43:39 -07:00
Zach Brown 244196f8cb Rebuild some patches 2016-03-12 00:40:16 -06:00
Zach Brown 3fc67691fc Fix BeaconEffectEvent
It is no longer 5 am
2016-03-11 20:36:47 -06:00
Zach Brown 5dcb658e3e Update upstream and rebuild patches 2016-03-11 20:13:31 -06:00
Zach Brown fdf80f055f Update upstream and rebuild patches 2016-03-11 15:24:37 -06:00
Zach Brown e208ee6102 Update patch numbers for PR merges 2016-03-09 19:48:14 -06:00
Zach Brown b4e8b79728 Merge pull request #73 from kashike/feature/you-are-very-resourceful-you-know-yes-you-are-very-resourceful-yes 2016-03-09 19:45:55 -06:00
Zach Brown 962d24acb2 Merge pull request #71 from kashike/feature/what-are-these-pokey-things-OH-MY-GOD-HELP-THEY-HURT 2016-03-09 19:44:18 -06:00
kashike 9216a46316 Add more complete resource pack API 2016-03-08 22:24:16 -08:00
kashike a8ecaee65f Add methods for working with arrows stuck in living entities 2016-03-08 21:11:46 -08:00
Zach Brown 7603bda87f Fix a patch number after a few PRs 2016-03-08 23:09:32 -06:00
Zach 3a5c806a3e Merge pull request #70 from starlis/fixCollisionLag
Disable Scoreboards for non players by default
2016-03-08 22:58:36 -06:00
Aikar cecc8e3eba Disable Scoreboards for non players by default
Entities collision is checking for scoreboards setting.
This is very heavy to do map lookups for every collision to check
this setting.

So avoid looking up scoreboards and short circuit to the "not on a team"
logic which is most likely to be true.
2016-03-08 23:51:52 -05:00
kashike dcb7708f0c Don't nest if we don't need to when cerealising text components 2016-03-08 18:29:39 -08:00
Aikar 354ed8ed65 Improve NavigationListener patches.
reduces diff and cleans up implementation of goals greatly.
2016-03-08 21:01:33 -05:00
Zach Brown b5a7d7fd29 Forcibly disable async light updates for the time being 2016-03-08 16:23:28 -06:00
kashike 9a9033c6c1 Add BaseComponent sendMessage methods to CommandSender 2016-03-08 13:16:54 -08:00
Aikar 017c6f73be Optimize NavigationListener Iteration
I don't know what the person who wrote that code was smoking, but I
don't think it was good.

Gets rid of the WeakHashMap that mojang was abusing purely to be lazy
on clean up, and handles registering and deregistering navigation
upon world add/remove operations.
2016-03-08 00:42:48 -05:00
Aikar e2906382a1 Optimize NavigationListener 2016-03-07 20:45:17 -06:00
Techcable abc4f8df61 Re-add BlocksPos inlining patch 2016-03-07 16:01:34 -06:00
Zach Brown a05bf5ab9f Rebuild patches 2016-03-07 15:54:14 -06:00
Zach Brown 46d8cd6ca7 Rebuild patches 2016-03-07 00:57:19 -06:00
Zach Brown f429e9e043 Update and rebuild patches 2016-03-06 14:59:17 -06:00
Zach Brown a34a886ff7 Revert "Update to latest and rebuild ALL patches"
This reverts commit 141ef5a6dc.
2016-03-06 14:49:47 -06:00
Zach Brown 141ef5a6dc Update to latest and rebuild ALL patches 2016-03-06 14:37:28 -06:00
Zach Brown 35f085a017 Remove our own changes to the chunk save queue 2016-03-05 16:10:11 -06:00
Aikar 417017308c Chunk save queue improvements 2016-03-04 20:24:42 -06:00
Zach Brown 43091edd3a Fix chest sound playing at the wrong locaton
Closes GH-48
2016-03-04 17:49:32 -06:00
Zach Brown 4076ee569b Update against latest 2016-03-04 15:59:51 -06:00
Zach Brown 142defbe03 Rebuild patches 2016-03-04 15:20:13 -06:00
Zach Brown 7e7db629ed Update against latest upstream versions 2016-03-03 23:50:05 -06:00
Zach Brown a54fb8d270 Silence BeaconEffectEvent, swallow exception in version checking 2016-03-03 04:48:46 -06:00
Zach Brown 6287e97b6b Update for upstream changes 2016-03-03 04:07:25 -06:00
Zach Brown 99fec76702 Paper 1.9 2016-03-03 03:46:49 -06:00
Joseph Hirschfeld 010c651473 Add exception reporting events 2016-03-03 03:46:48 -06:00
Sudzzy 18b55ae547 Fix inter-world teleportation glitches
People are able to abuse the way Bukkit handles teleportation across worlds since it provides a built in teleportation safety check.

To abuse the safety check, players are required to get into a location deemed unsafe by Bukkit e.g. be within a chest or door block. While they are in this block, they accept a teleport request from a player within a different world. Once the player teleports, Minecraft will recursively search upwards for a safe location, this could eventually land within a player's skybase.

Example setup to perform the glitch: http://puu.sh/ng3PC/cf072dcbdb.png
The wanted destination was on top of the emerald block however the player ended on top of the diamond block. This only is the case if the player is teleporting between worlds.
2016-03-03 03:46:48 -06:00
Aikar 9dbab1fcf8 More timings for scheduler 2016-03-03 03:46:48 -06:00
Techcable dcad4c6ea7 Improve title API
Uses title objects instead of individual update methods
2016-03-03 03:46:48 -06:00
Joseph Hirschfeld c04cff4f82 Add velocity warnings
Issues #12 & #18
2016-02-22 21:31:56 -06:00
Joseph Hirschfeld 7ad220f6e6 Add configurable portal search radius 2016-02-21 14:50:05 -05:00
Joseph Hirschfeld a861cc6d8c Change implementation of tile entity removal list 2016-02-20 21:34:45 -06:00
Joseph Hirschfeld 1d78a73b5d Ensure inv drag is in bounds - Fixes #30 2016-02-20 20:07:15 -06:00
Jedediah Smith ee63dbebdc Player Tab List and Title APIs 2016-02-16 20:01:30 -06:00
Zach Brown 52398f034c Move bungeecord chat APIs out of spigot subclasses 2016-02-16 19:55:05 -06:00
kashike e8118c4a31 Be a bit more informative in maxHealth exception 2016-02-16 14:37:28 -08:00
Thinkofdeath 3ebeccc109 Fix Furnace Minecarts losing all of their velocity on corners 2016-02-15 23:19:43 -06:00
Zach 7bea05be51 Merge pull request #27 from kashike/feature/commandmap
Expose server CommandMap
2016-02-15 12:07:29 -06:00
kashike edc2cd686e Expose server CommandMap 2016-02-15 07:13:16 -08:00
Zach Brown 29616a64bb Some people just have bad days 2016-02-15 08:24:39 -06:00
Zach Brown bf58a0d278 Downgrade versioning plugin, fix build 2016-02-15 08:22:37 -06:00
Zach Brown 2cf460f29e Update version handling for our new build system
CC GH-19
2016-02-15 06:02:47 -06:00
Zach Brown 7022e9325f Missed a comment 2016-02-13 20:11:49 -06:00
CullanP 258dd89aa6 Avoid hopper searches if there are no items
Closes PR #23
2016-02-13 19:55:53 -06:00
Aikar 17e043b0fe Optimize getBlockData 2016-02-13 19:41:55 -06:00
Aikar e1db75896c Optimize Pathfinding 2016-02-13 19:41:55 -06:00
Zach Brown 505386c5cb Add BlockBrewingStand and BlockEnchantmentTable to flying entity collisions patch 2016-02-13 19:41:55 -06:00
Zach Brown 2052670adf Make timings verbose by default
More useful data by default for server administrators
2016-02-13 19:41:55 -06:00
Zach Brown b1492af86b Update CraftBukkit 2016-02-05 04:12:16 -06:00
Nik Gil b9d98ad6e8 Make EntityDismountEvent Cancellable 2016-02-01 23:57:27 -07:00
Zach Brown 43876bb104 Squash these tab complete patches 2016-01-31 17:00:30 -06:00
DemonWav 00f91edaec Fix infinite recursion with plugin tab completers
Make block location tab completion be a per-world configurable value
2016-01-31 01:21:47 -06:00
DemonWav 7a0c30a707 Add Location support to tab-completes
This is a feature in vanilla Minecraft that has somehow been missing from CraftBukkit for years
2016-01-30 19:20:18 -06:00
Techcable 4715d9c9d2 Fix mutable block position construction
Should fix #3
2016-01-29 13:49:01 -07:00
Aikar 33f207e3c2 Remove completely invalid Redstone event for Netherrack 2016-01-29 03:40:25 -06:00
Techcable bb17101d59 Speedup BlockPos by fixing inlining 2016-01-29 03:26:50 -06:00
Zach Brown 972d71a30b Squash Java 8 patches into pom changes patches 2016-01-29 02:51:53 -06:00
vemacs c0920b08dc Option to make all chunks capable of spawning slimes 2016-01-29 02:39:21 -06:00
Zach Brown a26fef50ef Re-introduce an option to limit the height of a flying tnt entity 2016-01-18 16:24:29 -06:00
Zach Brown 56c14f8f07 Force commands to be dispatched synchronously
[22:29:12] <Aikar> just add that
[22:29:17] <Aikar> that forces it fixed
[22:29:31] <Aikar> and then when his users spam him hell fix it :P
2016-01-12 23:02:36 -06:00
Zach Brown 314212b236 Add an option to disable chest's detection of Ocelots/Cats 2016-01-10 20:47:21 -06:00
Zach Brown 85dd26898d Migrate timings classes to new package 2016-01-10 01:33:27 -06:00
Zach Brown 9172103531 Migrate PaperSpigot to Timings version 2 2016-01-09 00:32:38 -06:00
Zach Brown e9c23b0c38 Require Java 8 - Tell your shitty hosts to update 2016-01-09 00:13:58 -06:00
chickeneer 06ada7cc6d Resolve bed issues on unloaded chunks 2016-01-04 00:24:44 -06:00
Aikar d02fb4e971 Entity teleport fix 2016-01-04 00:23:20 -06:00
Zach Brown a55011eb68 Make the duplicate entity UUID warning toggleable 2015-12-28 20:15:28 -06:00
Steve Anton 5063a0613d Add PlayerInitialSpawnEvent 2015-12-22 22:06:43 -06:00
Jedediah Smith 0265f4eaef Fix player leak from entity tracker and item frames
3005a20c5c
2015-12-22 21:55:24 -06:00
Aikar ff621fcb04 EAR: Fix bug with teleporting entities 2015-12-22 18:23:08 -06:00
Zach Brown d709888852 [17:15:29] * Z750 kicks jetbrains right in the scrotum 2015-12-06 17:16:51 -06:00
Zach Brown a7600285a6 Restore a constructor that was removed in EntityFallingBlock 2015-12-06 17:14:41 -06:00
ItsHarry 60136e77fe Also apply the "vanished players don't have rights" patch to Fishing Hook entities. 2015-11-26 19:51:30 -06:00
Aikar 0d986bbce5 Don't create a chunk just to unload it 2015-11-15 19:46:37 -06:00
Aikar a4e0b24594 Don't create region files when checking if a chunk exists 2015-11-15 19:44:34 -06:00
Aikar 61aa4a801b Bump thread count for chunk loading 2015-11-15 19:41:14 -06:00
Aikar fa810f3d47 Don't damage ArmorStands that are already dead 2015-11-15 19:40:53 -06:00
Zach Brown 4a647dc40b Remove TE/E Removal Optimizations
Causes pistons to eat blocks in certain circumstances, double piston extenders most notably
2015-10-24 02:20:30 -05:00
Aikar 04daf845d4 Update tick limiter removal and TE/E removal optimizations 2015-10-24 02:13:27 -05:00
Aikar c725b9cb96 Implement EMC's optimized entity and tileentity removal 2015-10-16 22:23:28 -05:00
Zach Brown 43c3a7b169 Don't point users at spigotmc when watchdog kills the server 2015-10-16 21:50:04 -05:00
Zach Brown 7d86a674eb Disable spigot tick limiters 2015-10-16 21:43:03 -05:00
Zach Brown 978982edfd Rebuild patch for upstream changes 2015-10-07 21:32:01 -05:00
Aikar 19619f8450 Remove an unused list of TileEntities slowing down removal 2015-10-06 23:36:43 -05:00
Zach Brown 9365b36050 Rebuild patches for upstream changes 2015-10-02 22:58:02 -05:00
Zach Brown 7aa4900879 Remove our own (outdated) TE handling, for one that's closer to vanilla 2015-09-19 09:34:17 -05:00
Zach Brown ea565eff61 Rebuild patches 2015-09-18 20:44:37 -05:00
vemacs 502ffa0833 Re-add entity/tile entity tick limiters 2015-09-14 20:37:51 -05:00
Zach Brown f243a4024d Remove several broken or unnecessary patches.
Removes PlayerMicroMoveEvent API, the ability to disable the AsyncCatcher, and the TeleportPassengerVehicleWithPlayer patch
2015-09-12 19:57:39 -05:00
Zach Brown 1f41387610 Rebuild patches 2015-09-01 20:14:41 -05:00
Zach Brown 477b22d36c Use spigot.yml's view distance setting 2015-08-29 03:12:41 -05:00
Techcable 25a137f3a3 Lookup game profiles for users that aren't onine 2015-08-15 14:05:29 -05:00
Byteflux a16e54d332 Re-add Spigot's hopper-check feature 2015-08-13 10:36:58 -07:00
Techcable 6d0a86a9b6 Use the server usercache for player heads 2015-08-11 01:27:37 -05:00
Zach Brown e786f4635b [23:29:51] <Byteflux> no tacoz 4 clippeh 2015-08-08 23:33:19 -05:00
Byteflux 4021394904 Fix NPE in recheckGaps when using async lighting 2015-08-06 21:44:03 -07:00
Byteflux 4eadccd3e2 Add beds and enderchests to list of collidable blocks 2015-08-05 02:31:55 -07:00
Iceee e12f1faed1 Fix lava/water some times creating air instead of cobblestone 2015-08-04 18:24:39 -07:00
Byteflux bde7f6bbbd Temporarily use getDouble() internally for calls to getFloat() in Paper configs
getFloat() seems to have an issue with reading modified values and always
returns the default value instead. This needs further investigating, but
for now making it use getDouble() internally appears to resolve the issue.
2015-08-04 17:57:17 -07:00
Byteflux 80e87de54f Configurable TNT explosion volume 2015-08-04 17:47:57 -07:00
Byteflux 8ba82c550a Add chests and soul sand to list of types falling blocks can collide with 2015-08-04 17:25:16 -07:00
Byteflux c38e8ec349 Make the recheckGaps method async like other lighting updates 2015-08-04 15:44:54 -07:00
Byteflux eaaf2c2cf3 Optimize getCubes() 2015-08-04 15:25:37 -07:00
Zach Brown 0febdc8b44 Rebuild patches 2015-08-02 01:56:08 -05:00
Zach Brown f6fba00cbc Temporarily remove PlayerMicroMoveEvent implementation
Breaks the existing PlayerMoveEvent, to be re-worked soon
2015-07-30 22:47:22 -05:00
Zach Brown 0daad69443 Update for upstream NMS mapping changes 2015-07-30 22:41:53 -05:00
Zach Brown 881dfe09c2 Update PaperSpigot to 1.8.8 2015-07-27 17:26:21 -05:00
Zach Brown fe4c7c88ac Re-add recentTps array for plugins that make bad choices 2015-07-26 15:58:37 -05:00
Zach Brown 56afbe3f71 Rebuild 2015-07-25 18:00:37 -05:00
Sudzzy f9e5f65987 Configurable container update tick rate 2015-07-23 22:06:57 -07:00
Byteflux 633137c1a8 Rebuild patches 2015-07-23 13:37:52 -07:00
Byteflux 7d9632e328 Add BeaconEffectEvent 2015-07-23 12:57:12 -07:00
Byteflux 16ab69f11b Fix package naming of PaperSpigot events to be consistent with Bukkit/Spigot
Right now this only affects the recently added PlayerMicroMoveEvent. I
figured this should be done to keep the events organized in the same way
Bukkit and Spigot do. This should lead to a less cluttered event package
when we do add more events.
2015-07-23 09:56:24 -07:00
Techcable 23f4ae7bbd Add PlayerMicroMoveEvent 2015-07-23 04:30:13 -07:00
Iceee e139db70f1 Optimize Spigot's Anti X-Ray 2015-07-23 04:24:24 -07:00
Jedediah Smith 579868e0c1 Send absolute position the first time an entity is seen 2015-07-23 04:13:26 -07:00
Zach Brown 58a75fef88 Rebuild patches 2015-07-20 20:14:39 -05:00
Byteflux 4d70f421f6 Unload client chunks + only cache whole chunk maps 2015-07-16 14:06:33 -07:00
Byteflux e3e7539232 Configurable chunk map caching 2015-07-15 16:16:27 -07:00
Byteflux b5666dd9e8 Improvements to ChunkMap caching 2015-07-15 13:31:34 -07:00
Iceee 7562f087f8 ChunkMap caching 2015-07-15 02:42:49 -07:00
Byteflux 536af803c4 Lookup neighbor chunks more efficiently in async lighting 2015-07-15 02:01:49 -07:00
Byteflux 8de3946478 Nerfed spawner mobs should use PathfinderGoalFloat to swim if available 2015-07-14 10:51:38 -07:00
Byteflux 04705fd392 Optimize item movement 2015-07-14 10:17:39 -07:00
Byteflux 4d0466c559 Configurable mob spawner tick rate 2015-07-14 10:01:28 -07:00
Byteflux 4cd1afddde Various configurable toggles
- Disable explosion knockback for players
- Disable thunder logic
- Disable ice and snow formation
- Disable mood sounds
2015-07-14 09:34:10 -07:00
Byteflux c17e209dc1 Rebuild patches 2015-07-14 08:59:57 -07:00
Byteflux a5bb700ee9 Remove obsolete patch 2015-07-10 03:45:20 -07:00
Byteflux c3a07a7060 Remove bad condition in async lighting check 2015-07-10 03:20:10 -07:00
Byteflux edfdff2218 Load chunks in getCubes() 2015-07-07 13:44:35 -07:00
Byteflux f1652c14d8 Fix off-by-one in async lighting neighbor loop 2015-07-04 17:42:28 -07:00
Byteflux 5ceee0e6e0 Fix liquids stuck in fast drain loop 2015-07-03 12:38:43 -07:00
Byteflux 7f032d52e6 Add player view distance API 2015-07-01 01:01:42 -07:00
Byteflux d07fe95b65 Configurable lava flow speed 2015-07-01 00:39:31 -07:00
Byteflux 6d7eed6d75 Clean up async lighting patch 2015-07-01 00:27:58 -07:00
Byteflux ca8627834d Clean up forced chunk loading patch 2015-06-30 22:58:11 -07:00
Byteflux 41064e2faa Fast draining 2015-06-30 20:22:24 -07:00
Byteflux 7ef5da4a4d Stop updating flowing block if material has changed 2015-06-30 19:46:05 -07:00
Byteflux 2811124265 Always use optimized draining fix 2015-06-30 19:23:17 -07:00
Zach Brown 929b5b0452 Patch rebuild 2015-06-27 01:18:29 -05:00
Zach Brown 5d7c5da500 Rebuild patches 2015-06-20 22:05:36 -05:00
Byteflux 111ed5569b Optimize explosions 2015-06-16 05:55:15 -07:00
Byteflux d3a270e365 Do not filter out large getEntities call 2015-06-16 05:34:03 -07:00
Zach Brown 6b6eb8f7f7 Rebuild patches for upstream API addition
Removes ArmorStand Marker API as that was added to Bukkit
2015-06-10 22:35:26 -05:00
Zach Brown b537fcb6cd Rebuild a patch for upstream changes 2015-06-07 15:51:24 -05:00
Zach Brown 55b35d8a6f Rebuild patches 2015-06-06 12:15:22 -05:00
Byteflux f6bd873c1d Update to 1.8.7 2015-06-05 05:45:30 -07:00
Byteflux d6fa7c2b99 FallingBlock and TNT entities collide with specific blocks 2015-06-05 01:24:22 -07:00
Byteflux e82e438855 Add configurable fix for TNT cannnons.
This attempts to revert cannoning mechanics to pre-1.8 behavior. A huge
thanks to TheIceAP who championed almost every fix in this patch.

Another shoutout to Jebediah Smith from SportBukkit for the velocity
update patch which mostly fixes the client issue of TNT moving in water.
2015-06-04 14:25:07 -07:00
Byteflux d75469a33d Migrate old TNT height nerf settings to falling block height nerf 2015-06-04 03:57:23 -07:00
Byteflux 9420859807 Remove giant TNT changes patch 2015-06-04 01:42:09 -07:00
Byteflux a5158e4b5c Fix another structure generator NPE 2015-06-02 02:13:19 -07:00
Byteflux 4bd0540daa Fix NPE when disabling certain structure generators 2015-06-02 01:47:50 -07:00
Byteflux 1a53596cb0 Add generator settings from Paper 1.7
As of 1.8, it is possible to customize worlds beyond what these settings
allow using a Customized world type, however, this is still useful for
non-Customized worlds and Nether worlds.
2015-06-02 00:44:06 -07:00
Iceee a34f61611b Fix lag from explosions processing dead entities 2015-06-01 22:56:10 -07:00
Byteflux 3cf6c48811 Stackable Buckets 2015-06-01 22:27:22 -07:00
Zach Brown 9ac5394f72 Re-add the teleport passenger/vehicel with player patch from 1.7.10 2015-05-31 01:52:17 -05:00
Zach Brown 233814297b Remove the spigot TileEntity/Entity capping feature
It appears to cause visual glitching issues with certain TNT entities
fired from cannons. TileEntity tick capping has already been removed
for some time, Entity tick capping removal is new to this patch.
2015-05-30 01:39:20 -05:00
Zach Brown 31fe931194 Rebuild Patches for upstream changes 2015-05-30 01:11:16 -05:00
Zach Brown 32f10ee552 Bring chunkloading TNT/FallingBlocks/EnderPearls to 1.8
Forward ported from PaperSpigot 1.7.10
2015-05-28 22:19:49 -05:00
DoctorDark 7752c5973f Configurable end credits when leaving the end 2015-05-28 20:30:05 -05:00
Zach Brown efaef117d3 Rebuild patches for upstream changes 2015-05-28 00:11:18 -05:00
Zach Brown dfdbaa3bd8 Update to 1.8.6 2015-05-25 15:59:30 -05:00
Zach Brown ebb90ceeae Things compile better when you update mc-dev 2015-05-23 13:04:28 -05:00
Zach Brown d69690af14 Update PaperSpigot to 1.8.5 2015-05-23 12:09:55 -05:00
Zach Brown 51360537c1 Misc. cleanup from 1.8.4 update 2015-05-18 19:22:48 -05:00
Jedediah Smith 06c96d094f Fix jar being shaded multiple times 2015-05-18 19:06:27 -05:00
Zach Brown 41cc0debed Re-enable Metrics so that we can better understand our userbase 2015-05-18 19:03:24 -05:00
Zach Brown 4c8a717466 Update PaperSpigot to 1.8.4 2015-05-18 18:41:57 -05:00
Zach Brown 07ff818e53 Rebuild patches 2015-05-10 19:24:52 -05:00
Zach Brown 9012499383 Add ArmorStand Marker NBT API 2015-05-03 17:47:28 -05:00
Zach Brown d167eb42de Fix a typo in the server POM 2015-05-03 16:28:13 -05:00
Isaac Moore 4651b50153 Add PlayerLocaleChangeEvent 2015-04-27 21:44:11 -05:00
Zach Brown 0348f3fb5e Rebuild patch for update 2015-04-21 17:29:36 -05:00
Zach Brown 6c710c1692 Rebuild a patch for an upstream merge 2015-04-18 16:00:48 -05:00
Zach Brown 8022d678b3 Fix the repo's patches because I can't merge things today
Thanks to Byteflux for all the PRs you see below bringing 1.8 PaperSpigot that much closer to feature parity with it's 1.7 branch
2015-04-18 15:50:17 -05:00
Byteflux 1fba83469e Toggleable player crits 2015-04-18 15:10:26 -05:00
Byteflux b0095e91dc Optimize draining 2015-04-18 15:08:52 -05:00
Byteflux 80aba79938 Async Lighting 2015-04-18 15:02:39 -05:00
Byteflux 0b6c6c3725 Configurable tickNextTickListCap bypass for redstone 2015-04-18 14:53:02 -05:00
Byteflux 69337ef9ee Fix remove-unloaded.enderpearls option not being respected 2015-04-18 14:48:55 -05:00
Byteflux 8bd77dff5a Add FallingBlock source location API 2015-04-18 14:46:35 -05:00
Zach Brown 83fc0d21e7 Rebuild patches 2015-04-16 15:38:30 -05:00
Zach Brown e62cf21c8f Rebuild patches 2015-04-13 15:48:16 -05:00
Zach Brown 9a77c8ec95 Always tick falling blocks - Exclude from EAR 2015-04-10 18:07:59 -05:00
Zach Brown 232c6f8387 Patch rebuild 2015-04-08 22:47:58 -05:00
Zach Brown 0091c86379 Rebuild patch 2015-04-06 17:29:04 -05:00
Roman Alexander 5a49816bef How about we actually make that tickNextTickList cap configurable
*glances at Z*
2015-03-24 18:28:50 -05:00
Zach Brown 7cbda258cc Allow users to configure the tickNextTickList cap 2015-03-23 14:40:52 -05:00
Zach Brown d22f14e933 Rebuild patches 2015-03-23 14:23:25 -05:00
Zach Brown f1c39a0f62 Remove patch that kept the player on world changes 2015-03-20 21:39:37 -05:00
Zach Brown 6be3dc0d50 Rebuild Patches 2015-03-19 19:41:36 -05:00
Zach Brown ad93cd940f Rebuild patches 2015-03-09 16:02:50 -05:00
Zach Brown 78fa2af57a Update PaperSpigot to Minecraft 1.8.3 2015-03-08 05:17:04 -05:00
Zach Brown 9b05d00764 Check online mode before converting and renaming player data 2015-03-05 15:30:48 -06:00
Zach Brown e9ce2f6a10 Rebuild Patches 2015-02-28 00:43:40 -06:00
Zach Brown 9cb1661979 Manually bump the config version since git won't 2015-02-23 16:59:00 -06:00
Zach Brown d28dd3edbd PaperSpigot TNT Changes
Brought our multiple TNT change patches into a single patch and
configuraiton section.
You /will/ need to update your configs, sorry.

Adds additional configuration and features as well.
2015-02-23 16:36:47 -06:00
Zach Brown d871bd8d00 (Temporarily?) Disable Spigot's TE changes in favor of our own
Pending proper benchmarks and a potential rewrite, this appears to be a
good short-term solution
2015-02-22 02:38:45 -06:00
Zach Brown b2f0432d2e Rebuild patches 2015-02-22 00:43:08 -06:00
Zach Brown a1b0dffb19 Remove upstream-pulled patch 2015-02-14 20:16:45 -06:00
Zach 2ab5f7ada3 Make Enderman drop the block they're holding when they die 2015-02-13 14:50:25 -06:00
Bestle 70205b2b3a Despawn items outside EAR activation range 2015-02-13 14:34:02 -06:00
Zach f856100e66 Rebuild patches for upstream changes 2015-02-13 14:24:02 -06:00
Zach bf99f9b97d Rebuild a patch 2015-02-06 09:06:09 -06:00
Zach ddb3f1daa3 Rebuild a few patches 2015-02-04 15:31:08 -06:00
Zach 3d0e742fab Rebuild patches for upstream changes 2015-02-03 17:53:51 -06:00
Zach Brown b22a02ec14 Rebuild patches 2015-02-02 16:10:54 -06:00
Zach 965e98f6e2 Rebuild patches 2015-01-31 00:00:35 -06:00
Zach Brown 51d8a94236 Add configurable top of nether void damage patch 2015-01-29 15:42:25 -06:00
Zach Brown bd4f1bb35b Remove the broken teleport passenger vehicle with player patch 2015-01-29 15:42:00 -06:00
Zach Brown 3c6c540486 Fix patch usernames and emails 2015-01-29 15:25:50 -06:00
Zach Brown e4f8f0793e Remove patch that was pulled upstream 2015-01-25 02:08:21 -06:00
Zach Brown 6776612919 Fix certain mobs crashing the server from MobSpawners 2015-01-18 12:43:42 -06:00
Zach Brown c6b30147f0 Rebuild patches 2015-01-13 15:20:59 -06:00
Zach Brown 2405e7c169 Rebuild patches for upstream changes 2015-01-12 11:21:32 -06:00
Zach Brown b7ea61e56b Fix parent warning in PaperSpigot-API... and rebuild other patches 2015-01-11 01:10:11 -06:00
Zach Brown 788b857ddd Rebuild patch for upstream update 2015-01-08 21:53:39 -06:00
Zach Brown 6c95b61fd5 Rebuild patches for upstream changes 2015-01-06 22:13:40 -06:00
Zach Brown 6ae735e2e3 Rebuild our patches for upstream changes 2015-01-04 20:30:07 -06:00
Howaner 3fba354aa5 Fix kick messages 2015-01-03 18:26:19 -06:00
Zach Brown 8f0aaf3411 Fix block placement in the invisible players patch
Thanks Mojang...
2015-01-03 17:35:46 -06:00
Aikar cf5eecc1e1 Prevent tile entity and entity based crashes 2014-12-22 15:13:48 -06:00
gsand 5ed916c971 [00:50:57] <Clippy> wait, actually I need to do additional testing, just
remove it
[00:51:09] <Clippy> ;(
[00:51:17] * Clippy opens mcp
[00:51:22] <Z750> ._.
2014-12-21 00:53:33 -06:00
gsand 7ead09d18c [00:32:19] <Clippy> I goofed, forgive meeeee! ;____; 2014-12-21 00:48:14 -06:00
gsand 52b0f26ce8 Allow the first spawn location "fuzziness" to be configured 2014-12-20 19:22:56 -06:00
Aikar 5460c17f8a Do not allow negative count itemstacks (infinite itemstacks)
Should work around quite a few issues and this
'feature' is relatively worthless anyway
2014-12-19 16:37:05 -06:00
Zach Brown ed8119ad4d Rebuild our patches for upstream changes 2014-12-18 17:35:10 -06:00
Zach Brown eb71958f5c Remove unnecessary patch 2014-12-14 16:26:48 -06:00
Zach Brown 11b53f20cf Rebuild our patches for upstream changes 2014-12-14 16:25:11 -06:00
Zach Brown b532dbb6ce Rebuild patches for upstream changes 2014-12-12 22:52:49 -06:00
Zach Brown b07fd9dae8 Rebuild our patches for upstream changes 2014-12-10 22:26:46 -06:00
Zach Brown 0004ccb0f6 Missed a comment in chest sound patch 2014-12-07 22:57:26 -06:00
Zach Brown 2c4fcfbf9f Improve chest sound handling patch 2014-12-07 14:52:19 -06:00
Zach Brown 6618287b5c Update our patches for upstream changes 2014-12-07 13:29:55 -06:00
Byteflux 62b112be14 Use the servers built in UUID map for player lookups 2014-12-07 13:29:07 -06:00
Zach Brown ff120ea055 Add a constructor for setting both the header and the footer to PacketPlayOutPlayerListHeaderFooter 2014-12-05 22:47:37 -06:00
Zach Brown 4b79813cf3 Clean up some of our patches
Remove unused torch placement config option
Remove ambiguity in invisible players patch
2014-12-05 22:28:08 -06:00
Zach Brown 137dfd0b4f Update our patches for Spigot changes 2014-12-05 22:25:23 -06:00
Zach Brown 1d8cdd7bf5 Rebuild our patches 2014-12-03 18:15:12 -06:00
Zach Brown 9d7fbd476f Update our patches for the latest changes
/ver is no longer useless! Meaninful version tracking yay!
2014-12-02 00:45:25 -06:00
Aikar 2a326d9446 Add TNT source location API 2014-11-30 22:58:51 -06:00
Zach Brown 4e29dfb788 Improvements to teleport with passenger vehicle 2014-11-30 22:35:33 -06:00
Zach Brown 718ed221b4 Fix an improperly updated patch file 2014-11-30 20:09:09 -06:00
Byteflux 991a3fa2b6 Allow specified ItemStacks to retain their invalid data 2014-11-30 19:00:00 -06:00
Zach Brown 99e3002266 Regen our patches 2014-11-30 16:21:39 -06:00
Byteflux 5826b0b98a Configurable TNT water movement 2014-11-29 23:15:12 -08:00
Zach Brown 169193fee6 Regen Patches for CraftBukkit updates 2014-11-29 13:23:36 -06:00
Zach Brown 28718b4c25 Update 2014-11-29 02:13:12 -06:00
Zach Brown 1c49ff69f4 Update Spigot's Patches round 2?
The hell happened here.
:
Fix Build 2339ac14a8e
Regen the patches 89d3fcbdfaf

This new system breaks a lot :(
2014-11-28 18:06:26 -06:00
Zach Brown b547153ec6 Fix a mistake in Teleport w/ passenger/vehicle patch
Along with restoring authorship to the original writer
2014-11-28 16:30:20 -06:00
Zach Brown de86706b70 Update PaperSpigot to Minecraft 1.8 2014-11-28 15:01:21 -06:00
Aikar b697c4d506 Add Async Chunk Load API 2014-11-28 14:19:09 -06:00
Zach Brown a5069ae74d Random space is most certainly not best space 2014-11-28 14:19:09 -06:00
Zach Brown edf1a20dcd Replace non-picky rails with non-picky torches
Issues with rails colliding with hitboxes on fences
non-picky torches can be placed on stained glass on 1.8+ clients only (client-side limitation)
2014-11-28 14:19:09 -06:00
Zach Brown b6b3d84943 Minor configuration code formatting 2014-11-28 14:19:09 -06:00
Zach Brown 20973ffd0f Make certain game mechanics configurable
Boat drops and rail placement at this time
2014-11-28 14:19:09 -06:00
Aikar 25c5c2cb16 Implement performance improvements from the EMC-CraftBukkit fork
See the individual patch files for more details
2014-11-28 14:19:09 -06:00
Byteflux c615aa649b Fix PaperSpigot entity removal in unloaded chunks 2014-11-28 14:19:09 -06:00
Zach Brown 4555490e4b Remove 1.8 blocks/items patches
For those interested in these features, you can continue to use these patches in your own builds or use a plugin, such as Carbon, to add them
2014-11-28 14:19:09 -06:00
Byteflux 2a92d3a54a Update with more Spigot binary patches 2014-11-28 14:19:09 -06:00
Byteflux 9ef798aa90 Backwards compatible PacketPlayOutEntityTeleport constructor 2014-11-28 14:19:09 -06:00
Zach Brown 0326076342 Redo protocol warning message 2014-11-28 14:19:08 -06:00
Byteflux 1a6b7c9d79 Update with latest patches from upstream SpigotMC 2014-11-28 14:19:08 -06:00
Zach Brown 39893976b4 Re-add SportBukkit visual offset fix
Looks to be entirely unrelated to the visual issues being seen

Revert "Remove SportBukkit visual offset fix, may cause issues with certain cannons"

This reverts commit 1156e17179492f530ced9a91a2db0ee32f6bf0e9.
2014-11-28 14:19:08 -06:00
Zach Brown 09d8de02ad Fix slime block sounds 2014-11-28 14:19:08 -06:00
Zach Brown 6916d318a4 Remove SportBukkit visual offset fix, may cause issues with certain cannons 2014-11-28 14:19:08 -06:00
Zach Brown b543551365 Don't register standing or wall banner, and daylight detector inverted
Cause client crashes, likely because they arent ticking yet
2014-11-28 14:19:08 -06:00
Zach Brown c1d8afce9b Don't allow 1.8 clients to join...
they crash when encountering 1.8 blocks/items/etc
2014-11-28 14:19:08 -06:00
Zach Brown 798eced7fc Add SportBukkit fix for visually offset entities 2014-11-28 14:19:08 -06:00
Zach Brown e60db6a306 Add a few 1.8 features/blocks/items/whatever 2014-11-28 14:19:08 -06:00
Zach Brown 15b553bed3 Update from upstream SpigotMC
Fix double plants having the incorrect top half SpigotMC/Spigot@377b69d787
Fix boats thinking that they were always on land for 1.8 clients SpigotMC/Spigot@4a083f819e
Correct the action used in updateGamemode. this isn't used by the ser... SpigotMC/Spigot@face904a9a
Allow the updated version of protocollib to be enabled SpigotMC/Spigot@4614a615cc
2014-11-28 14:19:07 -06:00
Minecrell 85eb25863a Fix ProtocolLib compatibility 2014-11-28 14:19:07 -06:00
Zach Brown 72142b3f8d Rebuild patches after merge 2014-11-28 14:19:07 -06:00
Zach Brown 1827f089f2 Remove accidentally committed patch file 2014-11-28 14:19:07 -06:00
Dmck2b 9c68e2eb9f Work around for blocking rail duplication 2014-11-28 14:19:07 -06:00
Zach Brown a245892c3c Remove brewing stands from the TE optimizations as well
Possible conflict with CB wall time patches?
2014-11-28 14:19:07 -06:00
Zach Brown 14ac97ad60 Configurable strength and weakness effect modifiers 2014-11-28 14:19:06 -06:00
Zach Brown ab9af61cbf Show PaperSpigot in protocol warning 2014-09-01 14:41:47 -05:00
Zach Brown 495c399ff4 Add Spigot's 1.8 protocol patch - Update from upstream
Add support for Minecraft 1.8.x SpigotMC/Spigot@b15ae91145
Skip loading of ProtocolLib SpigotMC/Spigot@508ec8f573
Apply the block fix to block change packets SpigotMC/Spigot@b9349e416d
Blacklist Orebfuscator as well. SpigotMC/Spigot@b2ba105762
2014-09-01 14:11:02 -05:00
Zach Brown 1f10a97d0d Temporary fix for broken furnaces on certain servers 2014-08-30 14:25:03 -05:00
Zach Brown 134a563b5f Remove specific entities that fly through unloaded chunks 2014-08-29 20:38:35 -05:00
Zach Brown c777f40058 Update from upstream SpigotMC
Add unbreakable API to item meta SpigotMC/Spigot@b1af008222
Configure how often EntityHangings calculate if they should die. SpigotMC/Spigot@ac6e1fc32d
Copy ItemStacks in DataWatcher to prevent ConcurrentModificationExcep… SpigotMC/Spigot@2af28ffbd1
Add the spigot.yml into the timings paste SpigotMC/Spigot@d61f38bd58

Note: This commit moves the entity-hanging tick into Spigot's spigot.yml and out of our paper.yml
2014-08-25 16:33:18 -05:00
Aikar c803f4dde1 Implement optimized Tile Entity ticking 2014-08-24 21:20:12 -05:00
Zach Brown f7bb4ad8a3 Update from upstream SpigotMC
Included Commits:
Update IRC channel to irc.spi.gt SpigotMC/Spigot@a791c555e7
Remove inv close patch for now SpigotMC/Spigot@a3abb3bea9
Limit TNT Detonations per tick SpigotMC/Spigot@8f9c601aed
Use sane default config values SpigotMC/Spigot@1cbbb9b62e

These commits were not included as they were quickly reverted:
Only close if we are actually placing a block SpigotMC/Spigot@ea0b1b2d67
Revert for the above SpigotMC/Spigot@28faa0bd20
Add isUnbreakable and setUnbreakable to ItemMeta. Also fixes a bug wh... SpigotMC/Spigot@32e6d74a5f
Revert for the above SpigotMC/Spigot@4b5a26b11c
2014-08-24 02:40:45 -05:00
Byteflux 825584d02f Remove invalid mob spawner tile entities 2014-08-19 14:53:38 -05:00
Zach Brown 33cf47c75b Remove Metrics
People seem fairly mixed on it, and we just don't need 'em
2014-08-19 14:27:57 -05:00
Zach Brown 5342c92587 Show 'PaperSpigot' in client crashes, server lists, and Mojang Stats 2014-08-19 14:26:33 -05:00
Zach Brown 5b4bc3081a Update from upstream SpigotMC
Upstream merge (we must go deeper) SpigotMC/Spigot@1e7bc383c3
2014-08-18 10:43:17 -05:00
Zach Brown f88a3838c0 Don't tick enderchests either 2014-08-17 17:15:18 -05:00
Zach Brown a4647a8a71 Update from upstream SpigotMC
Fix empty `ench` tags being wiped by the meta system SpigotMC/Spigot@cc9a1a417f
Add Hunger Config Values SpigotMC/Spigot@2cd515e224
Make debug logging togglable SpigotMC/Spigot@d31b1d616f

Spigot has implemented a system of hunger exhaustion similar to ours, as such a lot of config values have been moved there.
Our exhaustion patch has been trimmed and only a few values for exhaustion remain in paper.yml, the others now sit in spigot.yml
2014-08-17 16:47:36 -05:00
Zach Brown 57ec3d64be Temporarily remove optimized tile entity code
Potential CME's and issues with pistons, we'll work through this on a separate branch and re-add it when appropriate
2014-08-13 16:50:24 -05:00
Zach Brown 31d35e76ac Update TileEntity optimizations (again again) ...
hopefully less often now
2014-08-11 23:07:39 -05:00
Aikar 169c67aaa0 Update with latest TileEntity optimization changes 2014-08-11 21:57:37 -05:00
Zach Brown 0b8246dbb7 Move chest sound handling out of the tick loop...
and set them not to tick
2014-08-11 19:36:08 -05:00
Aikar 2542c10a85 Optimize TileEntity Ticking
Re-organizes the servers TileEntity Tick List to be bucketed by type.

This allows the server to skip buckets of Tile Entities that is known to
not have any tick function (half of them), skipping time spent iterating
them and checking if they are valid and in a loaded chunk. In other words,
a lot of "meta" time wasted on tile entities that would never do anything anyways.

This change also adds control into the interval of every TileEntity, giving
the server owner control on how fast a TileEntity ticks, slowing it down if they must
(Such as chest), to improve performance.
2014-08-11 16:05:29 -05:00
Zach Brown 174855f19d Update from upstream SpigotMC
Part revert to fix (0) in place of file name SpigotMC/Spigot@2fbc1f2704
Fix the last PR SpigotMC/Spigot@b2199df3f7
2014-08-11 15:49:06 -05:00
Zach Brown 552e1c5afd Remove 0026-Don-t-tick-chests, we'll be slightly changing our implementation 2014-08-11 15:45:57 -05:00
Zach Brown 3727c00bdd Update from upstream SpigotMC
Abridged: Force close player inventories when they move/interact
This prevents modified clients from using the 2x2 crafting square as permanent storage

Force Close Inventory On Move SpigotMC/Spigot@db78a70788
Only close once, if needed SpigotMC/Spigot@b652de8e7f
Move to interact event closing SpigotMC/Spigot@b5378850d3
Disregard arm swings - racy SpigotMC/Spigot@f86634e280
2014-08-10 00:21:18 -05:00
Suddenly 0eb966c2a9 Treat this.c as an element, not an extra object 2014-08-09 19:25:24 -05:00
Zach Brown ce389c461f Remove link to CB PR as its causing a lot of unneeded spam 2014-08-09 18:12:13 -05:00
drXor d95ac585d4 Configurable hanging tick
EntityHangings make a somewhat extensive calculation ever 100 ticks to check if they should die (obstruction etc). This patch makes this magic number configurable, allowing server owners to pick how often they want EntityHangings (e.g. ItemFrames) to tick. Higher values may provide a performance boost for Hanging-heavy servers.
2014-08-09 17:28:09 -05:00
Jedediah Smith 9fdc6b05f9 Add player affects spawning API
Test plugin here: https://github.com/Zbob750/AffectsSpawning
I believe this originated with SportBukkit, slightly modified for our (and potentially upstream's) usage
2014-08-08 23:27:47 -05:00
Zach Brown 8e365012c0 Update from upstream SpigotMC
Upstream Merge (Bukkit + CraftBukkit) SpigotMC/Spigot@da20125dab
Plug WorldMap Memory Leak SpigotMC/Spigot@da20125dab
2014-08-08 17:15:42 -05:00
Jedediah Smith 86f789adb4 Center TNT sample grid points
Makes TNT calculations more accurate, among other things
2014-08-07 23:14:51 -05:00
Zach Brown 2253110c8e Revert "Fix TNT directional bias"
Restores our earlier and supposedly working TNT directional bias fix
We will contiune to work through the specifics of the the issue in a separate branch
This reverts commit 2449df7cdf.
2014-08-07 14:18:11 -05:00
Jedediah Smith 2449df7cdf Fix TNT directional bias
Shift the sample points so they are centered on the entity, eliminating the directional bias of the explosion force
2014-08-06 18:23:28 -05:00
Zach Brown b657ae7456 Cleanup our patches 2014-08-05 18:45:22 -05:00
Zach Brown 557a65eb3c Update CraftBukkit 2014-08-04 15:11:38 -05:00
Byteflux 8c8c10cefa Configurable speed for water flowing over lava
Higher values = Slower water movement = better performance
http://hastebin.com/axuzaralas.vhdl
2014-08-03 21:23:45 -05:00
Dmck2b f054884c39 Don't log debug information 2014-08-03 21:05:27 -05:00
Byteflux aeead930a1 Better nerf for TNT Cannons ...
Drops the item
Applies to all Falling Block Entities
2014-07-30 03:35:32 -05:00
Zach Brown 7d802ab493 Temporarily remove the better water lighting updates patch while we ensure there are no performance or implementation issues
Specifically around non-water fluids
2014-07-30 02:44:36 -05:00
Iceee 37d9d3a11e Apply the better water lighting updates patch to receding water as well 2014-07-28 02:48:03 -05:00
Zach Brown 94071f2c32 Remove configurable AI target selector delay patch 2014-07-27 21:50:06 -05:00
Zach Brown 398f6983bd Update from upstream SpigotMC
Make "moved too quickly" limit configurable SpigotMC/Spigot@99a0a640e8
Undeprecate Player#updateInventory()V SpigotMC/Spigot@5c32e1cb48
Fetch complete profile for skull items, similarly to TileEntitySkull. SpigotMC/Spigot@33d758773e
Move getDouble into the Spigot Configuration patch SpigotMC/Spigot@b5dd202af1
Add missing particle to particle API SpigotMC/Spigot@273c64bbad
Log debug levels to the log file. SpigotMC/Spigot@348eae75f4
Fix PlayerItemDamageEvent (we already had this #badupstreamrelations) SpigotMC/Spigot@e207ea23cd
Move hopper patch to top for PR180 SpigotMC/Spigot@abb775108d
Don't be so spammy on Java 6 SpigotMC/Spigot@5abb82b1ca
Apply NBTReadLimiter to more things SpigotMC/Spigot@408944e9f5
2014-07-27 14:20:28 -05:00
Zach Brown a7f1e7efd5 Fix PlayerItemDamageEvent
Hopefully a temporary patch as I've already submitted it to SpigotMC
But I kinda wanna use the event now so... Here we are
2014-07-24 22:29:15 -05:00
Zach Brown 7dd671146d Update from upstream SpigotMC
Don't use Bukkit.getLogger as the CraftServer isn't loaded at this point SpigotMC/Spigot@5c48793ecf
Modify the block placement limit to allow for the odd random packet or two SpigotMC/Spigot@7768676ae2
2014-07-24 22:21:57 -05:00
Iceee c768de882c Fix lag caused by water lighting updates
Before: http://aikar.co/timings.php?url=7842564
After: http://aikar.co/timings.php?url=7842536
2014-07-23 10:54:24 -05:00
Zach Brown f07313c43f Fix random position generator's tendency to move north-west
Fixes the issue of mobs constantly going North-West in pens and other areas
backported from 1.8
2014-07-22 22:04:05 -05:00
Zach Brown 5cfd799cff Fix incorrect API version on startup 2014-07-22 20:16:50 -05:00
Zach Brown 4aef5602d5 Update from upstream SpigotMC
Remove defensive copy in EAR SpigotMC/Spigot@f1ba1f6c07
Make "moved wrongly limit" configurable SpigotMC/Spigot@f7ab380e16
Fix null Tile Entity Worlds (we already had this) SpigotMC/Spigot@b271cdbfa0
Fix slow tab complete for some commands SpigotMC/Spigot@f3b7952c73
Only suggest ops to deop and remove whitelist add case entirely SpigotMC/Spigot@0e1fcfbe70
Allow tab complete for /whitelist add SpigotMC/Spigot@27f8aa22bd
2014-07-22 15:25:09 -05:00
Zach Brown 62371c5dc0 Fix minecraft-server dependencies in poms 2014-07-22 14:50:06 -05:00
Zach Brown a23a026713 Support all projectiles in the invisible players patch
also cleans up the code a bit
2014-07-21 18:52:19 -05:00
Zach Brown 7b0c576798 Restructure PaperSpigot as a new set of modules
Allows us much greater control over the Spigot portion of the code
and makes us more "proper"
Credit to @Dmck2b for originally passing the idea along a while back
2014-07-21 15:46:54 -05:00