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
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
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
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
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
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
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
2a5d240df9
Update POM.
2012-11-04 03:39:38 +01:00
Kristian S. Stangeland
a5dbbc6170
Release of 1.5.1
2012-11-04 03:38:00 +01:00
Kristian S. Stangeland
abafb7a6c5
Fix configuration handling.
2012-11-04 03:03:38 +01:00
Kristian S. Stangeland
f5dce019df
Save the last update check, even if it was initiated from a command.
2012-11-04 02:30:47 +01:00
Kristian S. Stangeland
64e3ba7f14
Add the ability to disable metrics in the config file.
2012-11-04 02:15:16 +01:00
Kristian S. Stangeland
2f2eb148fa
Added a timeout listener.
2012-11-04 01:10:05 +01:00
Kristian S. Stangeland
6c8bda24fd
Parse "detailed" as TRUE.
2012-11-04 00:06:44 +01:00
Kristian S. Stangeland
a9fe6afa01
Divide names output into pages instead.
2012-11-03 09:27:20 +01:00
Kristian S. Stangeland
626dea07fa
Move range parser out of CommandPacket. Make a common command base.
2012-11-03 08:51:03 +01:00
Kristian S. Stangeland
188f03b39e
Fixed the columns slightly. Still needs tweaking.
2012-11-03 07:32:14 +01:00
Kristian S. Stangeland
da0d55fcea
Improve the names command.
2012-11-03 07:16:20 +01:00
Kristian S. Stangeland
f2e078ce6a
Print strings with quotation marks.
2012-11-03 06:59:47 +01:00
Kristian S. Stangeland
72bfa3da9b
Adding the names sub-command.
2012-11-03 06:54:31 +01:00
Kristian S. Stangeland
27104c7350
Accept zero as a packet ID in the packet command.
2012-11-03 06:51:37 +01:00
Kristian S. Stangeland
263d085590
Always create vanilla packets in the packet constructor.
2012-11-03 06:48:58 +01:00
Kristian S. Stangeland
f16581cdf4
Massive update.
2012-11-03 06:41:29 +01:00
Kristian S. Stangeland
413eb283a4
Fix handling of configuration.
2012-11-03 00:54:03 +01:00
Kristian S. Stangeland
7952da99c9
Added configuration and commands.
...
The two commands added are as follows:
protocol:
Reload the configuration, check for updates and download the
most recent version.
packet:
Add or remove a simple packet inspector. Can even display the
content of each packet.
2012-11-03 00:38:57 +01:00
Kristian S. Stangeland
3d0dce7e8d
Make the update class easier to work with.
2012-11-02 18:55:23 +01:00
Kristian S. Stangeland
4328072f49
Created a default maven resources folder.
2012-11-02 17:47:33 +01:00
Kristian S. Stangeland
22aab024c2
Add a couple of permissions and commands.
2012-11-02 17:35:41 +01:00
Kristian S. Stangeland
18ec9bc973
Adding h31ix's auto update system.
2012-11-02 17:22:42 +01:00
Kristian S. Stangeland
2c00b570aa
Increase default packet timeout to 30 minutes.
2012-11-02 16:58:56 +01:00
Kristian S. Stangeland
5ac15f11dc
Drop expired packets in the processing chain.
2012-11-02 01:18:38 +01:00
Kristian S. Stangeland
cda235af7e
Increment the default async timeout to 2 minutes.
2012-11-02 01:03:12 +01:00
Kristian S. Stangeland
51184dd209
Ensure getEntityModifier is thread safe. FIXES Ticket-6.
...
Don't use the world's getPlayers-method, as it's enumerating a
collection that's not thread safe. This is important as
getEntityModifier may be called by a client packet listener (which is
async).
2012-11-02 00:35:35 +01:00
Kristian S. Stangeland
aa9616d6b0
Don't check for closed sockets. If it talks like a duck, ect.
2012-10-31 00:52:02 +01:00
Kristian S. Stangeland
ae08abe821
Remove PrimitiveUtils - it's already present in Bukkit's Guava library.
2012-10-29 22:15:25 +01:00
Kristian S. Stangeland
d54cc35445
Updated to 1.5.1-SNAPSHOT for development of the next version.
2012-10-29 22:05:55 +01:00
Kristian S. Stangeland
0dc2bfef0c
Handle exceptions in injected code.
...
This is very important, otherwise the server may crash unnecessarily.
2012-10-29 17:20:04 +01:00
Kristian S. Stangeland
f9c0f212c1
Put UnsupportedListener at the package level.
2012-10-29 16:57:07 +01:00
Kristian S. Stangeland
cbf4def71b
Prevented map chunk listeners from crashing the server.
...
If the NetServerHandler injector fails and we revert to the network
field injector instead, any map chunk listener will crash the server
due to complications with Bukkit's ChunkCompressionThread.
We avoid this by disabling map chunk listening entirely.
2012-10-29 16:54:53 +01:00
Kristian S. Stangeland
8636215b98
Add a couple of extra error handlers.
2012-10-29 04:21:12 +01:00
Kristian S. Stangeland
2239c1ea32
Add a better error reporter.
2012-10-29 04:17:53 +01:00
Kristian S. Stangeland
5e036185b8
Removed DEBUG message.
2012-10-29 02:39:05 +01:00
Kristian S. Stangeland
03da0e1974
Increment to 1.5.0 Release
2012-10-29 02:37:10 +01:00
Kristian S. Stangeland
dfba924561
Clean up every static field, preempting potential ClassLoader leaks.
...
Note that this method is using some fairly ugly hacks and must be
maintained/updated manually whenever a new class is added or removed.
2012-10-29 02:25:29 +01:00
Kristian S. Stangeland
bdc41221db
Fixed a serious misuse causing the creation of too many new classes.
...
The different injectors using CGLib was using a custom CallbackFilter
to optimize the resulting generated class. Unfortunately, the custom
filter didn't properly implement equals() and hashCode(), and so every
time a player logged, a new injector class had to be generated.
This was fixed by making the injectors share a single CallbackFilter.
In addition, I've begun adding cleanup code that will reset all static
fields once the plugin has unloaded.
2012-10-29 01:42:22 +01:00
Kristian S. Stangeland
eaf0b73c00
Increment version to 1.4.4-SNAPSHOT (skipping release of 1.4.3)
2012-10-28 06:10:31 +01:00
Kristian S. Stangeland
cb2c7b4e0a
Use a class cache when constructing the packet interceptor.
2012-10-28 06:09:29 +01:00
Kristian S. Stangeland
4e9b5009c8
Don't print messages to the console without a plugin prefix.
...
It's bad practice.
2012-10-23 00:54:41 +02:00
Kristian S. Stangeland
7536815e58
Set as SNAPSHOT in the plugin-file as well.
2012-10-23 00:41:53 +02:00
Kristian S. Stangeland
96ad954cf7
Prevent the PlayerQuitEvent from being fired twice. FIXES Ticket-2.
2012-10-23 00:37:35 +02:00
Kristian S. Stangeland
0aac8ebf0a
Increment to 1.4.3 snapshot.
2012-10-21 22:40:26 +02:00
Kristian S. Stangeland
a60dc3d778
Make the client packet reader thread-safe.
2012-10-21 22:39:56 +02:00
Kristian S. Stangeland
01c481dc93
Release of 1.4.2
2012-10-21 20:42:29 +02:00
Kristian S. Stangeland
a51ad1f50f
Properly remove previous hook, even if socket is NULL. FIXES Ticket-1.
2012-10-21 20:31:20 +02:00
Kristian S. Stangeland
c08106a923
Increment to 1.4.2 snapshot.
2012-10-21 16:33:52 +02:00
Kristian S. Stangeland
63c468eff0
Packet constructor can now handle primitive parameter types.
2012-10-21 16:33:41 +02:00
Kristian S. Stangeland
43c0b5d8f1
Don't save NULL injectors in a ConcurrentHashMap.
2012-10-21 12:11:59 +02:00
Kristian S. Stangeland
331fc94190
Sending or receiving packets now work without listeners.
2012-10-19 16:27:49 +02:00
Kristian S. Stangeland
caed0dcb11
Removed the spammy "Entity does not exist" error.
2012-10-19 00:54:03 +02:00
Kristian S. Stangeland
90f2caa5e8
Incremented to 1.4.1
2012-10-17 09:54:28 +02:00
Kristian S. Stangeland
69a5675161
Fixed a bug causing a StackOverflowException on packet construction.
2012-10-17 09:53:59 +02:00
Kristian S. Stangeland
d5028b584d
Put the provided CGLib dependency in the com.comphenix namespace.
2012-10-17 06:57:05 +02:00
Kristian S. Stangeland
2b6a4570ab
Added a couple of extra constructors.
2012-10-17 05:58:47 +02:00
Kristian S. Stangeland
4717cca2ec
Increment to 1.4.0.
2012-10-17 05:32:46 +02:00
Kristian S. Stangeland
dd5303ea88
Use a boolean lookup table instead of a ConcurrentHashMap.
2012-10-17 04:13:25 +02:00
Kristian S. Stangeland
fee9a32e4b
Store a current player injection hook for each game phase.
...
That way, one failing the other won't cause any problems.
2012-10-17 03:33:49 +02:00
Kristian S. Stangeland
3a8a4d15cf
Fixed a couple of small bugs.
2012-10-17 01:19:06 +02:00
Kristian S. Stangeland
4cd5d04cae
Wait 5 seconds before unhooking every player in the server.
2012-10-17 00:46:51 +02:00
Kristian S. Stangeland
476a918794
Dynamically add or remove injected hooks depending on the listeners.
...
This occurs whenever a listener is added or removed. A listener can
now specify whether or not it's listening for packets sent BEFORE
a player has logged in (every packet upto Packet1Login and a few more),
or AFTER. By default, listeners only receive notifcation of packets
sent and received after.
ProtocolLib will now only hook NetLoginHandler if there's a login
listener, and vice versa. Thus, the new login feature will only
tax the server if another plugin is using it. In addition, ProtocolLib
will not consume any resources when it's not serving any listeners.
2012-10-16 22:24:30 +02:00
Kristian S. Stangeland
ecdc9b4b6c
Let's be generous and clean up the injection before the other plugins.
2012-10-16 17:01:34 +02:00
Kristian S. Stangeland
94efb38324
Retrieve the updated player entity as fast as we can.
2012-10-16 16:42:27 +02:00
Kristian S. Stangeland
09348343dd
NetLoginInjector should not be public.
2012-10-16 08:01:04 +02:00
Kristian S. Stangeland
d88f507337
Removed debug listener.
2012-10-16 07:59:03 +02:00
Kristian S. Stangeland
b52670c4b3
Switching to overriding an ArrayList directly.
...
This makes the injection code compatible with earlier versions of
Minecraft (even 1.0.0).
2012-10-16 07:58:30 +02:00
Kristian S. Stangeland
93468b53b3
Massive update that adds support for intercepting packets during login.
...
This is achieved by injecting the NetLoginHandler when it's added
to the DedicatedServerConnectionThread's list of current login handlers.
PacketEvents during this phase uses "fake" Player objects that only
support a subset of methods. Consumers can expect the following methods
to be functional:
* getPlayer()
* getAddress()
* getServer()
* chat(String)
* sendMessage(String)
* sendMessage(String[])
* kickPlayer(String)
A "fake" Player object can be converted to its real counterpart by
calling getPlayer().
2012-10-16 07:28:54 +02:00
Kristian S. Stangeland
9b4b161602
First test of the pre-login injector.
2012-10-15 00:31:55 +02:00
Kristian S. Stangeland
39805c5502
Incremented version to 1.3.3
2012-10-13 22:19:07 +02:00
Kristian S. Stangeland
98ae5c6e29
Added a monitor every packet listener.
2012-10-13 22:19:01 +02:00
Kristian S. Stangeland
51c5a23c83
Switching to the "repo" virtual website instead.
2012-10-13 17:19:45 +02:00
Kristian S. Stangeland
61cd8a3ae4
Using a self-hosted repository for now.
2012-10-12 04:09:38 +02:00
Kristian S. Stangeland
fe3a69bd3d
Switching from UTF-8 to cp1252.
2012-10-12 00:49:47 +02:00
Kristian S. Stangeland
8e70a56768
CGlib must be in the compile scope, otherwise it's not included.
...
In addition, updated the README with information about Maven.
2012-10-12 00:24:15 +02:00
Kristian S. Stangeland
28fc096740
Bumping to version 1.3.2
2012-10-12 00:04:59 +02:00
Kristian S. Stangeland
129687772f
Mark CraftBukkit and cglib as provided.
...
CraftBukkit, or just Bukkit, will already be a dependecy for any
plugin. CGlib will be provided by ProtocolLib, so that's not needed
either.
2012-10-12 00:04:05 +02:00
Kristian S. Stangeland
768d169f27
Added the same NULL check to the generic Bukkit unwrapper.
2012-10-12 00:01:05 +02:00
Kristian S. Stangeland
57add8e26f
Handling the case where someone is writing a NULL element to
...
a equivalent converter.
2012-10-11 23:57:45 +02:00