#anti x-ray
1 messages · Page 1 of 1 (latest)
It’s not very easy. My best guess is that’ll you need to save every ore the player has mined in a certain time frame and how fast the player gets to the next ore they mine. But it would be hard to figure out since caves would be an issue. Theres probably different approaches but that’s how I would do it
world.afterEvents.playerBreakBlock.subscribe(({ player, block }) => {
if (block.typeId.includes('diamond_ore')) world.getPlayers({ tags: [ 'admin' ] }).forEach(p => p.sendMessage(`${player.name} found a diamond`));
});
That would work too😭 my idea is for it to be more automated I guess
I get what you mean, but they just asked for it to notify when the player finds a diamond
Actually I was about to say "not possible" before reading the message
Definitely possible with your way but a lot of people aren’t bothered by just watching the logs for who mined what and at what time for a long time lol. I guess your method can be improved by testing if the player has mined for example more than 12 diamonds within 5 minutes it will notify an admin instead of just watching it constantly
HOW CAN I DO THAT
no wait
if someone collect diamonds and then get them with luck?
you must remember the ores placed by players so as not to apply the xray verification on these ores
Just get an texture pack and force it
Put every broken block by the player into an array with a timestamp using date.now and just clear it every 5 minutes. Check if the player has mined and collected more than 12 and if so send a message to an admin or something. You’ll also need to scale that number depending if the item that broke the block has fortune or not
This is what I would do probably...
Could Alternatively just check to see if someone has an extreme amount of one type of item as well dynamically to flag suspicious activity (this would work for all items)
I made something like that and it's really helpful.
could you give me the script?
If you want
Very nice