#help-development

1 messages ยท Page 1928 of 1

wary harness
#

until u run in connection problems with them xd

young knoll
#

I know they do

#

But whether it's worth using is another convo

solar prairie
#

Its free, try it lul

hasty prawn
#

It looks like it's only free for 30 days

quiet ice
#

Well known last words

solar prairie
#

Hahahaha

#

Meth? Sure.

quiet ice
#

Don't use free products for the sake of them being free.

opal juniper
dusk flicker
#

Free most of the time means shit

young knoll
#

I heard something about it being free forever

opal juniper
#

not sure about that

quiet ice
#

So did I

hasty prawn
#

It actually might be I think I read it wrong

solar prairie
#

Probably a small ammount for free, pay to get something worth using.

opal juniper
young knoll
#

Ask @onyx fjord

tender shard
solar prairie
#

Like oh you did all this hard work and its too slow? Pay us monthly to actually use it.

young knoll
#

Apparently it would work for like

#

10 players on an MC server

quiet ice
#

Eh, for a maven repo it doesn't need to be that fast since you are going to serve mostly static content

worldly ingot
#

I do want to have somewhere to setup some CI and a Maven repo I just need to get around to doing it

dusk flicker
#

I use Hosturly for my dedis, they do vps's as well iirc

solar prairie
#

So itd be good to develop on then upgrade/transfer.

tender shard
worldly ingot
#

Well yeah, GitHub's actions are good too

solar prairie
#

10 players is assuming no plugins I imagine.

tender shard
#

and yeah for the repository, definitely go for nexus :3 it's indeed the best

tender shard
worldly ingot
#

Nexus has always been on my mind, ye. Just seems standard

onyx fjord
worldly ingot
#

Need to look more into like... hardware requirements

tender shard
#

let me see what I'm using

quiet ice
#

I'd say that the only limiting factors are I/O speeds

tender shard
#

this is basically only running nexus + some tiny other docker applications. so yeah I'd go for at least 4 GB of RAM, but other than that, it's basically just idling

young knoll
worldly ingot
#

Yeah that's not terrible

#

If I spring for 8 gigs or whatever I could use it as general purpose on top of that

onyx fjord
young knoll
#

Idk, how much it does or doesn't suck :p

naive bolt
#

how do i stop the extra [Name] 16:41:19 INFO]: [WhitelistPlugin] [Discord Control Panel] has loaded!

naive bolt
#

[WhitelistPlugin]

tender shard
#

the first one is your plugin's name, the second one you added yourself

quiet ice
#

Don't attempt it

naive bolt
#

can i remve plugin name

quiet ice
#

please

#

especially not for a public plugin

tender shard
naive bolt
#

i want to use colors

#

๐Ÿ˜„

tender shard
#

colors in the console are not only useless but also annoying for admins

#

just don't do it

naive bolt
#

k

quiet ice
#

Don't

tender shard
#

noone wants to see a huge colored banner

tardy delta
#

Bukkit.getConsoleSender().sendMessage supports color codes

naive bolt
#

its not a banner its just a ready message but ok

tardy delta
#

atleast on windows cmd

young knoll
#

Shhhh

dusk flicker
#

Don't use colors in the console

#

Please

quiet ice
#

And using Logger.getLogger("Minecraft") is also a really bad way of doing it since admins cannot disable the logger afterwards

tardy delta
#

i did it before and now i stopped doing it so maybe yea

naive bolt
quiet ice
#

So if your logger would be spamming unnecessary shit you wouldn't be able to disable it traditionally

unique bronze
#

clearly the real trick is to set your plugin name to nothing

tardy delta
#

getLogger() is plugins logger

unique bronze
#

is there an easy way to get the namespace'd id from ItemStack e.g. modname:some_ore, there's BlockData#getAsString I've not touched Spigot's API in ages and everything I search returns magic values before flattening~ Solved: item.getType().getKey().toString()

quiet ice
#

So, Logger.getLogger("Minecraft").info("[MyPlugin] Has loaded!") isn't good

naive bolt
#

k

tardy delta
#

chaining isnt good either

tender shard
dusk flicker
#

Reflection

#

Also the reason my plugin on my server has a space in it's name

tardy delta
#

remember kids dont make protected stuff public

dusk flicker
#

Why not

tardy delta
#

lmao Bukkit.getOfflinePlayer(uuid) executes a bunch of code

young knoll
#

yes?

#

What did you expect

red sedge
#

is there any other way to exit an inventory that inventorycloseevent doesnt cover

quiet ice
unique bronze
tardy delta
#

doing it in the prelogin so it doesnt block the user from entering the server long

tender shard
tardy delta
#

uhu i hadnt expected it to do that much

dusk flicker
#

Pfft make them wait

tender shard
#

well it doesn't really do much

#
 public OfflinePlayer getOfflinePlayer(UUID id) {
        Validate.notNull(id, "UUID cannot be null");
        OfflinePlayer result = this.getPlayer(id);
        if (result == null) {
            result = (OfflinePlayer)this.offlinePlayers.get(id);
            if (result == null) {
                result = new CraftOfflinePlayer(this, new GameProfile(id, (String)null));
                this.offlinePlayers.put(id, result);
            }
        } else {
            this.offlinePlayers.remove(id);
        }

        return (OfflinePlayer)result;
    }
tardy delta
#

