#help-development

1 messages ยท Page 812 of 1

glossy venture
#

thats what i thought yeah after readin ghte comment

#

thx for the explanation tho

noble adder
#

maybe head with certain name?

valid burrow
#

are all the heads created by your plugin?

noble adder
#

so if i eventually add other items using head

river oracle
#

use pdc

#

?pdc

valid burrow
#

yh

river oracle
#

instead of item name

noble adder
#

yes

valid burrow
#

give all your heads a data

#

in der pdc

#

pdc is used to store data in items and entities

#

and block entities

noble adder
#

in the listener class right?

valid burrow
#

on death u can then loop through all the items in the inv and remove the ones with the pdc

#

yes

noble adder
#

ok how do i create a data for the head?

valid burrow
#

youi also need to make sure to add the pdc to the items before giving them to the player

tardy delta
#

what else have you been doing with classloaders

hushed spindle
#

hold on now

noble adder
#

im using GreatKits its great because when u create a kit when you it , it stores all data of the item even if its modified by a plugin

hushed spindle
#

if you have to basically ask someone to write your code for you maybe you should consider practicing first

#

on some simpler project

#

and maybe watch some tutorials first

fluid river
#

true

#

tho cpp also uses :

noble adder
glossy venture
#

ig

noble adder
glossy venture
#

also just more convenient to type

#

ig

fluid river
#

?

#

tho c# uses : for both extends and implements

glossy venture
#

doesnt c++ do that too

fluid river
#

never used interfaces in cpp so idrk

