Commit graph

1098 commits

Author SHA1 Message Date
miclebrick
68e76b43b8 Optimize CraftBlockData Creation
Avoids a hashmap lookup by cacheing a reference to the CraftBlockData
and cloning it when one is needed.
2018-08-23 11:45:32 -04:00
Byteflux
28ea7bb560 Configurable speed for water flowing over lava 2018-08-08 16:33:21 -06:00
BillyGalbreath
14aa197675 Slime Pathfinder Events 2018-08-24 08:18:42 -05:00
Spottedleaf
4e0ee05920 Optimize BlockPosition helper methods 2018-08-15 12:05:12 -07:00
Aikar
d178f73bb8 Use a Queue for Queueing Commands
Lists are bad as Queues mmmkay.
2018-08-12 02:33:39 -04:00
egg82
f6519a79fe Use ConcurrentHashMap in JsonList
This is specifically aimed at fixing #471

Using a ConcurrentHashMap because thread safety
The performance benefit of Map over ConcurrentMap is negligabe at best in this scenaio, as most operations will be get and not add or remove
Even without considering the use-case the benefits are still negligable

Original ideas for the system included an expiration policy and/or handler
The simpler solution was to use a computeIfPresent in the get method
This will simultaneously have an O(1) lookup time and automatically expire any values
Since the get method (nor other similar methods) don't seem to have a critical need to flush the map to disk at any of these points further processing is simply wasteful
Meaning the original function expired values unrelated to the current value without actually having any explicit need to

The h method was heavily modified to be much more efficient in its processing
Also instead of being called on every get, it's now called just before a save
This will eliminate stale values being flushed to disk

Modified isEmpty to use the isEmpty() method instead of the slightly confusing size() < 1
The point of this is readability, but does have a side-benefit of a small microptimization
2018-08-07 01:24:23 -06:00
miclebrick
31fc02af68 Add Early Warning Feature to WatchDog
Detect when the server has been hung for a long duration, and start printing
thread dumps at an interval until the point of crash.

This will help diagnose what was going on in that time before the crash.
2018-08-08 15:30:52 -04:00
Aikar
2f4d83a219 Add Debug Entities option to debug dupe uuid issues 2018-07-21 08:25:40 -04:00
Aikar
223c6c3b5a Remove unnecessary itemmeta handling 2016-11-22 00:40:42 -05:00
Aikar
394e4c04f7 Fix NBT type issues
Addresses two issues:
- MC-135506: Experience should save as Integers
- Allay duplication cooldown is saved and exposed as a long, but loaded as an int
2018-08-03 00:04:54 -04:00
Shane Freeder
88409ad861 Break up and make tab spam limits configurable
Due to the changes in 1.13, clients will send a tab completion request
for all bukkit commands in order to factor in the lack of support for
brigadier and provide backwards support in the API.

Craftbukkit, however; has moved the chat spam limiter to also interact
with the tab completion request, which while good for avoiding abuse,
causes 1.13 clients to easilly be kicked from a server in bukkit due
to this. Removing the spam limit could cause issues for servers, however,
there is no way for servers to manipulate this without blindly cancelling
kick events, which only causes additional complications. This also causes
issues in that the tab spam limit and chat share the same field but different
limits, meaning that a player having typed a long command may be kicked from
the server.

Splitting the field up and making it configurable allows for server owners
to take the burden of this into their own hand without having to rely on
plugins doing unsafe things.
2018-07-29 05:02:15 +01:00
Mark Vainomaa
30f16143ba Add TNTPrimeEvent 2018-07-16 00:05:05 +03:00
BillyGalbreath
f20fbf5477 AnvilDamageEvent 2018-07-20 23:37:03 -05:00
BillyGalbreath
da011362dc SkeletonHorse Additions 2018-07-27 22:36:31 -05:00
Riley Park
c0a3a0d12c Allow disabling armor stand ticking 2018-08-15 01:26:09 -07:00
Hugo Manrique
510b8187c7 Vanished players don't have rights 2018-07-23 14:22:26 +02:00
Hugo Manrique
1549b076df Option to prevent armor stands from doing entity lookups 2018-07-23 12:57:39 +02:00
Techcable
85be8cc620 Improve BlockPosition inlining
Normally the JVM can inline virtual getters by having two sets of code, one is the 'optimized' code and the other is the 'deoptimized' code.
If a single type is used 99% of the time, then its worth it to inline, and to revert to 'deoptimized' the 1% of the time we encounter other types.
But if two types are encountered commonly, then the JVM can't inline them both, and the call overhead remains.

This scenario also occurs with BlockPos and MutableBlockPos.
The variables in BlockPos are final, so MutableBlockPos can't modify them.
MutableBlockPos fixes this by adding custom mutable variables, and overriding the getters to access them.

This approach with utility methods that operate on MutableBlockPos and BlockPos.
Specific examples are BlockPosition.up(), and World.isValidLocation().
It makes these simple methods much slower than they need to be.

This should result in an across the board speedup in anything that accesses blocks or does logic with positions.

This is based upon conclusions drawn from inspecting the assenmbly generated bythe JIT compiler on my microbenchmarks.
They had 'callq' (invoke) instead of 'mov' (get from memory) instructions.
2016-11-30 20:56:58 -06:00
BillyGalbreath
925d397466 PlayerLaunchProjectileEvent 2018-07-21 03:11:03 -05:00
BillyGalbreath
a949eef7aa PlayerElytraBoostEvent 2018-07-21 01:59:59 -05:00
BillyGalbreath
e054d501fb EnderDragon Events 2018-07-21 01:51:27 -05:00
Aikar
eb528f5f37 add more information to Entity.toString()
UUID, ticks lived, valid, dead
2018-07-19 01:13:28 -04:00
Aikar
3430a002d1 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:56:23 -04:00
BillyGalbreath
b7f23ee86d Add config to disable ender dragon legacy check 2018-06-22 10:38:31 -05:00
Aikar
dddd41ac34 Expand Explosions API
Add Entity as a Source capability, and add more API choices, and on Location.

Co-authored-by: Esoteric Enderman <90862990+EsotericEnderman@users.noreply.github.com>
Co-authored-by: Bjarne Koll <git@lynxplay.dev>
2018-06-20 23:17:24 -04:00
Brokkonaut
991875920d Add entity knockback events
- EntityKnockbackEvent
- EntityPushedByEntityAttackEvent
- EntityKnockbackByEntityEvent

Co-authored-by: aerulion <aerulion@gmail.com>
Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
2018-06-18 15:46:23 +02:00
Aikar
d68fcd321f 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:12:53 -04:00
Aikar
26ade76848 Improve EntityShootBowEvent
Adds missing call to Illagers and also adds Arrow ItemStack to skeletons

