Commit Graph

869 Commits

Author SHA1 Message Date
Tux
88e71ead05 Add reset() and retain() methods to ComponentBuilder.
This method is simple: it resets the current part to default settings, keeping only the current text. It therefore acts like the old ChatColor.RESET
code. The retain method allows for more control over what is reset.

Add a test to verify proper functioning of reset()/retain().
2015-05-06 09:57:48 +01:00
md_5
d1e1ce4cdb Add option to disable native code. 2015-05-03 10:35:48 +10:00
md_5
fa828eba31 Allow using properties to change leak detection level. 2015-04-13 09:51:31 +10:00
Thinkofdeath
a48c458306 Don't send bungeecord plugin messages to the client 2015-04-08 18:22:16 +01:00
Thinkofdeath
f2d17cb216 Follow vanilla and kick the joining user on connect if the name is already taken (Fixes #1383) 2015-02-28 13:07:13 +00:00
md_5
f2673c5876 Kick only in online mode: #1382 2015-02-28 13:00:04 +11:00
Thinkofdeath
e1951c5d66 Fix spectator mode with ip-forwarding enabled 2015-02-25 22:31:05 +00:00
Thinkofdeath
988490ba87 1.8 isn't a snapshot anymore 2015-02-25 22:27:50 +00:00
md_5
61cee2d27c Fix formatting in a bunch of files. 2015-02-14 18:36:58 +11:00
md_5
2055c98ebe Add reason for stopping and extra arguments. 2015-02-14 18:33:49 +11:00
Joshua Rodriguez
415d5860e4 Allow setting a connections uuid when in offline mode 2015-02-14 18:33:28 +11:00
md_5
3776feb559 Don't allow duplicate UUIDs on the proxy. 2015-02-14 18:26:27 +11:00
md_5
7c1f232e85 Update depend versions, limit use of most Java 1.7 APIs. 2015-02-08 13:07:41 +11:00
md_5
0d569ac0d1 Refactor native code and implement our own JNI wrapper around zlib.
The previous native cipher code has been refactored so that it may be loaded and used slightly more generically, allowing more native components to be easily added as time goes on.
I have also written a new native code compression module, which wraps around zlib in the same manner that Inflater / Deflater does, however it operates directly on the memory addresses of it's input / output buffers which means that we can save one, or maybe even two copies. To support this, the VarInt decoder has been adjusted to always use a native buffer.
2015-02-07 14:06:41 +11:00
md_5
61d2765715 Only check name for server reload modification. 2015-01-24 13:34:38 +11:00
md_5
cf722de1d2 #1130: Add scheduler unit tests and make more robust. 2015-01-18 12:09:38 +11:00
Daniel Naylor
28496e0471 Add API for getting whether the user is a Forge user.
For Minecraft+Forge 1.8 we can detect whether the user is a Forge user before we get the mod list, due to the changes to the initial (not FML|HS) handshake that are now made (which is for vanilla client support). Bungee can exploit this to detect FML clients from the off, but it still does not tell us what the mod list is. Thus, creating this API method for users who simply need to know whether the user is connected via FML is no longer a duplication of the getModList api method.
2015-01-12 19:23:07 +11:00
Daniel Naylor
4809f1f80a Update IP forwarding to ignore FML and other null character delimited tokens (for now)
For Forge 1.8, a new \0FML\0 token is included in the handshake packet host field. Whilst from a Forge <-> Bungee standpoint, this is good in the long run (we can detect Forge/FML clients right from the off, allowing us to expose a reliable API for detecting modded 1.8+ clients), it plays havoc with IP forwarding on Spigot servers, as they expect a very specific format.

Until we can look at improving this situation (probably by creating an updated IP forwarding protocol on the server side), this removes the FML marker from the handshake whenever IP forwarding is on. If you have a FML 1.8 network, IP forwarding MUST be off.

With thanks to @geNAZt for finding the issue.
2015-01-12 19:23:07 +11:00
xxyy
5091515f0b Add TabCompleteResponseEvent 2015-01-12 11:53:28 +11:00
mrapple
54c9ade1a6 Move mojang translations to chat module, fixes SpigotMC/BungeeCord#1301 2014-12-23 19:23:24 +11:00
md_5
1711223b02 Use string lists in preference to string arrays. 2014-12-22 19:59:14 +11:00
Tux
972b4c1fe5 Further fix task clean up issues by moving the BungeeScheduler's cancel(ScheduledTask) method to just call the cancel() method on the task. The cancel call was moved to BungeeTask's cancel method.
This patch makes the patch transparent to existing callers using cancel(ScheduledTask) from the scheduler. It also simplifies some logic in BungeeTask itself.
2014-12-14 17:18:49 +11:00
Tux
36c4af35de Fix issues cleaning up after repeating tasks.
A mass of NullPointerExceptions would be outputted when tasks were stopped. This is resolved by checking if we are still running (indicating a possible scheduler cancel) before telling the scheduler to pull the plug.

Ideally, the entire BungeeCord scheduler should be rewritten. It has quite a few issues which could be avoided with a new system.
2014-12-14 17:18:49 +11:00
md_5
02d3660f32 Fix fancy terminal on Windows.
This is a workaround for quite possibly the weirdest bug I have ever encountered in my life! When jansi attempts to extract its natives, by default it tries to extract a specific version, using the loading class's implementation version. Normally this works completely fine, however when on Windows certain characters such as - and : can trigger special behaviour. Furthermore this behaviour only occurs in specific combinations due to the parsing done by jansi. For example test-test works fine, but test-test-test does not! In order to avoid this all together but still keep our versions the same as they were, we set the override property to the essentially garbage version BungeeCord. This version is only used when extracting the libraries to their temp folder.
2014-12-14 13:07:13 +11:00
md_5
37e37e9a55 Fix timestamp format.... 2014-12-13 11:53:03 +11:00
md_5
45bf7a9ab9 Move ansi console system install right into the bootstrap. 2014-12-13 11:13:40 +11:00
Thinkofdeath
ef364d9053 Actually put the tasks in the tasksByPlugin Multimap (Fixes #1278) 2014-11-26 16:42:45 +00:00
Minecrell
f19cc7fe4f Add chat position API. 2014-11-22 09:17:37 +11:00
Minecrell
772c8d7f2b Improve legacy client ping support. 2014-11-15 10:18:40 +00:00
Thinkofdeath
830f18a357 Manually remove the player from everyone's tab list on disconnect
This is needed because when the player disconnects from bungee they are removed from the connection map, this causes the tab-list rewrite to fail due the player no longer being on bungee and therefor it ends up not removing the player (online vs offline uuid). This would only happen on servers without ip-forwarding enabled
2014-11-11 10:33:22 +00:00
md_5
532a94382b Block really wrong offline mode names, see #1270 2014-11-08 10:04:59 +11:00
md_5
56c372a3ce Fix HTTP client now that Mojang has their stuff together. 2014-11-08 10:02:48 +11:00
Daniel Naylor
4d389df7c8 Be more selective when sending reset packets.
Always send the packet when going from modded -> anything, send the packet later when going from vanilla -> modded, never send it on a vanilla -> vanilla switch.
2014-10-17 20:37:10 +11:00
Daniel Naylor
cfad2c65d4 Implement Support for MinecraftForge / FML 1.7.10
Additional implementation help provided by @jk-5 and @bloodmc.
2014-09-27 19:38:28 +10:00
md_5
8715c5fd82 Actually update translations to 1.8 2014-09-27 08:25:36 +10:00
md_5
cbb190cfd3 Fix a few import ordering issues. 2014-09-26 10:11:16 +10:00
md_5
57a07dc2e2 Update Depend Versions:
Guava 17.0 -> 18.0
Lombok 1.12.6 -> 1.14.8
Gson 2.2.4 -> 2.3
SnakeYaml 1.13 -> 1.14
2014-09-25 11:05:21 +10:00
Minecrell
6fcfb5aecb Add more message arguments. See #1214. 2014-09-25 10:53:41 +10:00
md_5
4e3b5670a0 [#1224] Add connect / read timeout for module download incase Jenkins is down. 2014-09-25 10:52:16 +10:00
md_5
ee3b209c2d Declare game version support as 1.8 2014-09-25 10:49:20 +10:00
md_5
25ee8a1496 Revert "Revert "Update Mojang translations to 1.8""
This reverts commit dd1a28ea1e.
2014-09-25 10:47:27 +10:00
md_5
dd1a28ea1e Revert "Update Mojang translations to 1.8"
This reverts commit 5ec36efb52.
2014-09-25 10:41:40 +10:00
md_5
3cd4f169bd [#1191] Stop getPermissions from creating blank groups. 2014-09-25 10:21:15 +10:00
md_5
5ec36efb52 Update Mojang translations to 1.8 2014-09-25 10:18:29 +10:00
md_5
dcc9be9dfe [#1218] Check which player instance we remove from the connection maps.
Legitimate but slightly sneaky fix for the issue of racing for addition / removal. An alternate fix would be a multimap.
2014-09-12 18:45:50 +10:00
Thinkofdeath
1623fb6952 Only update the dns cache on new lookups (Fixes #1221)
This causes the cached entry to be looked up every 5 minutes instead of the previous system where it was kept as long as it was used. This fixes an issue where after Mojang's session servers go down the ip address tends to change. This caused bungee to repeatedly hit the old (inactive) one which with the previous system would be re-cached every time someone tried to connect
2014-09-11 10:18:34 +01:00
Minecrell
4e353e9277 Add Title API. 2014-09-07 09:30:57 +01:00
Minecrell
d6b7157c1c Add player list header / footer API. 2014-09-07 09:26:52 +01:00
Steve Anton
bc48ab3fb8 Make ProxyPingEvent async 2014-09-07 12:03:55 +10:00
Thinkofdeath
65ae8b4c6a Correctly send the MC|Brand packet 2014-09-02 13:54:52 +01:00