#
public class Shit : Interface1, Interface2, Abstract1 {

}```
noble adder
#

what is the next step friend im alr confused :-:

river oracle
#

you need to learn java

fluid river
#

jree

river oracle
#

or learn basic logistical reasoning

hushed spindle
#

you're taking on too big of a project for your skill level

#

which to my understanding is basically none

remote swallow
noble adder
chrome beacon
#

Then hire someone

#

?services

undone axleBOT
fluid river
#

which are not present in cpp

tardy delta
fluid river
fluid river
#

guys just made an interface operator

valid burrow
tardy delta
#

thats c#

fluid river
#

that's cpp

tardy delta
#

cpp doesnt have ^, delegate and ref keyword

fluid river
#

ig that's some kind of define shit

#

for some builds

tardy delta
#

nope those are all valid c#

#

^ is some kind of managed pointer

ivory sleet
#

cpp doesnt have interfaces right?

#

Afaik

tardy delta
#

yes

ivory sleet
#

Like you can technically emulate a java interface, but there exists no such keyword semantic

tardy delta
#

why would one even want to

fluid river
#

diamond probleme

ivory sleet
#

equivalent

fluid river
#

yeah yeah

ivory sleet
#

Yes but the diamond problem is easily addressed if the language allow for more precise and specific inheritance semantics

#

Like javaโ€™s interfaces

fluid river
#

not an interface class

ivory sleet
#

C# is not cpp

fluid river
#

so it's not valid for c# too

#

so idk what this microsoft page is about

noble adder
fluid river
#

oh

#

it's cpp/cx

#

based on cpp11

#

so well, that's a variant of cpp

#

with a lot of #define 's ig

fluid river
wary harness
#

Is it possible to access buyrs list thru some spigot site API

fluid river
#

oh it's deprecated

ivory sleet
#

I know the papi devs do it somehow

wary harness
#

xd

fluid river
#

gl with that

valid burrow
#

huh? ๐Ÿ˜ญ

chrome beacon
#

What do you need the server for?

fluid river
valid burrow
#

getting all online players

chrome beacon
#

Just use Bukkit#getOnlinePlayers

valid burrow
#

doesnt work either

fluid river
#

wdym

valid burrow
#

it says it dowsnt exisz just as with bukkit.getServer

fluid river
#

what does exist in Bukkit. then

valid burrow
#

it exists when it recommends me options

#

but when i use it

#

it doesnt anymore

fluid river
#

try mvn update or smth

chrome beacon
#

Try invalidating caches

fluid river
#

yeah

#

^^

valid burrow
gleaming grove
tender shard
#

for(Player player : Bukkit...)

fluid river
#

it might be cuz you didn't make correct loop?

valid burrow
#

and no it doesnt show the error because of that

fluid river
#

or Bukkit.getOnlinePlayers().forEach(p -> { });

valid burrow
fluid river
valid burrow
fluid river
#

for getOnlinePlayers

chrome beacon
#

ah yeah complete the loop

fluid river
#

butkkit doesn't have getServer() method

chrome beacon
#

and that error should go away

valid burrow
valid burrow
gleaming grove
fluid river
#

oh i'm dumb

chrome beacon
#

There's just no reason to use it

#

since bukkit wraps server

fluid river
#

anyways there's no purpose of ever using it

#

yup

valid burrow
chrome beacon
#

Maight be useful when working with nms ๐Ÿคทโ€โ™‚๏ธ

tender shard
#

there's also Bukkit.setServer(Server) lel

fluid river
#

code me the thing which would actually change the server

#

without erroring

#

setServer(getServer())

valid burrow
#

what if i bukkit.setServer(null)

#

no more server

fluid river
#

๐Ÿ’€ server

umbral ridge
#

interesting

fluid river
#

so well, it's literally useless

tender shard
valid burrow
umbral ridge
#

its useless

#

XD

tender shard
fluid river
#

well, and you won't ever be able to do your stuff before that

#

since your plugins require pluginmanager

#

which is accessed from server

fluid river
#

well ig it would still error tho

#

thing would instantly crash after that code is executed

tender shard
#

why that

weak meteor
#

I need to fix my Adapter for EnchantMeta someone can help me?

valid burrow
#

since when is #showPlayer depricated

fluid river
weak meteor
fluid river
#

or is it player, plugin

#

idr

tender shard
valid burrow
fluid river
#

won't plugins with listeners try to access events stack

valid burrow
#

will it fail?

fluid river
valid burrow
#

crazy

fluid river
#

thing is just marked as deprecated

#

check javadocs maybe there is a reason

valid burrow
#

too laty

#

lazy

#

if it works it works

young knoll
#

Why are we nulling the server

tender shard
#

we aren't

#

we're setting it to myNewServer

young knoll
#

I see

remote swallow
#

which im making null

young knoll
#

Why are we overriding the server

tender shard
#

someone asked how to do it without errors

#

idk why

young knoll
#

sus

valid burrow
#

i forgor how to set event priority

tender shard
#
@EventHandler(priority = EventPriority.HIGHEST)
public void onWhateverEvent(SomeEvent event) { ...
valid burrow
#

thats what i did

#

bruh

#

i thouhg its wrong

autumn cave
#

How to properly delete a scoreboard? Is Objective::unregister() enough? What about the teams, I can go through and Team::unregister(), but what about the scoreboard itself? Thanks

tender shard
valid burrow
#

yh i know

#

only using monitor anyway

valid burrow
#

so i dont trust it

glossy venture
valid burrow
#

i have no clue what else to call the class when new players join the server that then need have invisible players set invisible for them

#

any suggestions

glossy venture
#

writing database abstraction for fun

weak meteor
#

.3333+-

#

56

kindred valley
#

what was right clicking a block event

fluid river
#

playerinteract?

glossy venture
#

playerinteract

young knoll
#

PlayerInteractEvent

glossy venture
#

lmao

kindred valley
#

how do we get the pdc of a block

#

i forgot everyting

glossy venture
#

blocks dont hve pdc

worldly ingot
glossy venture
#

use chunk

#

unless ur exclusively dealing with tile entities

kindred valley
#

was only clickables had pdc?

young knoll
#

?blockpdc

undone axleBOT
valid burrow
glossy venture
#

1 sec

glossy venture
glossy venture
young knoll
#

C# dev spotted

glossy venture
#

addNewPlayersToTheSoup is vague as shit tho i thought u were coding a soup pvp server at first

valid burrow
#

a soup can be a group or a collection of things

glossy venture
tardy delta
valid burrow
glossy venture
#

but absent() is cleaner than getType() == QueryResultType.ABSENT imo

#

or something like that

kindred valley
#

how to get

kindred valley
#

custom model number of block

glossy venture
#

to represent it internally ill use an enum though

glossy venture
#

did u just make that

shadow night
#

Yes

#

It was what I imagined lmao

valid burrow
glossy venture
#

lmao nice

glossy venture
#

ig

#

cant be bothered to do that in every file tho

#

so ill add the option

#

for myself

#

lol

kindred valley
#

were we able to add custom model data to block

tardy delta
#

you're that kind of person that writes c style java code and im fascinated about it

glossy venture
#

lmao

tardy delta
#

is there like any reason to have your field transient?

glossy venture
#

to denote that it shouldnt be serialized

tardy delta
#

you doing some reflective serialisation?

glossy venture
#

thats the whole point of the keyword

#

yeah

#

i will

#

probably

#

other types of queries will be annoying to do but whatevr

#

ill prob just do Query.match().eq("myField", 6) or smth but i dont know how to efficiently find that in the cache

tardy delta
#

mongodb syntax is awful

glossy venture
#

maybe some kind of DataAccessor<KitPVPData>

#

to quickly access fields

valid burrow
#

i hate my live

#

turns out customer wants plugin for 1.8.8 and ive been using EntityPotionEffectEvent

#

but it got added in 1.9

#

thats just awsome

#

whats the alternative for older versions

river oracle
#

In nms iirc

valid burrow
#

what if i just loop through all players and check if they have the effect

#

every few seconds

#

rathwer

#

miliseconds

river oracle
#

its not worth the money

valid burrow
#

i already made the entire rest of the plugin

#

everything else works

#

just this doesnt

river oracle
#

๐Ÿ’€ ashame

#

make sure you ask for version in the future before starting

#

I wouldn't do anything under 1.19.4 personally

valid burrow
#

yh its really ass

#

but im poor

river oracle
#

is this just for players?

valid burrow
#

yeah

river oracle
#

might want to try NMS here, but otherwise you can probably use a shit ton of events and conditional checks here

#

for exmaple 1.8 has PotionSplashEvent

valid burrow
#

its like

river oracle
#

you can get a list of affectEntities

valid burrow
#

10 players max

river oracle
#

its easiest but inefficent

#

what do you need to know the effects for?

#

if you could expound

valid burrow
#

i just need to check when players get or loose the invisibility effect

#

need to do some stuff with those players

river oracle
#

by any source?

valid burrow
#

yeah

#

potion usally ig

river oracle
#

can probably use PlayerCommandPreProcessevent, PotionSplashEvent and add player UUID's to some form of timer task

#

this way you are never looping on players who don't recieve the effect

valid burrow
#

potion splash doesnt apply to drinking potions though does it

river oracle
#

once their effect expires you can remove them from the cache and trigger the event

river oracle
valid burrow
#

nein

river oracle
#

This event will fire when a player is finishing consuming an item (food, potion, milk bucket).

valid burrow
#

thx

#

pookie

river oracle
#

make sure you also use PlayerJoinEvent

valid burrow
#

already doing that

river oracle
#

so you check on PlayerJoin for any lingering effects and add them to your cache

valid burrow
#

thx thouhg

river oracle
eternal valve
#

how to disable backgroudn vanilla gui //

#

what i want to do is to turn off the bad looking gui in the background when the "custom gui" is open, is it possible with datapack or shader core?

#

I use "deluxemenui" for special gui

valid burrow
pseudo hazel
#

if you are already using a resourcepack, cant you just remove that texture?

river oracle
#

negative space fonts are the way to go here

pseudo hazel
#

to remove/hide textures?

river oracle
#

to hide them

pseudo hazel
#

oh I didnt know that I thought you could only put new stuff overtop

river oracle
#

that's really the goal when you do this you overaly the current inventory texture using the title of the inventory and use negative space to adjust and hide the old textures

river oracle
pseudo hazel
#

yeah I know

#

but like

#

a resourcepack is on the client anyways

#

so how do you hide a texture using negative space?

#

like in the example image shown above

river oracle
#

that would allow you to utilize the extra slots their too

#

you can adjust left right up down with negative spacing

pseudo hazel
#

yes that I know

#

but its just that the design they drew will never not show any of the vanilla ui if they want the tab buttons to work

river oracle
#

its very naive to do so and expect things to be all okay

pseudo hazel
#

like what

river oracle
#

remove a vanilla texture

pseudo hazel
#

I mena what does it break

river oracle
#

the menu? it'll be blank aka not there

pseudo hazel
#

I just mean to edit teh texture to make it dissapear

river oracle
#

or supply the no texture error

#

other plugins utilize these menus though which is why its naive

#

you've essentially broken teh design / styling of every other plugin which utilizes that same container

pseudo hazel
#

okay sure

#

so to fix this issue you would just have to come up witha shape that covers the existing ui

river oracle
#

there is not really a way around it until mojang makes contianers Data Driven and allows servers to sync with clients

pseudo hazel
#

yes true

river oracle
#

even now there are a few things you can do as far as utilizing smaller containers with packets etc, but its no easy task

pseudo hazel
#

okay seems like I was just confused with what you said earlier I think we on the same page now

river oracle
#

but as far as a server owner goes they're options are limited to only using negative space fonts

#

and they have to conform to whatever the plugin allows them to utilize, as a dev you do have a few more options, but they are indeed very hacky

quaint mantle
#

is it possible to stop an entity's hitbox when riding on a player from interfering?

grim hound
#

if I just keep the same Block object, will it stay updated?

valid burrow
#

honestly no clue

#

?tas ig

undone axleBOT
lost matrix
carmine mica
#

"mostly" = "literally". It has no state

river oracle
#

Reminds me of how weird Location is lol

#

In a world where location isn't kinda weird it'd jsut be 3 numbers or a vector

twin venture
#

hi , how would i make it so it send the Arena info each time the arena change its status?
so for example :

  • IN lobby
  • waiting
  • playing
  • ENDED
    etc , i already have an enum for it , iam talking about the redis part .
    and i want to show it in a gui of some kind
torpid jetty
#

Hey guys, I'm probably doing this wrong. I'm getting an error that MemorySection's can't be cast to just about anything else. I haven't found a tutorial that spells out exactly how to do this specific part, maybe you all can help? Here's my code.


    public FactionManager readData() {
        if(getConfig().get("data") != null) {
            System.out.println(getConfig().get("data"));//MemorySection[path='data', root='YamlConfiguration'], is this right?
            return new FactionManager((Map<String, Object>) getConfig().get("data", Map.class));
        } else {
            return new FactionManager();
        }
    }```

