#help-development

1 messages · Page 1494 of 1

granite stirrup
#

i did

sullen dome
#

see what?

granite stirrup
#

the code u sent

rocky umbra
sullen dome
#

i sent code? where

granite stirrup
#

this is what u sent

#

here

sullen dome
#

i thought you didnt see anything?

granite stirrup
#

i did see it

sullen dome
#

weird

granite stirrup
#

lmao

sullen dome
#

no you didnt

granite stirrup
granite stirrup
quaint mantle
#

whew

sullen dome
#

you didnt see any of my errors

#

please

#

keep them out of your sight

granite stirrup
#

i did

rocky umbra
granite stirrup
sullen dome
#

imagine beeing unverified

#

pff

quaint mantle
#

😭

wraith rapids
#

i am the patron saint of the unverified

sullen dome
#

now it works perfectly tho. thanks

iron condor
#

is there a way to do tasks in PlayerMoveEvent but not so often? (with a delay)

sullen dome
opal juniper
#

how to make super duper fast api request xD

sullen dome
#

oh god helll

eternal oxide
sullen dome
#

i fell like a whole dark oak forest in one

#

holy

granite stirrup
#

let them live to slowly die a painful death

sullen dome
#

because i dont like them floating around lol

iron condor
# eternal oxide Explain what you want to do?

I have an item that his name has to change based on the coordinates of the player but I feel like setting the metadata every time he moves will be a bad idea on the performance since many players running could be bad (I think).

sullen dome
#

and you ask why i hate humans? thats why

granite stirrup
#

lol

eternal oxide
opal juniper
sullen dome
#

its probably an iteam that shows the coords of the player

#

or smt

#

iteam. cool

granite stirrup
#

iteam sounds like a apple thing

sullen dome
#

I present you:
The new Apple iTeam -

used for online classes

#

starts at 99,99€ per month

granite stirrup
#

lol

sullen dome
#

The Ability to invite more than 5 people is available for extra 26,99€ per month

iron condor
sullen dome
#

thats how they sold me my iphone 11 lol

#

like no way to charge it lmao

cloud berry
#

guys can there b such a thing as a .mca file wit zero generated chunks? .-.

eternal oxide
quaint mantle
#

anyone can help me?

iron condor
wraith rapids
#

a .mca is its own miniature filesystem

sullen dome
#

cant you see what bField#set needs as 2nd param?

wraith rapids
#

it can store zero chunks in it

#

but i doubt any such files are generated by the minecraft server naturally

quaint mantle
cloud berry
quaint mantle
#

but i can't understand what

granite stirrup
#

[object Object]

sullen dome
#

well that could probably be everything lol

wraith rapids
#

i'm sure you can find a mca editor or viewer online

eternal oxide
cloud berry
#

mca editor 😄 ty ill hav 2 check

sullen dome
#

cant intellij support mca?

cloud berry
#

at least ill kno if me code is workin or not lol

opal juniper
quaint mantle
#
Field bField = PathfinderGoalSelector.class.getDeclaredField("b");
bField.setAccessible(true);
bField.set(c.goalSelector, ??ANYTHING??);
sullen dome
#

well no, it doesnt

#

nvm i opened an json, not an mca

my bad

quaint mantle
#

b in PathfinderGoalSelector is this:

private static final PathfinderGoalWrapped b = new PathfinderGoalWrapped(2147483647, new PathfinderGoal() {
        public boolean a() {
            return false;
        }
    }) {
        public boolean g() {
            return false;
        }
    };
sullen dome
#

i literally have no clue how PathFinderGoals work

#

not a small idea

wraith rapids
#

that is static and final

#

you will have a difficult time modifying that

sullen dome
#

lol

granite stirrup
#

lmao is it even possible to use a PathfinderGoal without nms

sullen dome
#

dont think so

quaint mantle
#

i need set this field anyway

wraith rapids
#

use paper's ai goals api

lean gull
#

