Commit graph

4873 commits

Author SHA1 Message Date
Lucas Nicodemus
7d310b7780
Add upcoming changes section to changelog
Following pre-release 12, renormalize the changelog so that there's a section for new changes.
2020-06-27 01:49:40 -07:00
Lucas Nicodemus
a82174fef8
Update changelog for PR12 2020-06-27 01:42:40 -07:00
Chris
ece40af089
Merge pull request #2061 from Pryaxis/addtileentityinteraction
RequestTileEntityInteraction hook and handling.
2020-06-27 17:57:15 +09:30
Patrikkk
530bc95123 RequestTileEntityInteractionHandler - Use object size for building perm check.
This commit will modify the RequestTileEntityInteractionHandler to use HasBuildPermissionForTileObject when checking for building permissions for Hat Rack and Display Doll to give an accurate response wether or not any part of the object has an overlapping protected region.
2020-06-27 10:22:03 +02:00
Lucas Nicodemus
0cfe670038
Merge branch 'general-devel' into addtileentityinteraction 2020-06-25 21:57:00 -07:00
Lucas Nicodemus
42f0e58928
Normalize changelog 2020-06-25 21:54:38 -07:00
Lucas Nicodemus
d60067dec0
Merge pull request #2073 from Pryaxis/fixtileplacement
Missing parenthesis from an if logic. Fix valid Tile placement reject.
2020-06-25 17:40:41 -07:00
Patrikkk
05829dee3b Missing parenthesis from an if logic. Fix Tile placement reject. 2020-06-25 17:08:58 +02:00
Patrikkk
d4e4692d8b Merge branch 'general-devel' into addtileentityinteraction 2020-06-25 13:41:14 +02:00
Chris
eee7fac1a8
Merge pull request #2062 from Pryaxis/displaydollsynchook
Displaydollsynchook
2020-06-25 11:43:56 +09:30
Patrikkk
c6723dbfa4
Merge branch 'general-devel' into addtileentityinteraction 2020-06-25 01:52:06 +02:00
Patrikkk
89ab7be0f8 TileEntityInteraction - Pass TileEntity object instead of ID in args. 2020-06-25 01:51:30 +02:00
Patrikkk
b70f4fe96e
Merge branch 'general-devel' into displaydollsynchook 2020-06-25 01:42:58 +02:00
Patrikkk
38a1351d38 Register DisplayDollItemSyncHandler.
Moved the type check for 0 before itemSetDefaults to have less code run if the empty slots are clicked.
2020-06-25 01:42:22 +02:00
Chris
2cf0808420
Merge pull request #2051 from moisterrific/patch-18
Add spawnpets perm to trustedadmin & owner
2020-06-24 15:11:35 +09:30
Chris
f1392cfa52
Merge branch 'general-devel' into patch-18 2020-06-24 15:08:52 +09:30
Chris
d4c248dbad
Merge pull request #2060 from Pryaxis/commandscleanup
Command.cs - Multiple minor changes.
2020-06-24 14:59:32 +09:30
Patrikkk
90dd61e668 Moving the DisplayDollItemSync hook inside null check.
In crafted (hacked) packet sending, people could send the DisplayDollItemSync packet with an entity ID that is not actually a display doll. This would not happen in a normal scenario.
If they send the crafted packet, our hook would have been invoked and it would have contain a null TEDisplayDoll object since we tried to get the TileEntity object as a TEDisplayDoll object.
2020-06-21 15:03:08 +02:00
Patrikkk
10a9ee399a Update CHANGELOG.md
Loggin latest change of adding DisplayDollItemSyncHandler.
Updating missing author for previous changes.
2020-06-19 14:26:25 +02:00
Patrikkk
64e61b8ed9 Add DisplayDollItemSyncHandler
In a previous PR I have added the tile entity request packet handler which checks for building permissions to prevent the unauthorized player to open a DisplayDoll and see its content.

This Handler is being added to prevent *Hackers* from modifying a DisplayDoll through direct/crafted packet sending, or by sending raw byte data to the server.
In a valid enviroment, the player couldn't even get to see the content of the doll in the first place, to then try to modify it's items.

Because of this,  I do not bother with making sure the player gets their item back.
2020-06-19 14:21:45 +02:00
Patrikkk
408eaf4383 Add TEDisplayDoll object to the event args. 2020-06-19 14:16:27 +02:00
Patrikkk
69f232b12a Adding DisplayDollItemSync event.
An event that is called when a player modifies the slot of a DisplayDoll (Mannequin).