== AT ==
public net.minecraft.world.entity.projectile.AbstractArrow getPickupItem()Lnet.minecraft.world.item.ItemStack;
2013-06-15 19:51:17 -04:00
BillyGalbreath
2d9d74f9a9 Make shield blocking delay configurable 2018-06-16 01:18:16 -05:00
Aikar
4ec0188c4d Print Error details when failing to save player data 2018-06-15 20:37:03 -04:00
Aikar
d50334d6e8 Configurable 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:30:32 -04:00
Aikar
809fa1fbea Unset Ignited flag on cancel of Explosion Event
Otherwise the creeper infinite explodes
2018-06-10 01:18:49 -04:00
Shane Freeder
d6d2d75fe6 Add EntityTeleportEndGatewayEvent 2018-06-09 14:08:39 +02:00
Aikar
b64e7f96d3 WitchReadyPotionEvent 2018-06-05 22:47:26 -04:00
Aikar
a3b5f969ed WitchThrowPotionEvent
Fired when a witch throws a potion at a player
2018-05-16 20:44:58 -04:00
Aikar
72743537f4 WitchConsumePotionEvent
Fires when a witch consumes the potion in their hand
2018-05-16 20:35:16 -04:00
Aikar
40e2712d61 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:18:54 -04:00
0x22
952a6d631c Fix exploit that allowed colored signs to be created 2018-04-26 04:41:11 -04:00
Aikar
634b639098 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.
Adds an option to control the force mode of the particle.

This adds a new Builder API which is much friendlier to use.
2017-08-15 22:29:12 -04:00
Aikar
b4ece1619f 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.
2018-04-30 13:15:55 -04:00
Brokkonaut
5a528af05e Configurable sprint interruption on attack
If the sprint interruption is disabled players continue sprinting when they attack entities.
2018-04-14 20:20:46 +02:00
Minecrell
0511551203 Call PaperServerListPingEvent for legacy pings 2017-10-11 19:30:51 +02:00
Minecrell
361fc3ab43 Make 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
2017-10-11 18:22:50 +02:00
Aikar
d0d0b1a21e Player.setPlayerProfile API
This can be useful for changing name or skins after a player has logged in.

== AT ==
public-f net.minecraft.world.entity.player.Player gameProfile
2018-03-18 12:29:48 -04:00
Aikar
5fb78725e4 Add more fields to AsyncPreLoginEvent
Co-authored-by: Connor Linfoot <connorlinfoot@me.com>
Co-authored-by: MCMDEV <john-m.1@gmx.de>
2018-03-18 11:45:57 -04:00
Minecrell
ac0c06a72f Implement extended PaperServerListPingEvent 2017-10-11 15:56:26 +02:00
Aikar
a7bc7ca33a Disable Explicit Network Manager Flushing
This seems completely pointless, as packet dispatch uses .writeAndFlush.

Things seem to work fine without explicit 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.explicit-flush=true
2018-03-11 14:13:33 -04:00
MiniDigger | Martin
b9319698ce Toggleable player crits 2018-03-10 00:50:24 +01:00
Shane Freeder
794fc9799b Extend Player Interact cancellation
GUIs are opened on the client, meaning that the server cannot block them from opening,
However, it is possible to close these GUIs from the server.

Flower pots are also not updated on the client when interaction is cancelled, this patch
also resolves this.
2018-02-11 10:43:46 +00:00
BillyGalbreath
ec3ae43c82 Add PlayerAdvancementCriterionGrantEvent 2018-01-19 08:15:29 -06:00
Aikar
4f248b1b5b 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-02 00:31:26 -05:00
Aikar
cad0c129c8 PreCreatureSpawnEvent
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:01:31 -05:00
Aikar
f249b1f39a 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:02 -05:00
Aikar
533b86c3fc PlayerPickupExperienceEvent
Allows plugins to cancel a player picking up an experience orb
2017-12-19 22:02:53 -05:00
Jason Penilla
ed76af5637 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

Co-authored-by: Aikar <aikar@aikar.co>
2017-11-26 13:19:58 -05:00
Aikar
eb20b0b160 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

also Avoid NPE during CraftBlockEntityState load if could not get TE

If Tile Entity was null, correct Sign to return empty lines instead of null
2017-11-06 21:08:22 -05:00
Shane Freeder
1d1c5a4493 use CB BlockState implementations for captured blocks
When modifying the world, CB will store a copy of the affected
blocks in order to restore their state in the case that the event
is cancelled. This change only modifies the collection of blocks
in the world by normal means, e.g. not during tree population,
as the potentially marginal overheads would serve no advantage.

CB was using a CraftBlockState for all blocks, which causes issues
should any block that uses information beyond a data ID would suffer
from missing information, e.g. Skulls.

By using CBs CraftBlock#getState(), we will maintain a proper copy of
the blockstate that will be valid for restoration, as opposed to dropping
information on restoration when the event is cancelled.
2017-11-16 12:12:41 +00:00
mezz
f1fd83ac7a Fix MC-117075: Block entity unload lag spike 2017-08-09 17:51:22 -05:00
killme
3ce6b37e05 Prevent logins from being processed when the player has disconnected 2017-11-12 19:40:01 +01:00
pkt77
540274bcf2 Add PlayerArmorChangeEvent 2017-11-10 23:46:34 -05:00
Brokkonaut
e0661a5f13 Send attack SoundEffects only to players who can see the attacker 2017-10-31 03:26:18 +01:00
Shane Freeder
2c11c3e2bb revert serverside behavior of keepalives
This patch intends to bump up the time that a client has to reply to the
server back to 30 seconds as per pre 1.12.2, which allowed clients
more than enough time to reply potentially allowing them to be less
tempermental due to lag spikes on the network thread, e.g. that caused
by plugins that are interacting with netty.

We also 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-10-15 00:29:07 +01:00
Minecrell
8838089321 Expose client protocol version and virtual host 2017-10-10 18:45:20 +02:00
Shane Freeder
70e24c1b60 handle ServerboundKeepAlivePacket async
In 1.12.2, Mojang moved the processing of ServerboundKeepAlivePacket 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
off the main thread.

also adding some additional logging in order to help work out what is causing
random disconnections for clients.
2017-10-05 01:54:07 +01:00
Zach Brown
8c951e13df Add PlayerJumpEvent 2017-09-28 17:21:44 -04:00
Riley Park
ebbb3ee8b5 Allow specifying a custom "authentication servers down" kick message 2017-08-17 16:08:20 -07:00
BillyGalbreath
d00d3df166 Reset spawner timer when spawner event is cancelled 2017-07-31 01:45:19 -05:00
BillyGalbreath
08aaee1b77 Ocelot despawns should honor nametags and leash 2017-07-31 01:54:40 -05:00
Kyle Wood
0dcb203960 Fix this stupid bullshit
Disable the 15 second sleep when the server jar hasn't been rebuilt within a period of time.

