CoreNetwork / Mantle

The main plugin powering majority of features on Flatcore
1 stars 1 forks source link

Problems with perks - renaming, itemframes, #340

Closed eliadil closed 9 years ago

eliadil commented 9 years ago

In one of the commits I added detecting if player used a subscribtion item on an armor stand or itemframe - just like normal placing, cant do outside of his claim.

Armorstands work great (both for armorstands wielding armorstands and armorstands wearing skulls).

ItemFrame not so much - idk why, but when I cancel the event, the item gets placed in the itemframe oO To investigate tomorrow. So you can place, for example, sub skull in an itemframe in unclaimed land.

Another problem is with renaming - currently the subs items can be renamed via anvil, and used by anyone, anywhere (detecting of sub item is done by detecting the gold color code at the beggining).

eliadil commented 9 years ago

Change detecting the perk item -

I didn’t think you use the name to determine the item type

ridddle [10:46 AM]
Armor Stands are identified by `Pose` NBT

ridddle [10:46 AM]
Banners by those two unavailable NBT tags as well

ridddle [10:46 AM]
Skulls should be identified by Owner or whatever it is

ridddle [10:46 AM]
Not by golden name
eliadil commented 9 years ago

I think change to what ridd sugested. A bit more chekcing, but seems worth it ;]

riddle commented 9 years ago

Also, you cannot really block renaming items easily. Most of anvil is client-side, at least was that way in 1.7

matejdro commented 9 years ago

You could prevent them from putting items into the Anvil.

riddle commented 9 years ago

If that can be done, sure, that seems like a better thing to do.

matejdro commented 9 years ago

Is it OK if gold detection is left for lore addition?

So if somebody renames the item for some reason, worst case he will just get double lore.

riddle commented 9 years ago

Sure thing!

matejdro commented 9 years ago

OK banners and armor stands now resist name changing exploit. Also lore is working, I decided to just overwrite lore instead of adding to the old one (I guess there is no reason to).