can anybody help?

        meta.setDisplayName(name);
        if (!lore.equals("/"/"")) {```
https://i.imgur.com/WadF5iD.png
sullen dome
#

tf

#

that looks funny

lean gull
#

lol wat

granite stirrup
#

do ' then \ and then another '

lean gull
#

that'll do """

wraith rapids
#

what are you even trying to do

lean gull
#

i want it so if the lore is set to "" it won't do anything

quaint mantle
granite stirrup
lean gull
#

not lore i mean, sorry

wraith rapids
#

lore is probably a list

lean gull
#

the string

sullen dome
#

i hate string formatting

quaint mantle
wraith rapids
#

a list will never be equal to a string

sullen dome
lean gull
#

it's a list string

sullen dome
#

because why... that doesnt sound right lol

lean gull
#

but the value it's set to is singleton

quaint mantle
sullen dome
#

interesting

lean gull
sullen dome
#

i mean, i personally need to use paper, because without paper my server couldn't nearly run 32chunks render distance lol

wraith rapids
#

a list will never be equal to a string

quaint mantle
granite stirrup
#

@lean gull are u 11?

lean gull
#

i don't understand

wraith rapids
#

the type of the list doesn't matter; a list is a list

#

an apple will never be an orange

sullen dome
#

well

wraith rapids
#

a basket of oranges will never be an orange

lean gull
sullen dome
#

i would disagree there lol

wraith rapids
#

it might have oranges in it

#

but it's still not an orange

chrome beacon
quaint mantle
sullen dome
#

is an orange apple an orange? i'd say so haahaha

lean gull
#

your metaphor confuses me

unreal sandal
#

How can I send my code with md5 past ?

chrome beacon
#

?paste

undone axleBOT
sullen dome
#

?paste

undone axleBOT
sullen dome
#

fuuuuuuuu

#

i hate you

chrome beacon
wraith rapids
#

List<Orange> will never be an Orange

#

a List<Orange> is a List

#

it simply has Orange's in it

unreal sandal
#

Sorry 🙂 so how can I send my code with md5 paste ?

wraith rapids
#

that doesn't make it an Orange

sullen dome
#

it's definitely an orange

chrome beacon
sullen dome
#

not gonna change my mind hehe

lean gull
#

what do i do tho doe

unreal sandal
#

Yes i save and then ? Because when i take my code and paste it on discord it is white

sullen dome
#

theres too many o's for my brain

chrome beacon
#

;/

lean gull
#

lol i accidently said "tho doe"

sullen dome
#

i say weird wrong stuff all the time

chrome beacon
sullen dome
#

but i have excuses lol

lean gull
#

wat do i do doe tho doe

chrome beacon
sullen dome
#

i still get confused with an and a. tho i know what to say mostly, sometimes i get confused

quaint mantle
#

?jd

unreal sandal
#

Okay thank you, So I have a problem with my CustomChatEvent, I would like to separate the chat per world and do an event fort that but there is no message in the chat when a player send a message

sullen dome
#

i mean, i know you say an if there's an a,b,c,d,e before the next word

#

i guess so

quaint mantle
cloud berry
#

@wraith rapids may i sho u my code .-. its just liek 20 lines

sullen dome
#

not abcde

#

im dumb

#

a,e,i,o,u

unreal sandal
sullen dome
quaint mantle
#

a,e,i,o,u

sullen dome
#

ok

#

we call it Vokale lol

quaint mantle
#

all others - consonant

sullen dome
#

nocsonant? sounds funny

#

oh

chrome beacon
sullen dome
#

german should be the world's main language imo

#

makes it just easier for me

wraith rapids
#

TOTALEN KRIEG

sullen dome
#

i already told you

#

saying that isnt the best idea

quiet ice
#

Idioten

wraith rapids
#

what are you going to do

#

blitzkrieg me?

sullen dome
#

oh god

unreal sandal
chrome beacon
#

Add some debug messages and see if it gets called

sullen dome
#

ich hoffe deine Ärmel rutschen beim Hände-waschen runter

#

you jerk

cloud berry
#

...somethin bout hand washin? 😄

sullen dome
#

yea

sullen dome
#

something

wraith rapids
#

ah yes, the real übermensch does not say such words

sullen dome
#

übermensch? dafuq

granite stirrup
#

wait u can make custom events in spigot?

chrome beacon
#

Yes lol

sullen dome
#

you are more like untermensch lol

#

is untermensch actually a swear word? idk

cloud berry
#

wait @wraith rapids y r u a norman .-. shouldnt u b veryfy'd by now

sullen dome
#

some people dont like that word

granite stirrup
#

?

wraith rapids
#

let them not like it

quiet ice
sullen dome
#

lol

#

ich hoffe dein Löffel fällt dir morgen früh ins Müsli

cloud berry
quiet ice
sullen dome
#

so, i probably shouldnt say it right? xd

quiet ice
#

I mean, there are worse things to say

sullen dome
#

like the n bomb for example lol

quiet ice
#

I mean honestly, it isn't a de-facto swear word (too lazy to look up the exact meaning of swear words so I may be really wrong there) but more of an insult

sullen dome
#

i mean, some people could say, untermensch could distract poor people or smt

#

probably depends on how people interpreting it, like you said

wraith abyss
#

hi i need help because i want to use plugins in my server but i dont know how to use spigot to do it :c can somebody help me??

sullen dome
#

?bt

undone axleBOT
wraith rapids
#

use google

quiet ice
#

I am pretty sure that the word can be easily be connected with the nazi regime, at least I would connect the word with that

wraith abyss
#

i did but im new to this and could be better if someone explains to me slowly :C

sullen dome
#

nazi? lol, i personally would never associate that with some nazi shit

#

but wow, interesting

#

i probably just stop saying that xd

sullen dome
chrome beacon
quiet ice
#

Well, the nazi did categorise people into categories, so I would be surprised if the nazi did not use this word

sullen dome
#

but instead of the vanilla jar-file, you use the spigot-one

wraith abyss
#

i asked in general and they said me to ask here

sullen dome
#

tf?

#

who said that

#

in general

granite stirrup
#

ask in help server

#

lol

wraith abyss
#

im so lost idk what to do, i just created a server and i wnt to use /home and tp to my friends but idk how to do it

granite stirrup
#

yeah sorry mate i cant help ||ur to stupid in minecraft||

sullen dome
#

with external plugins lol

wraith abyss
sullen dome
quiet ice
#

use spigot

wraith rapids
#

well, übermensch is associated with nazi germany quite closely, even though they didn't spawn the word, only used it

granite stirrup
#

carlos

wraith rapids
#

so it's understandable for similar words to trigger the same response

granite stirrup
#

lol

wraith abyss
chrome beacon
sullen dome
#

guys, please calm down

#

really

#

so

granite stirrup
quiet ice
#

heya

#

Calm down or I call the cops (Discord helpers)

wraith abyss
#

shut up kid

granite stirrup
#

lol

wraith abyss
#

i need help because i am like a lost old man

wraith rapids
#

consider getting lost in the right channel

quiet ice
#

Use paper man, you are a lost cause

chrome beacon
quiet ice
#

A lot easier than compiling spigot, but honestly ?bt or bust

sullen dome
#

@wraith abyss

you go the the buildtools site i suggested, and run it (all documented there, pretty easy).

then you take the outgoing jar, put it into a folder.

in that folder you create a file like start.bat

into that file, you put in java -jar -Server -Xmx2G jarfilename.jar nogui

then you just start the .bat-file

#

where Xmx2G means your server runs at maximum 2GB of ram

quiet ice
#

-Xmx always should have a matching -Xms though

sullen dome
#

i dont think its that important in this case

#

i mean, i personally never use xms for localhosts

wraith rapids
#

it's not a production server and he'll probably give up in a few days anyway so it doesn't matter

quiet ice
#

Usually you do not have to specify either unless you want performance, so ¯_(ツ)_/¯

wraith abyss
#

im only listening relarivex because is the only one helpinh so everyone else dont spam

wraith rapids
#

anyway

sullen dome
#

https://www.youtube.com/watch?v=lNp4I-600wo
there's a tutorial in videoform

A simple video that explains download and setting up your own Spigot OR CraftBukkit server for 1.16 and above. I show 1.16.3 in this video, but it applies to every recent version and even future ones! By the end, you will have a working multiplayer server that you and your friends can play on, for free! Yes, this video uses BuildTools, but it's ...

▶ Play video
wraith abyss
#

what is the site you suggested? i dont see it

sullen dome
#

?bt

undone axleBOT
wraith rapids
#

i've found that deep fried onion rings are quite cool

quiet ice
sullen dome
#

he explains it in the video tho i guess

wraith rapids
#

i also arbitrarily load ice cream into the ash tray

wraith abyss
#

thx for the video but i dont think it can work for me because i am in the lastest version

#

1.17

sullen dome
#

1.17 has no spigot yet

#

?1.17

undone axleBOT
#

There is no ETA for 1.17. Having an ETA leads to unrealistic deadlines, false hope, and a bad product. It will be ready when it's ready.

sullen dome
#

so either use 1.16.5 spigot, or 1.17 vanilla

wraith abyss
#

yes i just want to learn and get ready to use it as asoon as possible

quiet ice
#

Anyone asking for an eta will be fed to the goblins

wraith rapids
#

👺

sullen dome
#

it doesnt matter which version the tutorial is, its basically the same way to set it up all the time

wraith abyss
#

then im saving the video too

quiet ice
#

Md should introduce a caret emoji

sullen dome
#

i got a emote-reaction from geol, now i can die in peace

lol

wraith abyss
#

and do you know how long more or less does it takes to have ready the 1.17 spigot version?

sullen dome
#

?eta

chrome beacon
#

?eta

undone axleBOT
#

There is no ETA. Having an ETA leads to unrealistic deadlines, false hope, and a bad product. It will be ready when it's ready.

#

There is no ETA. Having an ETA leads to unrealistic deadlines, false hope, and a bad product. It will be ready when it's ready.

sullen dome
#

hah

#

not this time ma dud

pulsar patrol
#

From what I remember, Spigot is taking longer with 1.17 than they did with 1.16.. but I don't know how long it takes on average, and 1.17 might be a particularly large update Mojang-code wise

wraith abyss
#

ok ty

quiet ice
#

I do not think that the mojang code is at fault

wraith abyss
#

i think i got everything i need

chrome beacon
#

It's a draw now

wraith rapids
#

didn't mojang like omit half of the promised features anyway

sullen dome
#

lol

wraith rapids
#

"they'll be in 1.18 we promise"

sullen dome
#

interesting

quiet ice
#

It is just spigot's sloppy work that hit them back again

wraith rapids
#

better watch your tongue

pulsar patrol
wraith rapids
#

we don't shit talk bukkit or its derivatives here

quiet ice
#

anyways, I should go now

wraith rapids
#

unless it's paper

sullen dome
#

lol

quiet ice
#

paper is deprecationville

wraith rapids
#

bukkit is perfection

pulsar patrol
#

I meeeaaan

#

Our server uses Tuinity because Spigot is waaaay too unstable. Paper is better but we need the real cutting edge optimisations and Spigot doesn't have any of that.

chrome beacon
#

Spigot isn't unstable

sullen dome
#

idk is tuinity actually that much more performance from paper?

#

never tried it

pulsar patrol
#

Hell yeah, Paper's async chunks alone is enough to not use Spigot

chrome beacon
wraith rapids
#

spigot is PERFECTION and anyone who uses or contributes to a fork is selfish and conceited and only thinking about their own gain, instead of sharing their work with the entire ecosystem

#

you will literally go to HELL for using paper

iron condor
#

Does public ItemStack item; holds the reference to the Item even if I change his metadata?

sullen dome
#

imagine you are MiniDigger, who works at paper now :(

#

he sold himself

sullen dome
#

that is the best website ive ever seen tho

#

love it

pulsar patrol
sullen dome
#

isnt that already implemented in paper? lmao

pulsar patrol
wraith rapids
#

it was originally in tuinity

#

and was later merged into paper

sullen dome
#

so, its basically the same as notick-viewdistance in paper?

granite stirrup
#

epic games giving free nitro yum

wraith rapids
#

myes

sullen dome
#

but paper stole it? lmao

#

that fuckers

chrome beacon
#

I mean who cares

#

;/

pulsar patrol
#

I meeaaan, isn't Tuinity made by MiniDigger?

sullen dome
#

idk

quiet ice
#

nonononono

wraith rapids
#

no

sullen dome
#

i just know mindigger works for paper

#

so

pulsar patrol
#

And isn't MiniDigger now a core developer of paper

wraith rapids
#

it'smade by the cat guy

#

like not cat cat

quiet ice
#

SpottedLeaf is tuinity afaik

wraith rapids
#

the guy with a cat as his avatar

#

yeah, him

sullen dome
#

he sold himself to them lol

pulsar patrol
#

but either way, isn't SpottedLeaf also a pretty active developer of Paper?

wraith rapids
#

myes

sullen dome
quiet ice
#

but only recently

sullen dome
#

mostly working for Hangar or smt, idk

wraith rapids
#

see, unlike spigot that is in constant war with all of the downstream forks, paper and its derivatives are all friends

quiet ice
#

Like, one week ago

sullen dome
#

yea

granite stirrup
#

lol

sullen dome
#

like i said, he sold himself. he's not that loyal as you guys think

wraith rapids
#

he's been working on hangar for ages

pulsar patrol
#

We all must sell ourselves at some point

sullen dome
#

then why wasnt he on the team all the time?

#

i mean

wraith rapids
#

not everybody who is an active contributor is in the team

#

there are lots of very active contributors who don't have official standings or roles

sullen dome
#

who dont sell theirselfes :)

#

theirselves? theirselfes? IDK

#

i dont care

wraith rapids
#

themselves

sullen dome
#

fuck you

#

you hate me

#

thats not nice

wraith rapids
#

TOTALEN KRIEG

sullen dome
#

not agaaaaiiiin

#

meinetwegen. TOTALEN KRIEG

#

the general channel is soooo deeead

granite stirrup
#

ik

#

probs cuz of cooldown

sullen dome
#

no

#

the cooldown is there, because it's dead

shut field
#

how do you set entity target?

royal rapids
#

I want to make that when someone is eating the golden apple if they receive a blow to stop eating it. someone help me

somber hull
#

BOOST!

#

i am now server booster

chrome beacon
#

Feel the power

daring maple
#

Like do you want to stop their eating whenever they get hit?

quaint mantle
#

ok so my sever has downloaded a vehichle plugin however some of the feature s is not workign can anyone help?

proud basin
#

I was thinking of using replaceAll or regex to make a placeholder but I feel like there is a better way, any ideas? making a place holder for a click event

eternal oxide
royal rapids
eternal oxide
#

store in a Map the last damage time under the Players UUID

quaint mantle
#

ok so my sever has downloaded a vehichle plugin however some of the feature s is not workign can anyone help?

eternal oxide
#

all you have to do then is check that time in the PlayerItemConsumeEvent

#

Too close to now and you cancel

daring maple
#

This would just put a cooldown on eating after a hit tho right?

#

not the otherway around

eternal oxide
#

no

#

teh consume event fires at teh end of eating

daring maple
#

Ah

#

I see

#

Yeah that'd make sense

eternal oxide
#

so if you take any damage before you finish eating the time get logged in the map

royal rapids
#

there is no event in spigot a configuration?

eternal oxide
#

configuration has no events

#

events are triggered by in game actions

daring maple
#

@royal rapids if you want this you would have to make a plugin, I hope you know that.

iron condor
#

why wont this work?

    public void onEnable() {
        BukkitTask deathDistanceUpdater = new DeathDistanceUpdater(this).runTaskLater(this, 20);
}
public class DeathDistanceUpdater extends BukkitRunnable {
    @Override
    public void run() {
        System.out.println("works");
}
eternal oxide
#

This channel is for obtaining help to write plugins, not to write them for you

iron condor
#

nothing gets printed

quaint mantle
#

ok so my sever has downloaded a vehichle plugin however some of the feature s is not workign can anyone help?

quaint mantle
#

no one talking

eternal oxide
#

This is the wrong channel

eternal oxide
iron condor
#

I have no errors either

eternal oxide
#

if yoru plugin is enabled that is

iron condor
#

Other featues of it do work

#

oh wait my bad

eternal oxide
#

You must be doing something wrong. The code you posted above is fine

iron condor
#

I want to make it repeat it self

#

it printed once

#

missed that

#

repeating scheduled tasks is my goal

wispy bridge
eternal oxide
#

then runTaskTimer

sharp bough
#

is ```
Bukkit.getOnlinePlayers().forEach(p -> ((CraftPlayer) p).getHandle().playerConnection.sendPacket(particle));

the best way to spanw a particle for all  players?
sullen dome
#

probably

sharp bough
#

cuz player.spawnParticle will only show it for the player

eternal oxide
#

Why use packets when you can use the API?

sharp bough
sullen dome
#

if mean, you could use for(Bukkit.getOnlinePlayers(){ //cast it //send })

iron condor
#

delay is before starting the task while period is the time between the tasks?

sharp bough
eternal oxide
#

and many others

sharp bough
#

wich works

wispy bridge
#

Spawning the particle in the world would be the correct way to do it

sullen dome
#

actually i remember where i fucked up and did like }, 20L, 0L);

was kinda funny

eternal oxide
#

World#spawnParticle shows to everyone

sharp bough
#

thank you

sullen dome
#

is there a Tag for Ore's?

#

couldnt find one

eternal oxide
#

only gold ores

sullen dome
#

sad

eternal oxide
#

you can just check the getType().name().endsWith("_ORE")

sullen dome
#

well

#

imagine people use anvils

lyric grove
#

Hi, im getting the string using this

sullen dome
#

well nvm, its a placed block... that shouldnt let a name change

lyric grove
#

but its only showing up in capital letters

chrome beacon
lyric grove
#

.getName()?

gaunt relic
#

Use your getter?

lyric grove
#

ok

bitter briar
#

?1.17

undone axleBOT
#

There is no ETA for 1.17. Having an ETA leads to unrealistic deadlines, false hope, and a bad product. It will be ready when it's ready.

empty swallow
lean gull
#

anyone know how to set a variable of a uuid

eternal oxide
#

a UUID is an object

lean gull
#

i don't know what an object is

eternal oxide
#

Not to be rude, again, its basic java

wraith rapids
#

java is an object oriented language

lean gull
#

the tutorial i watched on basic java didn't include it lol

wraith rapids
#

that is, the language revolves around objects, and everything being objects

#

it is fundamental to the language

shut oyster
#

Does anyone here have some page or article about using Anvil as InventoryType? I figured out that spigot doesnt have an easy way to open an inventory for player with a anvil than it has with a normal virtual 'chest' and im trying to find some more documentation.

wraith rapids
#

afaik should be about as straight forward as a chest

#

Bukkit.createInventory

shut oyster
#

yea it as simple but the opening of the player isnt done the same as p.openInventory(inventory);

#

all u can do rn is send a gui thru packets like this:

wraith rapids
#

are you sure

shut oyster
#

Connection.sendPacket(new PacketPlayOutOpenWindow(1, Containers.ANVIL, new ChatComponentText("IT WORKS!")));

shut oyster
wraith rapids
#

you'd think that createinventory would instantiate an inventory that you could pass to the openInventory method

#

guess not

eternal oxide
#

What issue?

shut oyster
#

well opening a inventory with the InventoryType.ANVIL doesnt function as seems

pastel drift
#

Sending a packet is the only way, I think.

eternal oxide
#

recipes not working?

pastel drift
shut oyster
pastel drift
#

That library has support for items, too.

wraith rapids
#

yeah, basically any non-container inventory type added since like the furnace is completely fucked up in the api and nearly inoperable

shut oyster
wraith rapids
#

enchanting tables, anvils, that map workbench thing and grindstones and everything

#

it's all horrible

eternal oxide
#

Workbench and enchanting tables have their own method to open them

eternal night
#

maybe we just need an anvil one

#

well paper has it

shut oyster
#

actually?

eternal night
#

yes

eternal oxide
#

Someone needs to make a PR for spigot to add anvil then

wraith rapids
#

obviously paper has it

#

shit like this is cancer to work with

#

meaning people make prs

shut oyster
#

how big is the step from converting a spigot plugin to paper?

eternal night
#

like, it is the exact same code as workbench xD

#

rn, none

wraith rapids
#

there is none

eternal night
#

all spigot plugins work on paper

wraith rapids
#

paper is api-compatible

#

you just change your dependency from spigot-api to paper-api and you're done

shut oyster
#

oh shit ofcourse

wraith rapids
#

the actual issue is that using paper-specific api methods will blow up on spigot

eternal night
#

just obviously means that, when using the paper-only api your plugin can only run on paper servers

wraith rapids
#

as those methods don't exist on spigot

#

but, spigot servers are a minority these days so whatever 😎

eternal night
#

I mean, around 33% are still spigot

#

lol

shut oyster
#

because to my knowledge paper is build from spigot but did it change alot as in the already existing libaries ?

wraith rapids
#

the api is more expansive

#

the biggest difference from spigot api that you'll notice is that instead of using chatcomponents and strings in a lot of places, they're quite agressively driving forward adventure

#

which is basically chatcomponents but overengineered

#

aside from that, everything is almost exactly the same, except that you can do a lot more with the api that you'd have to use nms or protocol hacks for on spigot

shut oyster
#

right not exactly sure what you mean but ye, paper fast and better

wraith rapids
#

there are also quite a few things that let you optimize your plugin better, f.e the Block::getState(boolean) overload, which lets you decide whether to deep clone the state of the block or not

shut oyster
wraith rapids
#

where spigot clones it regardless of what you do

cold tartan
#

could someone help me with permissions?

#

i added permission: origins.givepot to my plugin.yml

#

but it doesn't work

pastel drift
cold tartan
#

im still able to do the command

pastel drift
#

That only registers the permission.

cold tartan
#

oh, ok

pastel drift
#

I think you'll still have to check for the permission in code.

cold tartan
#

k ty

#

also

#

is there a way to get the default permission error code?

#

like this thing:

granite stirrup
#

u dont need a permission: permission in plugin.yml lol

cold tartan
#

oh

granite stirrup
#

u dont need to register a permisison

#

lol

pastel drift
#

If you want to set something to true by default.

granite stirrup
#

bruh my optifine is bugged

pastel drift
#

Or want to create permission groups, then yes.

slow chasm
#

free nitro on epic games store if you want

granite stirrup
#

my optifine is broken

#

its latest tho ;-;

slow chasm
granite stirrup
#

does anyone know why optifine 1.17 isnt rendering shit

pastel drift
#

Because it's in beta.

shut field
#

how do you set an entities target?

worldly ingot
#

Was going to say, it's a pre-release Optifine

shy plaza
granite stirrup
shy plaza
#

but yeah it's definite ymmv

granite stirrup
#

lmao

shy plaza
#

out of curiosity, whats ur graphics card?

granite stirrup
granite stirrup
#

so it isnt my graphics card

shy plaza
#

there's a lot more ways for it not to work then for it to work

granite stirrup
#

its just optifine

shy plaza
#

correct, it's pre-release

granite stirrup
#

chunks load if i update it

shy plaza
#

your render dist?

#

what do you mean by update it

granite stirrup
granite stirrup
shy plaza
#

oh i see

cold tartan
#

pls is there a way to get default error message like this

granite stirrup
cold tartan
granite stirrup
#

like use ChatColor.red

#

and things

#

idk

shy plaza
#

@granite stirrup honestly you'll probably just have to wait for the next rc

pastel drift
worldly ingot
#

If you assign to your command a permission node, it will show that message

cold tartan
shy plaza
#

There's not really anything you can do

shut field
granite stirrup
#

idk why the bugs happening should i report it to optifine ?

worldly ingot
#
commands:
  mycommand:
    permission: my.command.node```
worldly ingot
#

If my.command.node isn't granted, it will show that no permission message when they try to run that command

#

It also won't be sent to the client so it's not tab completable

shy plaza
#

again, you're running a prerelease, so ymmv

#

there's expected issues

shut field
worldly ingot
#

It needs to be a Mob ;p

#

It's part of the Mob interface

pastel drift
#

void setTarget​(@Nullable LivingEntity target)

shut field
#

I also tried casting it to LivingEntity and did not change it, and of course I tried just doing it to regular entity

#

I found the issue

cold tartan
#

is there a way to hide commands from non-op players like /give is

granite stirrup
#

if player isnt op

cold tartan
wraith rapids
#

they are hidden by default

#

tab completions pull from the player's command map, which is based on the player's permissions

granite stirrup
cold tartan
#

ohhhhhh, wait........ im dumb, i forgot to build my plugin, thats why all my permission stuff wasnt working

wraith rapids
#

if a player lacks the permission associated with a command, the player will not see that command in /help or in their tab complete

#

which is why you should always assign permissions to your commands in your plugin

wraith rapids
#

otherwise everybody will be able to see and tabcomplete those commands

#

and the server admin will need to either modify your plugin.yml for you, or get a shitty command hider plugin

digital plinth
#

is there an event that detects player upgrading a diamond armor to netherite armor?

#

on smithing table use or something

granite stirrup
#

anyone have $10 for a optifine cape

#

XD

daring maple
digital plinth
#

also i can get damageCause from entityDmgEvent

#

i can also check if the dmg is caused by an explosion

#

but can I find out what caused the explsion?

#

like a tnt?

#

or a creeper

wraith rapids
#

that should be possible to find somewhere

#

but i'm not sure if the api reflects that

daring maple
#

Im sure its possible, just don't know from the top of my head tho

#

I think you need EntityDamageByEntityEvent to get the creeper and/or EntityDamageByBlockEvent to get the bed

granite stirrup
daring maple
#

true

sullen dome
#

Explosion-Damage is Explosion-Damage - No matter if it comes from a Creeper, or from TNT

#

The DamageCause is always just [Explosion]

wraith rapids
#

the damage cause is still tracked somewhere somehow, as the game is able to associate f.e a tnt shot by a player with a flame bow as damage dealt by that player

#

whether the api lets you go the same route i'm not sure

granite stirrup
#

e.getDamager()?

wraith rapids
#

presumably by getting and casting the last damage cause itself, and getting the damager

daring maple
#

The DamageCause is always an Explosion yes, but there is also a block or entity that created the cause

wraith rapids
#

though i'm pretty sure that is only for players

#

and the creeper will probably not show up in it

granite stirrup
#

u could try

sullen dome
wraith rapids
#

no; the arrow hits the tnt block

#

which lights it

#

the damage from the explosion of that primed tnt entity is still counted as being caused by the player who fired the bow

#

as in, it will drop experience orbs and shit

#

i remember some popular ender grinder designs used to take advantage of this

digital plinth
#

why cant i cancel the PrepareSmithingEvent

#

bruhhhh

granite stirrup
#

probs cuz its not cancellable

pastel drift
#

You can have a skeleton shoot through lava and ignite TNT and killing creepers. All creepers would drop records.

#

At least how it used to work.

digital plinth
wraith rapids
#

yeah, it's not exactly bulletproof nor does it make sense all of the time

#

but the causes are definitely tracked somewhere under the hood

#

sometimes a bit too fervently

shadow gazelle
#

Would a plugin made in Java 11 work with Java 16?

granite stirrup
#

it might

shadow gazelle
#

They're that much different?

granite stirrup
#

no but it might not since idk

#

since the native version will be java 16

#

it might work u never know

#

u will just have to wait and see

shadow gazelle
#

Oh, yeah.

#

1.17 doesn't even have Spigot support yet

daring maple
pastel drift
daring maple
#

So you could just not give it a result

pastel drift
#

If you aren't using the deprecated and removed libraries, you should be fine with an older Java version. Kind of.

shut oyster
#

hey i made the conversion for my project from spigot to paper but running into some issues using EntityPlayer as in NPC like, does anyone know if paper has its own solution for this or should i go and add nms to my project again

sullen dome
#

maybe its better to ask in paper-discord

shut oyster
#

good idea, thank u

quaint mantle
#

Hey guys I wanna use luckperms variables and stuff in my plugin, what do I need to do ? Import luckperms or something ? Put files in same folder ?

sullen dome
#

if you use maven, just add their repo and dependency

#

into your pom.xml

#

if not, import the jar-file manually

quaint mantle
digital plinth
#

how do i disable damage from end crystals

livid tundra
#

for ```java
creeper_entity=((Creeper) entity)

does creeper_entity equal a copy of entity, or the creeper version of the entity(can I make the creeper explode)(assuming the entity is a creeper)
sullen dome
#

one sec

digital plinth
#

.getEntityType return player

livid tundra
#

.getentitytype returns the person damaged, I think

sullen dome
#
<dependencies>
    <dependency>
        <groupId>net.luckperms</groupId>
        <artifactId>api</artifactId>
        <version>5.3</version>
        <scope>provided</scope>
    </dependency>
</dependencies>

just add this to your pom.xml

digital plinth
sullen dome
#

and then just reload maven. then it should download the plugin into your project

digital plinth
#

gosh

#

annoyingggg

livid tundra
#

I think it is .getcause?

digital plinth
#

yea ik but you get explosion dmg from multiple entites

quaint mantle
livid tundra
digital plinth
#

like creeper and tnt

#

and end crystals

sullen dome
#

no

#

one sec

livid tundra
sullen dome
#

there is this small reload button

#

if you changee the file

digital plinth
livid tundra
#

no, I was thinking

#

I think you should use either entitydamagebyentityevent or entitydamagebyblockevent depending on if an end crystal counts as an entity or block

#

those have the getdamager method

livid tundra
quaint mantle
digital plinth
#

spawn a creeper?

#

get an instance of a creeper?

livid tundra
#

explode a creeper

digital plinth
livid tundra
#

yes, that I got in an entity

digital plinth
#

hmmm

livid tundra
#

that I got from an event

digital plinth
#

creeper.explode

#

:>

livid tundra
#

basicly convert the entity.Entity to an entity.Creeper without causing the entity.creeper to become a copy

digital plinth
#

or creeper.ignite

#

test them out

livid tundra
#

yes, but I'm trying to get the creeper from an entity.Entity

digital plinth
#

well this is how i make a zombie

#

Zombie armoredZombie = (Zombie) loc.getWorld().spawnEntity(loc, EntityType.ZOMBIE);

digital plinth
#

cast the creeper onto it

eternal oxide
#

You cast to Creeper and explode it

digital plinth
#

it should not become a copy

#

i think

livid tundra
#

how do you cast to creeper?

digital plinth
#

never did it

livid tundra
#

I know how to explode it

digital plinth
#

Entity e;

eternal oxide
#

((Creeper) entity).explode()

digital plinth
#

^

livid tundra
#

is there a way to make that a variable? because I need to use it multiple times

#

that's what I was asking

digital plinth
#

it is already a creepr variable

eternal oxide
#

you can't use it multiple times, you are about to blow it up

livid tundra
#

I use it before

#

to set the fuse and stuff

eternal oxide
#

then you already cast it, why are you askign how to cast it?

livid tundra
#

no, I mean could you do this? ```java
Creeper creeper_entity = ((Creeper) entity);
creeper_entity.setFuseTicks(100);
creeper_entity.explode();

eternal oxide
#

if you are setting a fuse you use ignite()

livid tundra
#

ok

#

but would the variable be a copy or not

eternal oxide
#

no

livid tundra
#

so the creeper_entity would explode?

eternal oxide
#

yes

livid tundra
#

it doesn't seem to be working

eternal oxide
#

then your entity is not a creeper

#

where are you getting yoru entity instance from?

livid tundra
#

a list that I filtered

eternal oxide
#

Where is your entity coming from?

livid tundra
#

listofallentitiesinworld.removeIf(entity -> entity.getType() != EntityType.CREEPER);

quaint mantle
# sullen dome there is this small reload button

Hey sorry but how can I check if it works ? I dont think it has downloaded anything when I clicked on reload, should the variables appear when I code like usually liek some luckperm variables would appear in the list as im coding my plugin ?

livid tundra
#

and then the entity is listofallentitiesinworld.get(x)

eternal oxide
#

you are going to cause a LOT of chunk loading using that code

#

are you trying to blow up all creepers?

livid tundra
#

no, then I check all the entities in the list to see if they have a player placed block(long code) nearby, and then I blow them up

eternal oxide
#

then debug yoru code as your explosion code is fine.

#

if you want all Creepers in a world just use World#getEntitesByType(Creeper.class)

livid tundra
#

what does the hashtag mean?

eternal oxide
#

member of

cinder timber
#

how would i integrate multivrrse into my plugin

livid tundra
#

all the code is fine except for the exploding

#

but now I know the problem isn't with the variable as ((Creeper) entity).setFuseTicks(100);//5 second fuse ((Creeper) entity).ignite();
also doesn't work

eternal oxide
#

does it actually get to and run the exploding code?

livid tundra
#

yes, I checked by sending a serverwide message just before the exploding code

#

it sent

#

wait, maybe it's because I run the code 2 times a second?

#

and it keeps igniting?

quaint mantle
#

`` <dependencies>
<dependency>
<groupId>com.destroystokyo.paper</groupId>
<artifactId>paper-api</artifactId>
<version>1.16.5-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
</dependencies>
<dependencies>
<dependency>
<groupId>net.luckperms</groupId>
<artifactId>api</artifactId>
<version>5.3</version>
<scope>provided</scope>
</dependency>
</dependencies>

</project>
`

eternal oxide
#

100 ticks is also a long fuse

quaint mantle
#

@sullen dome Im noob and new so there may be something that I need to set before hand on the program idk

sullen dome
#

i mean your whole pom

#

not just the part. paste it here:

#

?paste

undone axleBOT
sullen dome
#

and if i overread some message, feel free to ping me. i'm watching netflix beside

quaint mantle
#

my anti malware blockin link

sullen dome
#

tf?

#

then use hastebin. basically the same

quaint mantle
#

fuck it too long to paste here

sullen dome
#

wait

quaint mantle
#

k 2 sec

sullen dome
quaint mantle
#

not sure what I shoud do after lol I pasted it but there is no button ?

#

am i supposed to provide a link or something ?

opal juniper
#

Control S

sullen dome
#

^

opal juniper
#

Then copy the new url

sullen dome
#

and then just copy the link in the search bar

quaint mantle
#

weird it doesnt respond to control s

#

or the save button

sullen dome
#

well

#

then

#

just paste it into a .txt file, and send that file

#

that should work, idk tho if you need to be verified for that

opal juniper
#

I imagine

#

What is ur issue ?

quaint mantle
#

lol no it doesnt work dammnit lol

sullen dome
#

he cant use dependencies. seems like the code isnt downloaded or smt

#

send me private

opal juniper
#

Ah ok

sullen dome
#

send fa, i'll accept

shut field
#

how do I make a loop that does not lag my server/game really really badly

#

I have waits in it

opal juniper
#

Don’t use waits lmao

ivory sleet
#

I mean any loop is by default blocking the thread its called on assuming you don't jump to another thread withing the loop

shut field
opal juniper
#

Or - if you absolutely have to - make a new thread

ivory sleet
#

Crota send code

sleek moon
ivory sleet
#

the chances are you're doing something very wrong

opal juniper
#

But using the scheduler is probs better

sullen dome
#

if someone different sent me an FR here, tell me , and why you did

shut field
sullen dome
#

i usually dont accept random requests

ivory sleet
#

Idk RealRivex

shut field
#

how do I do that embed thing like here: (I turned ping off btw)

sullen dome
#

got 3 requests now lmao

ivory sleet
#

```java
code

shut field
#

'''while (!true == false) {
Mob livingEnt = (Mob) trollJuice;
boolean found = false;
for (int integer = 0; integer < 202; integer++) {
List<Entity> entities = trollJuice.getNearbyEntities(integer, 64, integer);
for (Entity e : entities) {
if (e.getType().equals(EntityType.PLAYER)) {
//do compas thing for that player, also post that code, i would be interested in it..
found = true;
founded = (LivingEntity) e;
break;
}
}
if (found) {
break;
}
sleep(50);
}
founded.sendMessage(founded.getName());
livingEnt.setTarget(founded);
sleep(500);
}'''

ivory sleet
#

remove the sleep

shut field
torn crescent
shut field
ivory sleet
#

actually crota I believe you could use a parallel stream here

#

but also

#

!true == false

#

its gonna loop forever

daring maple
#

yes

#

i just wanted to point that out

shut field
ivory sleet
#

oh yeah I see now

#

but its dangerous if nothing is found

#

then it will practically continue to hang the server

wraith rapids
#

everything about that is wrong

#

down to the spelling and grammar of the variables

opal juniper
daring maple
#

if (e.getType().equals(EntityType.PLAYER)

#

isnt it just e instanceof Player

opal juniper
#

Use == for enums but yes you could

ivory sleet
#

the type comparison works also

torn crescent
granite stirrup
#

apparently u can manually do ram in java but the way u do it isnt recommend

wraith rapids
#

instanceof is probably half a nanosecond faster

daring maple
#

I am speed

opal juniper
sullen dome
#

Colclure, it was you lol

#

sending me the FR

wraith rapids
#

colclure

ivory sleet
#

am I getting accepted? 😮

sullen dome
#

if it has a reason, except sending me trash gifs or messages

ivory sleet
#

frankly I don't have a good reason

sullen dome
#

i mean, i dont like getting messages with spam like hey, you want to pay for instagram followers?

shut field
wraith rapids
#

yes

#

delete it

shut field
#

😐

wraith rapids
#

literally everything about it is wrong

#

it is remarkable how wrong something can be

sullen dome
#

why should i accept your request
to ask this way

ivory sleet
#

crota let me ask this, what did you want to accomplish with that

ivory sleet
sullen dome
#

well

daring maple
#

Conclure just wants friends

ivory sleet
#

true that

shut field
sullen dome
#

but only because you seem like a german home

wraith rapids
#

get the players in the world

#

sort by distance squared

sullen dome
#

homie*

paper viper
wraith rapids
#

get the first element

#

done

#

no need to search through the entire world chunk by chunk 200 and 2 fucking times

ivory sleet
#

yeah pulse my f list got a little bit poor after I drained it

paper viper
#

how many ppl you got rid

#

lol

ivory sleet
#

uh an estimated 50%

paper viper
#

Damn

ivory sleet
#

yeah lol

sullen dome
#

so

#

now i accepted your fr

#

and you dont even have anything to say? wow. i actually thought i'll get spammed with stuff

wraith rapids
#

i don't have friends but I do have a long contact list of like 500 people who have asked me dumb and unanswered questions in dms

sullen dome
#

but no, one normal person on this earth

ivory sleet
#

I do have something now when you mention it

sullen dome
#

well

#

what is it

wraith rapids
#

this, paper, and a few others

sullen dome
wraith rapids
#

i don't accept any requests

#

stuff like

I mistakenly deleted most things in my plugin code. My only option is to decompile the imported plugin. But right now I just couldn't do it. Can you do this for me?

daring maple
#

lmao

ivory sleet
#

lol

covert bluff
#

should i still use an if statement or will this work just fine

#

this.description = description != null ? description : "";

ivory sleet
#

I mean I would advocate to use that instead of an if else

quaint mantle
#

Heya. Im having a problem with PlayerInteractEvent and InventoryClickEvent... Im trying to make it so that if there is a right air or left air click on items in the hotbar it will open a gui. I have that part working. But my problem comes when I add an inventory click event, so that an item in the Inventory will open a new Inventory, it opens the menu, then opens the old menu from the PlayerInteractEvent. Ping or message me if you could help.Thanks

ivory sleet
#

oh

#

hmm you might want to disable the opening of the old menu in PlayerInteractEvent if the player is already in that menu

quaint mantle
#

hmm. how would I do that?

ivory sleet
#

Send your current code

covert bluff
#
kits:
  Tank:
    helmet:
      material: Material.DIAMOND_HELMET
      enchants:
        - Enchantment.PROTECTION_ENVIRONMENTAL
      enchant-levels:
        enchant1:
          - 2
          - 3
          - 3
          - 2

would the material and enchants part work, or do i need to do something else

#

cuz something's going on in console and it's not mentioning it but i've checked every piece there is

ivory sleet
#

just have
material: DIAMOND_HELMET

quaint mantle
#
    @EventHandler(priority = EventPriority.HIGHEST)
    public void onInventoryClick(InventoryClickEvent event) {
        if (event.getWhoClicked() instanceof Player) {
            if (event.getCurrentItem() != null) {
                if (event.getCurrentItem().hasItemMeta()) {
                    if (event.getCurrentItem().getItemMeta().getDisplayName()
                            .equals(ChatColor.translateAlternateColorCodes('&', "&8» &6Test &8«"))) {
                        openMenu((Player) event.getWhoClicked());
                    }
                    event.setCancelled(true);
                }
            }
        }
    }```
covert bluff
#

Oh

ivory sleet
#

and
enchants:

  • PROTECTION_ENVIRONMENTAL
#

assuming you want to grab the strings with Enum#valueOf or smntg

covert bluff
#

oh right

#

I can do Enchantment.valueOf and Material.valueOf, right?

quaint mantle
#
    public void onPlayerInteract(PlayerInteractEvent event) {
        if (event.getPlayer() instanceof Player) {
            if (event.getItem() != null) {
                if (event.getItem().hasItemMeta()) {
                    if (event.getAction() == Action.LEFT_CLICK_AIR || event.getAction() == Action.RIGHT_CLICK_AIR) {
                        if (event.getItem().getItemMeta().getDisplayName()
                                .equals(ChatColor.translateAlternateColorCodes('&', "&8» &6Example &8«"))) {
                            openOtherMenu(event.getPlayer());
                    }
                }
            }
        }

    }```
ivory sleet
#

notprankster yes but I would recommend doing it inside a try-catch (IllegalArgumentException)

quaint mantle
#

so when I click on the item in the inventory, it runs both methods

covert bluff
#

yup okay

#

thanks

ivory sleet
#

np 😄

covert bluff
#

also

#

lets say i want the encahntment levels to be specific for each part of the armour

ivory sleet
covert bluff
#
enchants:
      - PROTECTION_ENVIRONMENTAL
      enchant-levels:
        enchant1:
          - 2
          - 3
          - 3
          - 2  
#

basically from helmet to boots

quaint mantle
covert bluff
#

would i be able to set that into an array

covert bluff
ivory sleet
#

notprankster

enchants:
  - PROTECTION_ENVIRONMENTAL: 2
  - DAMAGE: 3
#

maybe?

covert bluff
#

no, specifically

#

i want prot 2 on helmet and boots, prot 3 on chestplate and leggings

#

is it possible that i get an array of ints from that

ivory sleet
#

I mean sure

covert bluff
#

how do i get an array from it?

#

or is it something like getIntList()

ivory sleet
#

yup

#

getIntegerList

covert bluff
#

oh okay

#

ty

ivory sleet
#

oops wrong

ivory sleet
#

can we start with reducing some code smell in your code?

versed flicker
#

who is hyped for spigot 1.17

hybrid spoke
quaint mantle
#

Thanks

versed flicker
#

what chat should it be in ?

hybrid spoke
#

#general

ivory sleet
#

okay max so first of all

#

do you know what implicit else is ?

quaint mantle
#

like an if {} else {}

ivory sleet
#

thats explicit

#

lets take an example here and now

quaint mantle
#

oh then other way -- without brackets

hybrid spoke
#
//implicit
private String resolveViewName(Viewable viewable) {
    if(viewable.isTemplateNameAbsolute())
        return viewable.getTemplateName();
    return uriInfo.getMatchedResources().get(0).getClass().toString();
}

//explicit
private String resolveViewName(Viewable viewable) {
    if(viewable.isTemplateNameAbsolute())
        return viewable.getTemplateName();
    else
        return uriInfo.getMatchedResources().get(0).getClass().toString();
}
covert bluff
#
try {
           this.helmet = new ItemStack(Material.valueOf(fileConfiguration.getString("kits." + kitname + ".helmet.material")));
        } catch(Exception e) {

        }

?

hybrid spoke
#

?ask

undone axleBOT
#

If you have a question, please just ask it. Don't look for staff or topic experts. Don't ask to ask or ask if people are awake or available. Just ask the question to the channel straight out, and wait patiently for a reply.

ivory sleet
#
    @EventHandler(priority = EventPriority.HIGHEST)
    public void onPlayerInteract(PlayerInteractEvent event) {
        if (event.getPlayer() instanceof Player) {
            if (event.getItem() != null) {
                if (event.getItem().hasItemMeta()) {
                    if (event.getAction() == Action.LEFT_CLICK_AIR || event.getAction() == Action.RIGHT_CLICK_AIR) {
                        if (event.getItem().getItemMeta().getDisplayName()
                                .equals(ChatColor.translateAlternateColorCodes('&', "&8» &6Example &8«"))) {
                            openOtherMenu(event.getPlayer());
                    }
                }
            }
        }

        //the code below is more readable
        Player player = event.getPlayer();
        ItemStack item = event.getItem();
        
        if (item == null) return;
        if (!item.hasItemMeta()) return;

        Action action = event.getAction();

        if (action != Action.LEFT_CLICK_AIR && action != Action.RIGHT_CLICK_AIR) return;
        if (!item.getItemMeta().getDisplayName().equals(ChatColor.translateAlternateColorCodes('&', "&8» &6Example &8«"))) return;
        
        openOtherMenu(player);
    }
#

@quaint mantle

hybrid spoke
#

i couldn't tell as a beginner what or where the implicit else is here

quaint mantle
#

oh great. thank you

ivory sleet
#

but yeah essentially only try catch the absolute necessary parts

ivory sleet
empty swallow
#

i love how the register function returns a register form

#

🧠