this.offlinePlayers.get does do a lot

#

wait no

#

i mean this.getPlayer(id)

dusk flicker
#

๐Ÿ‘

tender shard
#
    public Player getPlayer(UUID id) {
        ServerPlayer player = this.playerList.getPlayer(id);
        return player != null ? player.getBukkitEntity() : null;
    }
dusk flicker
#

Lmao

tardy delta
#

and then using hasPlayedBefore on the retrieved object

#

does some io

worldly ingot
#

Just wait until he sees the MinecraftServer constructor aPES_Laugh

quiet ice
#

as long as it is only some io it is discardable

young knoll
quiet ice
#

There is far worse stuff

tender shard
young knoll
#

getOfflinePlayer may also do a web lookup

#

Wait no only the string one

tardy delta
#

with a string as paramater i think

#

heh i found the Main class

#

so would getting an offlineplayer and calling hasPlayedBefore on it be faster than looking for the player in the embedded database?

quaint mantle
#

how to check if an nms method or field exists in all mc versions

#

or it has a different name or whatever

quiet ice
#

Doing it the bukkit way is probably going to be faster when there are a lot of plugins around

quaint mantle
#

should i decompile every version i want to support ?

hardy swan
#

If you use maven you should technically create a module for each version you want to support

#

Even if the method exists in different versions, they can be obfuscated into different forms

tender shard
#

I think I once looked it up and couldnt find any web requests

young knoll
#

The string version

tardy delta
#

i also looked for it but couldnt find it

young knoll
#

It's deep in there

tender shard
#

the docs dont say anything about web requests

#

it onyl says that getName returns null if the palyer hadnt joined before

#

ugh my writing

#

you can keep the typos

young knoll
#

The docs do

#

Gets the player by the given name, regardless if they are offline or online.

This method may involve a blocking web request to get the UUID for the given name.

This will return an object even if the player does not exist. To this method, all players will exist.

tender shard
#

you are using getOfflinePlayer(String)

#

I was talking about getOfflinePlayer(UUID)

young knoll
#

I did say that

#

Like twice

tender shard
#

whoops sorry

#

I missed that

quiet ice
#

typical humans

opal juniper
#

literally monkeys

quaint mantle
#

F

quiet ice
#

pft, recaf also does the trick

tender shard
#

oh you don't need 1.16.4, and 1.16.3, 1.16.2 etc

#

you only have to decompile the versions with a changed NMS package name

#

e.g. 1.16.5 and 1.16.4 are both R3 so you only need one of those

#

and you can basically ignore 1.15 - it's only used by 0.7% of people

#

all you need is basically just 1_18_R1, 1_17_R1 and 1_16_R3

quaint mantle
#

so 3 versions then

#

?

hasty prawn
#

I'm kinda surprised 1.8.8 is so low

quaint mantle
#

are these enough ?

tender shard
#

and remember than you can use mojang-remapped for 1.17+ which means - no code changes needed except for tiny things (e.g. in 1.17 it's ServerPlayer.connection and in 1.18 it's ServerPlayer.connection.connection)

tender shard
spiral light
tender shard
#

as said only 0.7% still use 1.15.2 and basically noone uses 1.14 according to bstats

quaint mantle
#

well im forking someone's plugin

#

and i want to remove protocollib and do it with full reflections

tender shard
hasty prawn
tender shard
#

1.8 is like 8 years old

quaint mantle
#

still the best pvp version

#

(1.8 is trash its just for cringe 1.8 pvpers i pvp 1.9)

spiral light
quaint mantle
#

i seriously hate 1.8 pvp

tender shard
quaint mantle
#

if someone runs a 1.17 bedwars server, who plays it

#

with ocm with full of bugs

quiet ice
#

Mine was 1.12 for some reason

hasty prawn
#

Yeah I think 1.8 is lower than it seems because there's more 1.18.1 servers, but the 1.8.8 servers are just more popular.

quaint mantle
#

and the performance of 1.8 is way better than 1.12.2

hasty prawn
#

So 1.8.8 servers are more prominent than 1.18.1, Hypixel for example would only add like 1 to 1.8.8 but it's got thousands of people lol

quaint mantle
#

we are running a bedwars server with 500+ players and still 60% usage

tender shard
quaint mantle
quaint mantle
tender shard
#

everything below 1.18.1 is officially outdated ๐Ÿ˜›

quaint mantle
#

i use 1.16.5 as my client

#

1.18.1 trash

#

complete trash

#

even forks cant fix it

hasty prawn
#

Whats wrong with 1.18.1

tender shard
#

people always keep saying new versions are trash because they like to stay on their oudated versions

quaint mantle
#

both server and client

tender shard
quaint mantle
#

high system usage both client & server

tender shard
#

well if you want to run a server for 100 players and only have 4 GB of RAM, then sure that won't work in modern versions

#

but instead of saying that 1.18.1 is shit, maybe just upgrade your server

quaint mantle
#

the most up to date version we are using in our server is 1.17.1, survival gamemode, 100+ players and 20.0* tps

tender shard
quaint mantle
#

well i was at the test server on paper 1.18.1 release

#

i saw

#

i guess it was 1.18

quaint mantle
hasty prawn
#

Why can you not

quaint mantle
#

same

#

trash laptop

#

getting 60 fps on 1.17 with arch linux
ARCH LINUX

