Commit Graph

814 Commits

Author SHA1 Message Date
Kristian S. Stangeland
49eb39e45f Improve packet class lookup performance by mainaining a inverse map. 2013-07-04 01:12:39 +02:00
Kristian S. Stangeland
0ec2a705da Mark 1.6.1 as tested. Things seems to work now. 2013-07-02 17:42:51 +02:00
Kristian S. Stangeland
5e5243e3fb Update ProtocolLib for 1.6.1.
A lot of methods changed from accepting DataInputStream to DataInput, 
which messed with the part that dynamically finds the "readPacket" 
method. Changed to accepting any method whose signature contains a 
parameter derived from DataInput.
2013-07-02 17:41:43 +02:00
Kristian S. Stangeland
0b3fe5470a Added a plugin verifier test.
Attempting to solve a problem discovered by Silthus, but I need
more information.
2013-06-27 03:05:53 +02:00
Kristian S. Stangeland
ef4476a72e Print a warning message instead of crashing.
We shouldn't prevent a plugin from adding packet listeners just because
the plugin verifier failed.
2013-06-23 21:56:53 +02:00
Kristian S. Stangeland
8d0e8139de Add support for the Lilypad Bukkit Connector. FIXES Ticket-101 2013-06-23 21:38:35 +02:00
Kristian S. Stangeland
256581d4ed Incrementing to 2.4.6-SNAPSHOT 2013-06-23 21:35:00 +02:00
Kristian S. Stangeland
56b81281a8 Merge branch 'master' into gh-pages 2013-06-21 01:12:07 +02:00
Kristian S. Stangeland
f7aa146a94 Increment to 2.4.5 2013-06-21 00:46:16 +02:00
Kristian S. Stangeland
a797dba594 Fixed a memory leak on Spigot that would retain unloaded worlds. 2013-06-20 01:06:50 +02:00
Kristian S. Stangeland
2cce1bca0a Certain packets must be cloned. Document this. 2013-06-19 23:19:46 +02:00
Kristian S. Stangeland
8f2935e241 Minimize the number of unnecessary references. 2013-06-19 02:07:12 +02:00
Kristian S. Stangeland
e7954a0f79 Load JavaScript engine on demand. 2013-06-17 13:16:29 +02:00
Kristian S. Stangeland
169842f265 Ignore logged out players. 2013-06-14 03:52:31 +02:00
Kristian S. Stangeland
627c500de1 Added some debug information when a network manager lacks an address. 2013-06-01 01:32:24 +02:00
Kristian S. Stangeland
aa5e1beb7f Added the ability to suppress arbitrary warnings and errors. 2013-06-01 00:17:08 +02:00
Kristian S. Stangeland
77346f8438 Fixed incorrect detection of "custom" net handlers.
This should ensure that users on MCPC no longer recieves the 
REPORT_DETECTED_CUSTOM_SERVER_HANDLER warning just for using MCPC.
2013-05-31 22:57:00 +02:00
Kristian S. Stangeland
bbe766cf23 Bumping to 2.4.4-SNAPSHOT for development towards the next version 2013-05-31 22:51:36 +02:00
Kristian S. Stangeland
542105601b Updating JavaDoc for 2.4.3 2013-05-14 01:29:12 +02:00
Kristian S. Stangeland
7e20abdd37 Merge branch 'master' into gh-pages
Conflicts:
	ItemDisguise/.settings/org.eclipse.core.resources.prefs
2013-05-14 01:24:47 +02:00
Kristian S. Stangeland
9b8d61b2b0 Added small settings file in ItemDisguise 2013-05-14 01:19:22 +02:00
Kristian S. Stangeland
b613e8f01e Bumping to 2.4.3 2013-05-14 01:17:03 +02:00
Kristian S. Stangeland
02b5dec304 Permit cross edges when validating dependencies. FIXES 91. 2013-05-13 03:49:48 +02:00
Kristian S. Stangeland
6af440789c Invert the actual packet instance instead of a new instance.
In NetworkFieldInjector, we use a "inverted" packet class to undo the 
data received counter when a packet has been cancelled. 

Previously, we would generate a proxy class that inherits from the 
class of the packet (Packet3Chat, etc.) along with its size() method 
(which is called and added to the counter, cancelling the other packet),
but this doesn't work for packets that are dynamically sized such as
Packet255KickDisconnect. Instead, we now pass the actual instance to
 the proxy class through a weak hash map.