modified in order to prevent merge conflicts when Spigot changes/disables the warning,
and to provide some level of hint without being disruptive.
2017-08-06 17:17:53 -05:00
Aikar
2f6c221649 ProfileWhitelistVerifyEvent 2017-07-03 18:11:10 -05:00
BillyGalbreath
760d9e300f Entity#fromMobSpawner() 2017-06-18 18:17:05 -05:00
Zach Brown
3edcdeaf22 Block player logins during server shutdown 2017-07-02 21:35:56 -05:00
Aikar
aab7ec1655 Shoulder Entities Release API 2017-06-17 15:18:30 -04:00
Sweepyoface
551d6ee71e Add UnknownCommandEvent
Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
2017-06-17 18:48:21 -04:00
Aikar
bb90110894 Basic PlayerProfile API
Establishes base extension of profile systems for future edits too

== AT ==
public org.bukkit.craftbukkit.profile.CraftProfileProperty
public org.bukkit.craftbukkit.profile.CraftPlayerTextures
public org.bukkit.craftbukkit.profile.CraftPlayerTextures copyFrom(Lorg/bukkit/profile/PlayerTextures;)V
public org.bukkit.craftbukkit.profile.CraftPlayerTextures rebuildPropertyIfDirty()V
public org.bukkit.craftbukkit.profile.CraftPlayerProfile toString(Lcom/mojang/authlib/properties/PropertyMap;)Ljava/lang/String;
public org.bukkit.craftbukkit.profile.CraftPlayerProfile getProperty(Ljava/lang/String;)Lcom/mojang/authlib/properties/Property;
public org.bukkit.craftbukkit.profile.CraftPlayerProfile setProperty(Ljava/lang/String;Lcom/mojang/authlib/properties/Property;)V
2018-01-15 22:11:48 -05:00
Spottedleaf
40654111d1 Do not submit profile lookups to worldgen threads
They block. On network I/O.

If enough tasks are submitted the server will eventually stall
out due to a sync load, as the worldgen threads will be
stalling on profile lookups.
2021-08-08 16:26:46 -07:00
BillyGalbreath
8eb7ab6946 PlayerAttemptPickupItemEvent 2017-06-11 16:30:30 -05:00
BillyGalbreath
eb52c5e2f2 PlayerPickupItemEvent#setFlyAtPlayer 2017-05-07 06:26:09 -05:00
BillyGalbreath
b41abcdb68 Item#canEntityPickup 2017-05-05 03:57:17 -05:00
Shane Freeder
918da37691 provide a configurable option to disable creeper lingering effect spawns 2017-06-11 21:01:18 +01:00
Zach Brown
49fbdd7336 Add option to make parrots stay on shoulders despite movement
Makes parrots not fall off whenever the player changes height, or touches water, or gets hit by a passing leaf.
Instead, switches the behavior so that players have to sneak to make the birds leave.

I suspect Mojang may switch to this behavior before full release.

To be converted into a Paper-API event at some point in the future?

== AT ==
public net.minecraft.world.entity.player.Player removeEntitiesOnShoulder()V
2017-05-16 21:29:08 -05:00
Zach Brown
2f74bdb56b Properly handle async calls to restart the server
The watchdog thread calls the server restart function asynchronously. Prior to
this change, it attempted to do several non-safe operations from the watchdog
thread, rather than the main. Specifically, because of a separate upstream change,
it causes player entities to be ticked asynchronously, among other things.

This is dangerous.

This patch moves the old handling into a synchronous variant, for calls from the
restart command, and adds separate handling for async calls, such as those from
the watchdog thread.

When calling from the watchdog thread, we cannot assume the main thread is in a
tickable state; it may be completely deadlocked. In order to handle this, we mark
the server as stopping, in order to account for situations where the server should
complete a tick reasonbly soon, i.e. 99% of cases.

Should the server not enter a state where it is stopping within 10 seconds, We
will assume that the server has in fact deadlocked and will proceed to force
kill the server.

This modification does not force restart the server should we actually enter a
deadlocked state where the server is stopping, whereas this will in most cases
exit within a reasonable amount of time, to put a fixed limit on a process that
will have plugins and worlds saving to the disk has a high potential to result
in corruption/dataloss.
2017-05-12 23:34:11 -05:00
Aikar
d2f4d82ce2 Cap Entity Collisions
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:07:56 -05:00
Aikar
110bcadcdf 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:31:46 -05:00
Aikar
aa6fe30766 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:41:58 -05:00
Aikar
4ca188a20e 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:24:46 -05:00
Aikar
2aa9d5bf18 PlayerTeleportEndGatewayEvent
Allows you to access the Gateway being used in a teleport event
Fix the offset used for player teleportation
2016-12-31 21:44:50 -05:00
Aikar
746f540e81 Firework API's
== AT ==
public net.minecraft.world.entity.projectile.FireworkRocketEntity attachedToEntity
2016-12-28 07:18:33 +01:00
Alfie Cleveland
26ff64cadc Properly fix item duplication bug
Credit to prplz for figuring out the real issue
2016-12-27 01:57:57 +00:00
Riley Park
e27e53d201 Add API methods to control if armor stands can move 2016-12-21 11:47:25 -06:00
Aikar
c28a11a1d8 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:26:27 -05:00
Aikar
63de7b1ff6 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:15:11 -05:00
Aikar
ddd1807ad5 Optimize Level.hasChunkAt(BlockPosition)Z
Reduce method invocations for World.isLoaded(BlockPosition)Z
2016-12-02 00:11:43 -05:00
Aikar
1f63668ee9 Prevent Pathfinding out of World Border
This prevents Entities from trying to run outside of the World Border

TODO: This doesn't prevent the pathfinder from using blocks outside the world border as nodes. We can fix this
by adding code to all overrides in:
    NodeEvaluator:
    public abstract BlockPathTypes getBlockPathType(BlockGetter world, int x, int y, int z);

to return BLOCKED if it is outside the world border.
2016-12-19 23:07:42 -05:00
AlphaBlend
087a701e69 Add source to PlayerExpChangeEvent 2016-09-08 08:48:33 -07:00
Alfie Cleveland
3e9512a6fc Cache user authenticator threads 2016-11-25 13:22:40 +00:00
Zach Brown
b1018e6808 Filter bad block entity nbt data from falling blocks 2016-11-12 23:25:22 -06:00
AlphaBlend
472983f423 Add EntityZapEvent 2016-10-16 23:19:30 -07:00
Riley Park
8141041554 Configurable flying kick messages 2016-09-20 00:58:01 +00:00
Zach Brown
72bc20c589 Configurable packet in spam threshold 2016-09-11 14:30:57 -05:00
Alfie Cleveland
c7287dd5ee Optimise BlockState's hashCode/equals
These are singleton "single instance" objects. We can rely on
object identity checks safely.