#

some random shit ass with the cpu graphic driver

#

sometimes 40 or 30

hasty prawn
#

that sucks

#

With Fabric mods I can get 600+ FPS on 1.18.1 lol

quiet ice
#

FPS is meaningless

quaint mantle
#

60+ is meaningless for 60hz monitors

hasty prawn
#

It's only meaningless after your monitor cap

quaint mantle
#

according to what i've seen, the intel graphic driver that was required is intel gene 3000, while mine is the last in gene 2000

quiet ice
#

Especially if you stayed with 10 - 25 fps all your childhood

tender shard
#

this is about 70 players on 1.18.1. not really causing any lag lol

quaint mantle
#
  • cries *
    why putty
tender shard
#

wrong reply

#

@quaint mantle what's wrong with putty

hasty prawn
#

Survival vs Minigame servers, one is going to be harder than the other

quaint mantle
tender shard
#

it's regular survival with default view distance etc

tender shard
quaint mantle
#

well the plain openssh

#

or bitvise

tender shard
#

I never liked bitvise

#

it's so bloated with stuff I don't need

quaint mantle
#

thats my ssh client, looks cool enough ?

tender shard
quiet ice
#

I just use whatever terminal I have available for ssh, I don't see why anyone would be selective about this

quaint mantle
#

its just a command

tender shard
#

on linux I use openssh, on mac I use openssh, on windows I use putty

quaint mantle
#

same but putty looks ugly for me

tender shard
quaint mantle
#

sexy

tender shard
#

btw I am crying

#

why did I install ubuntu 20 on so many VMs

#

I just remembered that ubuntu is a pain in the ass to do dist-upgrades

#

I should have sticked to debian 11

quiet ice
#

Just use fedora

quaint mantle
tender shard
quiet ice
#

Heh

tender shard
#

Stromberg

tender shard
#

german version of The Office

quiet ice
#

To be honest, I should really look how fedora works in a server env

tender shard
#

I don't think rolling releases are good for servers

#

but that's just my opinion

#

I basically only use debian 11 for servers because their upgrades are straigtforward, or ubuntu because of the long LTS times

#

I recently upgraded a server from debian 8 to debian 11 without any problems

quiet ice
#

Most of my problem with rolling releases have been associated with audio and graphics, so I don't think it won't have any too grave consequences in a server environment.

torn vale
#

Could someone send me the build.gralde for Java 8 and Spigot 1.8.9? I cant find anything on the web about it

spiral light
#

upgrading an ubunto system is way better then fucking windows ... i almost have to reinstall windows every year because of those fucking updates

glossy venture
#

i refuse to update to win 11

#

imo the style sucks

#

and from looking at screenshots of for example explorer there are less features on the surface

#

like you have all this shit in win 10

#

and then in windows 11

waxen plinth
#

Use linux

raw ibex
#

what would the arguments of the event be?

glossy venture
#

id like to but i feel like im going to struggle and i just want to use my pc

#

also i heard some shit about companies giving linux shitty support

#

like didnt fucking nvidea refuse to make drivers

#

i do like the icons of win 11 tho

waxen plinth
#

They refused to open source them

#

Some distros are difficult to install and use, but some are dead simple

glossy venture
#

and i the drivers lack features right

#

or not?

raw ibex
waxen plinth
#

What features

raw ibex
#

armor equip event

glossy venture
waxen plinth
#

Ok but what features are you talking about

glossy venture
#

idk i think it was like resolution on multiple monitors

waxen plinth
#

Because I'm not aware of drivers being particularly feature-rich, at least not in a way that users would notice

#

My friend has 9 monitors and it works perfectly fine for him

glossy venture
#

ok then im wrong

woven dove
#

In NVIDIA drivers you have nvidia shadowplay

waxen plinth
#

And I have obs

woven dove
#

you can't do instant replays with it

waxen plinth
#

lol

woven dove
#

also idk why when I play MC 1.8 on linux the mouse is messed up and it doesn't register clicks

waxen plinth
#

Doesn't register some, or doesn't register them at all?

#

I've never had that issue but there's probably a fix for it

#

But you know, when you use a version that's 7 years out of date that's no longer supported...

karmic grove
#

?jd

karmic grove
#

for meself

round finch
#

Wrong server

quiet ice
#

big doubt

wary harness
#

do you guys have idea

#

how is this possible

young knoll
#

Resource pack

wary harness
#

I know

#

that

#

but entity of dragon

red sedge
#

that looks like bedrock

wary harness
#

entity is puffer fish

red sedge
#

uh

#

custom models

young knoll
#

I assume there is an armor stand in there too

quiet ice
red sedge
#

you just remodel it

wary harness
#

dragon is animated

young knoll
#

No idea what the pufferfish is for

red sedge
wary harness
#

I don't see it

red sedge
#

you dont see what--?

wary harness
#

on f3 info

red sedge
#

why would you see the plugin

wary harness
karmic grove
#

so i was wondering how you can teleport a player to a location reletive to there coords lke 1 block on the y level where they are

karmic grove
#

yes but im having trouble with the types like to add it needs to be double but to teleport it needs to be uh location im trying to cast but yeaa

red sedge
#

wtf..

young knoll
#

Location#add

red sedge
#

location#tovector

young knoll
#

Why would you need it as a vector

red sedge
tardy delta
wary harness
#

