Commit graph

1073 commits

Author SHA1 Message Date
CraftBukkit/Spigot
f190bf3da3 Refactor CraftBukkit dependencies. Fixes BUKKIT-2329
The maven shade plugin has the ability to change the namespace for
included dependencies and packages. This change is being implemented to
remove all conflicts with any possible libraries in an execution
environment.

The only dependencies to be refactored are specific to CraftBukkit. To
refactor dependencies included with Bukkit breaks any plugin compiled
against those specific dependencies, especially ebeans--an API
specifically encouraged for database management.

By: Wesley Wolfe <weswolf@aol.com>
2012-08-19 15:42:54 -05:00
CraftBukkit/Spigot
b1d40801aa Rewrite scheduler. Fixes BUKKIT-1831, and BUKKIT-845
The new scheduler uses a non-blocking methodology. Combining volatile
references to make a linked reference chain, with the atomic reference
handling the tail, tasks are queued without waiting for locks. The main
thread will no longer limit the length of time spend for scheduled tasks,
but no task will run twice in the same tick. Scheduling a new task inside of
a synchronous task will always run the new task during the same tick,
assuming there is no supplied delay > 0.

Asynchronous tasks are now run using a thread pool. Any thread-local
implemenation should now account for threads being reused between
executions.

Race conditions were carefully examined and the order of logic is now very
important. Each task is placed in a secondary collection before removal from
primary collections. Thus, by reading tasks from the collections in the same
order they travel, it retains state-safety. This does make modifications
less responsive in some situations, as the task may be transitioning before
the modifier accesses it. This cost outweighs the requirement to synchronize
on the scheduler; previously any conflict would be first-come-first-serve,
with the main thread backing out arbitrarily.

By: Wesley Wolfe <weswolf@aol.com>
2012-08-14 06:09:51 -05:00
CraftBukkit/Spigot
757465f533 Fix instances where Signs have null lines. Addresses BUKKIT-684
By: V10lator <v10lator@myway.de>
2012-08-18 14:50:09 +02:00
CraftBukkit/Spigot
9c8b353591 Use standard format function to format logs. Addresses BUKKIT-2246
Also fix "excess" Log Levels.

By: EdGruberman <ed@rjump.com>
2012-08-11 16:29:50 -07:00
CraftBukkit/Spigot
ae2357b96e Implement API for Sound, and playing the sounds for Worlds and Players. Adds BUKKIT-1430, BUKKIT-1226 and BUKKIT-2019
By: feildmaster <admin@feildmaster.com>
2012-08-21 17:23:17 -05:00
CraftBukkit/Spigot
c144b2459c Use a dynamic pool size for the iterator cache
Many codepaths only end up with one iterator being used at a time and
most of the rest only get up to two being used so using a static pool of
three is wasteful. This also allows us to efficiently handle cases that
exceed 3 iterators in use. Overall this dramatically increases the hit rate
and results in less iterators being created.

By: Travis Watkins <amaranth@ubuntu.com>
2012-08-19 19:59:58 -05:00
CraftBukkit/Spigot
7a4660c49e Implement API to retrieve and open EnderChests. Adds BUKKIT-2016
By: feildmaster <admin@feildmaster.com>
2012-08-20 15:52:44 -05:00
CraftBukkit/Spigot
4ada047593 [Bleeding] Remove redundant chunkList from ChunkProviderServer
This ArrayList duplicates part of the functionality of the much more
efficient chunk map so can be removed as the map can be used in the few
places this was needed.

By: Mike Primm <mike@primmhome.com>
2012-08-11 17:34:22 -05:00
CraftBukkit/Spigot
327e789c7f Add LongObjectHashMap and LongHashSet
Replace uses of LongHashtable and LongHashset with new implementations.
Remove EntryBase, LongBaseHashtable, LongHashset, and LongHashtable as they
are no longer used.

LongObjectHashMap does not use Entry or EntryBase classes internally for
storage so has much lower object churn and greater performance. LongHashSet
is not as much of performance win for our use case but for general use is
up to seventeen times faster than the old implementation and is in fact
faster than alternatives from "high performance" java libraries. This is
being added so that if someone tries to use it in the future in a place
unrelated to its current use they don't accidentally end up with something
slower than the Java collections HashSet implementation.

By: Travis Watkins <amaranth@ubuntu.com>
2012-08-17 18:53:59 -05:00
CraftBukkit/Spigot
9c569d394d Add iterator cache to UnsafeList and use it in hotspots
Adds a specialized iterator for the list and a pool of iterators to avoid
object churn. Also optimizes the clear() method to reduce object creation.