Use a simpler optimized hashcode
2016-08-19 01:52:56 +01:00
Gabriele C
f7ae11f984 Add setting for proxy online mode status
TODO: Add isProxyOnlineMode check to Metrics
2016-08-05 01:03:08 +02:00
Zach Brown
a55727ff06 Don't lookup game profiles that have no UUID and no name 2016-07-16 19:11:17 -05:00
Aikar
d072c2d5fb Avoid blocking on Network Manager creation
Per Paper issue 294
2016-05-16 23:19:16 -04:00
Jake Potrebic
08698c4642 Fix global sound handling
* Only send global sounds to same world if limiting radius
* respect global sound events gamerule

Co-authored-by: Evan McCarthy <evanmccarthy@outlook.com>
Co-authored-by: lexikiq <noellekiq@gmail.com>
Co-authored-by: Aikar <aikar@aikar.co>
2016-05-31 22:53:50 -04:00
Martin Panzer
ef21fd4166 Faster redstone torch rapid clock removal
Only resize the the redstone torch list once, since resizing arrays / lists is costly
2016-05-23 12:12:37 +02:00
Zach Brown
bdd96190e0 Optional TNT doesn't move in water 2016-05-22 20:20:55 -05:00
Aikar
cda878cf64 Async GameProfileCache saving 2016-05-16 20:47:41 -04:00
Aikar
07c767b6f4 LootTable API and replenishable lootables
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"

== AT ==
public org.bukkit.craftbukkit.block.CraftBlockEntityState getTileEntity()Lnet/minecraft/world/level/block/entity/BlockEntity;
public org.bukkit.craftbukkit.block.CraftLootable setLootTable(Lorg/bukkit/loot/LootTable;J)V
public org.bukkit.craftbukkit.entity.CraftMinecartContainer setLootTable(Lorg/bukkit/loot/LootTable;J)V
2016-05-01 21:19:14 -04:00
Aikar
b8d05bbc27 Don't save empty scoreboard teams to scoreboard.dat 2016-05-07 23:33:08 -04:00
Aikar
6d39090450 remove null possibility for getServer singleton
to stop IDE complaining about potential NPE
2016-04-28 00:57:27 -04:00
Riley Park
217a52eaa8 Add ability to configure frosted_ice properties 2016-04-21 23:51:55 -07:00
Zach Brown
3532e55dab EntityRegainHealthEvent isFastRegen API
Don't even get me started
2016-04-22 01:43:11 -05:00
Aikar
b414f3d993 Configurable RCON IP address
For servers with multiple IP's, ability to bind to a specific interface.

== AT ==
public net.minecraft.server.dedicated.Settings getStringRaw(Ljava/lang/String;)Ljava/lang/String;
2016-04-16 00:39:33 -04:00
Riley Park
d743b03fb6 Add handshake event to allow plugins to handle client handshaking logic themselves 2016-04-13 20:21:38 -07:00
Aikar
a99426b5fe Configurable Player Collision 2016-04-13 02:10:49 -04:00
Aikar
1056951a73 Optimize DataBits
Remove Debug checks as these are super hot and causing noticeable hits

Before: http://i.imgur.com/nQsMzAE.png
After: http://i.imgur.com/nJ46crB.png

Optimize redundant converting of static fields into an unsigned long each call by precomputing it in ctor
2016-04-05 21:38:58 -04:00
Aikar
55db966770 Fix Cancelling BlockPlaceEvent triggering physics 2016-04-03 17:48:50 -04:00
Aikar
eb76e508f5 Configurable random tick rates for blocks
A general purpose patch that includes config options for the tick rate
of a variety of blocks that are random ticked.

Co-authored-by: MrPowerGamerBR <git@mrpowergamerbr.com>
2016-04-03 16:28:17 -04:00
Jedediah Smith
e2263633d4 Add PlayerUseUnknownEntityEvent
Adds the PlayerUseUnknownEntityEvent to be used by plugins dealing with
virtual entities/entities that are not actually known to the server.

Co-authored-by: Nassim Jahnke <nassim@njahnke.dev>
2016-04-02 05:09:16 -04:00
Aikar
f9ef3612f7 Do not load chunks for Pathfinding 2016-03-31 19:17:58 -04:00
Antony Riley
db2502d732 Sanitise RegionFileCache and make configurable
RegionFileCache prior to this patch would close every single open region
file upon reaching a size of 256.
This patch modifies that behaviour so it closes the the least recently
used RegionFile.
The implementation uses a LinkedHashMap as an LRU cache (modified from HashMap).
The maximum size of the RegionFileCache is also made configurable.
2016-03-29 08:22:55 +03:00
Aikar
c801c5439d EntityPathfindEvent
Fires when an Entity decides to start moving to a location.
2016-03-28 21:22:26 -04:00
Aikar
e2accd8d62 Configurable Chunk Inhabited Time
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 chose a fixed value.

This allows to fine-tune vanilla gameplay.
2016-03-28 20:46:14 -04:00
Aikar
93bbce1c69 Entity AddTo/RemoveFrom World Events 2016-03-28 20:32:58 -04:00
Aikar
63fa3068c6 Only process BlockPhysicsEvent if a plugin has a listener
Saves on some object allocation and processing when no plugin listens to this
2016-03-28 19:55:45 -04:00
Zach Brown
b2671f4dd1 Configurable spawn chances for skeleton horses 2016-03-22 12:04:28 -05:00
Aikar
d989bc5d17 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 00:33:47 -04:00
Aikar
becb30e9e6 handle NaN health/absorb values and repair bad data 2015-09-27 01:18:02 -04:00
Jedediah Smith
54fe0287a2 Custom replacement for eaten items 2015-06-21 15:07:20 -04:00
Aikar
f54f356a35 Add World Util Methods
Methods that can be used for other patches to help improve logic.
2016-03-18 20:16:03 -04:00
Aikar
686b77345f 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:12:22 -04:00
Aikar
20b9d3de7b 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.
2015-05-28 23:00:19 -04:00
Jedediah Smith
f55b057ffb Complete resource pack API 2015-04-04 23:17:52 -04:00
Aikar
5764c71185 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:25:45 -05:00
Joseph Hirschfeld
68979dd492 Add exception reporting event 2016-03-03 03:15:41 -06:00
Joseph Hirschfeld
1f86344458 Add configurable portal search radius 2016-03-03 02:46:17 -06:00
vemacs
886d8e6ac3 All chunks are slime spawn chunks toggle 2016-03-03 01:19:22 -06:00
Aikar
bcc07d07b6 Improve Player chat API handling
Properly split up the chat and command handling to reflect the server now
having separate packets for both, and the client always using the correct packet. Text
from a chat packet should never be parsed into a command, even if it starts with the `/`
character.

