[SPIGOT-3241] Add Chat Component message methods to CommandSender Created: 14/May/17  Updated: 15/May/17  Resolved: 15/May/17

Status: Resolved
Project: Spigot
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: New Feature Priority: Minor
Reporter: zreed Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: bukkit, chat, spigot


 Description   

Given a BaseComponent and a CommandSender its necessary to check if the CommandSender is a Player and then cast to use Player.spigot().sendMessage(...) or fall back and translate the component back to text for use with CommandSender.sendMessage(...). It'd be more convenient if the sendMessage methods in Player.spigot() were added to CommandSender.spigot() and then non-Player command senders transparently convert them back to text.

Essentially feature parity between Player message sending and CommandSender message sending.



 Comments   
Comment by zreed [ 14/May/17 ]

Entity is a sub-interface of CommandSender so that should get around Player.Spigot extending Entity.Spigot. Assuming Entity.Spigot changed to extend CommandSender.Spigot.

Alternatively the Spigot.sendMessage methods could be deprecated and added to CommandSender directly. I'm not sure the criteria for promoting methods like that though.

Comment by md_5 [ 14/May/17 ]

This might not be possible in a non breaking manner

Generated at Fri Mar 14 15:13:16 UTC 2025 using Jira 10.3.3#10030003-sha1:d220e3fefc8dfc6d47f522d3b9a20c1455e12b7b.