are you just chiling there

tardy delta
#

50 rubies bad

wary harness
#

I am curious how that works

young knoll
#

It's an armor stand

dry beacon
#

Hey, is there any method that's used to get the server seed?

red sedge
#

i thought of the wrong thing nvm

quiet ice
#

?jd

quiet ice
#

WorldInfo#getSeed

dry beacon
#

thank you!

quiet ice
#

World should extend WorldInfo so yeah

unique bronze
#

It does.

dry beacon
#

gotcha

dry beacon
worldly ingot
#

Missing an @EventHandler annotation on your method

#

That's about it

lost matrix
dry beacon
#

oh lol

#

thanks haha

tardy delta
#

dispatching the ban command hmmm

dry beacon
#

made it so it works with whichever ban plugin is installed

#

seems like it doesn't work at all though haha

dusk flicker
#

Your banning someone for saying the world seed?

#

Why

dry beacon
#

that's for servers on which the world seed isn't public

#

most smps pretty much

dusk flicker
#

But a ban?

#

Hope that's configurable

tardy delta
#

does a custom map also has a seed?

dry beacon
#

i'd think a ban is sufficient if the players openly tries spreading the seed in public, it's for my own server

eternal oxide
tardy delta
#

ah right

dusk flicker
#

Oh if it's for your own that's fair

tardy delta
#

makes sense

dusk flicker
#

But otherwise that'd be way overkill

dry beacon
#

that's true

tardy delta
#

what was the best way again to execute multiple sql statements? executeBatch?

tardy delta
#

wha-

worldly ingot
#

Yeah that depends entirely on what statements you're executing

#

If they're the same statements just with different prepared vars, executeBatch() is what you want

tardy delta
#

table creation

terse ore
#

How can I autocomplete commands?

tardy delta
#

like different tables, which may been created already

blazing scarab
#

then batch is pointless

#

Not sure if you can use it in this case

tender shard
worldly ingot
#

Worth noting that an EntityChangeArmorEvent is about to be pulled into Bukkit for 1.18

tender shard
#

but it was never merged

worldly ingot
#

Yeah because he hadn't updated it

tender shard
#

it would be awesome if it was actually added now

worldly ingot
#

It's up to date now with master ;p

blazing scarab
#

Pfff

#

PlayerArmorChangeEvent

tender shard
#

I only forked the existing ArmorEquiopEvent because there was no maven repo for it

tender shard
sterile token
#

L

raw ibex
tender shard
raw ibex
#

because you made it

tender shard
#

I didnt made it

#

the code was originally written by someone else

#

I just decided to maintain it now

#

because I use it myself and it'd be a shame if it'd die now

terse ore
#

How do I get length of args?

proper marlin
#

Is their a way to fix the KB so players donโ€™t get pulled towards the ground in a Spigot Plugin?(I want the KB to be like vanilla, not a vanilla server I donโ€™t want to change how high a player goes)

worldly ingot
#

;p

terse ore
#

I want to make a playsound command, how can I transform the string from the command to a sound?

tardy delta
#

isnt sound an enum otherwise you could use valueOf

terse ore
#

wdym by that

tardy delta
#

it is an enum

delicate lynx
#

so you could take whatever your input for the command is and play it

tardy delta
#

like this, if you do Sound.valueOf(string.toUpperCase()) it can get a sound constant

#

like if the user enters ambient_cave

#

probably best way to do that is a tabcompletion

red sedge
#

is there a entity move event

tardy delta
#

make sure to catch any exceptions

tardy delta
#

cant find it

delicate lynx
#

I think paper has an event for that?

vocal cloud
#

That sounds like a super dangerous event tbh

red sedge
#

very much so

#

ill just assign a task repeating every tick when the mob spawns

delicate lynx
#

oh they had a move event, but it's gone

#

no surprise

delicate lynx
#

oh I'm blind

blazing scarab
#

54% of minecraft servers moment

red sedge
#

question

#

is it better to have 1 runnable repeating every tick and looping through all entities

#

or is it better to have all entities have their own runnable

tender shard
red sedge
#

no thx

red sedge
tender shard
#

yes

red sedge
#

i thought the loop could cause some problesm

tender shard
#

why?

red sedge
#

because of looping through all the entities..

quaint mantle
#

Dont loop through players

tender shard
#

you'd "loop" through all of them anyway, woludn't you?

red sedge
#

huh

#

i mean I wouldnt but the runnable would ig

tender shard
#

there's nothing wrong with looping through all entities every tick unless you do heavy stuff

#

the server itself does it anyway

blazing scarab
red sedge
#

im planning to assign a armorstand holding an item and teleport it to the entity

#

so not really heavy

hybrid spoke
#

how do i delete/reset the JAVA_HOME var of intellij?

tender shard
#

do you just want to change your java version in intellij? Ctrl+Alt+Shift+S

glossy venture
#

i think

#

so it should be no different

red sedge
#

Btw can I just save an entity as a variable?

glossy venture
#

also one task more memory efficient

glossy venture
red sedge
#

like would it update as the entity updates

#

thinking of that was a stupid question

hybrid spoke
glossy venture
#

the runnable?

red sedge
next stratus
#

How do people learn to do module stuff? It's legit so complex

red sedge
#

i have a map that has a Entity and an Entity

#