Add a missing async catcher and improve Spigot's async catcher error message.

== AT ==
public net.minecraft.server.network.ServerGamePacketListenerImpl isChatMessageIllegal(Ljava/lang/String;)Z

Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
Co-authored-by: SoSeDiK <mrsosedik@gmail.com>
2016-03-03 01:17:12 -06:00
Aikar
b380d6445b Configurable Disabling Cat Chest Detection
Offers a gameplay feature to stop cats from blocking chests
2016-03-03 01:13:45 -06:00
Steve Anton
dd1cfc07db Fix spawn location event changing location
== AT ==
public net.minecraft.world.entity.Entity setRot(FF)V
2016-03-03 00:09:38 -06:00
Zach Brown
c8c53412a4 Disable spigot tick limiters 2016-03-02 23:45:17 -06:00
Sudzzy
5b0e06e8e8 Configurable container update tick rate 2016-03-02 23:34:44 -06:00
Byteflux
adb6c35b17 Add BeaconEffectEvent 2016-03-02 23:30:53 -06:00
Isaac Moore
c9cf82340d Use null Locale by default 2016-04-19 14:09:31 -05:00
Sudzzy
1ac857b531 Configurable mob spawner tick rate 2016-03-02 15:03:53 -06:00
Sudzzy
3816346f1c Disable ice and snow 2016-03-02 14:57:24 -06:00
Sudzzy
d75a64eff3 Disable thunder 2016-03-02 14:52:43 -06:00
Sudzzy
fb3f2c1b8e Disable explosion knockback 2016-03-02 14:48:03 -06:00
Byteflux
68603a72c5 Optimize explosions
The process of determining an entity's exposure from explosions can be
expensive when there are hundreds or more entities in range.

This patch adds a per-tick cache that is used for storing and retrieving
an entity's exposure during an explosion.
2016-03-02 11:59:48 -06:00
Iceee
e2ead8262e Fix lag from explosions processing dead entities 2016-03-02 01:39:52 -06:00
DoctorDark
b083157a8c Configurable end credits 2016-03-16 02:21:39 -05:00
Zach Brown
188e3332d6 Check online mode before converting and renaming player data 2016-03-02 00:03:55 -06:00
Zach Brown
b8b1eef98c Configurable top of nether void damage
Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
2016-03-01 23:58:50 -06:00
Aikar
0255317409 Prevent block entity and entity crashes 2016-03-01 23:52:34 -06:00
Byteflux
6212f523fa Entity Origin API 2016-03-01 23:45:08 -06:00
Jedediah Smith
840b8a7bfa Player affects spawning API 2016-03-01 14:47:52 -06:00
Zach Brown
f41436f787 Expose server build information
Co-authored-by: Zach Brown <1254957+zachbr@users.noreply.github.com>
Co-authored-by: Kyle Wood <kyle@denwav.dev>
Co-authored-by: Mark Vainomaa <mikroskeem@mikroskeem.eu>
Co-authored-by: Riley Park <rileysebastianpark@gmail.com>
Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
Co-authored-by: masmc05 <masmc05@gmail.com>
2016-03-01 14:32:43 -06:00
Byteflux
560b13ca08 Drop falling block and tnt entities at the specified height
Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
2016-03-01 14:14:15 -06:00
Suddenly
a24a98199a Add configurable entity despawn distances 2016-03-01 13:51:54 -06:00
Zach Brown
92ffacc419 Allow nerfed mobs to jump 2016-03-01 13:24:16 -06:00
Zach Brown
c7125aaa48 Configurable fishing time ranges 2016-03-01 13:14:11 -06:00
Zach Brown
92ebed543f Configurable baby zombie movement speed 2016-03-01 13:09:16 -06:00
Zach Brown
097b7fd752 Configurable cactus bamboo and reed growth height
Bamboo - Both the minimum fully-grown height and the maximum are configurable
- Machine_Maker
2016-03-01 13:02:51 -06:00
Aikar
770ee3eebd Remove Spigot timings 2016-03-03 04:00:11 -06:00
Aikar
a371d5fefe Further improve server tick loop
Improves how the catchup buffer is handled, allowing it to roll both ways
increasing the effeciency of the thread sleep so it only will sleep once.

Also increases the buffer of the catchup to ensure server stays at 20 TPS unless extreme conditions

Previous implementation did not calculate TPS correctly.
Switch to a realistic rolling average and factor in std deviation as an extra reporting variable
2016-03-01 23:09:29 -06:00
Jason Penilla
13e0a1a71e Plugin remapping
Co-authored-by: Nassim Jahnke <nassim@njahnke.dev>
2022-10-29 15:22:32 -07:00
Owen1212055
216388dfdf Paper Plugins
Co-authored-by: Micah Rao <micah.s.rao@gmail.com>
2022-07-06 23:00:31 -04:00
Zach Brown
329dfdabdc Paper Metrics
Removes Spigot's mcstats metrics in favor of a system using bStats

To disable for privacy or other reasons go to the bStats folder in your plugins folder
and edit the config.yml file present there.

Please keep in mind the data collected is anonymous and collection should have no
tangible effect on server performance. The data is used to allow the authors of
PaperMC to track version and platform usage so that we can make better management
decisions on behalf of the project.
2017-03-24 23:56:01 -05:00
Jason Penilla
bd7282c66d Paper command
Co-authored-by: Zach Brown <1254957+zachbr@users.noreply.github.com>
2016-02-29 21:02:09 -06:00
Jason Penilla
34407fe880 Deobfuscate stacktraces in log messages, crash reports, and etc. 2021-06-20 18:19:09 -07:00
Minecrell
36723cdd60 Use TerminalConsoleAppender for console improvements
Rewrite console improvements (console colors, tab completion,
persistent input line, ...) using JLine 3.x and TerminalConsoleAppender.

Also uses the new ANSIComponentSerializer to serialize components when
logging them via the ComponentLogger, or when sending messages to the
console, for hex color support.

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:
  - Server starts 1-2 seconds faster thanks to optimizations in Log4j
    configuration

