Commit Graph

1896 Commits

Author SHA1 Message Date
kamcio96
b6e26e0c09 Load NativeCode manually, not in constructor.
Bungee will call load method from main thread
https://github.com/SpigotMC/BungeeCord/blob/master/proxy/src/main/java/net/md_5/bungee/BungeeCord.java#L202
2015-11-19 08:42:01 +11:00
Joseph Hirschfeld
19f2e7b13e DNS IPs should only be cached for 1 minute. 2015-11-12 12:58:18 +11:00
xxyy
ba448b5670 Add configurable proxy command logging.
This commit adds a config switch that allows users to turn off
 the logging of proxy commands. It is set to off by default to
 prevent unwanted log spam and keep current behaviour.
Log proxy commands

This commit changes the PluginManager to print a message to
console and the log when a proxy command is executed.
This may assist with debugging and miscellaneous
investigations.
2015-10-26 20:59:53 +11:00
md_5
013320fd9e #1852: Fix packet compression when BungeeCord and the server are set to different compression levels. 2015-09-16 19:44:55 +10:00
md_5
8a1030e21c #1583: Two additions to console behaviour:
1) Stop trying to read anything if the console is hooked up to /dev/null
2) Don't even bother in the first place if --noconsole is used as an argument.
2015-09-16 15:09:40 +10:00
Thinkofdeath
c626254825 Only enable compression for 1.8 clients 2015-09-13 08:59:42 +01:00
md_5
4e94c278da [#1567] Let BungeeCord dictate the network compression threshold. 2015-09-13 09:29:39 +10:00
jfr
06ad0f9310 Reorder PlayerJoinEvent / UpstreamBridge initialization.
Placing the PlayerJoinEvent in front of the Upstream Bridge handling prevents us from actually accessing the target server in PostJoinEvent handlers.
2015-09-07 18:26:41 +10:00
md_5
c4a3a052d7 Update to Netty 4.0.31.Final 2015-09-06 12:11:41 +10:00
md_5
7ec1a1aa4e Fix / clarify behaviour of matchPlayer. 2015-09-05 13:42:33 +10:00
Tux
59208aad86 Improve EventBus by removing read locking.
This is primarily done by using ConcurrentHashMap, which has lock-free reads and thread-contention-based writes. Only one thread at a time can register threads, however, as baking events isn't thread safe (and there's no reason to make it thread-safe anyway).

My own benchmarks indicate 1.4-2.2 million operations/ms throughput and approximately ~1ns/event post for four threads posting events.
2015-09-05 13:33:18 +10:00
zml
bd07be8772
chat: Correct placeholder handling in translatable
This change makes TranslatableComponent still scan a
translation string for placeholders, even if the translation string
itself is being used (rather than a value found from the
ResourceBundle). This matches vanilla behavior and allows plugins that
use this system with serverside translations and other custom
translation systems to send output to the server console correctly.
2015-08-30 14:50:37 -07:00
pvmac2194
b3d15d53d6 Add <server> in the usage of /send
Just a small cosmetic fix that shows server owners that this argument exists.
2015-08-14 18:31:28 +10:00
Thinkofdeath
6343416c0c Update the PluginMessage packet to respect the protocol limit changes in 1.8 2015-07-16 23:07:30 +01:00
kamcio96
81d1c46a0d Support uuid in config.yml 2015-07-13 19:46:15 +10:00
md_5
6e5132f914 #1537: Allow /send <server> <server>.
If the first argument is a server, send all players from that server. Servers take priority in the case a player and server share a name.
2015-07-13 19:32:12 +10:00
Daniel Naylor
f3c14cf064 Fix telling newer 1.7 Forge clients that they are outdated. Fixes #1476
* Only check the version of FML if we are running Minecraft 1.7.10 - 1.8 clients are always valid.
* If the version of FML that is reported is 7.10.99.99 - report the Forge version instead.
2015-07-10 12:33:22 +10:00
Marc Baloup
a3a31fd2dd Correct handling of command's parameters for tab completion
Hi :)

There is some problem with TabExecutor and I think I found the problem.

Exemple :
/send <playerName|all|current> <targetServer>
When I write "/send " (with trailing space) and press Tab, I don't have any suggestion. But when I wrote the first character of an online player, it suggest all players which start with this same character (expected behavior)

