Kristian S. Stangeland
28b213a419
Ensure that the dummy objects are all package private.
2013-02-05 23:28:11 +01:00
Kristian S. Stangeland
fc44ff9fba
Merge branch 'master' into gh-pages
2013-02-05 22:16:42 +01:00
Kristian S. Stangeland
cf52d6ddb4
Bumping to version 2.2.0.
...
- Adding support for Spigot
- Adding support for MCPC
- Range of bug fixes
2013-02-05 22:10:34 +01:00
Kristian S. Stangeland
f3ad0d86fe
Increment to pre-release version 2.1.2-SNAPSHOT
2013-02-05 17:53:27 +01:00
Kristian S. Stangeland
bdcd7f1f54
Ensure that ProtocolLib works with VanishNoPacket and Spigot
2013-02-05 16:06:49 +01:00
Kristian S. Stangeland
901ab1fdda
Add support for the Netty Spigot build.
...
This required extensive reworking of the inner packet injection system
in ProtocolLib.
I've also fixed a minior bug in the fuzzy member contract class.
2013-02-05 07:00:49 +01:00
Kristian S. Stangeland
e8112dba0e
Made IntegerSet accessible. Encapsulating the injection handler.
2013-02-05 01:37:41 +01:00
Kristian S. Stangeland
4685a06d27
Made the constructors for the different injectors more generic.
...
We now use builders. This should make it simpler to introduce Netty
Spigot support.
2013-02-04 22:42:07 +01:00
Kristian S. Stangeland
7abfd2148e
Make it possible to specify a custom incoming packet interceptor.
2013-02-03 20:27:47 +01:00
Kristian S. Stangeland
6cf3307a3b
Moved packet-related classes to a seperate package.
...
This is backwards compatible because they were all package private.
2013-02-03 19:24:39 +01:00
Kristian S. Stangeland
3219deed79
Use isMinecraftClass to check for NMS classes.
2013-02-03 19:07:12 +01:00
Kristian S. Stangeland
eaf7ea9618
Add an equality and hashCode() method to all the matchers.
2013-02-03 04:47:02 +01:00
Kristian S. Stangeland
75f05732bb
Improve the toString()-functionality of each fuzzy contract.
2013-02-03 04:08:30 +01:00
Kristian S. Stangeland
58969b26f6
Add getters and setters for each of the fuzzy contracts.
2013-02-03 03:13:10 +01:00
Kristian S. Stangeland
d583f7ccc3
Moving fuzzy reflection "framework" to a seperate package.
2013-02-03 02:07:23 +01:00
Kristian S. Stangeland
ab5bc1fd25
Make people aware of NULLs in the StreamSerializer class.
2013-02-01 01:43:40 +01:00
Kristian S. Stangeland
c7caf16a94
Inform the server operator about problems with Guava.
2013-02-01 01:32:48 +01:00
Kristian S. Stangeland
b26c9c45c8
Make it possible to send and recieve packets during login.
2013-01-31 22:52:33 +01:00
Kristian S. Stangeland
ea08696d10
Fix a serious bug that caused Blocks to inadvertanly be created.
...
Our custom IOC system (DefaultInstances) would call new Block(0) on a
MCPC based CraftBukkit system, causing air blocks to be treated as
solid blocks. We prevented this by explicitly forbidding it from
creating instances of ItemStack or Block in our structure modifier's
default field generator.
A second bug was caused by mismatched methods in WrappedDataWatcher,
which we solved by simply trying to use them, and then swapping them
if we encounter any errors or weird state.
2013-01-31 20:30:08 +01:00
Kristian S. Stangeland
e8c615b203
Attempting to add support for MCPC.
...
Still have to track down a very elusive bug however.
2013-01-31 06:23:01 +01:00
Kristian S. Stangeland
8b12907dfb
Improve JavaDoc and add the ability to match declaring class.
2013-01-30 18:44:13 +01:00
Kristian S. Stangeland
2f8912a8ae
Improved the fuzzy reflection system tremendously.
...
It is now possible to specify exactly what method or field you're
looking for, based on a number of different critera such as return
value, parameter count or parameter type, exceptions, modifiers, name -
all using a very fluent builder syntax.
2013-01-30 05:08:38 +01:00
Kristian S. Stangeland
58017960c9
Don't reference classes by name - it is not safe.
2013-01-30 01:45:00 +01:00
Kristian S. Stangeland
d109506cf2
Automatically delete empty JAR-files left over from upgrades.
2013-01-27 16:42:30 +01:00
Kristian S. Stangeland
eb996e73d8
Fixed a bug causing the entity modifier to always lookup the same world
...
The entity modifier would try to cache each equivalent converter by its
specific type - i.e. whether or not it converts entities or watchable
collections - but this isn't enough to distinguish entity modifiers
as they store a hidden reference to the world the entity is supposed
to be occupying.
Thus, after the first entity modifier is used for "world", it would
be subsequently cached for every world ("world_nether", "world_end",
etc.). The end result was that entity modifiers would only work for
one world.
This patch fixes this problem by adding a proper equals() method to
the entity equivalent converter class, along with all the other
equvialent converter classes, in case it should prove to become useful
in the future.
2013-01-27 15:35:39 +01:00
Kristian S. Stangeland
4f061e3464
Incremented to 2.1.1-SNAPSHOT for development towards the next version.
2013-01-22 13:56:05 +01:00
Kristian S. Stangeland
74ecb14a33
Fixed a couple of mistakes in the JavaDoc.
2013-01-22 13:33:24 +01:00
Kristian S. Stangeland
290b791eb3
Merge branch 'master' into gh-pages
2013-01-22 13:26:58 +01:00
Kristian S. Stangeland
c6d896d717
Bumping version to 2.1.0
...
This is because the previous release had a mistake in the API.
2013-01-22 12:59:08 +01:00
Kristian S. Stangeland
2a8dc4ad22
Don't consider the current file as a candidate for conflicting version.
2013-01-22 03:27:26 +01:00
Kristian S. Stangeland
14f667e2b9
The client no longer sends a RESPAWN packet.
2013-01-20 21:03:17 +01:00
Kristian S. Stangeland
b138332608
Compile PL for 1.4.7 - though earlier versions will still work.
2013-01-18 15:36:42 +01:00
Kristian S. Stangeland
5c098339a9
Increase default waiting period to 2 seconds.
2013-01-18 09:56:55 +01:00
Kristian S. Stangeland
093a6f12bf
Properly exit BlockingHashMap#get if we time out.
2013-01-18 09:46:23 +01:00
Kristian S. Stangeland
95438c1861
Throw an exception the caller can handle instead of a warning message.
...
This should prevent possible spam by plugins that are not aware that a
player has either logged out, or is not injected due to a bug in
ProtocolLib.
2013-01-17 12:26:39 +01:00
Kristian S. Stangeland
d23a45081a
Better error messages - inform that updating is disabled for SNAPSHOTs.
2013-01-15 11:09:16 +01:00
Kristian S. Stangeland
1880add7dc
Just report HTTP errors, no need to make tickets out of them.
2013-01-13 18:00:34 +01:00
Kristian S. Stangeland
429ca5d447
Don't update hooks if we don't need to.
2013-01-13 15:44:16 +01:00
Kristian S. Stangeland
651581d677
FIXED: DataWatcher can now clone ItemStacks and ChunkPositions.
...
Due to a oversight, we retrieved the "wrapped" value in the get cloned
helper method. This caused it to not clone the chunk position and item
stack.
2013-01-13 15:22:55 +01:00
Kristian S. Stangeland
637d6cda18
Only set the hook if it's different
2013-01-13 14:58:07 +01:00
Kristian S. Stangeland
70cb9c5275
Updated packet registry for 1.4.6.
2013-01-13 14:31:19 +01:00
Kristian S. Stangeland
37a9fc6a98
Don't call deprecated methods.
2013-01-13 11:41:32 +01:00
Kristian S. Stangeland
f416d1ba3d
Make the backwards compatible scheduler available to all.
2013-01-13 11:33:53 +01:00
Kristian S. Stangeland
845f339a30
Add the ability to set the default injection hook method.
...
This is useful for debugging.
2013-01-13 11:31:32 +01:00
Kristian S. Stangeland
17a5f59c0d
Added a convenience method for boolean structure modifiers.
2013-01-11 00:07:15 +01:00
Kristian S. Stangeland
29709c4159
Fix a small oversight in the API design.
2013-01-10 01:26:45 +01:00
Kristian S. Stangeland
898eb405f0
Incremented to 2.0.1-SNAPSHOT for development towards the next version
2013-01-10 01:00:16 +01:00
Kristian S. Stangeland
9778ed6fc5
Merge branch 'master' into gh-pages
2013-01-10 00:52:35 +01:00
Kristian S. Stangeland
9c86a36afb
Stop tracking the dependency reduced POM.
2013-01-10 00:51:52 +01:00
Kristian S. Stangeland
12c15b23ab
Increment to 2.0.0 instead.
...
This is to indiciate that this version is incompatible with older
versions. Although, it should really have occured at 1.8.0.
2013-01-10 00:21:51 +01:00
Kristian S. Stangeland
f2c955985c
Increment to version 1.10.0
2013-01-09 23:35:14 +01:00
Kristian S. Stangeland
10d5163ef5
Added the ability to save int arrays in configurations.
2013-01-09 14:45:00 +01:00
Kristian S. Stangeland
221ce71b97
Increment to 1.9.2-SNAPSHOT.
2013-01-09 07:06:57 +01:00
Kristian S. Stangeland
0597084c3d
Switched to a better base64 encoding and decoding method.
2013-01-09 07:05:36 +01:00
Kristian S. Stangeland
f791e2726f
Inform about the purpose of the fromItemStack (fromItemTag) method.
2013-01-09 04:52:53 +01:00
Kristian S. Stangeland
dbc28c0035
Added the ability to serialize and deserialize NBT to many formats.
2013-01-09 04:50:04 +01:00
Kristian S. Stangeland
3426306805
Finalize the operation to make the NBT wrappers into interfaces.
2013-01-08 22:24:07 +01:00
Kristian S. Stangeland
c2ea92ab37
Refactoring: Made NbtList and NbtCompound into generic interfaces.
2013-01-08 21:11:29 +01:00
Kristian S. Stangeland
749f006621
Add the ability to serialize ItemStacks to strings.
2013-01-08 03:33:24 +01:00
Kristian S. Stangeland
4756de8066
Factory methods should return NBTWrapper.
2013-01-08 03:16:21 +01:00
Kristian S. Stangeland
79daec662c
Added GPL license information.
2013-01-08 02:05:15 +01:00
Kristian S. Stangeland
9fb5f7f2dd
Fine tuning of the NBT system. Added more test cases.
2013-01-08 02:00:42 +01:00
Kristian S. Stangeland
70589a6263
Added the ability to read NBT ItemStack tags.
2013-01-07 23:39:16 +01:00
Kristian S. Stangeland
38137cea2c
Verify element type in tag list.
2013-01-07 20:37:21 +01:00
Kristian S. Stangeland
6b3d85af62
Change "clone" to "deepClone", in line with PacketContainer.
2013-01-07 20:24:15 +01:00
Kristian S. Stangeland
8abb93114f
Ensure that we can create compounds and lists.
2013-01-07 20:15:21 +01:00
Kristian S. Stangeland
671654aaaf
Add support for reading and writing NBT tags in packets.
...
This wraps the internal NBT read/write system in Minecraft.
2013-01-07 10:14:25 +01:00
Kristian S. Stangeland
73e71ff954
Don't load classes on secondary threads. ADDRESSES TICKET-27.
...
We'll move the "load class" call to the main thread, hopefully fixing
ticket 27. The secondary thread will still call the "define class"
protected method, which may not be thread safe.
2013-01-06 20:14:25 +01:00
Kristian S. Stangeland
07ae10bcd6
This is a snapshot version.
2013-01-02 20:39:10 +01:00
Kristian S. Stangeland
6996db9e63
Add a serializer for reading and writing ItemStacks to byte arrays.
...
To aid discoverability, we add a short-cut to this serializer in
PacketContainer, next to the getByteArrays() method.
2013-01-02 20:37:24 +01:00
Kristian S. Stangeland
3723e73e81
Reverted the attempt at automating the version number in plugin.yml.
2013-01-02 20:17:15 +01:00
Kristian S. Stangeland
711ffb1db7
Updated Metrics to version 6.
2013-01-02 20:16:53 +01:00
Kristian S. Stangeland
f995accd0c
Let maven automatically insert the correct version in plugin.yml
2012-12-27 19:00:49 +01:00
Kristian S. Stangeland
6bd8ec5791
Updated to 1.9.1-SNAPSHOT for development towards the next version.
2012-12-27 17:46:09 +01:00
Kristian S. Stangeland
044a58f657
Merge branch 'master' into gh-pages
2012-12-27 17:41:23 +01:00
Kristian S. Stangeland
fd69f08a1d
Maven crap.
2012-12-27 17:37:45 +01:00
Kristian S. Stangeland
82ec3dc5f1
Bumping to 1.9.0 to indicate that the cloning API is improved.
2012-12-27 17:03:30 +01:00
Kristian S. Stangeland
0d34b82d72
Don't copy inflated buffers - they won't be modified in any case.
...
Resulted in some pretty ugly factory code.
2012-12-27 16:28:30 +01:00
Kristian S. Stangeland
20ab2a71ac
Assume SecretKey and PublicKey is immutable too.
2012-12-27 15:11:08 +01:00
Kristian S. Stangeland
d16e0bf1c6
Add support for cloning maps.
2012-12-27 15:06:25 +01:00
Kristian S. Stangeland
f0e7b9aec7
Added missing copyright notices (GPL).
2012-12-27 14:28:33 +01:00
Kristian S. Stangeland
01b9e15930
No need to expose the MinecraftVersion class.
2012-12-27 14:23:22 +01:00
Kristian S. Stangeland
0f30a11510
Bumping version to 1.8.5-SNAPSHOT.
2012-12-27 12:12:44 +01:00
Kristian S. Stangeland
447f01a3dd
Crash if multiple copies of ProtocolLib are running simultaneously.
2012-12-27 12:12:11 +01:00
Kristian S. Stangeland
695a4f3b0e
Added a shallow clone method.
...
Removed the identity cloner, as it's no longer needed.
2012-12-27 11:13:42 +01:00
Kristian S. Stangeland
dea725e1e3
Move the field cloning reponsibility to FieldCloner.
2012-12-27 10:32:26 +01:00
Kristian S. Stangeland
8b91e3034d
Added a generic cloning library to properly support deepClone().
2012-12-27 09:23:07 +01:00
Kristian S. Stangeland
fdbd3d6495
Rename ObjectCloner to ObjectWriter.
...
It's more accurately thought off as a way of writing the content of
object A to object B, than a generic cloning method.
2012-12-25 15:46:33 +01:00
Kristian S. Stangeland
655fbf4799
Added StructureModifier tests for different packet types.
2012-12-25 15:44:14 +01:00
Kristian S. Stangeland
425c5fd682
Add equals() and hashcode() to the wrapped DataWatcher.
2012-12-24 21:42:48 +01:00
Kristian S. Stangeland
cc3441dfeb
Continue to remove unnecessary raw types.
2012-12-23 18:52:00 +01:00
Kristian S. Stangeland
450fbd8e8d
Bumping to beta 1.4.6 of CraftBukkit
2012-12-23 04:22:02 +01:00
Kristian S. Stangeland
d328111b38
No need to suppress any warnings - we can use wildcards.
2012-12-22 23:16:21 +01:00
Kristian S. Stangeland
5d06b9e84c
Bumping to version 1.8.4-SNAPSHOT.
2012-12-21 18:33:40 +01:00
Kristian S. Stangeland
555b5d0795
Create a typed ItemStack array when writing it to a field. FIXES 24.
...
After the package versioning commit, ProtocolLib switched to performing
everything exclusively with reflection. Unfortunately, this may have
introduced a couple of new bugs.
This problem is caused by the fact that ProtocolLib converts a Bukkit
ItemStack array to an Object array instead of an array of NMS
ItemStacks. This object array can't be assigned to a ItemStack array,
so the write operation fails.
The fix is to create a typed array with reflection.
2012-12-21 18:33:09 +01:00
Kristian S. Stangeland
35083f87fe
Increment to version 1.8.3-SNAPSHOT.
2012-12-21 00:37:46 +01:00
Kristian S. Stangeland
c71bf61511
1.4.6 appears to be working properly.
2012-12-21 00:36:04 +01:00
Kristian S. Stangeland
5a96a63ff8
Added support for 1.4.6.
...
Yes, it's essentially a hack, but I don't have enough time today to
find a better way. It will have to do until 1.5.0 is out.
2012-12-21 00:27:13 +01:00
Kristian S. Stangeland
220c0e4bc5
Ensure that CraftItemStacks can be converted to NMS item stacks.
2012-12-19 23:48:31 +01:00
Kristian S. Stangeland
3b142db569
Don't ignore critical exceptions - print them.
2012-12-19 23:10:50 +01:00
Kristian S. Stangeland
1509f5cd8b
Increasing to 1.8.2-SNAPSHOT for development toward the next version.
2012-12-19 23:10:28 +01:00
Kristian S. Stangeland
3b0790f136
Bumping to release of 1.8.1
2012-12-19 18:04:44 +01:00
Kristian S. Stangeland
b0cc1440dd
Revert "Remove unused classes from CGLib. Saves us 136 kB. "
...
This reverts commit b1bd7e9fcd
.
2012-12-19 17:52:56 +01:00
Kristian S. Stangeland
d7d6e24506
Added support for the new way of converting CraftItemStacks in 1.4.5
2012-12-19 17:51:21 +01:00
Kristian S. Stangeland
b1bd7e9fcd
Remove unused classes from CGLib. Saves us 136 kB.
2012-12-15 07:17:04 +01:00
Kristian S. Stangeland
79afb0bcdc
Forgot to add the target object in the ChunkPosition wrapper.
2012-12-13 00:39:50 +01:00
Kristian S. Stangeland
86f15c8674
Fallback on our own custom object printer.
2012-12-12 18:35:58 +01:00
Kristian S. Stangeland
4440e6fcaa
Prevent ProtocolLib from spamming the console too.
2012-12-12 18:34:02 +01:00
Kristian S. Stangeland
15961f6cce
We can include the stack trace - it will only very rarely be printed.
2012-12-12 08:41:55 +01:00
Kristian S. Stangeland
7117545509
Prevent plugins from spamming the console.
2012-12-12 08:32:37 +01:00
Kristian S. Stangeland
e855be64ad
Default settings matter. Make auto-update opt-in.
2012-12-12 07:41:58 +01:00
Kristian S. Stangeland
781a945ef4
Bumping to 1.8.1-SNAPSHOT for development towards the next version.
2012-12-12 07:41:19 +01:00
Kristian S. Stangeland
3d166ae353
Merge branch 'master' into gh-pages
2012-12-10 16:43:44 +01:00
Kristian S. Stangeland
afdb0d0324
Remember to perform deep cloning.
2012-12-10 16:30:48 +01:00
Kristian S. Stangeland
40345f25ff
Bumping to version 1.8.0
2012-12-10 16:10:56 +01:00
Kristian S. Stangeland
f6f8c9f80f
Only broadcast a notifcation message in the event of a warning.
2012-12-10 05:50:18 +01:00
Kristian S. Stangeland
b135bf86c3
Add the ability to skip the version check for a specific MC version.
2012-12-09 17:09:24 +01:00
Kristian S. Stangeland
7845a844d4
Make ProtocolLib load on startup. No need to wait for the world to load
2012-12-09 15:35:01 +01:00
Kristian S. Stangeland
83f5a7e5b7
Add packet information to the default packet error reporter.
2012-12-09 04:51:11 +01:00
Kristian S. Stangeland
7ca3e916a5
Add a warning message when ProtocolLib is started on untested version.
...
May decide to simply stop ProtocolLib unless this feature is
specifically disabled.
2012-12-09 04:23:26 +01:00
Kristian S. Stangeland
6b5ecd7309
Improve the functionality of wrapped DataWatcher and WatchableObject.
2012-12-08 14:22:07 +01:00
Kristian S. Stangeland
af546e7f1d
Ignore depcreciation - we're using the method correctly.
2012-12-06 04:04:07 +01:00
Kristian S. Stangeland
6530db23b7
Last commit contains breaking API changes, so increment version.
2012-12-06 03:54:25 +01:00
Kristian S. Stangeland
0745fba881
Massive update that ensures ProtocolLib is compatible with 1.4.5-R3.0
...
Due to 8f12382e8efc8c39a919af9180dd884caf3720ff, CraftBukkit has
now moved the net.minecraft.server package and org.bukkit.craftbukkit
to versioned package names, breaking all plugins that rely on these
directly.
ProtocolLib was never intended to be updated specifcally for new
versions of Minecraft (hence the index-based system of accessing
packets instead of making wrapper classes), so we will use reflection
to "ignore" this hack entirely. Luckily, ProtocolLib was initially
designed for this in mind, so we don't have to refactor it entirely.
2012-12-06 03:37:20 +01:00
Kristian S. Stangeland
45c28d47c8
Create a new dedicated Minecraft reflection class.
2012-12-05 23:47:55 +01:00
Kristian S. Stangeland
88009292bb
Update to the new CraftBukkit snapshot.
2012-12-05 23:47:36 +01:00
Kristian S. Stangeland
25d41ed51c
Ensure that fake cancellation packets can be created.
2012-12-05 03:32:13 +01:00
Kristian S. Stangeland
ede60970b9
Ensure that we don't cache wrong methods in the serialization.
2012-12-04 16:21:37 +01:00
Kristian S. Stangeland
86d3461700
Ensure that we don't return enhancer classes as vanilla classes.
2012-12-04 14:59:08 +01:00
Kristian S. Stangeland
733ecdd59b
Increment to 1.7.2-SNAPSHOT for development towards the next version.
2012-12-04 14:49:59 +01:00
Kristian S. Stangeland
0129a0575c
Merge branch 'master' into gh-pages
2012-12-04 00:54:36 +01:00
Kristian S. Stangeland
98edcb1772
Maven crap again.
2012-12-04 00:54:25 +01:00
Kristian S. Stangeland
7062b9327c
Fix documentation.
2012-12-04 00:21:14 +01:00
Kristian S. Stangeland
b9abf0b683
Incrementing to 1.7.1
2012-12-04 00:19:55 +01:00
Kristian S. Stangeland
98a9377384
Add a convenience retriever for integer array fields.
2012-12-04 00:18:33 +01:00
Kristian S. Stangeland
300111b850
Make it easy to clone packets.
2012-12-03 17:51:18 +01:00
Kristian S. Stangeland
f4accbfe2d
Make it possible to get every player that is tracking a given entity.
2012-12-02 02:49:11 +01:00
Kristian S. Stangeland
2bd06922e0
Ensure that the wrapped watchable object returns wrapped objects.
...
In addition, made it possible to construct watchable objects directly.
Also fixed a bug preventing data watchers from creating new watchable
objects.
2012-12-01 22:34:46 +01:00
Kristian S. Stangeland
f81e3262d0
Don't spam the console when a player logs out quickly.
2012-12-01 17:24:46 +01:00
Kristian S. Stangeland
beb4bba7fa
Switching away from checked exceptions.
2012-11-27 08:00:52 +01:00
Kristian S. Stangeland
03ad9be078
Be careful when registering commands. It shouldn't break the plugin.
...
Found an error report in the wild suggesting that getCommand() might
occationally fail (if plugin.yml isn't loaded properly, maybe) and
return NULL instead.
Since the commands are only for administrators and plugin authors,
we'll simply ignore it if this occurs.
2012-11-23 11:42:17 +01:00
Kristian S. Stangeland
d53b6dbee1
Removed the ReadWriteLock as it's superseeded by the BlockingHashMap.
2012-11-23 08:52:02 +01:00
Kristian S. Stangeland
c49b1ddc02
Incremented to 1.7.1-SNAPSHOT for development to the next version.
2012-11-23 08:48:32 +01:00
Kristian S. Stangeland
f5cb7ddc7b
Adding a blocking hash map to use while looking up data connections.
2012-11-23 08:48:08 +01:00
Kristian S. Stangeland
1d1f96cda4
Merge branch 'master' into gh-pages
2012-11-21 06:27:32 +01:00
Kristian S. Stangeland
a4f79ccb3f
Maven crap.
2012-11-21 06:27:18 +01:00
Kristian S. Stangeland
78387a033b
Bumping to version 1.7.0
2012-11-21 05:57:07 +01:00
Kristian S. Stangeland
21a1dfcbac
Preserve intervals outside the given range to remove.
2012-11-21 05:53:26 +01:00
Kristian S. Stangeland
4b2f69c3c8
Fix removing intervals in the interval tree.
2012-11-21 05:50:23 +01:00
Kristian S. Stangeland
4b19f8498b
Allow timeout listeners to cancel expiration.
2012-11-21 03:40:31 +01:00
Kristian S. Stangeland
95fe40aef3
Discurage sending of cancelled packets in ProtocolManager too.
2012-11-21 02:48:14 +01:00
Kristian S. Stangeland
8c4b4fcaa4
Advertise the incrementProcessingDelay() function.
...
Discurage plugins of re-sending cancelled packets, as it makes it
impossible for other plugins to take part in the processing.
Assume plugin A delays transmission of packet X by cancelling the event,
and then retransmitting X outside the filters. It is then impossible
for another plugin B to extend the delay without fighting plugin A
for control over the packet, for instance by decreasing the listener
priority and cancelling first.
It is much better for plugin A to call incrementProcessingDelay() in
an asynchronous listener. Then plugin B can do the same, and the
packet will be sent after both plugins has called
signalProcessingDone().
2012-11-21 02:42:18 +01:00
Kristian S. Stangeland
524ef2e6c9
Fix the packet sending procedure.
2012-11-21 02:18:56 +01:00
Kristian S. Stangeland
858f9ee02d
Renamed 'synchronizeMain' to 'notThreadSafe'.
2012-11-21 01:42:59 +01:00
Kristian S. Stangeland
0b200472f1
Process asynchronous packets on an async thread.
...
Bukkit complains if we try to send an async packet on the main thread,
so we will have to add a new background thread that can transmit
packets processed by light-weight packet listeners.
In addition, fixed a bug causing the "uncancel" method in
PacketInjector from not working properly. That bug is as persistent
as a zombie.
2012-11-21 01:39:43 +01:00
Kristian S. Stangeland
9482818751
Fixed an incorrect null check.
2012-11-21 00:24:19 +01:00
Kristian S. Stangeland
36f867cafa
Added synchronous packet processing.
...
Client packets are typically processed asynchronously (in a client's
reader thread), and should never access the Bukkit API directly,
with a few exceptions. This is problematic if you need to cancel a
packet as a response to the Bukkit API, such as the permission system.
Currently, you will have to either cancel the packet - which is
discuraged - sync with the main thread and then re-transmit it outside
the filters, or use an asynchronous thread with callSyncMethod and
wait on the returned future. A better method is needed.
Synchronous processing allows you to run light-weight packet listeners
on the main thread without having to deal with synchronization,
concurrency or the overhead of an additional thread. It can also
process multiple packets per tick with a configurable timeout.
This, along with 7b9d971238
, makes it
easy to delay light-weight packets to be synchronously processed.
2012-11-21 00:15:53 +01:00
Kristian S. Stangeland
dd9cb30d25
Structure compiler shouldn't be public.
2012-11-20 18:47:22 +01:00
Kristian S. Stangeland
53fe3e5b61
Fixed a range of smaller bugs discovered by FindBugs.
2012-11-20 07:10:46 +01:00
Kristian S. Stangeland
a849c38ce6
Implement equals() and hashCode(), since we've implemented compareTo.
2012-11-20 06:59:56 +01:00
Kristian S. Stangeland
d4d763af94
Add a warning message when trying to correct invalid configuration.
2012-11-20 06:53:39 +01:00
Kristian S. Stangeland
dc186df695
Small fix for OpenJDK (FindBugs).
2012-11-20 06:48:05 +01:00
Kristian S. Stangeland
95dbddf9bb
Fixed a number of minor bugs.
2012-11-20 06:46:21 +01:00
Kristian S. Stangeland
023c3908ae
Fixed error reporter not being assigned properly.
2012-11-20 06:33:54 +01:00
Kristian S. Stangeland
ac993896cc
Fixed writing private fields with a compiled structure modifier.
...
Incredibly hard to track down. Lucked out by randomly removing a
semicolon.
2012-11-20 06:17:52 +01:00
Kristian S. Stangeland
456764468a
Always generate classes with legal identifiers.
...
Certain types, such as ItemStack[], would cause the StructureCompiler
to generate classes with the name CompiledStructure@ParentItemStack[],
which are not legal names.
Instead, we'll replace the brackets with the word Array.
In addition, to accomodate classes with identical names, we'll use
the following naming convention instead:
CompiledStructure$[Canonical name of target]$Canonical name of type],
where the canonical name (net.minecraft.server.ItemStack[]) is
transformed to a legal name by replacing "." to "_" and "[]" to array.
In our example, that would result in the following class name:
net_minecraft_server_ItemStackArray
2012-11-20 03:50:44 +01:00
Kristian S. Stangeland
9170e48992
Correct the concurrent initialization pattern.
2012-11-20 03:32:44 +01:00
Kristian S. Stangeland
7b9d971238
Use a separate asynchronous sending queue for every online player.
...
This ensures that packets intended for player A doesn't have to wait
for the packets of player B to be finished processing.
2012-11-20 03:23:43 +01:00
Kristian S. Stangeland
f8af92eb5b
Add the error reporter to the background compiler.
2012-11-20 00:26:16 +01:00
Kristian S. Stangeland
d5aa1cde51
Added the ability to enable or disable the background compiler.
2012-11-19 23:44:13 +01:00
Kristian S. Stangeland
cdc5740f85
Log the plugin version too.
2012-11-19 23:27:04 +01:00
Kristian S. Stangeland
c2209138fe
Add the ability to clone a watchable object.
2012-11-19 20:43:13 +01:00
Kristian S. Stangeland
45f5d55b6a
Fixed the update feature (hopefully for the last time).
...
The problem is that ProtocolLib is using a different naming convention
where each release has a version suffix. So, while we can't use the
update folder to replace the JAR file, it's also not needed since
we can simply add it to the plugins directory directly and remove
the old version on shutdown.
2012-11-17 08:47:25 +01:00
Kristian S. Stangeland
4298ac609d
Damn typos.
2012-11-16 04:10:59 +01:00
Kristian S. Stangeland
15ca240bac
Fixed a bug that would clear the debug listeners on "add".
...
This was caused by a bug in the abstract interval tree class that would
clear the entire tree instead of the subtree whenever a new entry was
added.
Never roll your own custom collection implementation ...
2012-11-16 03:57:55 +01:00
Kristian S. Stangeland
a40df621d0
Spelling error.
2012-11-13 18:31:06 +01:00
Kristian S. Stangeland
b6478924bb
Merge branch 'master' into gh-pages
2012-11-13 17:50:54 +01:00
Kristian S. Stangeland
b84161fde2
Fix documentation.
2012-11-13 17:50:36 +01:00
Kristian S. Stangeland
e28c2331e2
Incrementing to 1.6.1-SNAPSHOT for development to the next version.
2012-11-13 17:50:22 +01:00
Kristian S. Stangeland
5c2e692a90
Merge branch 'master' into gh-pages
2012-11-13 17:46:06 +01:00
Kristian S. Stangeland
c2d79c142f
Generated changes.
2012-11-13 17:45:49 +01:00
Kristian S. Stangeland
189497fffa
Bumping version to 1.6.0
2012-11-13 17:08:50 +01:00
Kristian S. Stangeland
235e6eeed2
Made it possible to convert between a chunk position and a coordinate.
2012-11-13 16:49:49 +01:00
Kristian S. Stangeland
80b99fccd9
Added some array methods too.
2012-11-13 16:43:52 +01:00
Kristian S. Stangeland
7f5288dea6
Add getIntegers(), getLongs(), ect. to PacketContainer.
2012-11-13 16:23:19 +01:00
Kristian S. Stangeland
528468a342
Fixed a bug preventing the entity modifier from reading entities.
2012-11-13 16:10:56 +01:00
Kristian S. Stangeland
fec2734fe2
Added a couple of useful methods to the wrappers.
2012-11-13 15:11:54 +01:00
Kristian S. Stangeland
ad69b0caac
Added the ability to read data watchers and watchable object lists.
2012-11-13 14:34:07 +01:00
Kristian S. Stangeland
a567721114
Add the ability to read and write ChunkPositions.
2012-11-11 07:24:45 +01:00
Kristian S. Stangeland
5bb6f7649a
Corrected a bug in a PacketAdapter constructor discovered by Folipurba.
2012-11-11 06:04:08 +01:00
Kristian S. Stangeland
0b292af3b1
Add the ability to write to final fields, even if it is compiled.
2012-11-11 02:09:45 +01:00
Kristian S. Stangeland
76d27017de
Allow the structure modifier to read final fields.
2012-11-11 01:22:17 +01:00
Kristian S. Stangeland
addc62457a
Handle multiple connection sides properly.
2012-11-11 01:06:11 +01:00
Kristian S. Stangeland
79786b8192
Use a default connection side in the packet command.
2012-11-11 00:57:16 +01:00
Kristian S. Stangeland
da7cd0b10d
Reference the correct permissions.
2012-11-10 07:58:44 +01:00
Kristian S. Stangeland
003bc927a4
Set default update rate to 43200 seconds instead.
2012-11-06 18:07:06 +01:00
Kristian S. Stangeland
5e6a6f6a95
Fix the syntax of the packet debug message.
2012-11-05 00:05:16 +01:00
Kristian S. Stangeland
0108c3390e
Add exception handlers to all the commands.
2012-11-04 16:14:07 +01:00
Kristian S. Stangeland
5b279660e0
Increment to 1.5.2-SNAPSHOT for development on the next version.
2012-11-04 16:13:47 +01:00
Kristian S. Stangeland
23fb21d234
Merge branch 'master' into gh-pages
...
Conflicts:
ProtocolLib/.classpath
2012-11-04 03:46:33 +01:00