Commit Graph

432 Commits

Author SHA1 Message Date
md_5
16d261553c Minecraft 1.12-pre2 Support 2017-05-14 12:00:00 +10:00
Gabscap
ea6680281f Allow cancelling LoginEvents with component reasons.
Ultimately this PR was selected as it better matched the existing code in terms of using lombok and not adding incomplete interfacing.
If for some reason a common interface is required, this can be implemented later.

Thanks to yawkat also for the PR in #1336 -- it was difficult for the merger to compromise between this and #1957
2016-12-01 10:12:54 +11:00
md_5
9ecdde2292 Add support for Minecraft 1.11
Improve QueryHandler session handling as suggested by IchBinJoe
2016-11-15 02:40:46 +11:00
md_5
1ad81564ad Fix Javadoc in Plugin#init 2016-11-06 11:51:52 +11:00
md_5
d6772cf1e4 #1933: Exclude favicon from ServerPing#toString 2016-08-13 14:24:50 +10:00
Cory Ory
b5121db886 Exclude data from PluginMessageEvent.toString 2016-07-18 13:33:48 +10:00
md_5
e3869fea18 #1893: Alter definition of slow event 2016-06-20 20:05:07 +10:00
md_5
6f6cb58d8b Make warning message better... 2016-06-20 09:25:29 +10:00
PunKeel
3fe72154a3 Fix slow event detection
Time moves forward, so the second call to nanoTime returns a bigger number than
the first one, giving a negative elapsed time … defeating the whole purpose of
this code. :-(
2016-06-20 08:46:53 +10:00
md_5
e4cf010bda Update to Minecraft 1.10 2016-06-09 11:44:06 +10:00
md_5
80b3135a93 Fix formatting 2016-04-24 22:31:04 +10:00
md_5
f53e66e2c0 Check all plugins have a name and main. 2016-03-12 12:00:56 +11:00
Joshua Küpper
0294fc5f20 Manually add the setDescriptionComponent(BaseComponent)
Lombok won't generate because of the overloading of setDescription(String).
2016-03-02 16:06:49 +00:00
Thinkofdeath
7926230682 #1765: Fix ServerInfo.ping to handle chat components. 2016-03-01 12:38:19 +11:00
md_5
05de455a9c Update to Minecraft 1.9 2016-03-01 09:31:12 +11:00
md_5
219819b738 Replace default/fallback servers with a server priority list. 2016-03-01 09:31:12 +11:00
md_5
e556fd7150 Add Connection.isConnected()Z API.
Idea from kamcio96 in #1693
2016-02-05 10:09:47 +11:00
md_5
1182affa09 Rewrite host parsing to account for IPv6. 2016-01-14 09:52:16 +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
7ec1a1aa4e Fix / clarify behaviour of matchPlayer. 2015-09-05 13:42:33 +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
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
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
Thinkofdeath
bd2eaf6879 Add missing scoreboard positions (Fixes #1397) 2015-03-12 16:42:01 +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
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
xxyy
5091515f0b Add TabCompleteResponseEvent 2015-01-12 11:53:28 +11:00
md_5
52b75cd18b Don't nuke command on tab complete if no args specified. 2015-01-12 11:07:43 +11: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
elmo92
c21275b877 Don't send no permission message on tab completion.
Instead returns the empty completions.
2014-11-08 10:08:42 +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
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
md_5
0a0146b68a [#1219] Fix Title#reset javadoc link 2014-09-25 10:30:52 +10:00
md_5
ca2227bad4 [#1212] Clarify Javadoc of ServerConnectEvent 2014-09-25 10:23:52 +10: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
md_5
2cec5f344a Update versions to 1.8... oops 2014-09-01 16:56:03 +10:00
md_5
faa284c8fc Move chat API into own submodule. 2014-08-31 18:56:03 +10:00
Thinkofdeath
26521cf2ff Add support for Minecraft 1.8.x
This commit allows BungeeCord to support Minecraft clients both of versions 1.7.x and of 1.8.x. There should be no breakages to any other support, however following their deprecation and uselessness within 1.8, the Tab list APIs have been removed.

Please report any issues to GitHub and be sure to mention client, server and BungeeCord versions.

When used with an appropriate server jar (such as multi protocol Spigot), this will allow clients of many versions to concurrently be connected to the same set of servers.
2014-08-31 09:03:12 +01:00
md_5
19b48672af Fix longstanding forward typo 2014-08-31 10:13:50 +10:00
md_5
87797ef719 Fix slight JavaDoc formatting issue. 2014-08-31 09:27:59 +10:00
Thinkofdeath
e573f7b89c Correct toLegacyText the same way toPlainText was previously 2014-08-17 18:50:28 +01:00
Minecrell
664c66fb97 Ignore unknown entries in plugin description files.
Fixes #955.
2014-08-17 19:58:15 +10:00
Tux
5e0aa2e60d Finalize the ServerDisconnectEvent target field.
There is no good reason for it to be mutable in the first place, considering that the event instance is not used after the method is called.
2014-08-17 09:34:06 +10:00
md_5
3188d946b3 Fix javadoc 2014-08-04 16:15:46 +10:00
md_5
ee3efd75d7 Change a few aspects from last PR 2014-08-03 18:12:44 +10:00
Jonas Konrad
b544bb34cb Add ServerInfo method to send plugin message only if server is online 2014-08-03 18:10:38 +10:00
Thinkofdeath
74f5ffd08b Duplicate any extra components when duplicated 2014-07-25 13:22:58 +01:00
Joshua Küpper
9fc862cb74 Make ComponentBuilder clonable 2014-07-25 13:22:54 +01:00
md_5
0d174b51c5 Clarify PreLoginEvent 2014-07-22 20:27:46 +10:00
md_5
1b18e64fb2 Handle objective value changes. Although the client *shouldn't* be using this for any sort of keying, it may indeed be. Closes #1116 awaiting testing. 2014-07-22 20:24:38 +10:00
md_5
949f150ea0 Fix some out of style formatting. 2014-07-12 19:50:56 +10:00
Thinkofdeath
02e219262a Fix TranslatableComponent's handling of missing translations 2014-07-12 10:34:24 +01:00
Thinkofdeath
a0e8b172ef Restrict access to some internal methods. 2014-07-12 19:33:04 +10:00
md_5
215b70dcd7 Fix some more things picked up by static analysis. 2014-07-12 19:30:00 +10:00
md_5
705b554b3b Add basis of grouped thread factory and make the scheduler use it. 2014-07-10 11:18:42 +10:00
md_5
8ce26e0370 Pass plugin into executor getter for future proofing 2014-07-08 15:53:25 +10:00
md_5
5d1b660e32 Implement Security Manager
This commit adds the basis for the intergration of a security manager into BungeeCord. The goal of the security manager is to prevent plugins from doing potentially dangerous or otherwise undesirable behaviour that may damage the stability of Bungee itself or pose a risk to the user's server.

One common theme in some Bungee plugins, especially those which were written in the very early days, is using Threads and ExecutorServices for scheduling purposes. Not only is this inefficient as there is no use of the thread caching features provided by the scheduler, it is also difficult to track who created which thread. Additionally creating threads not managed by the BungeeCord scheduler poses issues for when|if a plugin reload system is implemented, as these threads cannot be appropriately cleaned up and may continue to leak class references or perhaps even continue executing.

At this stage the SecurityManager is set to warn of prohibited actions, but not block them. For some plugins using external APIs, where usage of an ExecutorService is unavoidable, we have included an Unsafe interface to the scheduler which allows direct access to the underlying ExecutorService, or potentially a compatability wrapper.
2014-07-08 15:22:26 +10:00
Jonas Konrad
afa37505c5 Fix javadocs for java 8 doclint 2014-06-28 09:05:50 +10:00
md_5
81d83bdd8a Calling parent logger seems to work nowadays - closes #1071 2014-06-24 18:21:13 +10:00
md_5
e54388a5e0 Add matchPlayer API 2014-06-23 17:26:30 +10:00
maciekmm
4d1f0cbb26 Added getKickedFrom() to ServerKickEvent. 2014-06-22 17:11:27 +10:00
Moehritz
1a7efeabc4 Fix unregisterCommand(s) - second try 2014-06-20 19:43:36 +10:00
xxyy
107d6b011d Fix ServerPing NPE w/ String favicons
Currently, passing a null favicon String to the ServerPing(Protocol, Players, String, String) constructor causes a NPE. However, passing a null `Favicon` object to the corresponding constructor does not cause one. Setting the favicon String using the setFavicon(String) method doesn't cause a NPE either.

Therefore, the NPE thrown by the constructor is inconsistent and should be avoided. Please find a sample NPE here: http://newpaste.md-5.net/pmtqjc8vl (Note the `null` favicon)

This PR changes the documented (unintended?) behaviour by adding a null check before passing the favicon String to the alternative `Favicon` object constructor. This makes the constructor consistent with the other one and the `setFavicon(String)` method. This also adds compatibility for old (made before Favicon API) plugins passing `null` favicon Strings (and expecting no favicon to be displayed instead of a NPE).

Thanks!
2014-06-11 16:09:20 +10:00
md_5
91989564e5 Add method to get player's locale 2014-06-11 16:03:10 +10:00
Thinkofdeath
3c938c03c7 Fix BaseComponent calling the wrong method when inheriting from another BaseComponent (Fixes #1049) 2014-06-08 13:07:42 +01:00
md_5
00db351dd6 Deprecate tab list API - it will be removed in Minecraft 1.8 as the updates by Mojang render it useless. 2014-05-25 09:19:34 +10:00
Jonas Konrad
2af8dac70c Pull up getFaviconObject to the API 2014-05-03 17:29:48 +10:00
Thinkofdeath
6775b9230c Update Team packet's field names. unknown -> nameTagVisibility, unknown2 -> color 2014-04-16 14:46:48 +01:00
md_5
5a638f2290 Enable 14w11 support, changing servers is a bit iffy though due to EntityMap not being complete. 2014-04-16 11:01:41 +10:00
md_5
3715756be7 Update packets for MINECRAFT_14_11_a 2014-04-16 10:48:40 +10:00
Jonas Konrad
994a996981 Fix NPE while encoding when favicon was missing 2014-04-15 20:17:26 +10:00
Jonas Konrad
e2eba52162 Revert "Revert "Implement Favicon API""
This reverts commit 13decac4b9.
2014-04-15 20:17:26 +10:00
md_5
13decac4b9 Revert "Implement Favicon API"
This reverts commit 18316eb5f8.
2014-04-15 15:08:12 +10:00
md_5
7ebe5184a4 Clarify favicon.create javadoc 2014-04-15 11:11:11 +10:00
Keir Nellyer
a642346a2c Add method to get a connected player via their UUID 2014-04-15 11:07:17 +10:00
Jonas Konrad
18316eb5f8 Implement Favicon API 2014-04-15 11:05:20 +10:00
md_5
66a70fef5b Add #983 - disabled commands for players only. 2014-04-14 16:24:16 +10:00
md_5
dc2da29c16 Code format. 2014-04-13 14:15:41 +10:00
Thinkofdeath
bf9521472b Support setting uuid's on ServerPing.PlayerInfo + fix plugins which don't provide a valid uuid. 2014-04-09 20:26:07 +01:00
Keir Nellyer
13848def72 Return a Users UUID as a UUID object whilst keeping support for returning as a String 2014-04-04 21:35:07 +11:00
Keir Nellyer
a4dd0dba88 Allow 'softdepends' in plugin description 2014-04-01 19:55:59 +11:00
Jonas Konrad
5ae2e24c84 Fix uppercase color codes 2014-03-15 20:19:48 +01:00
Jonas Konrad
c29676e4fc Fix NPE when converting invalid color character from legacy text 2014-03-15 19:56:19 +01:00
Jonas Konrad
92ebce2ec6 Add TabCompleteEvent 2014-03-14 20:51:47 +11:00
kamcio96
9cd7c1ac03 Add ProxyReloadEvent 2014-03-14 20:49:45 +11:00
md_5
8502ab54c0 Revert "Fix #872 - use default server if forced host not found, OR force default is set."
This reverts commit 1fb7a3bf1d.
2014-03-14 19:27:51 +11:00
md_5
3301c95066 Revert "Rejig forced hosts some more - closes #927"
This reverts commit 72cadac76e.
2014-03-14 19:27:46 +11:00
md_5
72cadac76e Rejig forced hosts some more - closes #927 2014-03-13 13:32:48 +11:00
md_5
1fb7a3bf1d Fix #872 - use default server if forced host not found, OR force default is set. 2014-03-10 11:23:26 +11:00
md_5
4a7f8015e5 Close #918 - use case insensitive lookup for Yaml locations 2014-03-10 11:04:46 +11:00
Thinkofdeath
38f12840ca Correct component loop detector 2014-02-21 20:56:10 +00:00
Thinkofdeath
941450b4e4 Detect component loops 2014-02-21 10:13:40 +00:00
Fabian Fassbender
4faf507ad9 Added getPermissions() to the CommandSender API to get a unmodifiable Collection of all Permissions. The ConsoleSender returns an empty Set where as the UserConnection gives its real Permissions. 2014-02-08 14:17:01 +01:00
md_5
1f1cdb47e4 Search for bungee.yml and then plugin.yml for Bungee plugins. 2014-02-02 12:22:25 +11:00
md_5
b2f517fa63 Implement dual protocol version support. 2014-01-27 11:26:27 +11:00
Thinkofdeath
5c12f900b3 Correct the extra check 2014-01-26 01:12:55 +00:00
Thinkofdeath
6641d199b3 Move the extra check out of hasFormatting 2014-01-26 00:41:13 +00:00
Thinkofdeath
83b0229277 Fix formatting leaking through components when arrays are used + cases where component's extra wouldn't serialize 2014-01-26 00:37:33 +00:00
md_5
aa91354666 Make sure plugin onLoad is really called onLoad. This fixes regression #822 from when we implemented plugin depends. 2014-01-22 12:07:16 +11:00
md_5
f1b329bf21 Finish implementing modules. If anyone wants to test... be my guest. 2014-01-14 13:13:27 +11:00
Thinkofdeath
d4e4796739 Remove pointless Getter annotations 2014-01-13 19:48:49 +00:00
md_5
7483b4d276 Shuffle some internal stuff to API so that modules will compile 2014-01-10 09:58:31 +11:00
Joey Sacchini
cb4f70ecc7 Fix null pointer in depend resolution. This closes issue #515. 2014-01-07 14:34:07 +11:00
md_5
80caa2b669 Code format :( 2014-01-03 19:52:35 +11:00
Thinkofdeath
b0a8371570 Fix client crash when an empty message is sent using TextComponent.fromLegacyText 2014-01-02 15:39:38 +00:00
YoshiGenius
0ff1f4724a Add new lines 2013-12-23 08:45:48 +11:00
YoshiGenius
1baba3cd7d Fix javadoc - spelling and details 2013-12-22 13:05:45 +11:00
md_5
075518b643 Implement a connect callback - see #760 2013-12-21 13:11:27 +11:00
thinkofdeath
0dcba749dc Merge pull request #748 from thinkofdeath/master
Chat Component API
2013-12-14 02:31:42 -08:00
Thinkofdeath
00ac965d42 Remove class Getter annotation 2013-12-14 10:16:58 +00:00
md-5
32c6ab710a Delay is not in milliseconds, its in the TimeUnit 2013-12-13 12:46:52 +11:00
Thinkofdeath
5d68b422e5 Add ComponentBuilder + make events final
An example of ComponentBuilder usage can be found at CommandAlertRaw
2013-12-10 11:50:34 +00:00
Thinkofdeath
4ef15ae764 Fixed TranslatableComponents missing the end of the translated text 2013-12-08 00:47:45 +00:00
Thinkofdeath
3f9ca85831 Add missing documentation 2013-12-07 23:35:43 +00:00
Thinkofdeath
c17fa03ccd Remove string methods from HoverEvent. TextComponents will become strings if formatting isn't used 2013-12-07 15:10:08 +00:00
Thinkofdeath
0040955204 Fix events not working when no formatting is used 2013-12-07 13:59:00 +00:00
Thinkofdeath
2cb3b6f934 Fix TranslatableComponent's toPlainText and toLegacyText not handling %1$s and %d 2013-12-07 13:16:10 +00:00
Thinkofdeath
c7e590e286 Move en_US.properties to mojang-translations/en_US.properties 2013-12-06 23:21:52 +00:00
Thinkofdeath
696679809d Support printing TranslatableComponents 2013-12-06 23:18:10 +00:00
Thinkofdeath
e3e551d825 Use varargs instead of arrays 2013-12-06 23:02:05 +00:00
Thinkofdeath
890fac27c5 More formatting fixes 2013-12-06 22:40:40 +00:00
Thinkofdeath
35c1b26a20 Fix formatting 2013-12-06 22:40:40 +00:00
Thinkofdeath
2c8b15cb1e Use components for ServerKickEvent (fixes #744) + minor refactoring 2013-12-06 22:40:40 +00:00
Thinkofdeath
c20d8f9cd6 Chat Component API 2013-12-06 22:40:40 +00:00
md-5
0446351f9d @GunfighterJ for grammar nazi 2013 2013-12-05 09:24:00 +11:00
hcherndon
aad83d787f Add methods to expose parts of the proxy internal config. This is depreceated as it is subject to breaking changes without warning. 2013-12-02 15:17:19 +11:00
md_5
f7851b0436 Implement ServerDisconnectEvent. Wow so many server switch events. 2013-11-25 11:12:49 +11:00
md_5
2f2406206e Fix chat event javadoc - closes #713 2013-11-16 11:11:04 +11:00
md_5
f81bf8e7c5 Code format + fix pom 2013-11-06 20:11:17 +11:00
zh32
a201b5897a Added async PreLoginEvent to change online mode per connection. 2013-11-06 20:07:16 +11:00
md_5
4040d9f20a [Breaking] Fix player online sample 2013-11-01 22:00:46 +11:00
md_5
c84d6f0035 Add really efficient text -> json translation. Doesn't support format codes yet. 2013-11-01 17:14:18 +11:00
md_5
6ce43fb876 Sample is an array 2013-10-27 13:51:06 +11:00
md_5
5dfd14fbe5 Enhance ping API 2013-10-27 12:36:30 +11:00
md_5
37dc600fe0 BungeeCord can into server icon 2013-10-23 20:44:48 +11:00
md_5
0952e53d11 Update to 1.7 poms. 2013-10-23 17:33:21 +11:00
md_5
062dd38b2b Fix pinging. I love you @Sircmpwn 2013-10-12 15:50:08 +11:00
md_5
1551bf6f3a Ping stuffs, doesnt seem to work for some reason though 2013-10-12 13:51:33 +11:00
md_5
dbdae87ec6 Basically done with login 2013-10-11 21:36:28 +11:00
md_5
7121c20338 Compiles yet again 2013-10-11 20:34:21 +11:00
md_5
d900417d95 It compiles 2013-10-11 20:00:54 +11:00
md_5
4257b81d8c WIP 2013-10-11 18:40:21 +11:00
md_5
96acdb97fd Update to latest snapshot. 2013-10-11 16:16:02 +11:00