And here's the contents of the yaml it's trying to read:
```yaml
data:
  invites: []
  factions:
  - members: '[a8570f8f-d7cd-4df3-b864-e7e5b5e71eb9]'
    factionID: b9a7e163-8c91-487a-a7d5-1ee079bf6ef7
    factionName: best
    power: 10.0
    enemyFactions: '[]'
    allyFactions: '[]'
remote swallow
remote swallow
lost matrix
hushed spindle
#

im trying to implement a feature where i want to change loot drops based on nearby structures, but the documentation says this

whats the point of giving a radius if some structure types can just ignore it? is there any method that detects structures that respects this radius parameter?

lost matrix
remote swallow
#

wrong reply moment

vital sandal
#

is there anyway to clone an item?

#

not ItemStack#clone() it doesn't work that way

torpid jetty
hushed spindle
#

so clone an item but not using clone

#

why

vital sandal
#

The clone() doensโ€™t seem to working

hushed spindle
#

how are you using it

vital sandal
#

The item is still immutated

#

I clone an item from an inventory and send it to another inventory

#

If I modify the other inventory the other got modify too

hushed spindle
#

show code

vital sandal
#

like this

hushed spindle
#

show what cloneItem and updateLore does

#

why is cloneitem in a wrapper method

vital sandal
#

cloneItem is just an utils class that I use to try methods of cloneItem

#

for this cause you can see it is just return item.clone();

hushed spindle
#

and updateLore i just assume takes the meta, sets lore, applies meta to the given item

vital sandal
#

even removing the updateLore() still result the same

hushed spindle
#

i guess you could also just try doing item.clone() when setting the item to the gift menu

#

instead of just item

#

clone it again fuck it

vital sandal
#

well still no luck doing that :l

hushed spindle
#

yeah thats weird lol

#

feels like you're doing something wrong though because its definitely supposed to keep items separate like that, so you're saying both the item in the original menu as well as the one added to the gift menu are both modified with lore

topaz kestrel
#

Hi. I'm trying to get the entity height but none of these methods work:

Method 1: Using bounding box
So, in this method I used entity's bounding box getter and got the values to calculate like so:

boundingBox.e - boundingBox.b```

This will return the same value as other mobs' height value, so I tried the method 2.

**Method 2: Using length field**
This method also returns the same value like bounding box did.
hushed spindle
#

..what about get height

river oracle
topaz kestrel
#

I don't have that method. Using old version of NMS.

river oracle
#

oh lol ๐Ÿ’€ legacy moment

hushed spindle
#

bruh

river oracle
topaz kestrel
#

If I had that method, why would I come here to ask?

river oracle
#

legacy isn't supported especially legacy NMS

#

you gotta find your own way on this one

hushed spindle
#

i mean have you seen how many clueless noobs come here to ask for questions

topaz kestrel
#

when I was a really noob and was trying to register a listener. lol

#

anyways, it's been a while that I'm trying to find a way to get a exact mob height, however I can't find any.

#

NMS is always challenging.. smh

vital sandal
#

I think the problem is creating 2 inventories like this?

#

do you have any idea?

#

even with no operator both inventory are now the same one?

young shell
#

@river oracle just checked the PR again... Arguably nothing went really wrong though? Is md_5 for real?

river oracle
#

I've yet to write out a proper response since I'm busy with school

young shell
#

fair

river oracle
#

imo this isn't spigots job to be cleaning up after plugins that misuse features or cleaning up from server owners removing key plugins form their servers and expecting everything to go away without warnings/errors