Co-Authored-By: Emilia Kond <emilia@rymiel.space>
2017-06-09 19:03:43 +02:00
Riley Park
66779f5c86 Adventure
== AT ==
public net.minecraft.network.chat.HoverEvent$ItemStackInfo item
public net.minecraft.network.chat.HoverEvent$ItemStackInfo count
public net.minecraft.network.chat.HoverEvent$ItemStackInfo components
public net.minecraft.network.chat.contents.TranslatableContents filterAllowedArguments(Ljava/lang/Object;)Lcom/mojang/serialization/DataResult;

Co-authored-by: zml <zml@stellardrift.ca>
Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
2021-01-29 17:54:03 +01:00
Aikar
b01c811c2f MC Utils
== AT ==
public net.minecraft.server.level.ServerChunkCache mainThread
public net.minecraft.server.level.ServerLevel chunkSource
public org.bukkit.craftbukkit.inventory.CraftItemStack handle
public net.minecraft.server.level.ChunkMap getVisibleChunkIfPresent(J)Lnet/minecraft/server/level/ChunkHolder;
public net.minecraft.server.level.ServerChunkCache mainThreadProcessor
public net.minecraft.server.level.ServerChunkCache$MainThreadExecutor
public net.minecraft.world.level.chunk.LevelChunkSection states
2016-03-28 20:55:47 -04:00
Jake Potrebic
a82a09d198 CB fixes
* Missing Level -> LevelStem generic in StructureCheck
  Need to use the right for injectDatafixingContext (Spottedleaf)

* Fix summon_entity effect attempting to add incorrect entity (granny)

* Removed incorrect parent perm for `minecraft.debugstick.always` (Machine_Maker)

* Fixed method signature of Marker#addPassenger (Machine_Maker)

* Removed unneeded UOE in CustomWorldChunkManager (extends BiomeSource) (Machine_Maker)

* Honor Server#getLootTable method contract (Machine_Maker)