the first entity would be a redstone silverfish and the second one would be an armorstand holding a redstone block

#

im planning to teleport that armorstand to the back of the silverfish so it will look like it has a redstone block in its back

glossy venture
#

ok

quaint mantle
blazing scarab
red sedge
#

can I just assign the first entity when it spawns and it will update all the way through

blazing scarab
#

it simply breaking down the code into parts

glossy venture
#

maybe by making it a passenger

#

but i think your best bet is just updating all entities in the map every tick

red sedge
#

ig

next stratus
hasty prawn
#

What are you struggling with about it?

quaint mantle
#

Then why dont you do a research then

#

Is it actually that hard

glossy venture
next stratus
#

I can't wrap my head around it, I guess once I understand how to do it then i'll understand but it's the build.gradle and gradle.settings is where i'm like "wtf is going on?"

quaint mantle
#

Okay im out

#

Bye gradle

hybrid spoke
#

@tender shard

glossy venture
red sedge
glossy venture
#

build.gradle is per module

#

and configures the environment and build process for them

hybrid spoke
glossy venture
#

like dependencies, compiler options, etc...

hybrid spoke
#

but intellij doesnt take that

red sedge
next stratus
#

Am I dumb for finding this hard?

hybrid spoke
red sedge
#

do you really wnat the answer to that?

ivory sleet
#

well locally

red sedge
red sedge
hybrid spoke
#

and/or delete it?

red sedge
#

restart your computer

#

delete intellij

#

install it again

hybrid spoke
#

i will just switch to notepad

red sedge
#

yes

#

or make your own os

ivory sleet
#

luzifer, do you have intellij?

red sedge
#

and create your own IDE

#

in your own os

ivory sleet
#

believe you should be able to change in project structure

red sedge
#

and make yourself a computer

#

so you can make your own IDE work with your own computer and OS

hybrid spoke
red sedge
#

so it will be efficient

hybrid spoke
ivory sleet
#

if you use maven then u might wanna look at this

red sedge
#

conclure whats your theme

hybrid spoke
#

gradle rn. maven and gradle runner set to 17. still crying for JAVA_HOME

red sedge
ivory sleet
red sedge
hybrid spoke
ivory sleet
#

material oceanic, lol.

red sedge
#

and select the 17 one?

hybrid spoke
#

i already did

ivory sleet
#

did u change java home before or after entering intellij?

hybrid spoke
#

screens are in this chat

hybrid spoke
ivory sleet
#

hmm thats odd

#

and if you go to cmd prompt and invoke "echo %java_home%" or sth?

red sedge
#

restart your computer

hybrid spoke
red sedge
#

just try iot

red sedge
hybrid spoke
#

restarting my computer takes 30 mins

red sedge
#

you got no better option

ivory sleet
#

this is strange

red sedge
#

give up on your project

#

problem solved

hybrid spoke
red sedge
#

this should fix it

hybrid spoke
red sedge
#

buy a new computer and compile it there

#

so...

#

I updated intellij

#

(famous last words)

arctic moth
#

anyone know why intellij cant recognize the file type of config.yml every time i make it its so annoying to do override file type every time

#

it recognizes plugin.yml as a yaml but not config

red sedge
#

because

#

intellij is the worst

arctic moth
red sedge
#

intellij

arctic moth
#

eclipse bs?

#

lol

glossy venture
#

trusty notepad

red sedge
#

and it is the worst

#

and if you dont think it is the worst

#

im sorry

#

but you're in denial

arctic moth
#

well what else am i supposed to use?

red sedge
#

no clue

arctic moth
#

eclipse is even worse

#

lol

red sedge
#

the only reason people use intellij is becuase its the only option

red sedge
ivory sleet
#

shiny?

red sedge
#

yes

#

they

#

rainbow

ivory sleet
#

where lol

#

im blind

red sedge
#

your packages icons

#

shiny

limber mica
#

So I

ivory sleet
#

oh

#

the red colored packages?

#

those r just unadded files iirc

#

ye

arctic moth
#

how do you get all of the player's rendered chunks

limber mica
#

So I'm using TextInputDialog to display a dialog in javafx but how can I make it so if the input it wrong it reopens the dialog? I've tried using a if statement but that just doesn't reopen it

red sedge
ivory sleet
#

actually nvm

red sedge
ivory sleet
#

its git ignored files

red sedge
#

ohh

#

i should probably store all my stuff to git before intellij somehow manages to corrupt em

arctic moth
red sedge
#

uh

#

cant you just like idk

#

change the packets?

arctic moth
#

oh wait im retarded it only needs to be like 6 blocks away from the player

red sedge
#

...

arctic moth
#

i dont need all their rendered chunks for what im trying to do

#

lol

#

anyways how do u get all the blocks in a certain radius from a player

red sedge
#

ig loop through it

limber mica
dusk flicker
#

Not sure why you are asking here

hybrid spoke
dusk flicker
#

Another Java focused discord can prob help a lot more

limber mica
hybrid spoke
#

no

#

you can wait efficient for the input, check it efficient and reopen the dialog very efficient

quiet ice
#

Perhaps with event/action listeners

#

But idk how JavaFX works

tender shard
wooden fable
#

Is there any way to get the tool used to damage from a EntityDamageByEntityEvent?

young knoll
#

Get the damagers held item

arctic moth
#