sullen marlin
#

Literally all it is is a warning message?

#

I'm confused why you're being so aggressive about this

river oracle
#

oh yeah md

#

is there a reason Advancements don't have a proper API in spigot

#

just not been PR'd?

#

or is there some other underlying thing

sullen marlin
#

Wdym proper api

river oracle
#

uh creating them is what I meant

#

Bukkit Unsafe has something to load it from json

#

but there's nothing programatically

sullen marlin
#

Because it's a json datapack nightmare

river oracle
#

๐Ÿ˜จ I see

#

I was thinking I might take a crack at it after finals are over, but ig I'll have to look closer

topaz kestrel
river oracle
#

@sullen marlin oh btw if you are just not going to remove that line its fine you / I can decline the PR when i get around with it

river oracle
sullen marlin
topaz kestrel
sullen marlin
#

Shrug

#

?1.8

undone axleBOT
river oracle
#

wow 8 years 4 months

topaz kestrel
river oracle
#

1.8 is older than some of my cousins

river oracle
#

if you're getting the entiies bounding box and your sure thats it should work

topaz kestrel
topaz kestrel
#

You can't really make 1.20.2 PvP like 1.8, even with plugins.

#

It will look so odd and buggy and most of the mechanics that are in 1.8.8, wouldn't be in 1.20

lost matrix
#

You would think that the skywars bedwars kitpvp market is saturated for 1.8 at this point...

topaz kestrel
#

and also it uses so much CPU and ram.

paper viper
#

and u think

#

that yours will be better

#

someone has already probably poured years into their skywars plugin

dry hazel
river oracle
paper viper
#

i mean nothing wrong with coding the plugin again, but really reconsider your options

lost matrix
topaz kestrel
paper viper
#

I mean, there could be a million other things bottlenecking your server...

topaz kestrel
#

what thing?

paper viper
#

wdym what?

topaz kestrel
paper viper
#
  1. your cpu has many threads but many mc server operations are performed on one thread (only some are async)
  2. memory
  3. hard drive or ssd
  4. network
  5. server configuration (server software, plugin configuration)
  6. type of plugin you are using
    7)... so on
#

all we're trying to say is that it isn't worth your time to make another 1.8 skywars plugin

topaz kestrel
#

yes, but if there was 16GB memory and only few plugins on server, what would you say?

glossy venture
paper viper
lost matrix
topaz kestrel
lost matrix
#

lol

topaz kestrel
#

there are some SkyWars plugin out there, but they aren't like Hy server

#

even if they are, they might be so old or outdated

glossy venture
lost matrix
#

There is nothing to outdate. Your plugin will be as outdated as theirs from day one...

paper viper
#

and it will forever be outdated

#

its not like you can keep up with years of work lmao

#

some of these plugins were there since 1.8 was latest version

glossy venture
#

invaded and minemen have custom coded infrastructure and plugins for sure

topaz kestrel
#

in the community we have lots of fork for 1.8 that is updated and will be updated as soon as possible. there are so plugins that still support 1.8 and etc. How can you say 1.8 is old and no one should use it?

river oracle
#

oh god this debate again

lost matrix
river oracle
#

smile this is where you post the BStats graph and stop talking

paper viper
#

XD

glossy venture
#

i dont think hcf servers like cave are going to use some scuffed spigotmc plugin to make money

grim hound
#

What are you arguing about, exactly?

river oracle
glossy venture
#

some setups might run pre made server cores with grants, bans and staff chat n shit

grim hound
topaz kestrel
#

I'm sorry but who cares about how many people use 1.16 or something new? when 1.8 is a good option, it is a good option. who really likes to use an outdated thing? I'm just trying to say that 1.8 is taking less usage than newer versions

glossy venture
#

also if theres stats for player count across versions id like to look at that

river oracle
# grim hound By what meaning?

๐Ÿคทโ€โ™‚๏ธ who tf knows its definitely outdated and should just die in the dirt already. Mojang really fucked up with 1.9

lost matrix
torn badge
#

Bro it's 8 years old of course it's outdated

ivory sleet
#

I mean if you use a ducttaped 1.8 fork, go to their server and ask for support, end of it?

topaz kestrel
#

I know there are lots of good things and good APIs to use on 1.20 but because 1.20 uses so much usage, it's not good for a PvP server.

grim hound
#

Was it released long ago? Obviously.
Is it still used? Very much

glossy venture
river oracle
lost matrix
grim hound
glossy venture
#

what point

ivory sleet
#

but pvp in modern minecraft works just as well, altho u rely on different mechanics

lost matrix
paper viper
#

players when they now have to actually use their brain to pvp ๐Ÿคฏ

ivory sleet
#

I think using 1.8 as an argument to achieve a certain mechanic is a feeble argument

glossy venture
#

"spam pvp" is honestly such hard cope, sure cps plays a role but in like every gamemode gamesense, aim, etc matter so much more

ivory sleet
#

if u like 1.8 as a version sure, go play it

#

when it comes to the software, most of us just dont support it, thats it really lol

grim hound
#

Why are you guys bullying the guy?

glossy venture
#

and hypixel

ivory sleet
glossy venture
#

100% custom

#

largest server in mc

paper viper
#

what lmao

lost matrix
ivory sleet
#

wouldnt call that bullying... but yeah maybe a controversial opinion according to some people

river oracle
#

I love when people pull the hypixel card. I highly doubt their team wants to be stuck on their weird 1.7 fork xD who knows though ๐Ÿคทโ€โ™‚๏ธ

ivory sleet
#

we can ask choco

#

now that he works for hypixel

glossy venture
#

sure they all run mf essentials but for the actual gameplay theyre not gonna use "๐ŸŒŸ FREE 1.8 SKYWARS [OMG] ๐ŸŒŸ"

river oracle
#

isn't skyblock >1.8

ivory sleet
#

but then again, hypixel MAINTAINS THIER OWN FORK

grim hound
ivory sleet
#

choco is hypixel dev

grim hound
#

Full-time?

glossy venture
ivory sleet
#