By: Travis Watkins <amaranth@ubuntu.com>
2012-08-17 12:55:33 -05:00
CraftBukkit/Spigot
f694f8215b Updated version to 1.3.1-R2.1-SNAPSHOT for development towards next release.
By: EvilSeph <evilseph@gmail.com>
2012-08-19 09:01:23 -04:00
CraftBukkit/Spigot
61e4d2c4ad Updated version to 1.3.1-R2.0 in pom.xml for RB.
By: EvilSeph <evilseph@gmail.com>
2012-08-19 08:47:47 -04:00
CraftBukkit/Spigot
4c88eae55b Fix issues with chunk saving. Fixes BUKKIT-2158, BUKKIT-2018 and BUKKIT-2229
By: Mike Primm <mike@primmhome.com>
2012-08-12 18:40:49 -05:00
CraftBukkit/Spigot
84483a55f2 Add more detailed CrashReport for CraftBukkit. Addresses BUKKIT-2319
By: Wesley Wolfe <weswolf@aol.com>
2012-08-17 23:11:26 -05:00
CraftBukkit/Spigot
c0ce2ea3a1 Use correct SlotType's for merchants. Fixes BUKKIT-2257
By: feildmaster <admin@feildmaster.com>
2012-08-14 18:28:00 -05:00
CraftBukkit/Spigot
73cf129db7 Implement methods for spawning FallingBlocks and add various FallingBlock methods. Adds BUKKIT-2282
By: feildmaster <admin@feildmaster.com>
2012-08-13 22:21:10 -05:00
CraftBukkit/Spigot
cc018c2203 Update CreatureSpawner.setSpawnedType(EntityType) to 1.3
They can spawn any valid entities now. What is a "valid" entity? A "valid" entity is an EntityType with a non-null getName(). (for example: PRIMED_TNT, FALLING_BLOCK)

By: feildmaster <admin@feildmaster.com>
2012-08-12 14:02:57 -05:00
CraftBukkit/Spigot
939c2c8477 Implement player speed API. Addresses BUKKIT-2205
By: Wesley Wolfe <weswolf@aol.com>
2012-08-10 00:00:04 -05:00
CraftBukkit/Spigot
7c3b98a7f9 Updated version to 1.3.1-R1.1-SNAPSHOT for development towards next release.
By: EvilSeph <evilseph@gmail.com>
2012-08-07 17:10:11 -04:00
CraftBukkit/Spigot
1fc2417f5d Updated version to 1.3.1-R1.0 in pom.xml for RB
By: EvilSeph <evilseph@gmail.com>
2012-08-07 02:31:21 -04:00
CraftBukkit/Spigot
24abca3c43 Implement new deprecated warning state configuration option
By: Wesley Wolfe <weswolf@aol.com>
2012-08-06 23:52:49 -05:00
CraftBukkit/Spigot
bf9001a3d3 Put forceChunkLoad back to its original value.
By: Travis Watkins <amaranth@ubuntu.com>
2012-08-05 20:03:12 -05:00
CraftBukkit/Spigot
7383d52df7 Implement new AsyncPlayerChatEvent. Addresses BUKKIT-2064
Added two utility collections for use with PlayerChatEvents allowing lazier
initialization of events and less need to synchronize against the player
list.

Provided a hidden queue system for similar logic to pre-1.3 chat. When a
plugin is listening for the deprecated PlayerChatEvent, all chat will be
delayed to be mirror executed from the main thread. All developers are
encouraged to immediately update to the developmental Bukkit chat API as a
minimum transition for server stability.

Additionally, changes were required to bring thread-safety to the flow
logic. CopyOnWriteArrayList is the only viable means to produce thread
safety with minimal diff; using a sane pre-implemented collection would
require reworking of sections of NMS logic.

As a minor change, implemented expected functionality for
PlayerCommandPreProcessEvent. Setting the player should now change the
player executing the command.

By: Wesley Wolfe <weswolf@aol.com>
2012-08-03 06:24:55 -05:00
CraftBukkit/Spigot
a1a672d052 Fix mapping of ChunkSection nibble data to snapshot. Fixes BUKKIT-1977
By: Mike Primm <mike@primmhome.com>
2012-08-02 11:21:40 -05:00
CraftBukkit/Spigot
0eee4963fb Add trailing / to BukkitDL URLs. Fixes BUKKIT-2015.
Also adds CraftBukkit version number to user agent when communicating with
BukkitDL.