Co-authored-by: Spottedleaf <Spottedleaf@users.noreply.github.com>
2022-02-25 07:14:48 -08:00
Aikar
f829dcd46a MC Dev fixes 2016-03-30 19:36:20 -04:00
Jake Potrebic
769119f918 Paper config files
== AT ==
public org.spigotmc.SpigotWorldConfig getBoolean(Ljava/lang/String;Z)Z
public org.spigotmc.SpigotWorldConfig getDouble(Ljava/lang/String;)D
public org.spigotmc.SpigotWorldConfig getDouble(Ljava/lang/String;D)D
public org.spigotmc.SpigotWorldConfig getInt(Ljava/lang/String;)I
public org.spigotmc.SpigotWorldConfig getInt(Ljava/lang/String;I)I
public org.spigotmc.SpigotWorldConfig getList(Ljava/lang/String;Ljava/lang/Object;)Ljava/util/List;
public org.spigotmc.SpigotWorldConfig getString(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
public net.minecraft.server.dedicated.DedicatedServerProperties reload(Lnet/minecraft/core/RegistryAccess;Ljava/util/Properties;Ljoptsimple/OptionSet;)Lnet/minecraft/server/dedicated/DedicatedServerProperties;
public net.minecraft.world.level.NaturalSpawner SPAWNING_CATEGORIES
2022-06-08 22:20:16 -07:00
Zach Brown
bc10922ef3 Build system changes
== AT ==
public net.minecraft.server.packs.VanillaPackResourcesBuilder safeGetPath(Ljava/net/URI;)Ljava/nio/file/Path;

Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
2016-02-29 20:40:33 -06:00
Kyle Wood
f161aac557 Remap fixes 2021-06-11 05:25:03 -05:00
CraftBukkit/Spigot
9940174241 Add unload-frozen-chunks option
By: md_5 <git@md-5.net>
2024-05-18 11:39:58 +10:00
CraftBukkit/Spigot
479ce445d6 Configurable Below Zero Generation
By: DerFrZocker <derrieple@gmail.com>
2021-11-28 12:09:29 +11:00
CraftBukkit/Spigot
7cfc37b17d Configurable Thunder Chance
By: md_5 <git@md-5.net>
2021-10-24 20:29:25 +11:00
CraftBukkit/Spigot
e81bcdf643 Allow Disabling Player Data Saving
By: Sander Knauff <sanderknauff@hotmail.com>
2020-11-07 18:23:42 +11:00
CraftBukkit/Spigot
76c24a1454 Add log-villager-deaths option
By: md_5 <git@md-5.net>
2019-12-14 10:26:52 +11:00
CraftBukkit/Spigot
9ef9823b3b Allow Reading Old Large Chunks
The size of chunks in the region format is overdetermined. In particular their size on disk is indicated by both a sector count in the header, and actual size in the body.
If their size would overflow the header field (>= 255 sectors), it can just be read directly from the body instead.

This code/concept was adapted from MinecraftForge.

By: md_5 <git@md-5.net>
2019-02-19 22:30:00 +11:00
CraftBukkit/Spigot
6fcc9cce6d Add creative mode NBT permissions
By: md_5 <git@md-5.net>
2019-02-25 19:26:56 +11:00
CraftBukkit/Spigot
d16d3c3548 Configurable Advancement Disabling
Allow disabling any (or all) inbuilt advancements with a configuration option.

By: md_5 <git@md-5.net>
2017-06-09 16:29:31 +10:00
CraftBukkit/Spigot
93fea68749 Clear Packet Queue on Disconnect
By: md_5 <git@md-5.net>
2015-07-22 19:04:37 +10:00
CraftBukkit/Spigot
c4f3fcfce9 Use Map for getPlayer(String) lookup.
By: md_5 <git@md-5.net>
2015-07-13 19:05:15 +10:00
CraftBukkit/Spigot
d0a65bc995 Allow Capping (Tile)Entity Tick Time.
This patch adds world configuration options for max-tick-time.entity / max-tick-time.tile which allows setting a hard cap on the amount of time (in milliseconds) that a tick can consume. The default values of 50ms each are very conservative and mean this feature will not activate until the server is well below 15tps (minimum). Values of 20ms each have been reported to provide a good performance increase, however I personally think 25ms for entities and 10-15ms for tiles would give even more significant gains, assuming that these things are not a large priority on your server.

For tiles there is very little tradeoff for this option, as tile ticks are based on wall time for most things, however for entities setting this option too low could lead to jerkiness / lag. The gain however is a faster and more responsive server to other actions such as blocks, chat, combat etc.

This feature was commisioned by Chunkr.

By: md_5 <git@md-5.net>
2015-02-20 21:39:31 +11:00
CraftBukkit/Spigot
49288f7f95 BungeeCord Chat API
By: md_5 <git@md-5.net>
2014-12-13 03:06:05 +01:00
CraftBukkit/Spigot
5ec1e1bc24 Configurable Hanging Tick
By: drXor <mcyoung@mit.edu>
2014-08-09 13:56:51 -04:00
CraftBukkit/Spigot
d7f3ba3df3 Limit TNT Detonations per tick
This gives a per-world control on how much TNT will be processed per-tick,
preventing a massive TNT detonation from lagging out the server.

By: Aikar <aikar@aikar.co>
2014-08-20 18:12:32 -04:00
CraftBukkit/Spigot
f026f7905e Add Hunger Config Values
By: lazertester <austin.techhead@gmail.com>
2014-08-17 19:56:17 +10:00
CraftBukkit/Spigot
83699d54bf Plug WorldMap Memory Leak
By: md_5 <git@md-5.net>
2014-08-08 19:57:03 +10:00
CraftBukkit/Spigot
0098808c9e Allow Attribute Capping.
Apply some sensible defaults and allow server owners to customize the maximum values of selected common attributes.

By: md_5 <git@md-5.net>
2014-07-28 16:55:51 +10:00
CraftBukkit/Spigot
5b20d95920 Apply NBTReadLimiter to more things.
By: md_5 <git@md-5.net>
2014-07-27 20:46:04 +10:00
CraftBukkit/Spigot
f972379105 Make "moved too quickly" limit configurable
By: Jonas Konrad <me@yawk.at>
2014-07-22 15:59:01 +02:00
CraftBukkit/Spigot
7b951a7ec6 Make "moved wrongly" limit configurable
By: Jonas Konrad <me@yawk.at>
2014-07-04 23:03:13 +02:00
CraftBukkit/Spigot
6578ff97bb Add CommandLine EULA Flag
This flag contains the same message as eula.txt (albeit with proper grammar for 3rd person plural). By setting this flag you are agreeing to the terms listed in the message printed upon setting this flag, which are no different from those agreed to by any other method.

This feature only exists for hosting companies and people who manage servers in bulk who wish to agree to the terms by setting a flag in a script.

By: md_5 <git@md-5.net>
2014-07-09 10:35:44 +10:00
CraftBukkit/Spigot
0076297721 Safer JSON Loading
By: Suddenly <suddenly@suddenly.coffee>
2014-07-08 09:44:18 +10:00
CraftBukkit/Spigot
c4d2bdfd85 Further Seed Customisation
Allow server admins that really want to to customise the seeds used in world generation even further.

By: md_5 <git@md-5.net>
2014-07-04 13:28:45 +10:00
CraftBukkit/Spigot
4a1b3a723a Better item validation
By: Thinkofdeath <thinkofdeath@spigotmc.org>
2014-07-02 23:35:51 +01:00
CraftBukkit/Spigot
804b118219 Limit block placement/interaction packets
By: Thinkofdeath <thinkofdeath@spigotmc.org>
2014-06-29 21:10:34 +01:00
CraftBukkit/Spigot
7bee9a20b3 Configurable save-on-stop-only for UserCache
By: drXor <mcyoungsota@gmail.com>
2014-05-23 18:05:10 -04:00
CraftBukkit/Spigot
7e097e5d53 Implement PlayerSpawnLocationEvent.
By: ninja <xninja@openmailbox.org>
2014-04-08 14:05:19 +02:00
CraftBukkit/Spigot
542b7a7eb1 Configurable UserCache cap
By: drXor <mcyoungsota@gmail.com>
2014-04-25 18:17:30 -04:00
CraftBukkit/Spigot
05f3042755 Fix race condition that could kill connections before they were initiated
Because NetworkManagers are registered before they get their channel in
channelActive, the ServerConnection would remove them sometimes because
it thought they were disconnected. This commit fixes this by introducing
a 'preparing' variable that is true while the NetworkManager is not
initialized. The ServerConnection does not remove NetworkManagers with
this flag.

By: Jonas Konrad <me@yawk.at>
2014-04-25 23:46:46 +02:00
CraftBukkit/Spigot
8b9d2faa11 Prevent NoClassDefError crash and notify on crash
By: David <dmck2b@gmail.com>
2014-04-21 12:43:08 +01:00
CraftBukkit/Spigot
f1087e18c1 Fix Player Banning
This issue stems from the fact that Bukkit's API only allows a UUID to be banned, but Minecraft requires both a UUID and name. To fix this we modify the code to require a UUID or a name, or both. The correct fix would be expanding the API to be able to provide a name, however this would require plugin changes.

By: md_5 <git@md-5.net>
2014-04-15 10:32:48 +10:00
CraftBukkit/Spigot
b7597142d3 Use Offline Player Data Once if Required.
If we are online mode and the only copy of player data we can find is the player's offline mode data, we will attempt a once off conversion by reading this data and then renaming the file so it won't be used again.

By: md_5 <git@md-5.net>
2014-04-13 14:41:23 +10:00
CraftBukkit/Spigot
c3318769cd Print Stack on InternalException
By: md_5 <git@md-5.net>
2014-04-13 09:00:59 +10:00
CraftBukkit/Spigot
88fc243cd1 Display 'Spigot' in client crashes, server lists and Mojang stats
By: Thinkofdeath <thethinkofdeath@gmail.com>
2014-04-11 11:16:34 +01:00
CraftBukkit/Spigot
1cb6ba6942 Configurable dragon death and wither spawn sounds
By: drXor <mcyoungsota@gmail.com>
2014-03-29 13:44:25 -04:00
CraftBukkit/Spigot
c3ce457c08 Add Option to Silence CommandBlock Console
By: md_5 <git@md-5.net>
2014-02-09 14:39:01 +11:00
CraftBukkit/Spigot
ff6d4b2d90 Spam Filter Exclusions
By: md_5 <git@md-5.net>
2014-02-08 08:13:40 +00:00
CraftBukkit/Spigot
b26b6dadb0 Add Optional Tick Shuffling
This prevents players from 'gaming' the server, and strategically relogging to increase their position in the tick order.

By: md_5 <git@md-5.net>
2014-01-27 08:39:26 +11:00
CraftBukkit/Spigot
23c02d0942 Configurable Ping Sample Size
By: md_5 <git@md-5.net>
2014-01-26 21:48:34 +11:00
CraftBukkit/Spigot
cd82f21617 Highly Optimized Tick Loop
By: md_5 <git@md-5.net>
2017-01-26 21:50:51 +00:00
CraftBukkit/Spigot
68214fb1a0 Allow toggling of ZombiePigmen spawning in portal blocks
By: Dmck2b <dmck2b+github@gmail.com>
2014-01-20 20:18:23 +00:00
CraftBukkit/Spigot
bfc73d87f0 Catch stalling on corrupted map data / NBT arrays.
By: md_5 <git@md-5.net>
2014-01-20 13:44:07 +11:00
CraftBukkit/Spigot
1f67404bb9 Allow statistics to be disabled/forced
By: Thinkofdeath <thethinkofdeath@gmail.com>
2014-01-07 15:56:26 +00:00
CraftBukkit/Spigot
fc81df77cf Add Option to Nerf Mobs from Spawners
By: md_5 <git@md-5.net>
2014-02-02 16:55:46 +00:00
CraftBukkit/Spigot
efce291f2e Save ticks lived to nbttag
By: DerFlash <bte@freenet.de>
2013-07-09 00:11:12 +02:00
CraftBukkit/Spigot
cbf16b353d Configurable Amount of Netty Threads
This brings back the option that the Spigot version of netty saw. By default Netty will try and use cores*2 threads, however if running multiple servers on the same machine, this can be too many threads. Additionally some people have 16 core servers. If 32 Netty threads are allowed in this setup, then the lock contention, and thus blocking between threads becomes much greater, leading to decreased performance.

By: md_5 <git@md-5.net>
2013-12-13 11:58:58 +11:00
CraftBukkit/Spigot
0abc9c4cd1 Allow Disabling Zombie Villager Aggression
Ability to configure if Zombies will be aggressive towards Villagers.

By: Dylan Xaldin <Puremin0rez515@gmail.com>
2013-12-12 18:05:03 -06:00
CraftBukkit/Spigot
3d4c222263 BungeeCord Support
* Provides support for IP forwarding via BungeeCord.
* Treats Bungee as Online Mode.

By: md_5 <git@md-5.net>
2014-04-12 21:23:58 +10:00
CraftBukkit/Spigot
496995ccaa Watchdog Thread.
By: md_5 <git@md-5.net>
2014-08-05 17:20:19 +01:00
CraftBukkit/Spigot
29a8c7f4b3 Arrow Despawn Rate
By: md_5 <git@md-5.net>
2013-10-14 19:20:10 +11:00
CraftBukkit/Spigot
a702945c70 Prevent Ghost Players Caused by Plugins
Check if the player is still connected after firing event. Fixes BUKKIT-4327

By: Alex Ciuba <alexciuba@gmail.com>
2013-06-11 15:23:03 -04:00
CraftBukkit/Spigot
b934e29ae6 Disallow Interaction With Self
By: md_5 <git@md-5.net>
2013-06-28 19:52:54 +10:00
CraftBukkit/Spigot
1904e973f2 Properly Close Inventories
Properly close inventories when unloading and switching worlds.

By: md_5 <git@md-5.net>
2013-06-27 17:26:09 +10:00
CraftBukkit/Spigot
55148a3f2c Configurable Messages
By: md_5 <git@md-5.net>
2013-06-21 19:21:58 +10:00
CraftBukkit/Spigot
cabf908e4c Allow Disabling of Command TabComplete
By: md_5 <git@md-5.net>
2013-06-21 18:05:54 +10:00
CraftBukkit/Spigot
0eed728812 Allow Disabling of Command Logging
By: md_5 <git@md-5.net>
2013-06-21 18:01:29 +10:00
CraftBukkit/Spigot
135df938cc Hopper Customisations
Allows editing hopper cooldowns and amount transferred per tick.

By: erocs <github@erocs.org>
2013-09-08 12:06:15 -07:00
CraftBukkit/Spigot
831bf8fb7e Entity Tracking Ranges
This will let you configure how far to track entities in range from players, so that the entity does not render on the client if out of this range.
This has multiple benefits:

1) Less bandwidth. Not sending update packets for entities that are not even close to a player, or even close enough to clearly see.
2) Less lag by maps in item frames - Default range is 160 blocks... Many players can track that item frame and cause lag and not even see it.
3) Less lag in general - Less work for the server to do
4) Less client lag - Not trying to render distant item frames and paintings and entities will reduce entity count on the client, which is major for shop/town worlds which may use tons of item frames.