unsure

grim hound
#

Oi @worldly ingot

#

You a full-time dev?

lost matrix
ivory sleet
#

the amount of spigot 1.8 servers are low though (unless u have a derived software version, but then again, we dont support those)

river oracle
river oracle
glossy venture
topaz kestrel
# lost matrix 99% do

Personally, I only use ViaVersion and LuckPerms. that's it. I make other things myself

ivory sleet
#

@paper viper

#

u there?

paper viper
#

ye

ivory sleet
#

wyd

grim hound
paper viper
#

was coding fabric mod for my smp lol

ivory sleet
#

oo nice

paper viper
#

rn im coding plugin

vital sandal
ivory sleet
#

for what xD

paper viper
#

web browsers plugin

ivory sleet
#

ah

paper viper
#

just a personal one

ivory sleet
#

let me bet, u use selenium or w/e its called

topaz kestrel
vital sandal
#

no idea how this can modify other menus

paper viper
#

im also developing a fabric and forge mod to go along side it

ivory sleet
#

nice :)

paper viper
ivory sleet
#

:,)

lost matrix
# ivory sleet for what xD

Conclubi, wanna look at the mess i made? I switched from a state machine to a reactive design (kind of)

grim hound
#

Being shared

ivory sleet
#

sure smile, u pushing it?

lost matrix
#

๐Ÿ™‚

paper viper
#

what this for?

vital sandal
ivory sleet
#

smile works on this cool minigame thigny

vital sandal
#

It doesn't have anything in common as well

grim hound
ivory sleet
paper viper
#

Oh ic

lost matrix
grim hound
ivory sleet
worldly ingot
ivory sleet
#

wasnt that what we went for

grim hound
lost matrix
ivory sleet
#

mmm yess

vital sandal
#

this is my gift editor

grim hound
#

You checking and continiuing for nulls after creating a new array full of nulls?

vital sandal
#

and then for some reason

grim hound
vital sandal
#

the GiftEditor disappear as well

sullen marlin
#

Oh shi, @worldly ingot is a professional. Run!

grim hound
worldly ingot
#

TRUEEE

#

Whereโ€™s my pay check, md?

#

I want 6 years retroactive pay

grim hound
#
  • a company car and dental care
topaz kestrel
vital sandal
ivory sleet
#

you can ask him lol, he is right here

#

:>

topaz kestrel
#

@worldly ingot is Hypixel maintaining its own fork?

grim hound
river oracle
grim hound
#

You're literally setting this

#

To a new array

#

Which only has nulls

glossy venture
grim hound
#

And continiuing the to the next loop if an element is null

worldly ingot
topaz kestrel
vital sandal
sullen marlin
#

Bullshit

#

Hypixel is known for bullshit

river oracle
#

we all know they are going raw on spigot 1.8.8 with 0 extra patches

river oracle
#

they can't lie to us forever

grim hound
#

Resets the items for good

sullen marlin
#

Like that time they claimed they were running a custom Linux kernel or smthing detect if you edited the registry to enable tcpnodelay

grim hound
vital sandal
grim hound
#

Anything

vital sandal
#

well as you can see there I just doing some testing

grim hound
#

Do you know how the continue keyword works?

vital sandal
#

the mainthing is

#

if I open the giftView Inventory

grim hound
#

How tf you be saying that

river oracle
vital sandal
#

the giftViewInventory will be copy into giftEditorInventory

vital sandal
grim hound
grim hound
topaz kestrel
#

all of these forks are just part of a big puzzle

#

they help each other to make a better fork

hushed spindle
#

forks are cool and all

topaz kestrel
#

if Spigot wasn't exist, paper wouldn't be like how it is now

hushed spindle
#

but when will the next spoon be developed

grim hound
topaz kestrel
river oracle
hushed spindle
#

fun fact metal utensils are not actually all that dangerous to put in the microwave

grim hound
#

What was the purpose?

hushed spindle
#

its often rather difficult to get anything interesting to happen

river oracle
#

#general message

grim hound
river oracle
#

this is foreshadowing

hushed spindle
#

anyway im trying to implement a feature where i want to change loot drops based on nearby structures, but the documentation says this

whats the point of giving a radius if some structure types can just ignore it? is there any method that detects structures that respects this radius parameter?
https://cdn.discordapp.com/attachments/741875863271899136/1179494005692715119/image.png?ex=6579fc64&is=65678764&hm=ddd3142295138e11b30f0f5210043c4064e62d5cb5260bcd9a7ace79dab7b66c&
https://cdn.discordapp.com/attachments/741875863271899136/1179494005931774012/image.png?ex=6579fc64&is=65678764&hm=17b00d516adb707529587f90e54856facabe48809e77d29cc297818f60a28e14&

#

i'd like to be able to find nearby structures fast and not have the server freeze when it decides a mansion should have a 20k block search radius

sullen marlin
#

I think @young knoll did that API

hushed spindle
#

is there another method or something i can use to check if a structure is present in a radius, not necessarily where the given structure is and force the server to find one?

#

besides doing the extreme thing and segmenting the world and caching structure locations sometime beforehand

sullen marlin
#

If you findUnexplored = false isnโ€™t that what you want

hushed spindle
#

will that prevent the ridiculous radius stuff?

#

or do you mean structure finding is quick if they're already discovered?

scenic onyx
sullen marlin
#

I think the docs explain this

scenic onyx
river oracle
#

there are gradle ones

sullen marlin
#

It says it only blocks for unexplored structures

#

In screenshot above

young knoll
#

I didn't do the structure api

#

I did the biome one

river oracle
hushed spindle
#

epic

#

my english comprehension skills failing me as usual

young knoll
#

wtf EA the game company made async await in java

#

Weird

sullen marlin
#

Reading is for chumps

hushed spindle
#

illiterates should be thankful they dont know how to read

#

or they'd be total nerds

pine sandal
#

Still haven't published this plugin since I am not happy with it.

hushed spindle
#

thats a good solution

#

unfortunately, i am quite lazy

#

my excuse being that this feature is not significant enough to warrant that

