Commit graph

4902 commits

Author SHA1 Message Date
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
Aikar
1c531f852f String based Action Bar API 2016-12-27 15:02:42 -05: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
Techcable
68a47b98c6 Add ProjectileCollideEvent
Deprecated now and replaced with ProjectileHitEvent
2016-12-16 21:25:39 -06:00
AlphaBlend
087a701e69 Add source to PlayerExpChangeEvent 2016-09-08 08:48:33 -07:00
willies952002
76de1e898e Allow Reloading of Command Aliases
Reload the aliases stored in commands.yml
2016-11-28 10:21:52 -05: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
2a69b8dd1a Add server-name parameter 2016-05-28 16:54:03 +02: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
Zach Brown
ba4eeb8a28 System property for disabling watchdoge 2016-05-12 23:02:58 -05: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
Zach Brown
3c1c4ab059 Option to use vanilla per-world scoreboard coloring on names
This change is basically a bandaid to fix CB's complete and utter lack
of support for vanilla scoreboard name modifications.

In the future, finding a way to merge the vanilla expectations in with
bukkit's concept of a display name would be preferable. There was a PR
for this on CB at one point but I can't find it. We may need to do this
ourselves at some point in the future.
2016-04-06 01:04:23 -05: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