I was trying to think from a developer friendly perspective here.
Instead of passing seperate variables for type/stack/prefix, thought I pass an Item object.
As well as, instead of having devs who work with this hook figure out and implement how to get the Item of the DisplayDoll, I just provide it in the hook.
I can imagine this being used for creative purposes in plugins.
2020-06-19 14:07:39 +02:00
Patrikkk
27525e9d1f
Merge branch 'general-devel' into commandscleanup 2020-06-18 23:57:55 +02:00
Patrikkk
972483340a
Merge branch 'general-devel' into addtileentityinteraction 2020-06-18 23:57:40 +02:00
Patrikkk
1807488f2f
Merge pull request #2058 from Rustly/general-devel
Fix snake charmer's flute and block npc spawnrate change permission error on join
2020-06-18 23:57:20 +02:00
Rustly
0a01ae6d83
Merge branch 'general-devel' into general-devel 2020-06-18 16:53:14 -05:00
Rustly
c51f8abcbf
totally didnt update changelog again 2020-06-18 16:51:18 -05:00
Rustly
ce953c6eaa
forgot github is funny with line breaks 2020-06-18 16:48:56 -05:00
Rustly
b454d3fcb7 Update CHANGELOG.md 2020-06-18 16:46:20 -05:00
Patrikkk
0874177edb Update CHANGELOG.md 2020-06-18 17:37:29 +02:00
Patrikkk
bb20626203 Add building permission checks for Hat Rack modification.
Keeping this code format to have the code be friendly with us in future updates, as well as display proper rejection message to the players.
2020-06-18 17:32:08 +02:00
Patrikkk
2a0e1de285 Changelog - Grammar fixes 2020-06-18 17:13:39 +02:00
Patrikkk
fec5deedd9 Update CHANGELOG.md 2020-06-18 17:11:42 +02:00
Patrikkk
c418dda42c Add RequestTileEntityInteractionHandler. Check Mannequin modif perms.
Users can no longer open a Mannequin if they do not have building permissions at the position of the Mannequin.
(Mannequins work as a chest since 1.4)
2020-06-18 17:08:14 +02:00
Patrikkk
3012c92370 GetDataHandlers - Add RequestTileEntityInteraction hook. 2020-06-18 16:48:22 +02:00
Patrikkk
11a2a3e21b GetDataHandler - Code formatting. Modify order of Handler to respect PacketType value. 2020-06-18 16:34:33 +02:00
Patrikkk
d9ccf9fe60
Merge branch 'general-devel' into commandscleanup 2020-06-18 16:21:02 +02:00
Patrikkk
5a494b993a
Merge pull request #2053 from Pryaxis/removebouldercheck
Bouncer OnTileEdit - Remove redundant Boulder placement check
2020-06-18 16:20:19 +02:00
Patrikkk
b19e95b99d
Merge branch 'general-devel' into removebouldercheck 2020-06-18 16:09:21 +02:00
Patrikkk
d0b845b279
Merge branch 'general-devel' into patch-18 2020-06-18 16:08:01 +02:00
Patrikkk
698b3937aa
Merge pull request #2054 from moisterrific/patch-19
Add clarity to !HasPermission error messages
2020-06-18 16:03:38 +02:00
Patrikkk
ce07c284cf Command.cs - Multiple minor changes. 2020-06-18 14:18:25 +02:00
Rustly
2f22271dbe Update CHANGELOG.md 2020-06-15 13:33:56 -05:00
Rustly
01bae0475d apply the rest of fixes for snake flute, prevent players from seeing the npc perm error on join 2020-06-15 13:32:42 -05:00
Rustly
013ef4ce98 fix snake rope thingy 2020-06-15 12:37:49 -05:00
Patrikkk
865748fedf
Merge branch 'general-devel' into removebouldercheck 2020-06-13 22:58:36 +02:00
stacey
4949410cfa
minor grammar update 2020-06-13 13:26:34 -04:00
stacey
b831832fed
Improved clarity for !HasPermission error msg 2020-06-13 13:17:24 -04:00
stacey
067006a092
Add clarity to !HasPermission error messages
And a few other minor formatting/grammar changes.
2020-06-13 13:13:46 -04:00
stacey
5b44c9dd84
Fix formatting...again 2020-06-13 10:41:02 -04:00