elder orbit
#

ineed help

#

i've been trying to fix this

#
package net.jem;

import org.bukkit.Bukkit;
import org.bukkit.Location;
import org.bukkit.entity.Chicken;
import org.bukkit.entity.Entity;
import org.bukkit.entity.EntityType;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.player.PlayerJoinEvent;
import org.bukkit.event.player.PlayerMoveEvent;
import org.bukkit.plugin.java.JavaPlugin;
public final class chiken extends JavaPlugin implements Listener {

    @EventHandler
    public void onPlayerJoin(PlayerJoinEvent event) {
        Bukkit.broadcastMessage("[+]\\u00A72 Bro thinks he gonna survive :) " + event.getPlayer().getName());
    }
    @Override
    public void onEnable() {
        Bukkit.broadcastMessage("[Server] Good Luck...");
        Bukkit.setSpawnRadius(0);
    }

    @Override
    public void onDisable() {
        Bukkit.broadcastMessage("[Server] Shutdown...");
    }
    @EventHandler
    public void onPlayerMove(PlayerMoveEvent event) {
        Player player = event.getPlayer();
        Location playerlocation = player.getLocation();

        for (Entity entity : playerlocation.getWorld().getNearbyEntities(playerlocation, 5,5,5)) {
            if (entity.getType() == EntityType.CHICKEN) {
                Chicken chicken = (Chicken) entity;

                Location chickenLocation = chicken.getLocation();
                chicken.getWorld().createExplosion(chickenLocation.getX(), chickenLocation.getY(), chickenLocation.getZ(), 100.0f, true, true);
            }
        }
    }
}
#

my code

#

and i use gradle Minecraft 1.12.2

#

spigot too

#

so when player walk in 5 block radius of chicken it will explode

#

but it seeems to not work

hushed spindle
#

well you didnt seem to have registered your listener yet

#

also fyi basically nobody gets to see that good luck message because i dont think players can join the server before all plugins have enabled

#

i would also encourage you to maybe put a cooldown on the detection system, player move events are very spammy, possibly the spammiest event of all, and doing radius checks is overkill

#

maybe implement like a quarter second or half second cooldown between each radius search

pine sandal
#

Since thats what I replaced with the system I came up with that I am still not happy about xD

hushed spindle
#

what are you making anyway that requires this intensive structure caching

pine sandal
#

Oh, making it so you can setup specific mobs to spawn in structures, for example Husks in Desert Temples.

hushed spindle
#

then find nearby structure should be fine, no?

pine sandal
#

Or say a specially zombie that always has mining type stuff if they are in mineshafts.

hushed spindle
#

or is that too slow for your experience

#

or too imprecise

pine sandal
#

Sort of it, gives you a coord, which is not useful for getting a bounding box.

hushed spindle
#

right

pine sandal
#

Its basically an API to the vinillia command

hushed spindle
#

kinda sad these bounding boxes aren't exposed normally

#

they're there in minecraft, i mean theres the boundaries in which blazes and shit spawn in fortresses

pine sandal
#