The problem is the same when I wrote "/send marcbal " (with trailing space). When I press Tab key, I have "marcbal" suggested instead of servers suggestion. (the result is "/send marcbal marcbal"). But when i wrote the first character of a server name, it suggest all servers which start with this same character (expected behavior)

other exemple : there is 2 players online in the same server : me (marcbal) and marcbaleeee (for exemple)
when I wrote "/send marcbal " (with trailing space) and I press Tab key, I have the suggestion of the 2 player names.

I deduced that the onTabComplete() don't care about the trailing space of the command string (exemple : "/send marcbal ") and probably a problem when splitting (removing last trailing empty args), so, the onTabComplete method try to complete the first argument "marcbal" instead of the second empty argument.

To split the command line, you use the method Pattern.split(CharSequence) that remove trailing empty strings http://docs.oracle.com/javase/7/docs/api/java/util/regex/Pattern.html#split(java.lang.CharSequence)
So, we should use the other split() method, with a second argument which has to be a negative integer value. (see Javadoc)

PS : Sorry for my bad english x)
2015-07-10 12:28:26 +10:00
md_5
cc3a8c067e Check channel active before adding handlers. #1489 2015-06-06 18:41:54 +10:00
Joe
918d7229c2 Fix Deadlock in EventBus post #1493 2015-06-05 13:03:43 +10:00
sha-2
6c4e684de9 Move the compiler configuration to properties 2015-05-31 10:51:49 +10:00
minecraftshamrock
9cf57ca929 Fix AsyncEvent callback triggering.
Before this, two concurrent postCall() and completeIntent() calls might
cause the callback to be called more than once.
2015-05-18 20:22:32 +10:00
Adam
70564d9f44 Fix BaseComponent.duplicate() ignoring extra 2015-05-18 20:18:57 +10:00
Nathan Poirier
8622cf3af4 Fix BadPacketException handling It is catched by DecoderException and was not processed correctly by HandlerBoss So the console was spammed when that exception is thrown 2015-05-18 20:18:19 +10:00
Nick
5236dd301a Use an actual ArrayList when creating a TextComponent with extras.
Arrays#asList returns a java.util.Arrays.ArrayList which does not support adding more elements.  This previously broke BaseComponent#addExtra.
2015-05-18 20:16:45 +10:00
md_5
ddfd76ebda Make MinecraftDecoder a MessageToMessageDecoder 2015-05-18 20:16:12 +10:00
Thinkofdeath
93959cab4b Only force remove the player from 1.8 client's tab list 2015-05-10 22:51:14 +01:00
Thinkofdeath
585ab4f453 Readd the delay removed in f9773a69c3 2015-05-08 20:41:21 +01:00
Thinkofdeath
76052b92d3 Don't send a Kick during the STATUS protocol as it doesn't support it 2015-05-08 20:32:12 +01:00
Thinkofdeath
f9773a69c3 Don't send a kick to the server on disconnect
This was dropped from the protocol in 1.6 and was left in bungee by
mistake
2015-05-08 19:39:22 +01:00
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
d76c8d4f33 Ensure the copy is freed if an exception occurs during parsing packets 2015-04-12 01:47:10 +01:00
Thinkofdeath
a48c458306 Don't send bungeecord plugin messages to the client 2015-04-08 18:22:16 +01:00
portalBlock
3973c511f5 Show the no permission message even if the command is a TabExecutor but the command was not dispatched by the tab completer. 2015-03-22 13:54:05 +11:00
Jonas Konrad
78ea41015f Fix component deserialization on obfuscated and strikethrough tags 2015-03-16 20:24:37 +11:00
Thinkofdeath
bd2eaf6879 Add missing scoreboard positions (Fixes #1397) 2015-03-12 16:42:01 +00: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
62981e4c70 Downgrade netty to work around #1372 2015-02-15 10:27:30 +11:00
md_5
5699e86270 Looks like Jenkins may be having lombok issues with the new version. 2015-02-14 19:09:19 +11: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
Jonas Konrad
668cdabdf7 Fix BaseComponent.toString stack overflow 2015-02-14 18:21:43 +11:00
md_5
3e26eecd4e Fix formatting issue pointed out in #1370 2015-02-14 18:21:24 +11:00