By: Luke Granger-Brown <git@lukegb.com>
2012-08-02 23:35:08 +01:00
CraftBukkit/Spigot
fdfc871461 Add test for WorldType's
By: feildmaster <admin@feildmaster.com>
2012-08-02 09:10:15 -05:00
CraftBukkit/Spigot
6e2987bb35 Update CraftBukkit to Minecraft 1.3.1
By: feildmaster <admin@feildmaster.com>
2012-07-29 02:33:13 -05:00
CraftBukkit/Spigot
a45bcca987 Updated version to 1.2.5-R5.1-SNAPSHOT for development towards next release.
By: EvilSeph <evilseph@gmail.com>
2012-07-28 02:13:53 -04:00
CraftBukkit/Spigot
08dadaffd6 Updated version to 1.2.5-R5.0 in pom.xml for RB.
By: EvilSeph <evilseph@gmail.com>
2012-07-28 01:49:49 -04:00
CraftBukkit/Spigot
985d65840b Implement getExpToLevel method. Fixes BUKKIT-1906
By: feildmaster <admin@feildmaster.com>
2012-07-10 13:32:21 -05:00
CraftBukkit/Spigot
75617118ea [Bleeding] Include chunk biome data for refresh chunk. Fixes BUKKIT-1166
By: Mike Primm <mike@primmhome.com>
2012-04-04 19:55:16 -05:00
CraftBukkit/Spigot
b69d15792e Factor invulnerableTicks into getNoDamageTicks. Fixes BUKKIT-1324
By: feildmaster <admin@feildmaster.com>
2012-07-04 15:12:29 -05:00
CraftBukkit/Spigot
a8eaf02d50 Implement getMotd, and reload the motd. Adds BUKKIT-1799
By: feildmaster <admin@feildmaster.com>
2012-07-03 18:00:37 -05:00
CraftBukkit/Spigot
87d5b5e374 Apply setLastDamageCause after processing events and the event has not been canceled. Fixes BUKKIT-1881
This allows previous causes to be available during the event, as well as making the damage cause a valid one. If EntityDamageEvent is canceled, then it's not the last DamageCause.

Also prevents setting DamageCause involuntarily through construction.

By: feildmaster <admin@feildmaster.com>
2012-07-01 05:04:06 -05:00
CraftBukkit/Spigot
fdbd4efbd6 Treat ComplexParts as proxies for setLastDamageCause. Fixes BUKKIT-1821
By: feildmaster <admin@feildmaster.com>
2012-07-01 05:02:44 -05:00
CraftBukkit/Spigot
d96b0ca73f Clean entity.damage functions. Fixes BUKKIT-1822
By: feildmaster <admin@feildmaster.com>
2012-07-01 05:00:48 -05:00
CraftBukkit/Spigot
e5281e5d53 Fix deprecated spawnCreature. Fixes BUKKIT-1880
By: Wesley Wolfe <weswolf@aol.com>
2012-07-02 15:36:49 -05:00
CraftBukkit/Spigot
cdfbbb4638 Mark entities as invalid when they get despawned. Addresses BUKKIT-810
By: Travis Watkins <amaranth@ubuntu.com>
2012-06-25 03:24:53 -05:00
CraftBukkit/Spigot
18adfe63c3 Implement LivingEntity.hasLineOfSight. Addresses BUKKIT-1255
By: TomyLobo <tomylobo@nurfuerspam.de>
2012-03-21 16:31:30 +01:00
CraftBukkit/Spigot
25f555c6b9 Deprecate spawnCreature and add spawnEntity. Addresses BUKKIT-1168
By: V10lator <v10lator@myway.de>
2012-04-25 11:45:28 +02:00
CraftBukkit/Spigot
acc10eabc8 Trigger EntityBlockChangeEvent for Silverfish. Adds BUKKIT-1560 and BUKKIT-1593
By: feildmaster <admin@feildmaster.com>
2012-04-28 12:26:07 -05:00
CraftBukkit/Spigot
b91f0fe488 Implement plugin channel events. Addresses BUKKIT-1844
By: Wesley Wolfe <weswolf@aol.com>
2012-06-20 23:15:31 -05:00
CraftBukkit/Spigot
3211d52685 Fire PlayerItemBreakEvent. Addresses BUKKIT-1600
By: Travis Ralston <travpc@gmail.com>
2012-05-06 21:38:01 -06:00
CraftBukkit/Spigot
474a9e54a8 Clear animal owner when untamed. Fixes BUKKIT-1482
By: Ammar Askar <ammar_askar@hotmail.com>
2012-06-17 23:18:00 +05:00
CraftBukkit/Spigot
f54cb1e14e Add query-plugins setting. Addresses BUKKIT-1781
By: H31IX <effectsdude@gmail.com>
2012-06-09 13:59:52 -04:00
CraftBukkit/Spigot
86a06cd622 Changes '/whitelist list' to ignore comments. Addresses BUKKIT-1804
By: Jeff Wardian <krinsdeath@hotmail.com>
2012-06-14 22:31:47 -05:00
CraftBukkit/Spigot
b92707d6ea Preserve whitelist ordering. Addresses BUKKIT-1805
By: Jeff Wardian <krinsdeath@hotmail.com>
2012-06-14 22:43:46 -05:00
CraftBukkit/Spigot
fc5ec8c899 Fire NotePlayEvent. Fixes BUKKIT-1779
By: obnoxint <mail@obnoxint.net>
2012-06-10 17:39:18 +02:00
CraftBukkit/Spigot
efd15866c4 Support asynchronous events; Addresses BUKKIT-1212
By: Wesley Wolfe <weswolf@aol.com>
2012-06-13 21:52:49 -05:00
CraftBukkit/Spigot
add9437bd5 Check world before checking distance. Fixes BUKKIT-1792
By: Wesley Wolfe <weswolf@aol.com>
2012-06-12 10:59:29 -05:00