is there a way of making a block invisible to a player but have it apply normal block physics instead of the little lagback things?

young knoll
#

Make it a barrier client side

wooden fable
hollow sand
#

Anyone know why console throws me an error when I run a command?

arctic moth
hollow sand
wooden fable
#

Uh there is an offhand slot to

#

So if he used it's sword with that, it wouldn't work

young knoll
#

You can't attack with offhand

arctic moth
#

ig setting it to air works but i dont want to have the weird lagback thing

wooden fable
arctic moth
#

lol

limber mica
#

Do while loops do anything in javafx programs since the instance only runs once?

worldly ingot
#

wat

#

A while loop is going to run such that its condition is true

arctic moth
#

anyone know how to get the previously held item in PlayerItemHeldEvent the event.getPreviousSlot() seems to be just spewing random numbers lol

mellow edge
#

is batter to have one event and then execute code with ifs or to have multiple implementations of the same event

arctic moth
mellow edge
#

ok, I am making a plugin for everything bassiclly ;)

young knoll
#

Using ifs will be slightly faster

arctic moth
#

yep

#

lol i just prefer implementations tho

arctic moth
#

this is what i get from just scrolling in one direction

#

not exactly in order

#

like when i press 5 to go to the 5th slot it sometimes does 8, 3, etc.

mellow edge
#

thanks for suggestions, I will keep multiple implementations way

arctic moth
#

lol

#

how would i find blocks that are currently in a player's view?

vast spruce
arctic moth
#

including f5 if possible

vast spruce
#

I donโ€™t think thereโ€™s a method for it

vast spruce
#

Like loop all blocks in radius

arctic moth
#

and i dont feel like doing raytracing cuz rip server

vast spruce
#

Mhm true

arctic moth
#

ig i could check for air exposed but idk

#

that would also count cave blocks

vast spruce
#

Then youโ€™d have to deal with caves ye

#

Iโ€™m unsure if thereโ€™s a server efficient way

sullen marlin
#

?xy

undone axleBOT
vast spruce
#

Vector lineOfSight = player.getEyeLocation().getDirection();

#

Maybe u can make a for loop with displacements

arctic moth
#

what if i check for blocks that have air next to them that is on the side closest to the player?

vast spruce
#

U might need normalize() too

terse ore
#

How do I open an inventory to the sender of the cmd?

arctic moth
#

but still

#

C A V E S

vast spruce
arctic moth
#

lol

vast spruce
#

Or openInventory

terse ore
#

nono

#

i was going to send ss

#

1 sec

vast spruce
#

Ok

terse ore
vocal cloud
#

What's the issue here?

vast spruce
#

Cast to player

arctic moth
#

(Player) sender

#

not sender

vast spruce
# terse ore

Of ur missing a param, canโ€™t recall them

#

Press ctrl+p for params

vocal cloud
#

What does the error say lol

vast spruce
#

In the method

arctic moth
terse ore
#

it's right

#

if I use player it works

vast spruce
#

Or just put null

terse ore
#

but the issue is not that

vast spruce
#

Inv owner is dumb

terse ore
#

is when using sender

vast spruce
#

You can open the inv to anyone then

vast spruce
#

Player p = (Player) sender;

arctic moth
vast spruce
#

Yea right

#

if(!sender instanceof Player){return true;}

hybrid spoke
#

if(!(sender instanceof Player)){return true;}*

terse ore
#

nono

terse ore
#

wait

hybrid spoke
arctic moth
#

wdym

hybrid spoke
#

wait RL round started

arctic moth
#

lol

vast spruce
#

Ah yes

arctic moth
#

well technically im actually trying to get every block thats not in player view

#

lol

vast spruce
#

What are you gonna use this value for

#

Maybe thereโ€™s an easier solution

arctic moth
#

lol

vast spruce
#

?

hybrid spoke
#

what exactly are you trying to do

vast spruce
#

Yea

arctic moth
vast spruce
#

R u making a client?

arctic moth
#

no

#

packets

#

lol

vast spruce
#

Ah

young knoll
#

But like

#

Why tho

arctic moth
vast spruce
#

Theyโ€™ll just, check for the block behind the air

arctic moth
#

if the client cant intercept the packets that there are blocks there, then it cant pathfind to stuff like diamonds

hybrid spoke
arctic moth
#

but theyll appear if they are in player view

#

so someone could still go mining legit and find them

quaint mantle
#

so do orefuscator

arctic moth
#

but things like xray wont work

#

and baritone

dusk flicker
#

isnt that.. legit what antixray/orefuscator is?

arctic moth
#

idk

#

lol

vast spruce
#

Just send fake ore packets

quaint mantle
#

dont waste time doing that, you should go for paper's builtin or orefuscator plugin

vast spruce
#

If they mine a block next to them multiple times

#

Kick

arctic moth
vast spruce
#

So?

arctic moth
#

what if they were just mining lol

vast spruce
#

I meant next to the packet ore

quaint mantle
#

kick them for the next 10 days is not the same as banning them 10 days right? right? ๐Ÿ˜‚

vast spruce
#

Like, if they mine a block next to the packet ore quickly in a row

#

It means they cheat

quaint mantle
#

i think i should never ban anyone, should just kick them pernamently

hybrid spoke
#

you'll have to iterate over the blocks near a player over and over again if a block updates

vast spruce
#