By: Aikar <aikar@aikar.co>
2013-02-20 11:58:47 -05:00
CraftBukkit/Spigot
28c8009a16 Entity Activation Range
This feature gives 3 new configurable ranges that if an entity of the matching type is outside of this radius of any player, will tick at 5% of its normal rate.

This will drastically cut down on tick timings for entities that are not in range of a user to actually be "used".
This change can have dramatic impact on gameplay if configured too low. Balance according to your servers desired gameplay.

By: Aikar <aikar@aikar.co>
2024-11-02 18:16:11 +11:00
CraftBukkit/Spigot
54a84c6c79 Item Despawn Rate
By: md_5 <git@md-5.net>
2013-09-22 19:10:53 +10:00
CraftBukkit/Spigot
19bfb10583 Fix Mob Spawning Relative to View Distance
Changes the mob spawning algorithm to properly account for view distance and the range around players.

Needs better documentation.

By: md_5 <git@md-5.net>
2013-06-21 17:29:54 +10:00
CraftBukkit/Spigot
78524cb95e Spigot Timings
Overhauls the Timings System adding performance tracking all around the Minecraft Server

By: Aikar <aikar@aikar.co>
2013-01-10 00:18:11 -05:00
CraftBukkit/Spigot
127d8c1595 View Distance
This commit allows the user to select per world view distances.

By: md_5 <git@md-5.net>
2013-03-23 09:52:41 +11:00
CraftBukkit/Spigot
5240271410 Async Operation Catching
Catch and throw an exception when a potentially unsafe operation occurs on a thread other than the main server thread.

By: md_5 <git@md-5.net>
2014-03-25 16:10:01 +11:00
CraftBukkit/Spigot
973f52a650 Merge tweaks and configuration
This allows the merging of Experience orbs, as well as the configuration of the merge radius of items. Additionally it refactors the merge algorithm to be a better experience for players.

By: md_5 <git@md-5.net>
2013-03-23 09:46:33 +11:00
CraftBukkit/Spigot
df403168ff Crop Growth Rates
Allows configuring the growth rates of crops as a percentage of their normal growth rate.

By: md_5 <git@md-5.net>
2016-03-07 22:14:13 +11:00
CraftBukkit/Spigot
cba0d1f1ec Spigot Configuration
Provides the basic infrastructure to load and save the Spigot configuration file, spigot.yml

By: md_5 <git@md-5.net>
2013-07-07 09:32:53 +10:00
CraftBukkit/Spigot
30e4583dbe Remap CraftBukkit to Mojang+Yarn Mappings
By: Initial Source <noreply+automated@papermc.io>
2024-12-11 22:26:55 +01:00
CraftBukkit/Spigot
a265d64138 Move CraftBukkit per-file patches
By: Initial <noreply+automated@papermc.io>
2024-12-11 22:26:36 +01:00