CardinalPGM icon indicating copy to clipboard operation
CardinalPGM copied to clipboard

Add /me command, closes #836

Open ghost opened this issue 9 years ago • 14 comments

It should be better to simply create and override the /me command, instead of blocking it. Here's an image of how it looks like https://gyazo.com/dc6c7193eeb418ab816eaedd1508a9b3

ghost avatar Aug 17 '15 20:08 ghost

You can still use /minecraft:me no matter what. We can't overwrite that command.

connorjayr avatar Aug 17 '15 20:08 connorjayr

@iEli2tyree011 That's why I added this https://github.com/twizmwazin/CardinalPGM/pull/837/files#diff-c2eee098f5e1d9f71d4efd97974e23a2R5

ghost avatar Aug 17 '15 20:08 ghost

@Alfalik Did you test that? I've always had problems removing default permissions with the permission module.

connorjayr avatar Aug 17 '15 20:08 connorjayr

@iEli2tyree011 Meh, players can still use default minecraft permissions, minecraft:me in this case.

ghost avatar Aug 17 '15 20:08 ghost

I'll be honest I'd rather just outright disable the vanilla command

twizmwazin avatar Aug 17 '15 20:08 twizmwazin

what about just a #toLowerCase.startsWith(/me)

Pablete1234 avatar Aug 17 '15 23:08 Pablete1234

This PR can be closed

ghost avatar Aug 22 '15 15:08 ghost

it still would be nice to add a cardinal /me so that it uses display names (with ranks and team) instead of white names, but the vanilla one should be left as it is (usable by default, and blocked during mute or gmute) and the same behaviour should be used for cardinal:me

As I see it, you should: in BroadcastCommands.java line 35: ChatUtil.getGlobalChannel().sendMessage("\u002A " + Players.getDisplayName(sender) + " " + ChatColor.YELLOW + cmd.getJoinedStrings(0)); in ranks.xml line 5: <permission>cardinal.me<permission> (so that cardinal.me is a default) in PermissionModule.java line 153 & 161: disablePermission(player, "cardinal.me"); enablePermission(player, "cardinal.me"); and remove all changes made to ChatModule.java

Pablete1234 avatar Aug 22 '15 16:08 Pablete1234

I've ammend the commit, so if a player do /minecraft:me, the player won't have access. Also, a /me command has been added (https://i.gyazo.com/c584771128c1a7ed04d39871b2d5cb97.png). As @Pablete1234 said, it display the actual rank and team of the player.

ghost avatar Aug 23 '15 00:08 ghost

Leave the old chat module as it was, if someone has their server on the bukkit setting that uses vanilla by default it will be better to also block the regular /me (bcos it will be the vanilla one)

Pablete1234 avatar Aug 23 '15 00:08 Pablete1234

The vanilla command is now totally disabled, and I've added a /me command that shows the rank and team of the player.

ghost avatar Aug 28 '15 01:08 ghost

:+1:

unixfox avatar Sep 01 '15 00:09 unixfox

Should have been fixed in 6ce8cbd , thanks for your work in this PR!

SungMatt avatar Mar 25 '16 10:03 SungMatt

@SungMatt it isn't quite fixed, but i agree thar 1.9 fixed quite alot of stuff with player selectors (try /minecraft:say @a[team=observers]) now bukkit properly uses scoreboard team color / names or something, but it's still not the bukkit display name, it's just the scoreboard team color

Pablete1234 avatar Mar 25 '16 10:03 Pablete1234