Commit Graph

23 Commits

Author SHA1 Message Date
fullwall 130dc42e5f Use new method 2023-06-18 17:07:08 +08:00
fullwall 5ef99250e4 Reset UUIDs to version 2 on old minecraft versions 2023-04-16 02:25:51 +08:00
fullwall 61fd34df0b Reformat pom 2023-02-23 00:06:13 +08:00
fullwall 8fa5a965e1 Fix logic error in allay reset, code cleanup 2023-02-23 00:00:47 +08:00
fullwall fe4434de91 Don't clear uuid version 2023-02-09 21:09:53 +08:00
fullwall d04ea81225 WIP fix for NPCs not despawning properly 2022-10-17 01:17:32 +08:00
fullwall 5dbc578fd2 Integrate team creation directly into ScoreboardTrait 2022-07-25 23:14:00 +08:00
fullwall 4dfac9c62d Remove team unregistering to ScoreboardTrait, add scoreboard-teams send ticks to assist with a possible scoreboard conflict 2022-07-13 20:09:21 +08:00
Alex "mcmonkey" Goodwin 4dc123bb4b
Refactor scoreboard handling to use instant scoreboard application at spawn (#2544)
Full description in PR https://github.com/CitizensDev/Citizens2/pull/2544
2021-05-08 02:02:17 +08:00
fullwall ab16b50814 Try to avoid handling player properties twice if respawning in the same tick 2020-09-13 16:16:54 +08:00
Alex "mcmonkey" Goodwin a79e8a571a
Patch consistent application of scoreboard teams (#2302)
* Patch consistent application of scoreboard teams

This corrects issues with scoreboard team logic by ensuring NPCs use a consistent internal name, rather than randomizing

* apply team name tag visible=false earlier
2020-08-28 22:43:14 +08:00
fullwall 0a4905c0f3 Randomise name if using holograms to have unique scoreboard names 2020-07-08 18:58:39 +08:00
fullwall 0a58215541 Use holograms instead of scoreboard for names 2020-07-06 16:37:34 +08:00
Alex "mcmonkey" Goodwin 30f2dee4d7
Reduce potential for errors with packet teams (#2138)
* Reduce potential for errors with packet teams

Move scoreboard removal out of NMS to event method, and make more unique names

* remove unneeded isCancelled check
2020-05-05 18:20:56 +08:00
Alex "mcmonkey" Goodwin 2c24671ae3
simplify scoreboard patch to be 100% packet based (#2129)
* simplify scoreboard patch to be 100% packet based

which fixes edge case client errors

* fix edge cases of respawning and multinpc boards
2020-05-01 17:49:25 +08:00
fullwall a2208f0d32 Minor style changes 2020-05-01 01:47:07 +08:00
Alex "mcmonkey" Goodwin 981ade8974
patch the majority of potential scoreboard packet errors (#2128) 2020-05-01 01:39:07 +08:00
Alex "mcmonkey" Goodwin 0e31ffb9f8
Implement packet-based scoreboard team enforcement (#2127)
* Implement packet-based scoreboard team enforcement

This should fix incompatibility with scoreboard plugins that break the main scoreboard

* impl to 1.8-1.12, move event logic, fix Setting usage

* pull setting if to outside of foreach loop

* fix return vs continue, minor opti as requested
2020-04-30 20:51:10 +08:00
Alex "mcmonkey" Goodwin 9e0b4e0ab9 Improve handling of NPC names, fixes #1640 (#1642)
* Improve handling of NPC names, fixes #1640

Moves the logic to a Util method (instead of duplicated in each module), and adds the "prefixColors" portions (replacing just a static 'RESET' code).
If colors and effects are combined, using only the most recent effect is sufficient (eg reapplying bold) as that should produce effectively no change while still having a color code stuck into the name as is needed to break NPCs looking like real players internally.

* Additional NPC name improvement: fix color code splliting

a name consisting of a color code followed by 15 letters would get split in the middle of the color code, rather than around it. This fixes that.
2018-12-20 04:44:06 +08:00
Alex "mcmonkey" Goodwin 221eb4b8d5 Fix for client NPE issue - don't missend player spawn packets (#1525)
* Fix #1360 - don't missend player spawn packets

Player spawn packets were improperly sent by the Minecraft internals in early NPC spawn sequence, when they are not valid to be sent yet. This patch blocks their sending until the tracker system is pushed onto the NPC. Tested and functional.

* improve long name cutting order, fixes #1422

ensures that root name will always be 16 characters if the given name was too long - previously, the root name could be as small as a single character (for input name of 17 characters).
2018-06-28 23:51:41 +08:00
Alex "mcmonkey" Goodwin 42fda25ceb Patch skin command, rename command (#1524)
* Fix npc skin -t argument order

Command input is doc'd as (and should function as) data then signature, but the called method was signature then data... update calls it in correct order. Also, fixes doc to indicate that a name is valid input, not just uuid (not entirely sure how that is handled when sent out in a packet, but it seems to be correct to feed a name)

* Ensure rename command will handle scoreboard changes

Always update prefix/suffix, not just only when team is newly created
Guarantee removal entity from scoreboard team on remove
Also removes a fileheader screwup (first line changed in 1_12_R1 file)
Also removes non-used code bits (the two coloredName lines - they don't actually functionally do anything)
Also removes a duplicated data get call

* patch gamemode command

Uppercase + unique permission node

* patch for names of length 30
2018-06-27 12:00:03 +08:00
fullwall f33804609e Add -l flag to /npc spawn and add /npc metadata
Add /npc remove --owner
2018-01-01 14:41:10 +08:00
fullwall 0189157400 First pass at 1.11 2016-11-17 15:53:41 +08:00