New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[B+C] Add API to use 1.7 chat features. Adds BUKKIT-5245 #1111
base: master
Are you sure you want to change the base?
Conversation
Still misses all static constructors, append and insert methods JDs Also make Part constructor private
Opened PR for further discussion and development.
|
Another ToDo: |
@ST-DDT I have no idea what you're talking about |
Added some javadocs
Merge constructors
Added some missing validation
Anything left on the Bukkit side? |
@Ribesg Are there other participants that have contributed to this and i have to ask for permission too? |
This PR will be merged into https://github.com/GlowstoneMC/Glowkit as soon as https://github.com/SpaceManiac/Glowstone is ready to implement it. |
I, Ribesg, give permission to relicense the content of this PR under the MIT License for it to be integrated into SpongeAPI. |
I, bendem, give permission to relicense the content of this PR under the MIT License for it to be integrated into SpongeAPI. |
I, ST-DDT, give permission to relicense the content of this PR under the MIT License for it to be integrated into SpongeAPI. |
Minor improvements
Added MC 1.8 features
Bugfix Message
You do realize bukkit is dead? On Wed, Sep 2, 2015 at 7:28 AM RandomAltThing notifications@github.com
|
|
it returns an int (number if players it was send too). Or which method are you referring to? |
Isjsjdodkdi can we stop having the cs 101 discussion in everybodies inboxes thanks y'all.
|
I would like to unsubscribe from BukkitFacts, please. (But seriously, I'm enjoying these issue threads too much to unsub the repository.) |
This repository is depressing now, all I see are the ruins of a once bustling repository, that now sits idly, unable to continue, with PRs that will never be merged and updates that will never be released. RIP Bukkit |
The Issue:
There are currently no easy way to use the new chat features introduced in 1.7.
Justification for this PR:
As said before, there are currently no way (except from directly using the
/tellraw
command and passing your own generated json to it) to use the 1.7 chat features.PR Breakdown:
This PR adds a builder interface based on a
Message
to which you appendPart
s to build a rich chat message containing (or not):ItemStack
name or anAchievement
name ;Hover
text (showing a multi-color multi-line text, anItemStack
description or anAchievement
description) ;Click
action (executing commands / sending chat message, proposing commands / proposing chat message, or opening urls (actually opens the prompt)).These messages handle colors and formatting using ChatColor just like standard messages, internally using the existing algorithm built by the great @mbax.
Many (many) shortcuts have been added to
Message
to make it easier to append specific elements, seeMessage
static constructors,append
methods andinsert
methods.Message
andPart
will beConfigurationSerializable
making it easy to save and load them from a config file.This PR also adds methods to
Player
to send aMessage
and two methods toServer
andBukkit
to broadcast aMessage
. Those methods are closed to the standards String methods.Usage examples can be found in the TestPlugin after this line. You can get builds of all of this and test it yourself using the link below.
This PR is a complete rewrite based on the previous one and on @feildmaster's work on the subject.
Testing Results and Materials:
Test Plugin Source
Build everything yourself to test it as we're not allowed to link CB builds here.
Quick build & test:
Relevant PR(s):
CB-1413 - Associated CraftBukkit PR
B-1065 & CB-1378 - Old PRs
JIRA Ticket:
BUKKIT-5245 - https://bukkit.atlassian.net/browse/BUKKIT-5245
Authors
Of the previous PRs and of this one