Check when they mine and loop in radius 1 around mined block

arctic moth
#

and they happen to go where the packet ores are

dusk flicker
#

i feel like all those iterations could take a lot of time/lag

vast spruce
#

Thats what im saying, multiple times quickly is suspicious

#

It can happen sometimes

#

But not all the time

hybrid spoke
vast spruce
#

For legit ppl

hybrid spoke
#

the sent packets stay

vast spruce
#

Yea

hybrid spoke
#

you'll just have to update if the player moves

vast spruce
#

Or pickaxe swing

hybrid spoke
#

not really if he's air'ing everything

arctic moth
vast spruce
#

Yes but pickaxe swing can be used in a diff way

#

Like, get target block behind

#

If fake ore

#

Flag

#

If flag > 5 kick

#

Reset flag every x seconds

hybrid spoke
#

i like the idea of air'ing everything

#

i mean xray would be totally useless

vast spruce
#

It can flag baritone too

#

As it goes for ores

#

And it looks at em too

young knoll
#

I prefer the anti-xray that spams ores everywhere and lags out the hackers

dusk flicker
#

lmao

#

yes

vast spruce
#

xD

quaint mantle
#

paper's built in does that

#

i guess

young knoll
#

mhm

vast spruce
#

Create solution? โ›”
Never even start server? โœ…

hybrid spoke
#

can't client devs just listen for these packets

#

and cancel them?

vast spruce
#

Modern problems require modern solutions

quaint mantle
#

dont sent any packets about ore at all

vocal cloud
#

shrug1 win win?

quaint mantle
#

no more lags

vast spruce
hybrid spoke
#

not really

#

they could flag the locations

vocal cloud
#

How?

hybrid spoke
#

do some algo to get the patterns

#

and cancel the patterns

young knoll
#

This is why you modify the main outgoing packets

vast spruce
#

and overload cpu cores

#

Nice

vocal cloud
#

There would be way to many false positives

vast spruce
#

Yea lmfao

hybrid spoke
#

sure but you would still see some ores

vast spruce
#

How about new chunks

vocal cloud
#

Also you're assuming that they send the valid ore locations but they dont

hybrid spoke
#

and i bet the world packets are sent before some orefuscator packets

young knoll
#

No

#

They manipulate those said packets

vast spruce
#

Yea they modify the packets sent

#

They dont add more

vocal cloud
#

It's a smart way to prevent any workaround

hybrid spoke
#

ah

vast spruce
#

Thats why u use protocolLib and modify them

#

Not create

hybrid spoke
#

never really looked at stuff like that

vast spruce
#

Ah

#

Its complicated at first glance so i dont blame u

hybrid spoke
#

i mean its not really complicated

vast spruce
#

Its funny to get in to tho

hybrid spoke
#

my ego wants to find a bypass

vast spruce
#

Like bullying ppl with fake tnt packets and seeing them fly from another acc outta nowhere is hilarious

quaint mantle
#

use resource pack, replace diamond ores with stone.

vocal cloud
#

The only ores you could really detect are the ones on the walls of caves

quaint mantle
#

force that resource pack, if you're not going to use it = you get kick

young knoll
#

The heck is create

vast spruce
#

But that only solves xray

#

Not baritone

quaint mantle
#

baritone is for winner bruh

#

no baritone = no gg

vast spruce
#

U can put ur own txtpack over the one required

hybrid spoke
#

hack prevention prevention seems funny

red sedge
#

how can I set the note of a noteblock

hybrid spoke
#

going to be a client dev soon

vocal cloud
#

ew

vast spruce
worldly ingot
#

I don't think you can change it in the inventory, Elmo

hybrid spoke
#

after successfully prevent the hack prevention, i prevent the hack prevention prevention

worldly ingot
#

It's not a tile entity, it doesn't have NBT for that

vast spruce
#

Not sure

#

Oh

worldly ingot
#

It used to be a tile entity I believe, pre-1.13, so it may have been possible then

vast spruce
#

Ah

#

I thought it worked same as signs n stuff which u can pre-set

red sedge
#

is there a way to set a custom note value to a noteblock

vast spruce
#

But yea theyโ€™re not tile entities

red sedge
#

instead of using Note

vast spruce
#

With custom sound

red sedge
#

im going to use that

#

but to set the note of a ntoeblock

#

it says I need a Note.Tone enum

#

is there anyway to do it without it

young knoll
#

Maybe, but why

vast spruce
#

Yea why would u

red sedge
#

because I need to add an extra note

vast spruce
#

How are you planning on doing that

red sedge
#

and not replace one of the existing

#

texturepack

vast spruce
#

Ah

young knoll
#

You can't add a new block state

vast spruce
#

Anyways ima go sleep now

#

Cyall

red sedge
#

its hardcoded?

young knoll
#

Yes

red sedge
#

fucking minecraft

#

i hate this game

young knoll
#

We don't have data driven blocks yet

#

Not sure how you thought we did

red sedge
#

i had hope

#

wait

#

okay

#

can I not add a new state or can I just cant add a note over 24

#

because if I can make it voer 24 i can just play the sound myself

quaint mantle
#

?learnjava

undone axleBOT
young knoll
#

You cannot add a new state

red sedge
#

so I can set it over 24?

young knoll
#

No

#

That's a new state

red sedge
#

ugh

wary harness
#