2013-05-07 23:11:41 +02:00
Kristian S. Stangeland
a2b04e055a Make it possible to cancel packets for asynchronous processing. 2013-05-06 18:57:19 +02:00
Kristian S. Stangeland
8d814d2d9c Implement "isOnline" for temporary players.
This corrects the issue seen on http://pastebin.com/C4D8jsja
2013-05-06 18:37:08 +02:00
Kristian S. Stangeland
0fc6396974 ProtocolLib seems to work fine for 1.5.2 too. 2013-05-05 23:55:02 +02:00
Kristian S. Stangeland
c813811721 No point verifying the load order for ProtocolLib.
Also removed a debug message.
2013-04-30 03:17:59 +02:00
Kristian S. Stangeland
8970cd915a Move the last update time stamp to a separate file. FIXES TICKET 86. 2013-04-29 16:39:37 +02:00
Kristian S. Stangeland
8964246e22 Makes more sense to put this in the reflect lookup. 2013-04-28 17:27:58 +02:00
Kristian
bec05967d3 Mark field as volatile. 2013-04-27 02:48:39 +02:00
Kristian
cecf80250c Don't print pointless warnings on Spigot. 2013-04-27 02:24:49 +02:00
Kristian
93da193428 Improve JavaDoc. 2013-04-27 01:03:20 +02:00
Kristian
40a3abf5b9 Refactor the report system. Allow identification of report messages.
All warnings and error messages will now be identified using fields in 
the sender classes, to avoid depending on the format of the error or 
warning messages directly. This decoupling will make it possible to 
filter out certain irrelevant messages.
2013-04-26 20:59:28 +02:00
Kristian S. Stangeland
7e18207a2b Load at startup to stay compatible with startup plugins.
Earlier versions of ProtocolLib would in fact load at startup, but due
to an experimental change (ffd920e5b2) -
where ProtocolLib injected code into DedicatedServerConnectionThread in
order to intercept pending connections - the load order had to be
set to world.

This injection was later removed, but the load order was never 
reinstated. This causes problems with plugins that load on startup, 
but also depend on ProtocolLib as load order trumpts dependency.

This change reintroduces startup load order.
2013-04-20 19:26:54 +02:00
Kristian S. Stangeland
b451a5a672 Adding a plugin verification system detecting common programmer errors
Initially we will detect plugins that attempt to register a listener in 
ProtocolLib without setting "depend" or "soft-depend".
2013-04-19 21:34:34 +02:00
Kristian S. Stangeland
5ca29ef5ce Leave ThreadDead alone!
The original intent of catching throwable is to "sandbox" arbitrary
plugin logic and prevent it from ever accidentally killing threads on
the server. A LinkageError due to a missing or old dependency shouldn't
bring down the server, so we secure it by catching all exceptions around
plugin event handlers.

Trouble is, this also catches exceptions such as OutOfMemoryError or
ThreadDead, which assuredly should NOT be caught. The latter case has
even occured in the wild as seen by ticket 45 of TagAPI on BukkitDev.
Minecraft may terminate the reader and writer thread by calling stop(),
and this could occur within the event handler in a plugin. So we should
let ThreadDead go and propagate it to the appropriate handler in
Minecraft.
2013-04-14 03:53:27 +02:00
Kristian S. Stangeland
37dd46432a Ignore these errors again. 2013-04-13 15:27:31 +02:00
Kristian S. Stangeland
cd78e311d5 Looks like Rhino is not guaranteed after all. Add some checks. 2013-04-13 14:20:35 +02:00
Kristian S. Stangeland
8a5ebb88e0 Added the ability to recover from engine incompatibilities. 2013-04-12 17:12:42 +02:00
Kristian S. Stangeland
2411d29822 Correctly reference v1_5_R2. 2013-04-12 05:09:05 +02:00
Kristian S. Stangeland
8e11a40662 Update unit test to 1.5.1 2013-04-11 22:51:44 +02:00
Kristian S. Stangeland
bda4474d62 Update packets to 1.5.1 2013-04-11 22:51:34 +02:00
Kristian S. Stangeland
95603d3fa2 Increment to 2.4.2-SNAPSHOT 2013-04-11 22:51:20 +02:00
Kristian S. Stangeland
e7be3be17f Increment to 2.4.1 2013-04-09 16:49:17 +02:00
Kristian S. Stangeland
72172805ba Exploit the internal JavaScript parser to determine if the exp is done.
The original code attempted to parse the JavaScript as it went along, 
counting open and close brackets. Unfortunately, this doesn't
take comments and string literals into consideration, so it would very
likely have failed with more complicated filters.

Instead, we'll let the JavaScript compiler handle all the complexity 
and simply see if the code compiles. If it doesn't, but the error 
occured in the last line, we assume it can be recovered by adding a 
new line.
2013-04-09 16:48:26 +02:00
Kristian S. Stangeland
da7a58fb43 Incrementing to 2.4.0.
This is due to the non-breaking API changes
in 505226f8ad
2013-04-09 15:11:43 +02:00
Kristian S. Stangeland
82bb7a7c43 Adding support for Spigot MCPC 1.2.5.
Very buggy indeed.
2013-04-08 21:53:54 +02:00
Kristian S. Stangeland
505226f8ad Added the ability to match derived classes and interfaces. 2013-04-08 17:57:56 +02:00
Kristian
867afe29f7 Minecraft 1.5.1 seems to work fine. 2013-04-07 15:57:38 +02:00