All of them are exposed in NMS just no bukkit \ spigot api for them yet. (And I have no idea where to start on making one considering Bukkit already has 2 types of structures in its API they don't seem to work together.)

young knoll
#

Whats the issue?

remote swallow
#

why in the fuck does ea have jvm libraries

dry hazel
#

many companies use java

#

surprise

slender elbow
#

blizzard uses java too !!!

young knoll
#

I thought EA only used their customers

tender shard
young shell
#

wait no

#

thats was activision

tender shard
#

what did they do?

young shell
tender shard
#

oh damn

slender elbow
tender shard
#

it's free now? when I bought it, it wasn't free lol

slender elbow
#

yeah

#

everything is expansions basically outside of the very very basic mechanics

#

which is fine for most people but then there are the fanatics who want to get all the deco and all the jobs and map expansions

tender shard
#

I mean there's a few expansions that are worth it, e.g. the one where you can go to work

hushed spindle
#

work simulator POG

tender shard
#

even GTA is a work simulator... for criminals lol

hushed spindle
#

ok fair but at least crime is fun

elder orbit
tender shard
elder orbit
#

O

#

Thank you @tender shard

#

im fairly new to java

#

Ok

#

So

#

I've done what you said

#

and Now im recieving errors

tender shard
#

?paste them

undone axleBOT
elder orbit
#

saved it

tender shard
#

You often need a reference to your main instance (the instance of your class that extends JavaPlugin) in some of your other classes. Thereโ€™s two basic concepts for this. Choose whichever you like more. Method #1: Static Getter First way is to create a static method called getInstance() or similar in your main class. You...

hushed spindle
#

also ?learnjava

elder orbit
#

im trying

#

but i have fat head

river oracle
#

Anyone know of a valid reason to not supply null for an InventoryHolder outside of its general abuse e.g.

InventoryHolder holder; // not abusing it here
Inventory someInvenotry = Bukkit.createInventory(holder, 27, "goofy");
remote swallow
#

i dont think ive ever not passed null

river oracle
#

yeah well no one cares what you do Epic

remote swallow
#

true

river oracle
#

we are looking for weirdos here

#

you're just a normie

remote swallow
#

i know a weirdo

#

his name is choco

river oracle
#

then get choco over here

remote swallow
#

no

tender shard
#

yeah choco is weird

river oracle
#

Alex

#

you do stuff with chests

#

do you know? This is for inventory PR its very important

remote swallow
#

deprecate the method

river oracle
#

That's what I'm wondering about!!!!

remote swallow
#

do it

river oracle
#

I can't deprecate it if its useful outside of API abuse

remote swallow
#

i say its not

#

now deprecate

#

oh and also add a warning telling the user to nag the author to use correct api

river oracle
#

LOGGER.warn("nag author of %s to use Bukkit#createInventory(MenuType);");

remote swallow
#

needs more lines

tender shard
#

what's the issue with letting people supply an InventoryHolder?

river oracle
#

I seriously haven't a clue

remote swallow
#

Nag plugin.getDescFile.getAuthors to use xyz bc old is incorrect use of holders

echo basalt
#

something something the holder is cloned a bunch which can cause issues

#

raziel said stuff ab it

remote swallow
#

oh i remember that

river oracle
#

but like do we need to be using it for virtual inventories?

remote swallow
#

get holder makes a copy

echo basalt
#

We don't

#

They're used by vanilla somewhere

#

Makes no sense to expose it to the API

tender shard
echo basalt
#

But some menu utils depend on it

#

but who cares your changes are breaking anyways

tender shard
#

a GUI might also use the player as holder that opened the GUI

river oracle
river oracle
#

the former is more debatable

remote swallow
#

remove me and commodore

tender shard
#

I don't see any reason why a player should not be the holder of a player's backpack inventory

river oracle
#

oh but getHolder would return player

#

I see

#

okay I got it now

elder orbit
#

private static Chiken instance;

#

i done this

sterile axle
#

beautiful

remote swallow
#

hi simple

sterile axle
#

hi

river oracle
vast ledge
#

Why would you do such a thing

sterile axle
#

It's one way of getting your main class instance around the plugin, the other being dependency injection. So it's fine. In your onEnable just set instance = this, and make a public static method in your main class that returns instance. Then you can Chiken.getInstance().

#

Arguably dependency injection is cleaner, so if you want to do that, wherever you need the main class instance just put Chiken chiken in the constructor and save it to a class field by this.chiken = chiken and when you instantiate that dependent class in the onEnable or wherever you do it, just do it like new MyDependentClass(this), and voila your dependent class has your main class instance in a more OOP friendly way. Just don't get in the habit of using static anytime you need something in another class, as that's not what it's for. But since plugin main classes are essentially singletons managed by the server itself, it's ok.

sterile axle
#

That's fine

#

Just take heed of my 2nd to last sentence there, and it's not the way to do it for every case when you need an instance of class A in class B. You'll want to familiarize yourself with dependency injection

drowsy helm
#

TAKE HEED

weak meteor
#

yo

#

what else commands do i need?

#

i think thats the best

#

stuff i made

#

in my life

gleaming grove
#

Hi how can I make particles rotate around according to player body rotation, I try this code, but particles jumps from position to position ``` float pitch = player.getLocation().getPitch();

        var r = 3f;
        var angle = pitch;

        var X = Math.cos(angle) * r;
        var Z = Math.sin(angle) * r;

        var loc = player.getLocation();
        loc.getWorld().spawnParticle(Particle.HEART,loc.getX()+X,loc.getY(),loc.getZ()+Z,1);

        //transform.getScale().set(2f);
        transform.getTranslation().x = (float) X;
        transform.getTranslation().z = (float) Z;


        transform.getLeftRotation().set(new AxisAngle4f((float) iteration, (float)0, (float)1, (float)0));


        id.setInterpolationDelay(0);
        id.setInterpolationDuration(1);
        id.setTransformation(transform);```
lunar sentinel
#

Hello, I need help with one of your UberEnchant plugin

young knoll
gleaming grove
quaint mantle
young knoll
#

This is why the builder exists

river oracle
#

new GsonBuilder() ๐Ÿง 

tired creek
#

im having an issue with a plugin im creating where when I call my spawnerSettings HashMap in two methods(onPlace, onInteract) it has values in it (as it should), but if i call it in another(onCommand) it is empty. i checked via debugging and the hashmap is holding the values properly as the method(s) that do work updates regardless of when I call it (et before onCommand, after onCommand) heres my code (ignore the toDo's) (sorry for lack of documentation) https://pastebin.com/raw/dSTa1Ej9

drowsy helm
#

you're only every creating one instance of SpawnerCreation right?

#

can you show where you register the command listener

#

or rather your main class

tired creek
#

Certainly

#

I register my commandListeners onEnable, also id like to add on that this is a personal project so I understand certain pieces of code are rather inefficent but id like to get a functional prototype before making it perform excellently. https://pastebin.com/raw/jduStuhM

drowsy helm
#
        Objects.requireNonNull(this.getCommand("spawnerInfo")).setExecutor(new SpawnerCreation());
        Bukkit.getServer().getPluginManager().registerEvents(new SpawnerCreation(), this);```
#

you're creating two instances

#

either share the variable or move the command executor to another class

tired creek
#

oh i feel stupid now, thank you!

weak meteor
#

com.sun.HttpServer isnt bad

#

actually liked it

#

thought it was going to be a shit

#

but its pretty abstract ig

worldly ingot
#

mfw using com.sun package

cinder karma
#

Does Bukkit.getPlayer(UUID) work for only online players? Is there a way to get an offline player?

sterile axle
#

Yes. And yes. Bukkit.getOfflinePlayer(UUID).

#

You can use OfflinePlayer#isOnline to tell if they're online, and if they are, you can do OfflinePlayer#getPlayer to get the Player.

#

Note, getOfflinePlayer never returns null. Everybody exists from its perspective

quaint mantle
#

If you dont see in ide right click to pom then download source and docs

cinder karma
#

the javadoc for the spigot api does not specify that it only works for online players, and I had seen the getOfflinePlayer, but was trying to not use it as it's deprecated

#

but the results I was getting seemed to indicate it was the case

#

I will simply store the player's names instead of their uuids for the purposes of my plugin, doesn't really matter unless they change their names, which won't happen often

quaint mantle
#

Does not use offlineplayer if offline mode

#

UUID(s) can be spoofed

#

Just names

sterile axle
#

Getting by UUID is not.

#

Same reason getPlayer(String) is deprecated

#

(If that's still even there, it was deprecated for many years in favor of getPlayer(UUID))

#

Oh, it got undeprecated. Excellent. Anyway, docs explain why it's deprecated.

grim hound
#

Is there any easy way to cancel the console command log?

#

Since cancelling playercommandpreprocessevent

#

Does not do it

rotund ravine
#

Which log?

rotund ravine
wet breach
#

ยฏ_(ใƒ„)_/ยฏ

upper hazel
#

What is better to create a separate class from common methods or an abstract class

eternal night
#

Don't force inheritence into places that don't need it

glass mauve
#

damn gradle 8.5 out now actually, full java 21 support

upper hazel
#

Is it a good idea to use an abstract class to remove repetition code, especially if the descendants override only 1 method?
or are there other better options? - https://paste.md-5.net/udiyojimos.java

drowsy helm
#

Use an interface

#

Itโ€™s not stateful so no point use an abs class

#

Wait no abstract class is probably the way to go

#

If everything else is the same

drowsy helm
#

Ignore that

#

Stay using abstract class

upper hazel
#

But won't the implementation of interfaces be repeated? Isn't this the same thing as repeating code?

drowsy helm
#

Correct

earnest socket
#

Does anyone know how to use the set equipment packet (with mojang mappings)? I am trying to make a vehicle and I basically need to hide the head item from an armorstand from the player that's riding it, while showing it to all other players. I think that the ClientboundSetEquipmentPacket is what I need but it uses a List of Pairs of Equipment slots and an item stack. It kinda confuses me how this works

upper hazel
quaint berry
#

What's the ideal maven plugin compile command EI mvn clean install compile

eternal night
#

and delegate common methods

#

but abstract here is fine I guess ?

earnest socket
eternal night
#

"ideal" does not exist

#

compile here is useless, install will run compile

quaint berry
#

So what should I use?

eternal night
#

mvn package packages your application into a jar

quaint berry
#

I got flamed a while back for using the wrong one

eternal night
#

mvn install does the same but installs it into your local .m2 repository

#

it depends on what your goal is

quaint berry
#

Compile a java plugin into a jar

#

To chuck straight into a plugins folder

eternal night
#

mvn package should be just fine then

quaint berry
#

Ok, thanks

urban timber
#

Hello, does anyone know why ClientboundRemoveEntitiesPacket or PacketPlayOutEntityDestroy for spigot, is not removing arrows? Is there any alternative packet for it?

spare hazel
#

e.getItems().clear();
e.getBlock().getDrops().clear();
e.getBlockState().getBlock().getDrops().clear();

#

which one of these actually removes the block drops

native bramble
#

java.lang.NullPointerException: Cannot invoke "org.bukkit.entity.EnderDragon$Phase.equals(Object)" because the return value of "org.bukkit.event.entity.EnderDragonChangePhaseEvent.getCurrentPhase()" is null

#

why is it null?

quaint berry
#

When setting a block to a type of wall, it doesn't attach to nearby blocks. How can I update the block? I tried blockdata but to no avail?

smoky anchor
quaint berry
#
public void doorFill(World world, int startX, int startY, int startZ) {
        for (int y = 0; y < doorHeight; y++) {
            for (int z = 0; z < doorWidth; z++) {
                int finalY = y;
                int finalZ = z;
                Bukkit.getScheduler().runTaskLater(plugin, () -> {
                    Location blockLocation = new Location(world, startX, startY - finalY, startZ + finalZ);
                    blockLocation.getBlock().setType(Material.DIORITE_WALL);
                }, y * 4);
            }
        }
    }
#

I managed to get it working using a command block that replaces the wall with the fixed version

#

Not how I'd like it but it works

quaint berry
#

1.20.1

#

You now have to use a component constructor instead of just sending a message?

#

Yikes

eternal night
sterile axle
torn shuttle
#

I need someone to slap my IDE away from me

#

I just have to go do something else man, I'm going to end up having the ide burnt into my retinas at this pace

slate tinsel
#

How do you usually do it so that if the player should have an item in his inventory and it should always be there and not be duplicated (In creative), what can I do then?

#

And it should never disappear regardless if the player dies, and the item should not drop if the player dies

#

Is there a special / easy way to do it or do you just have to set up a bunch of events etc.?

lost matrix
lost matrix
# quaint berry 1.20.1

You could try force updating the state. But you will probably end up scanning adjacent blocks and changing the BlockData accordingly.

slate tinsel
lost matrix
upper hazel
lost matrix
#

Or proxy

upper hazel
#

I tried to get rid of inheritance

lost matrix
#

I mean... on that front you failed

#

Because every single method is now inherited

upper hazel
#

if you're talking about "override" line then it's because of the interface

lost matrix
#

I see

upper hazel
#

How then, in this case, can we derive general methods?

lost matrix
#

Nope looks fine then

upper hazel
#

oh cool

lost matrix
#

Not entirely sure why you need the interface in this case

upper hazel
#

but with changed parameters

#

I just didnโ€™t show the whole class, it has its own methods

lost matrix
upper hazel
#

it's used in this class like I said, I just didn't show the whole class.

native ruin
#

is there an alternate way to showing floating items with an invis armor stand

young knoll
#

Item display

#

If youโ€™re in 1.19.4+

native ruin
#

damn gotta update my spigot then

remote swallow
#

yeah just use run configs

#

one to start the server and add the remote jvm debug flag then just start both and you have the server plus debugger, if its just the debugger you want add the flag outside ij then start the server then start the debug config

native ruin
#

is the main file for the server supposed to be the server's jar?

lost matrix
#

What does make a file the "main file" to you?

native ruin
#

not quite sure, the file i am rnning?

lost matrix
young knoll
native ruin
lost matrix
#

You should probably not touch this jar...

native ruin
#

good to know for next time

slate tinsel
#

How do I make it so that you can only write a special subcommand, otherwise you get this error?

worldly ingot
#

Bukkit commands don't work like that unfortunately. You would have to turn to something like Luck's Commodore library

echo basalt
#

brigadier

worldly ingot
#

Yes, which is at least somewhat better exposed by Commodore

slate tinsel
#

Okay, but is a jar file needed for brigadier or is it just to add to the project according to the documentation on github

green plaza
#

Can i load serve negative space fonts without player knowledge and this screen meant for acceptance?

#

So player join and he don't have to accept any resourcepack it's just loaded without his knowledge

lost matrix
lost matrix
green plaza
remote swallow
#

it could also probably get you sued

molten hearth
#

rce the client

green plaza
#

Anyway thanks. That's what i thought after looking at wiki but i thought you could override it

river oracle