What is better practice and less consuming for server preformance
getting player:
ServerPlayer sp = MinecraftServer.getServer().getPlayerList().getPlayer(u);
or ServerPlayer sp = casting Bukkit Player to Craft Player and using getHandel ?

young knoll
#

Probably just casting

red sedge
#

eh there are like a billion different noteblock states

#

if i change one so uncommon no one will ever notice

#

hopefully

young knoll
#

Change all of em and reimplement noteblocks yourself

red sedge
#

how?

#

ohj

hybrid spoke
#

casting is bad and get the player by the players list is just iterating

#

i would go with iterating

wary harness
young knoll
#

Why is it iterating

buoyant viper
#

going thru all the players until it finds match?

hybrid spoke
young knoll
#

Map?

buoyant viper
#

is it map?

young knoll
#

It should be

#

Anyway, casting is very cheap

buoyant viper
#

today i am realizing i might not know how maps work

wary harness
#

it is a Map

young knoll
#

Maps are not iteration

quaint mantle
wary harness
quaint mantle
#

?learnjava

undone axleBOT
young knoll
#

Yeah, so not iteration

buoyant viper
young knoll
#

Hashcode based

buoyant viper
#

hmm

young knoll
#

I mean I guess there will be some iteration in the event of a hash collision, but those aren't common

hybrid spoke
#

i mean, technically a maps get still iterates

#

also casting is not really cheap

wary harness
#

so it that way better then casting Bukkit player

#

xd

#

because I do it a lot

young knoll
#

You are casting a class to itself in this case

wary harness
#

to rotate fake armorstand

young knoll
#

Player is always a CraftPlayer

terse ore
#

How do I put a player head with skullowner nbt in an inv

quaint mantle
#

because craftP is the only imple of player

young knoll
#

In spigot anyway

#

I think Glowstone implements the bukkit api too

quaint mantle
#

paper api

terse ore
#

How do I put an nbt on an item from an inv?

young knoll
#

That is built on spigot

quaint mantle
#

technically still bukkit

hybrid spoke
#

just get the player by requesting to mojang

young knoll
#

Paper still uses CraftPlayer

terse ore
eternal oxide
#

?pdc

young knoll
#

If you want vanilla NBT on it

#

Then itโ€™ll be BlockStateMeta

terse ore
#

yeah

buoyant viper
#

hmm

quaint mantle
#

Hey, is there some event for when shulker gets destroyed by fire/cactus and so on?

young knoll
#

EntityDamageEvent

#

EntityDeathEvent

crimson marsh
#

Anyone know a fix?

buoyant viper
#

internally it looks like something like HashMap#get is close to the behaviour of iterating through a linked list

hybrid spoke
#

"Declare repository providing the artifact"

young knoll
#

It definitely doesnโ€™t go through every entry

#

Which is why large maps perform well

hybrid spoke
#

still iterating

buoyant viper
#

it goes through until it finds the one it needs, like u would do with an array, no?

red sedge
#

Wait can I use chests for the extra note?

buoyant viper
red sedge
#

since chests are a blockentity

brave sparrow
#

Each bucket functions basically as a LinkedList

red sedge
#

I should be able to technically retexture it

young knoll
#

So it iterates the contents of 1 bucket

brave sparrow
#

It doesnโ€™t iterate the buckets

#

It computes exactly which bucket the key has to be in

#

And then checks that bucket

red sedge
#

coll?

young knoll
#

Can you change the number of buckets

brave sparrow
#

As buckets grow in size, the number of buckets increases and the entries are shuffled around accordingly

#

Thatโ€™s why a hashmap get is an amortized constant time operation

young knoll
#

Yeah you can retexture a chest

#

But then you wonโ€™t have a normal looking chest

red sedge
#

cant I use like

#

a data in the chest to retexture it

#

idk

young knoll
#

No

#

Maybe with optifine

red sedge
#

I was going to say custommodeldata but im pretty sure blockentities dont have that

young knoll
#

Correct

olive lance
#

What is the compatibility with api versions? Trying to run my plugin and its unsupported api version 1.18 im running 1.16. If i compiled the plugin against an earlier version than 1.16 would it work in that case then

quaint mantle
#

no

#

plugin.yml

#

api-version: 1.13

viral cargo
#

how i can make a knockback effect to all players around the block?
like a explosion effect but not an explosion...

quaint mantle
#

well actually its not that important to use 1.13

#

but most people do that

#

ask @tender shard

olive lance
#

oh thats weird i thought it was something else cause it worked on 1.18 servers

red sedge
#

they seem to have a lot of data

young knoll
#

A plugin with API version 1.18 will not load on any older version

#

Even if itโ€™s technically compatible

brave sparrow
red sedge
#

minecraft is pain

olive lance
#

will a plugin on 1.14 api version load on any newer version?

young knoll
#

Yes

olive lance
#

ok cool

buoyant viper
#

it should load on anything >=1.14

viral cargo
brave sparrow
viral cargo
#

eg: if north -> velocity effect to north

young knoll
#

Use vector math

brave sparrow
#

Compute the vector and apply it

viral cargo
young knoll
#

Subtract the players location from the blocks location.toVector

#

Or the other way around, I never remember

brave sparrow
#

Youโ€™ll also want to normalize and apply the factor you want in order to get the right power

young knoll
#

Then you can normalize and multiply it however you want