#help-development

1 messages Β· Page 1051 of 1

pseudo hazel
#

I guess

#

but I tought the contains would implicitly do that

#

which it does cuz the code works

#

but like

#

sussy contains

#

thanks for the assist

tardy delta
#

contains is just a loop with Objects.equals

pseudo hazel
#

yeah that would still implicitly do what I said

#

its just comparing object references

tardy delta
granite owl
#

which event governs setting a respawn location by interacting with beds?

spice burrow
tardy delta
#

neither do i

spice burrow
#

perfectly usable code πŸ˜ƒ

tardy delta
#

if only java had List::find(Predicate<E>)

spice burrow
#

it'll come in the next patch focused on performance

jovial lava
#

how do i access a function in the first plugin from another plugin

tardy delta
#

add a dependency on that plugin

dreamy chasm
#

how can i download 1.18.2 spigot api?

tardy delta
#

?bt ig

undone axleBOT
jovial lava
#

like add it under the pom.xlm under dependencies cause it says it cant find the dependency

dreamy chasm
river oracle
#

why you wouldn 't use maven or gradle now is beyond me

tardy delta
tardy delta
jovial lava
#

alright will try that. thanks

tardy delta
#

a la mvn install if youre on maven

dreamy chasm
tardy delta
#

idk ive never in my life used the gui

dreamy chasm
#

😦

tardy delta
#

whats not clear about that screen

river oracle
#

so many things about this confuse me
Why not use Maven or Gradle
What about the GUi is unintuitive

tardy delta
#

imagine using guis

#

had some dude on an internship and he said he couldnt see the password when he had to login on a linux server

river oracle
#

πŸ’€

tardy delta
#

πŸ’€

river oracle
#

did you tell him that was kinda the point

tardy delta
#

i mean ye

river oracle
#

a lot of people who go internships know litearlly nothing though

#

so its not surprising

#

my friend recently got an internship and he didn't even have a github account

tardy delta
#

πŸ’€

dark jolt
#

It didn't work, me and my friend are still stuck


public void doAnimationLoop(ArmorStandClass stand) {
        Iterator<StandBodyPoses> iterator = stand.savedPositions.iterator();
        BukkitScheduler scheduler = Bukkit.getScheduler();

        while (iterator.hasNext())
        {
            scheduler.runTaskTimer(Plugin.getInstance(), () -> 
            {
                as.setWholeBodyPoseFromPose(iterator.next());
            }, 2L * 10L /*<-- the initial delay */, 10L * 5L /*<-- the interval */);
        }
    }

tardy delta
#

no put the loop in the lambda

dark jolt
tardy delta
#

just write a class implementing Consumer<BukkitTask>

#
class AnimationTask implements Consumer<BukkitTask> {
  Iterattor<Pose> it = ..

@override
  void accept(task) {
    if !it.hasNext() { task.cancel() return }
    Pose = it.next()
      pose.play()
  }
}

scheduler.runtaskTimer(x, y, new AnimationTask(stand.savedPostiiobs?.iterator()), 2, 10)

a la this spaghetti

#

or extend Bukkitrunnable whatever

dark jolt
#

Alr will try it thank you

tardy delta
#

DbContext?

#

PlayerData?

#

PlayerDao?

#

call it whatever the fuck you want then

mortal hare
#

tbh the more and more I see how folia's implementation of bukkit api is broken, the more I think that Bukkit API should be refactored for a new API standard in plugin ecosystem

#

its designed for single threaded environment, and if minecraft's servers really want to expand into concurrency it just begs new api

#

dont get me wrong current API is evolving, but not in a critical sense due to somewhat compatibility layers that's being left for old plugins that are dating back to 2013 days

#

maybe im wrong idk

#

its just my view

inner mulch
#

i have many keys tied to one value, when adding the value to the Map<Integer,Value> , is there a more efficient way than doing the following:

for(int key : value.getKeys()) {
map.put(key,value);
}

fallow violet
#

you can make it a one liner but i dont know if its more efficient: value.getKeys().forEach(key -> map.put(key, value));

inner mulch
#

i think internally this is the same, altough thank you for helping

fallow violet
#

your welcome but if you dont find anything better, just use the option which is more readable to yourself

inner mulch
#

yeah im gonna do that it looks cleaner

sleek estuary
#

I will control the collection of items so that if an English player picks up the item, the lore will change to English, and if it is Portuguese, the lore will change to Portuguese, etc. But how should I do this in chests where several players can touch the items in the chest? How do you suggest displaying items in multiple languages?

young knoll
#

Translation components

sleek estuary
sleek estuary
#

Is it possible to change the lore and name of an item according to the game language in the texture?

inner mulch
#

TranslatableComponents

sleek estuary
inner mulch
#

wdym by texture?

sleek estuary
#

server texture

inner mulch
#

im still not sure what you mean

jovial lava
#

should i have one plugin managing all communication between plugins and the database or should every plugin have the database communication code and make their own connection or is there an even better way to do it and how?

inner mulch
#

if you have multiple small plugins managing different parts of your server, i would recommend using one connection + you can have multiple modules in one intelliJ project making it easier

jovial lava
#

how can i create a module? because right now i got stuck because i have two projects open one is for a test plugin and one is for the database manager plugin but i couldn't figure out how to reference the database manager's functions

inner mulch
#

top left, project structure, modules

#

top left button

#

you need to depend on the modules tho

jovial lava
#

so in the modules tab i just need to find my other project?

inner mulch
#

no

#

add a module and start coding

#

or copy the classes over

fallow violet
#

But doesnt that forces you to compile with intelliJ instead of maven or gradle?

inner mulch
#

no

#

you can still use maven

#

or gradle

#

im using maven so idk about gradle

jovial lava
#

cant i just press import and find the projects location?

inner mulch
#

try and see

torn shuttle
#

I've never had a love/hate releationship quite like the one I have with nodejs

#

it feels like driving a race car but the only pedal you have is gas

obtuse hedge
#

they both support npm packages

#

Bun even supports loading straight from a npm folder and auto-conversion

#

I enjoy Deno

#

they also both have builtin Typescript support & nice builtin apis

#

and they also dont require a package setup to run a file, actually idk bout bun

torn shuttle
#

I'm not interested in learning 35 different languages and libraries to get a project running

obtuse hedge
#

there both javascript

#

and also its one thing? using the same libraries as node (in npm_modules)

#

seems like a invalid excuse tbh

torn shuttle
#

javascript is most of my problem with nodejs so I guess it wouldn't make much of a difference then

junior geyser
#

In PlayerQuitEvent, will Player#isOnline() return false?

buoyant viper
#

schrodingers status

#

is the player online when they quit? fck around n fiiiinndd outt

torn oyster
#

is there a way to get the skin of a player and set it to a grayscale version? i wanna make it look like a stone statue of a player i select

torn shuttle
#

got an annoying one, trying to figure out if there's a way I can rebalance wither, poison and fire damage because those are doing an inordinate amount of damage for my boss combat system

#

since gear level is meaningless unless you have fire resist

#

really wish there was a way to trace the damage source of those though I understand why mc doesn't do it natively

#

I might just apply some damage multipliers in dungeons and call it a day, not great

frail pilot
#

So you might have to get a dummy Minecraft account which changes its skin

#

Then, you get the texture and signature and apply it on the server

torn oyster
#

on second thought i might just use a generic statue skin

nova notch
#

no do the grayscale thing it'd be way cooler

kindred solar
#

Yo guys, do you know how do I make custom gui using my plugin menus without any external plugin?

eternal oxide
#

?gui

serene egret
#

Is there a way to get a transformation from a matrix4f object ?

kindred solar
eternal oxide
#

data pack with a custom font

kindred solar
#

I tried but isnt working

serene egret
#

Should be an utf as a gui title

kindred solar
#

I made something like this

proper cosmos
#

How do I access PersistentDataContainer of OfflinePlayer?

eternal oxide
#

Not exposed on the OfflinePlayer

proper cosmos
#

So I don't?

#

And I would have to use some NBT api?

eternal oxide
#

nope

#

you'd have to read the nbt on the file

proper cosmos
#

😑

vocal cloud
#

You should modify the player before they go offline

proper cosmos
#

I want to get data from player that's offline

vocal cloud
#

Store it in a database or yml file

polar heart
#

anyone knows how to make an potion that deletes bad effects with duration ?

pseudo hazel
#

and like what have you tried exactly

polar heart
pseudo hazel
#

youd probably have to do something custom for that

#

idk if you can make an actual effect for that

clear elm
#

how can i get a pink leather helmet as a material

chrome beacon
#

You can't

#

Not as a material

clear elm
#

as a itemstack?

chrome beacon
#

Yeah that's possible

clear elm
#

and how

chrome beacon
clear elm
#

ty

kindred solar
kindred solar
pseudo hazel
#

well youll have to do more than that

#

like what texture did you change in the texturepack

#

im pretty sure that screenshot you sent earlier is from a video is it not?

pseudo hazel
#

so I assumed you followed to the video?

kindred solar
pseudo hazel
#

okay, well the essential part is after you made the font with your texture you have to set that character as the title of a menu

#

or inventory I mean

#

can you show your code?

kindred solar
pseudo hazel
#

I think the character can only be... a single character

#

like some unicode character that doesnt get used by others

clear elm
#

ItemStack pinkCap = new ItemStack(Material.LEATHER_HELMET);
how can i turn this helmet pink?

pseudo hazel
#

set the item meta

#

pinkCap.getItemMeta() and check if its LeatherArmorMeta (would be weird if it wasnt) and cast it to set the color

kindred solar
pseudo hazel
#

then set the meta back to the item

pseudo hazel
wet breach
#

believe the name of it is the character point you want it to replace. Then its a matter of using the character point in your strings where you want said character to appear. Don't really think there is a limit in size other then just where you want it to fit, so using invisible space can come in handy when you are wanting correct placement in regards to other strings being present on the same line other then using spaces lol

pseudo hazel
#

the idea is that the game will render that character with the texture you give it, in this case your menu

kindred solar
#

and if I wanted to have a name on it? like "menu" on this case?

pseudo hazel
#

like you can try copy and pasting that character in your chat and it will show the menu texture

clear elm
pseudo hazel
#

then you have to do what frost said and make sure the spacing is correct

#

which I have no experience with

wet breach
inner mulch
pseudo hazel
#

wdym character point

wet breach
#

every character has a number associated with it, this is called its character point

#

IE \u0021

pseudo hazel
#

right

clear elm
pseudo hazel
#

I mean sure you never have to actually type the character, the unicode would be fine

inner mulch
wet breach
#

well sometimes there is issues if you use some really weird characters πŸ˜›

#

either way, now they know how to do it

kindred solar
clear elm
#

what color is this

pseudo hazel
#

idk

#

I think you can use f3+ h to find out

inner mulch
kindred solar
pseudo hazel
#

it needs to have that character in it yes

clear elm
#
        LeatherArmorMeta capData = (LeatherArmorMeta) pinkCap.getItemMeta();
        capData.setColor(Color.PURPLE);
        pinkCap.setItemMeta(capData);```
is this right?
pseudo hazel
#

everywhere you use that character in the game, it would draw your menu

kindred solar
#

can I put more than 1 character on that array? and if so how would I do with the menu name?

pseudo hazel
#

idk

#

you would usually pick some unicode chatacter that minecraft doesnt render naturally

#

there are like a few thousand you can use iirc

inner mulch
kindred solar
pseudo hazel
#

yes 1

#

i have not experienced a lot with this though

#

im not the expert you are looking for

clear elm
pseudo hazel
#

compare both

clear elm
#

i copy pasted it

kindred solar
clear elm
#

mine?

kindred solar
#

steaf

pseudo hazel
#

just plugins? few years

#

never done custom textured guis though

clear elm
#

im getting thios in the one code as an error

#

here it works fine

kindred solar
# pseudo hazel just plugins? few years

great, I have a question, Im currently using gradle but since I wanted to use NMS it was giving me a lot of problems, some people said that usim maven is better, my plugin is medium size already, do you think its worth it changing it from gradle to maven?

pseudo hazel
#

is that another project or smth?

#

what is medium size

chrome beacon
#

There's no reason to set the localized name anymore

clear elm
#

itembuilder

chrome beacon
#

It has no purpose you can remove it

clear elm
#

im using it like this

kindred solar
pseudo hazel
#

30% says nothing about size

chrome beacon
kindred solar
#

sure idk how can I say

pseudo hazel
#

size will be relative

clear elm
kindred solar
#

yeah u r right

pseudo hazel
#

how many dependencies do you have

chrome beacon
#

If you want to detect items do so by attaching a PDC tag

kindred solar
#

?paste

undone axleBOT
pseudo hazel
#

if you only have a few deps there is no reason you cant switch over

chrome beacon
#

also do not call close inventory in the click event

clear elm
pseudo hazel
pseudo hazel
#

ah right

chrome beacon
#

just like your warning says

clear elm
#

hmm

#

why does it work in the other projekt

pseudo hazel
#

whats the difference between projects

#

@clear elm

clear elm
#

nothing

chrome beacon
clear elm
pseudo hazel
#

wdym, do you use this project across multiple plugins or something?

clear elm
#

i just used the same spigot version and the method worked in every plugin till now

kindred solar
pseudo hazel
#

idk

#

I recently switched to gradle because I am using paper

#

but like other than that idk what the best option is for all cases

wet breach
#

if you really can't decide

#

gradle and maven don't typically intefere with each other in the same project

#

really its down to preference. Generally maven is easier to use but that is because there is plenty of documentations and tutorials etc for it

#

where as for gradle there can be some large gaps in such things

#

you need a super large project to actually see any real differences between gradle and maven and most people are not going to have such things with plugins

#

a large enough project where you have build times of 5 or more minutes just to compile

#

both maven and gradle are pretty decently fast though if you tailor them appropriately and it also depends on your project as well

clear elm
#

how can i remove the Colour: on the top and the text from When on Head

eternal oxide
#

viwevers

clear elm
#

oh

drowsy helm
clear elm
#

how can i do this

clear elm
#

what are this 2?

icy beacon
#

i am pretty sure those are clientsided idk

drowsy helm
#

I think f3+h to disable

icy beacon
#

^

clear elm
#

oh yea ty

kindred solar
wet breach
#

if you believe so

hollow lily
#

Hello i'm pretty new to plugins, and i wanted to create my own minigame (A the towers remake). I wanted to know if anyone knows how to detect if a player enters an area and then do some actions ?

#

I did my own research how to do it and found WGRegionEvents, but I can't make it work. Maybe is it outdated ?

hybrid spoke
#

or hook into the worldguard api if you want to use that

#

otherwise the distance check is a valid one

hollow lily
#

distance to a block ?

hybrid spoke
# hollow lily distance to a block ?

if you speak of an area you typically mean the space between 2 locations. you can check if the player is within that by checking his distance to the area. but a bounding box does the magic already for you, so i recommend using that

blazing ocean
hybrid spoke
hollow lily
#

and which Event would you recommend ?

#

playermoveevent?

hybrid spoke
#

rather a scheduler which iterates of the players

#

playermoveevent is too frequently called for that check

blazing ocean
# blazing ocean nms blockbox ❀️

you can just do stuff ```kt
fun save(corner1: Location, corner2: Location, key: NamespacedKey) {
val corner1Pos = corner1.toBlockPos()
val corner2Pos = corner2.toBlockPos()
val (min, max) = corner1Pos.asExtremeties(corner2Pos)
val positions = BlockPos.betweenClosed(min, max)
val palette = mutableListOf<BlockState>()
val paletteBlockStates = positions.mapNotNull { pos ->
val location = Location(corner1.world, pos.x.toDouble(), pos.y.toDouble(), pos.z.toDouble())
val state = (location.block.state as CraftBlockState).handle
if (state.isAir) {
return@mapNotNull null
} else {
if (state !in palette) {
palette.add(state)
}
val relativePos = pos.subtract(min)
val id = palette.indexOf(state)
PaletteBlockState(relativePos, id)
}
}
val blockBox = BlockBox(min, max)
val size = Vec3i(blockBox.sizeX(), blockBox.sizeY(), blockBox.sizeZ())
val schematic = Schematic(palette, paletteBlockStates, size)
val nbt = Schematic.CODEC.encodeQuick(NbtOps.INSTANCE, schematic)
val path = Path("schematics/${key.namespace}/${key.key}.nbt")
path.parent.toFile().mkdirs()
NbtIo.writeCompressed(nbt as CompoundTag, path)
put(key, schematic)
}

young knoll
#

Tf is this

#

You know there is a structure api right

blazing ocean
#

my schematic saving functionality

blazing ocean
hybrid spoke
#

can we introduce a rule to use ?paste for kotlin code to not damage my eyes

blazing ocean
#

i ain't using md paste

#

esp for kotlin

#

pastes.dev my beloved

bitter rune
#

Why do some people disable boat with chest riding? And interaction.. is there a dupe or something

tardy delta
blazing ocean
#

yes please

halcyon jay
#

unable to determine destination of item move?

icy beacon
tardy delta
#

works on my machine

blazing ocean
#

same

chrome beacon
#

same

hazy parrot
icy beacon
#

hell if i know why

upper hazel
#

The question does not apply to plugins for minecraft, but more to plugins for inteliji. For some reason, some plugins do not work specifically on my PC.

  1. plugin for displaying diagrams
  2. Codeium
    Has anyone encountered this? These plugins work great for my friend.
slender elbow
#

you can check intellij's logs to see if you find any errors

#

Help -> Show Log in Explorer/Finder/whatever file explorer you use

eternal oxide
near citrus
#

Hey guys I have a problem compiling my plugin, I'm using bukkit 1.21 with nms and java 21 and I get this error while compiling the plugin:

[ERROR] Failed to execute goal net.md-5:specialsource-maven-plugin:1.2.5:remap (remap-obf) on project SimpleSmp: Error creating remapped jar: Unsupported class file major version 65 -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

Process finished with exit code 1

Can anyone help me please?

slender elbow
#

update specialsource

#

2.0.3 iirc

near citrus
# slender elbow 2.0.3 iirc

Omg dude I didn't realize the major version change πŸ˜‚
I was updating the version with 1.2 at first then tab completing with it
Thanks alot!

sleek estuary
#

why i can interact with armorstand?

slender elbow
#

wait until you find out about the armor stand manipulate event

mellow edge
#

Does anyone here know whether intellij has it's own system of merging git branches (gui or somthing) and if it's useful?

slender elbow
#

it's alright

mellow edge
#

so it exists

slender elbow
#

yes

#

with the git plugin

#

which is installed and enabled by default

mellow edge
#

I am doing a HUGE code rebase and I think it's good to do it with git branches

tardy delta
#

hmm theres no SugarCane block or something?

sleek estuary
slender elbow
tardy delta
#

was wondering if you broke the second block of a sugar cane plant, it that resets all growth to 0 or remembers how much longer it wouldve taken to grow a third block

slender elbow
#

πŸ€”

tardy delta
#

as in is it good to break sugar cane when its only 2 blocks tall or do you really have to wait to the third

#

or do you waste progress if you break it before its fully grown

slender elbow
#

i think the convenience of letting it grow to three comes from not having to replant it

#

when you break the top two

hybrid spoke
#

design question: we want to introduce a filter system to our pathfinder library and for now we ended up with this https://github.com/patheloper/pathetic/tree/v3.0/pathetic-api/src/main/java/org/patheloper/api/pathing/filter.
the filters are passed to the pathfinder directly https://github.com/patheloper/pathetic/blob/v3.0/pathetic-api/src/main/java/org/patheloper/api/pathing/Pathfinder.java#L26 and are evaluated here https://github.com/patheloper/pathetic/blob/v3.0/pathetic-model/src/main/java/org/patheloper/model/pathing/pathfinder/AStarPathfinder.java#L307. with our current approach there are some flaws which are very annoying, so openly asked: does anyone have any suggestions on how we can approach this better?

slender elbow
#

me with my 2x2 chunks of sugar cane being perfectly reasonable

tardy delta
#

i mean if you break it at 2, while it wouldve only taken 40 more ticks to grow to 3, so now its at 1, will it now grow to 2 again within 40 ticks or will it have to grow that second block from 0 again

#

theres probably a wiki about this

sleek estuary
#

why i can interact with armorstand?

tardy delta
#

use the function with the consumer

#

it fires the event before you set the custom data

#

actually nvm, interaction event

sleek estuary
shadow night
hybrid spoke
#

improving filter system design for a pathfinding library

late sonnet
sleek estuary
#

but i didn't debug

late sonnet
toxic sage
#
slender elbow
#

datapack or nms

pseudo hazel
#

inthe docs it says to generally not be used in a plugin

#

so they probably removed it to avoid confusion

river oracle
#

That's quite the odd addition wonder when that was added and why

#

Might need the ol deprecated

slender elbow
#

i mean, it was probably added in, like, its inception

#

far before registries were a thing

river oracle
#

Yeah I was thinking so

slender elbow
#

and that's how they thought would be a good idea

#

then when registries were added md5 kept it cuz muh backwards compatibility of unsupported methods πŸ€“

river oracle
#

Should probably be deprecated for removal I'll take a look at that later ig

river oracle
#

Trying to maintain compatibility with 1.8 at this point is wild

slender elbow
#

that's what op was pointing out

river oracle
#

Ah

#

Oh I didn't notice that was 1.20 docs

#

I always assume latest for spigot lol

river oracle
#

Or a datapack but yeah

#

There's a resource on the forums

#

Of how to

toxic sage
#

thanks πŸ˜„

slender elbow
#

datapack or nms
so only nms?

#

😭

toxic sage
#

thank you too

river oracle
onyx fjord
#

does spigot api support sending worldborder warnings to players?

slender elbow
#

more like mid api when data packs can do more

young knoll
#

Yes

#

There is a per player world border api

onyx fjord
#

so i create a border for single player only and simulate warning with a crazy distance?

young knoll
#

yes

onyx fjord
#

i kinda need it to work vertically

#

so ill have to simulate everything

young knoll
#

Don't think the game works that way

onyx fjord
#

i can just warn players if their Y is too high

#

and then loop some damage

#

kinda nether behavior

glossy wren
#

How do you get an entity's EntityCategory now through the new tag system?

gentle inlet
#

?paste

undone axleBOT
gentle inlet
blazing ocean
#

suckCounter
kekw

granite owl
#

since when do inventories no longer implement Serializeable?

slender elbow
#

it never did?

chrome beacon
#

^^

granite owl
#

huh

#

if i use ItemStack.serialize() i fail to see how i can deserialize it afterwards

slender elbow
#

you aren't gonna believe this

#

ItemStack.deserialize(Map)

blazing ocean
#

🀯

remote swallow
#

🀯

granite owl
#

right...

#

okay my bad

#

was just looking in the definition of ConfigurationSerializable

#

but makes sense to use a static method

#
public ArrayList<Map<String, Object>> serializeItems(ItemStack[] items)
{
    ArrayList<Map<String, Object>> ser = new ArrayList<Map<String, Object>>();

    for (ItemStack is : items)
    {
        ser.add(((is != null) ? is.serialize() : new ItemStack(Material.AIR, 1).serialize()));
    }

    return ser;
}
``` yaay.. xD
tardy delta
slender elbow
#

ask that to md5

tardy delta
#

epic

pseudo hazel
#

basically the same thing anyways

#

just better notation arguably

blissful steppe
#

hello everyone

Could someone help me prioritize the tablist? I'm trying with packets and teammanager

pseudo hazel
#

whats teammanager

blazing ocean
#

ktx.serial + kaml = ❀️

ocean hollow
#

as.setRemoveWhenFarAway(false); how does it works?

#

does this mean that I can access the entity when it is not loaded?

blazing ocean
#

it just removes it client side

#

it just gets hidden

#

(at least with displays, not sure with ASs)

sand spire
#

Can an entity's UUID be the same as a player's UUID or do I not have to check if an entity is a player before searching for it's UUID in a map?

blazing ocean
#

it's more likely that you would get hit by space trash than a uuid colliding within like 2m years

pseudo hazel
#

lets just say it cant

#

and be done with it

blazing ocean
#

yeah this discussion happened in paper earlier today lol

pseudo hazel
#

and if it does happen youll find out (probably)

blazing ocean
#

i think you were there

pseudo hazel
#

yes I was xD

#

but its like the chance is infinetly higher that your code has a billion more bugs than the uuid collide messing up your code

#

so I just assume its always unique

#

its in the name ffs

sand spire
#

My life is so boring I feel like a risktaker when I skip this check

granite owl
#

whats the key for an itemstacks serialized metadata

#

object

#

and materialdata?

clear elm
#

can some1 recommend a good obfuscator

remote swallow
#

theres specific guidelines of obsfucators on spigot and obsfucation wont stop people, if they want to they can still see your code

clear elm
#

but can you recommend a good obfuscator anyways

remote swallow
#

theres loads of them

pseudo hazel
clear elm
#

some easy to use would be good

remote swallow
#

theres still loads of them

clear elm
#

just tell me 1 of them

pseudo hazel
#

read this

remote swallow
#

shit

pseudo hazel
#

that will narrow it down

remote swallow
#

i got sniped

pseudo hazel
#

get sniped on

clear elm
#

is the Proguard good?

remote swallow
#

sure

pseudo hazel
#

I have no idea

#

if you dont know if its good you probably dont need it

remote swallow
#

obfuscation isnt security

clear elm
#

hmm

young knoll
#

What’s the fastest way to check if an item in a slot has changed

#

equals and isSimilar clone the meta, which id like to avoid

#

hashcode is my first idea, but that’s still not ideal

pseudo hazel
#

reference check?

#

like if items.contains(otherItem)

#

where items is like a set or map or smth

young knoll
#

Is it going to be the same reference all the time? (Until changing that is)

#

I don’t really know how long ItemStack references survive

pseudo hazel
#

hmm

#

idk what the lifetime is like for your slots

#

is it like player inventories?

young knoll
#

Players inventory

#

Specifically armor and held items

slender elbow
pseudo hazel
#

and how long do you wanna check the slots for

#

like in the lifetime of the server or what

young knoll
#

I need to know when they change

#

So yeah, as long as the player is online

#

Sadly the inventory change event isn’t merged yet

pseudo hazel
#

I see

remote swallow
#

forcemerge it

pseudo hazel
#

yeah you can probably use references, I think they dont randomly change if the item is in the inventory

#

like surely if you drop them perhaps

#

or when you die

young knoll
#

Seems smart

#

Hashcode changes whenever the item takes damage, so not ideal

pseudo hazel
#

but then you detect they changed, which is the goal

pseudo hazel
young knoll
#

I’ll be checking every couple of ticks, I just want to avoid cloning the meta and then parsing PDC if nothing has changed

pseudo hazel
#

so I think the reference only changes when the slot changes, which is what you want

pseudo hazel
#

makes sense haha

young knoll
granite owl
#

serializing ItemStacks with item meta still causes problems

#

when i try to serialize the itemmeta on its own theres no deserializer?

young knoll
#

ItemMeta should have a deserializer?

#

Since the entire itemstack is serializable

granite owl
pseudo hazel
#

why do you serialize or deserize meta without the item

young knoll
#

It’s possible you can’t do meta on it’s own because it’s actually represented by a ton of different objects depending on the item

granite owl
#

and when i wanted to write it via pdc

#

i got exceptions

pseudo hazel
#

isnt it saved with the itemstack or whatever

remote swallow
young knoll
#

Yeah I figured deserialize would be in the internals

granite owl
#

so i cant access it?

remote swallow
#

nop

young knoll
#

Not easily

pseudo hazel
#

you shouldnt need it

#

you can just serialize a whole item stack

granite owl
#

so this is what i do rn

#
if (ser.get(i).get("meta") != null)
            {
                ser.get(i).put("meta", ((ItemMeta)ser.get(i).get("meta")).serialize());
            }
```to serialize the itemmeta
#

which works fine

#

would be cool to deserialize it tho

#

xD

pseudo hazel
#

why are you serializing it

granite owl
#

because im getting exceptions when i try to serialize an ItemStack with ItemMeta

pseudo hazel
#

then that should be the thing you fix

granite owl
#

when i try to pass the whole map to an object output stream

pseudo hazel
#

not create an xy problem out of it

granite owl
#

which is what im fixing

young knoll
#

Does using ConfigurationSection#getObject(key, ItemMeta.class) not work

pseudo hazel
#

whats the exception

granite owl
#

hold on i need to revert the code then

ocean hollow
young knoll
#

No

#

It controls whether the entity despawns naturally

#

Like hostile mobs do

granite owl
#

so in essence

#
java.io.NotSerializableException: org.bukkit.craftbukkit.v1_21_R1.inventory.CraftMetaItem
remote swallow
young knoll
#

Are you trying to serialize it with javas serialization system?

river oracle
young knoll
#

Because that won’t work

granite owl
#

i need to store it to a pdc container

young knoll
#

Use BukkitObjectOutputStream

remote swallow
#

use BOOS

young knoll
#

That lets you convert it to byte[]

granite owl
#

huh

#

oh okay

#

dont i need any of the serialize impl then?

#

of the class itself

young knoll
#

No

granite owl
#

ItemStack.ser

#

oh ok

#

xD

#

ty πŸ˜„

#

lemme try sec

remote swallow
#

thats crazy that this was an xy issue

granite owl
#

well i didnt know that bukkit had its own implementation of an object output stream lol

pseudo hazel
#

well now you know πŸ˜‰

young knoll
#

@river oracle was supposed to add methods to convert items directly to and from bytes

#

But he’s bad

#

<3

remote swallow
#

he did

#

in pineapple

young knoll
#

That’s not spigot

remote swallow
#

just use pineapple Β―_(ツ)_/Β―

young knoll
#

I’d rather not rely on someone else’s NMS

young knoll
#

Yes I know how to do it myself

#

You spoon

remote swallow
#

so pr it

young knoll
#

I can’t

#

I didn’t write that code

#

Also you removed the code for saving a single item to bytes? What a nerd

river oracle
young knoll
#

Smh

granite owl
hybrid ivy
#

hi everyone. is there any tool/plugin/mod that show sample of every bukkit materials items as some kind of image or chest gui

chrome beacon
#

creative mode

hybrid ivy
#

i mean i need to know the exact enum value of bukkit Material as well

chrome beacon
#

The enum value is just the same as vanilla but uppercase

#

Assuming you're not on an ancient version

hybrid ivy
#

oh really?

#

if they r similar

#

its cool then

river oracle
#

They are the same

hybrid ivy
#

okie thanks mates

gentle inlet
echo basalt
#

something about suckDelay

#

You're incrementing the delay for each block instead of per iteration

#

Which creates a pattern instead of an effect

south mason
#

how can I attach a certain object/block to a player?

vast ledge
#

put the on an armorstand, and make the armorstand teleport to the player when they move

south mason
#

it`s so slowly

vast ledge
#

.-.

#

You asked for a solution, you got one...

quaint mantle
#

is there a way to check if sand breaks when it falls on a slab, or any block that causes it to break?

vast ledge
exotic obsidian
#

hello eveyone!

#

Im trying to create temporary cache (hashmap) for database and save the hashmap values in database after player quit

#

my question is now if player rejoin i need to put the databases values into hashmap again?

#

Does this cause lag?

eternal oxide
#

depends on your code

exotic obsidian
lost matrix
lost matrix
eternal oxide
#

I said it depends on yoru code because your question is too vague to answer. We'd need to know exactly what your code is doing to tell you if it could lag.

#

just putting some data into a HashMap would not cause lag.

#

But thats nto all you are doing

exotic obsidian
lost matrix
# exotic obsidian Im coding player stats like kills,death, etc.

Load your data in the AsyncPlayerPreLoginEvent. You can call your DB methods right in this event since its async already.
Save your data in the PlayerQuitEvent. You need to call your DB methods in a different thread here since the event is not async.

I would recommend using a ConcurrentHashMap from java.utils.
Or a Cache from the Caffeine library.

exotic obsidian
lost matrix
eternal oxide
#

where is the data coming from? How much data?

exotic obsidian
#

the data comes from database as you know hashmap data will removed if i reload the server or closed it, so i need to store it in file or database

#

and when player quit i stored the hashmap values into database, but if i want again to get the data i don't want to use it directly from database, becasue as i told you guys i think this will causes lag because the game i created is pvp game.

eternal oxide
#

never read live from a database

#

do as 7smile7 told you

exotic obsidian
#

okay

#

ty guys

floral ruin
#

is there a plugin that can create custom smithing recipes and compatabile with oraxen

torpid berry
#

Hello, good question, I bought a plugin and I have not been able to download it, what should I do or what should I do?

#

Sorry for the bad English, it is with a translator, I speak Spanish

pseudo hazel
#

maybe contact dev

#

I think sometimes it gets stuck and you can ask the plugin dev for a key or whatever

#

ik how it works exactly

late sonnet
#

depends of the plugin but yeah.. try contact the developer.

blissful steppe
#

how to make priority on tablist with packets? i try but not work

#

help me? please

nova notch
#

consider sending your code

chrome beacon
#

?notworking

undone axleBOT
#

"Does not working" is a useless statement. Please describe what exactly is not working, what you expect it to do, and what actually happens. If you get any console errors, also ?paste the entire stacktrace.

chrome beacon
#

?paste

undone axleBOT
quaint mantle
#

How it's possible to let players in newest versions join? (no viaversion) I mean with own code

remote swallow
#

very very painfully

quaint mantle
#

😦

#

any video or example?

remote swallow
#

you wont find an example of how to recreate via version

#

you have to remap the protocol, tell the client it can join and handle every single possible packet translation

quaint mantle
#

nah I don't any idea of how to do that

nova notch
#

if it aint broke dont fix it... unless you want to spend hundreds of hours making a bootleg version of something already working perfectly fine

remote swallow
quaint mantle
mortal hare
#

am i wrong in thinking that git could be a great way to store server's configuration files?

#

not worlds or plugin artifacts ofc

#

but for keeping track of configuration files, imo is great if you want to branch off multiple versions of the same config files with some changes (for example production server's and test server's)

#

also CI/CD support for pushing those changes from git to production or test servers

#

you can also do rollbacks to specific commits

river oracle
#

I think some servers probably use git to store state of their config files already

#

I mean its a pretty sensible system if you think about it

#

you can fallback if errors are made in your config you can have multiple branches, dev prod etc

mortal hare
#

what about plugin artifacts or lets say paperclip jar files

#

shall i store that?

#

how can i really deal with that

#

tbh i should probably develop a docker container for that

river oracle
#

since you can code it'd be pretty trivial to throw together a quick script to read a JSON file with needed data thats saved in git and actually make a request

mortal hare
#

so i need to compile it

river oracle
#

could also prob script that pretty easily too

#

but yeah it'd be more complex as you'd need a specific git version to compile

mortal hare
#

what about plugins, if i dont throw in the artifacts, how can i be sure that my cloned repo config files are always compatible with the newest plugins i download

#

i need some kind of package manager but for plugins

river oracle
mortal hare
#

well my repo is stored on github privately

#

i can store artifacts just by uploading them but this feels wrong

#

but at the same time it right since if production server uses the older version of the artifacts because somebody rollbacked it due to some kind of exploit

#

CI/CD would upload the right files to the server after the commit to the private repo

#

am i wrong?

river oracle
#

Could do it like that

#

If it's private there's no harm there

mortal hare
#

i hate this kind of solution but i dont see better alternatives

river oracle
#

I mean ideallistically you'd only store meta but plugins are a weird world of not being able to easily obtain them

mortal hare
#

i would love to have some kind of npm but for spigot plugins with package.json for keeping up with plugin versions from spigot marketplace

#

but we dont have smth like this afaik

sacred light
#

Does anyone know how I could create a special item where if you right click it it would give certain players speed 2

worthy yarrow
#

Check for an item, PlayerInteractEvent to get the action type, (permission check for certain players) then give the player speed 2 @sacred light

sacred light
#

ty

echo basalt
#

I wonder if anyone here used bytebuddy πŸ€”

#

Having a weird error

worthy yarrow
#

Hey what would you do if I hit you with a ?ask

echo basalt
#

block your ass

worthy yarrow
#

eheh

#

Don't block me, just block cafebabe = problem solved

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. Make sure you use the right channel regarding the topic of your question. Create a thread in case the channel is already in use!

worthy yarrow
#

its a command

quaint mantle
#

only time I even seen bytebuddy was when I watched a conference from java about agents

#

look @ snakeyml

#

that's what everyone uses

#

its pretty lightweight

echo basalt
#

copilot says use asm

#

fuck it we ball

sacred light
#

Would anyone know how to make a conditional tabprefix/tagprefix in the TAB plugin. for example when im in no faction it has nothing but when im in a faction it says the factions name. I want it so there would be no faction placeholder if your not in a faction

worthy yarrow
sacred light
#

ok ty

slender elbow
#

just use jackson or configurate

#

jackson is bae

#

idk idc, I just use it

#

I just use jackson, idc how it works lol

#

I sleep

left perch
#

I have been trying for a couple hours now to get custom player heads into my 1.21 server. How can I do this, I have tried using things such as setting the owner of the head. I have seen people try to use GameProfile but that does not work since GameProfile is now changed to PlayerProfile.

crude zephyr
summer scroll
crude zephyr
summer scroll
crude zephyr
#

umm ive had my account for more than 20 days

summer scroll
crude zephyr
#

lol where do i make posts then???

torn shuttle
#

you participate in the community, that's the whole point

crude zephyr
#

okay now how do i speedrun getting to 20 posts

torn shuttle
#

and they woke up

blazing ocean
#

yay

vital token
dusty herald
#

who tf ghost pinged me

quaint mantle
#

john doe

torn shuttle
#

some shenanigans were afoot but they've been removed

blazing ocean
#

not a ghost ping tho

dusty herald
#

sobs

chrome beacon
crude zephyr
summer scroll
#

I'm trying to use Vault in 1.21 and I wanted to make my own economy plugin but for some reason the Economy.class is null https://paste.md-5.net/eqicifabep.cs, why is that? there are only two plugins on the server, Vault and my custom plugin.

eternal oxide
#

did you register your eco as a service provider?

summer scroll
#

So I need to create a class that implements Economy and register it using the ServicesManager?

eternal oxide
#

yes

#

you ARE an eco so you need to register as one

summer scroll
#

Gotcha, thank you!

icy beacon
#

actually take part in the community

#

respond in threads (if you actually have something to add)

drowsy helm
#

Bit of a niche question but how do i hide the health bar icon when mounting an armourstand in spectator?

shadow night
#

Negative hp? Texturepack?

drowsy helm
#

ill try negative hp

#

I can do rp if nothing else works

#

not ideal though

drowsy helm
#

negative max health did the job, thanks

obtuse hedge
#

is there a event for right clicking/using a item?

#

even if it doesnt have a useaction

shadow night
#

Interact event

kindred wigeon
#

hey guys, i am looking fpr an offline manager plugin and for an anti Xray Plugin

pseudo hazel
#

whats an offline manager plugin

obtuse hedge
shadow night
#

PlayerInteractEvent

#

?interactevent

undone axleBOT
#

The PlayerInteractEvent may be called once per hand. If you only want code to be executed once, you can check the result of https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/player/PlayerInteractEvent.html#getHand(), then decide functionality.

For example, only executing code if the main hand was used:

@EventHandler
public void onPlayerInteract(PlayerInteractEvent event) {
    if (event.getHand() != EquipmentSlot.HAND) { // * if the hand used is NOT the main hand:
        return; // do not progress past this point  |
    }
    // provide functionality
}
obtuse hedge
#

can I click air

#

and it work

shadow night
#

?tas

undone axleBOT
obtuse hedge
#

k

near mason
obtuse hedge
#

why is getItemInUse giving me a error/returning null

#

also its not cancelling the event when i do this

#

        event.setCancelled(true);
        event.setUseItemInHand(Event.Result.DENY);```
#

wait im stupid

#

im doing getItemInuse on player

#

theres event.getItem

#

nvm

last cipher
#

Need some help here. In older versions (pre 1.20.5) items got serialized to something like

      v: 3700
      type: CHICKEN
      meta:
        ==: ItemMeta
        meta-type: UNSPECIFIC
        internal: H4sIAAAAAAAA/+NiYOBk4PZzCnHOz81NzEsp5mBgYGBkkAiPDMipDDaAKs1wykoJNvL3qSyziAi0tWUAAGLP5ZQxAAAA

While on new versions its

      v: 3700
      type: CHICKEN
      meta:
        ==: ItemMeta
        meta-type: UNSPECIFIC
        custom: H4sIAAAAAAAA/+NiYOBk4PZzCnHOz81NzEsp5mBgYGBkkAiPDMipDDaAKs1wykoJNvL3qSyziAi0tWUAAGLP5ZQxAAAA

aka it changed from "internal" to "custom" and now items can't be fully recognized as "internal" section gets completely ignored. Any work arounds without a need to manually or via code to modify file itself?

summer scroll
#

I'm trying to retrieve transaction logs based on duration of the transaction happened, for example If I do /paymentlogs 5h, it will show transaction logs in the past 5 hours from that time. But I ran into an issue, I managed to convert 5h into a milliseconds and that value is used to find the transactions inside the database.

But for some reason even tho I put WHERE conditions in the syntax the SQL just ignores it, as you can see in the video I put 1719994286367 and transaction with timestamp 1719999792025 is still being picked up.

icy beacon
#

i don't get it? 1719999792025 > 1719994286367

sullen belfry
#

anyone know how i can get rid of this part in the spawner lore?

summer scroll
icy beacon
#

just look at the 7th digit

summer scroll
#

Haven't got any sleep, need to refocus lmao

eternal oxide
#

1719999792025 IS >= to 1719994286367

icy beacon
#

also 1719999792025 - 1719994286367 = 5505658 => 1719999792025 - 1719994286367 > 0

sullen belfry
#

numbers ;-;

sleek mountain
summer scroll
#

Ah yes, so the result is already correct.

icy beacon
#

:>

summer scroll
#

damn

#

thanks

icy beacon
#

np

summer scroll
#

too many numbers i guess

icy beacon
#

yes

sullen belfry
drowsy helm
#

does the question mark on the character look tacky?

icy beacon
#

it looks fine

#

not out-of-place or anything

sullen belfry
drowsy helm
#

ty ty

sullen belfry
eternal oxide
#

lol

#

you added every flag

pseudo hazel
#

also just a piece of grammar but the plural is just Cows, not Cow's

sullen belfry
#

but it also removes all the flags from visibility

pseudo hazel
sullen belfry
#

weird question to ask but what do you all feel about a custom enchant that acts like lumber but for ores? I've already made a lumber enchant (Tree Hugger) but i was thinking about doing the same sort of thing but it mines all the ores in a vein

drowsy helm
#

like veinminer?

sullen belfry
#

?

drowsy helm
#

it's already a thing called vein miner

#

but yes, its a good enchant to add

sullen belfry
#

ah

#

alright

#

just trying to build up a good lib of enchants for my custom enchant plugin

#

its SMP based so trying to think of SMP Enchant ideas

wet breach
#

mysql can do the conversions for you

#

if you weren't already aware

#
SELECT FROM_UNIXTIME(1447430881);

would match 2015-11-13 10:08:01

#
SELECT UNIX_TIMESTAMP();

allows you to incorporate timezones

#

but it also lets you convert too

#
SELECT UNIX_TIMESTAMP('2015-11-13 10:20:19');

would match 1447431619

#

but here is another way to do a conversion in a query

#
SELECT FROM_UNIXTIME(FLOOR(millis/1000));
#

only telling you this because its handy to know you don't need to incorporate additional code for conversions in regards to queries when something like mysql can handle it for you πŸ˜‰

proper cosmos
#

If I have List of Players and after Player leave and I try to get UUID from him (after he left) will it work?

pseudo hazel
#

yes but you cant get a Player object from an offline player

#

it will be an OfflinePlayer

#

but yeah uuid is unique for every player and cant be changed

proper cosmos
#

I will just save UUID instead of Player obj

drowsy helm
#

you should always be doing that anyway

#

holding references of Player will cause a memory leak

proper cosmos
#

oof

summer scroll
hushed spindle
# proper cosmos oof

not only that but it can cause errors that make no sense from just reading them but are caused by said player objects

#

did it accidentally once and it took me two weeks to find the stupid mistake

proper cosmos
#

got it

#

is HashMap serializable object for configuration?

obtuse hedge
#

is this the proper way to run a tick timer

#

task.runTaskTimer(plugin, 20, 1);

#

run every tick

#

and wait 1 tick

#

before running

shadow night
#

yes, but it'll wait one second before running, not tick

obtuse hedge
#

oh

#

1 1

#

right

shadow night
#

yes

obtuse hedge
#

k

#

i just refactored my poop code

shadow night
#

lol

obtuse hedge
#

:p

turbid flame
#

Is there any event for totem break?

proper cosmos
#

EntityResurrectEvent

pseudo hazel
#

oh is there a way to change the item rendered in the totem animation? or is it all client side?

#

in which case can it be changed using a resource pack?

#

(apart from changing totem texture)

late sonnet
#

I dont remember but the item used in show in the animation, if you use resoursepack for the item then works, also not sure if you run the totem effect show any item in hand

pseudo hazel
#

hmm

#

is there api to just play the animation at any time?

#

like on another event or something

late sonnet
#

playEffect

pseudo hazel
#

which effect is it, I cant seem to find the totem one

young knoll
#

TOTEM_RESURRECT

pseudo hazel
#

oh I was looking at the wrong Effect class haha

#

thanks

drowsy helm
#

Can use customModelData but it has to be a totem

pseudo hazel
#

rught

#

and then it just takes the item in hand?

#

like playEffect does that look at hand items or how does it know what model data to use

drowsy helm
#

Yep

pseudo hazel
#

i see

drowsy helm
#

Pretty sure it has to be in hand

pseudo hazel
#

hmm, might be sufficient

drowsy helm
#

Hold up you making my question myself lel

pseudo hazel
#

I think its a particle so should be possible to recreate in a resource pack anyways

#

only the trajectory might be a bit tricky haha

drowsy helm
#

Nah it’s not a particle

#

Theres a totem particle but thats just the green shit

pseudo hazel
#

right I see

obtuse hedge
#

uh my interact event is running twice for items with vanilla functionality, how do I stop it doin that

pseudo hazel
#

i am jjst working on my minigane plugin but it would be so cool to play that animation for an item when you collect it

pseudo hazel
#

?interactevent

undone axleBOT
#

The PlayerInteractEvent may be called once per hand. If you only want code to be executed once, you can check the result of https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/player/PlayerInteractEvent.html#getHand(), then decide functionality.

For example, only executing code if the main hand was used:

@EventHandler
public void onPlayerInteract(PlayerInteractEvent event) {
    if (event.getHand() != EquipmentSlot.HAND) { // * if the hand used is NOT the main hand:
        return; // do not progress past this point  |
    }
    // provide functionality
}
obtuse hedge
#

i do

drowsy helm
#

It will call once fir each

#

Show your code

obtuse hedge
#
    public void onPlayerInteract(PlayerInteractEvent event) {
        if (event.getHand() != EquipmentSlot.HAND && event.getHand() != EquipmentSlot.OFF_HAND)
            return;

the thing is tho, theres more return statements at the bottom, so it doesnt matter which hand it calls from, itll only make it to the bottom for one hand, and send the message

drowsy helm
#

You’re cancelling if it’s either hand?

#

That wont do anything

pseudo hazel
#

its not getting cancelled its just returning

#

but yeah this code should not be doing wnything

#

because I think those are the only slots it gets fired for

young knoll
#

Yeah that code does nothing

obtuse hedge
#
public class PlayerInteractEventHandler implements Listener {
    @EventHandler
    public void onPlayerInteract(PlayerInteractEvent event) {
        if (event.getHand() != EquipmentSlot.HAND && event.getHand() != EquipmentSlot.OFF_HAND)
            return;
        
        Player player = event.getPlayer();
        
        ItemStack itemStack = event.getItem();
        if (itemStack == null || !ItemManager.isCustomItem(itemStack)) {
            return;
        }
        
        Item item = ItemManager.getItemForStack(itemStack);
        if (item == null) {
            return;
        }
        
        event.setCancelled(true);
        event.setUseItemInHand(Event.Result.DENY);
        
        int cooldownTicks = ItemManager.getCooldown(player, item);
        if (cooldownTicks == -1) {
            Util.sendMessage(player, "&aYou used the item!");
            ItemManager.startCooldown(player.getUniqueId(), item);
            return;
        }
        
        int seconds = cooldownTicks / 20;
        Util.sendMessage(player, "&cYou cannot use the item again for " + seconds + (seconds > 1 ? "s" : ""));
    }
}
drowsy helm
#

That snippet is enough to go off of

obtuse hedge
#

well the code "works", just runs twice when using fishing rod/etc

shadow night
#

you are returning at the start no matter what

drowsy helm
#

That if statement does nothing

obtuse hedge
drowsy helm
shadow night
#

or is it opposite?

drowsy helm
#

It will always be false

shadow night
young knoll
#

No, they are not returning at the start no matter what

#

It's just a waste of cpu cycles

shadow night
#

my brain is bad at boolean logic, sorry

obtuse hedge
#

no im not

mortal hare
#

guys gitlab vs github vs bitbucket for private repo with 5-6 collaborators?

shadow night
obtuse hedge
#

it returns if its neither of them

drowsy helm
mortal hare
#

i've heard gitlab has good ci/cd but at the same time github has actions

#

no

obtuse hedge
#

guys

mortal hare
#

free plan

obtuse hedge
#

think

river oracle
drowsy helm
#

Git lab and girhub are both good options

shadow night
river oracle
#

Git lab is good becuase of the CI/CD

obtuse hedge
#

it has

#

a body

#

feet

#

legs

drowsy helm
#

Gitlab runners > github actions

shadow night
#

yeah but it can't interact with thme

#

have you ever seen steve press left leg click?

remote swallow
#

ah shit i just pressed a button with my chest

remote swallow
#

totally works guys

obtuse hedge
#

feet walking over pressure plate?

remote swallow
#

that would be a phyiscal interaction

drowsy helm
#

player.getFeet().tickle()

shadow night
#

lmao

obtuse hedge
#

fine ill remove the if statement

remote swallow
obtuse hedge
#

but that doesnt fix the double msg

#

when using a fishing rod

shadow night
#

yeah

#

the event being fucking shit once again

remote swallow
#

because you dont check hand

#

?interactevent

undone axleBOT
#

The PlayerInteractEvent may be called once per hand. If you only want code to be executed once, you can check the result of https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/player/PlayerInteractEvent.html#getHand(), then decide functionality.

For example, only executing code if the main hand was used:

@EventHandler
public void onPlayerInteract(PlayerInteractEvent event) {
    if (event.getHand() != EquipmentSlot.HAND) { // * if the hand used is NOT the main hand:
        return; // do not progress past this point  |
    }
    // provide functionality
}
drowsy helm
#

Not borh

obtuse hedge
#

i want to be able to use either hand

#

bruv

shadow night
#

can't you get the item for the current hand and check for it?

remote swallow
#

check the action

obtuse hedge
#

btw

obtuse hedge
#

theres not a custom item in both my hands

#

so itll fail past the item check

young knoll
#

event.getItem is the item in whichever hand the event is called for

obtuse hedge
#

i use that

#

LET ME SEND IMAGES

#

bro

#

ItemStack itemStack = event.getItem();
if (itemStack == null || !ItemManager.isCustomItem(itemStack)) {

shadow night
#

?image

obtuse hedge
#

no

shadow night
#

what was the command

obtuse hedge
#

never

#

i will never

shadow night
#

imgur

obtuse hedge
#

ItemStack itemStack = event.getItem();
if (itemStack == null || !ItemManager.isCustomItem(itemStack)) {
return;

#

look

pseudo hazel
#

?img

undone axleBOT
#

Can't send images? That's because you're not verified! Use !verify to complete verification.
Alternatively, you can upload screenshots to any image hosting site and share the link.

Here's some screenshot utilities that you can use to upload images.
Lightshot: https://prnt.sc
Imgur: https://imgur.com/upload
Flameshot: https://flameshot.org

obtuse hedge
#

shut

#

youll never get me to make a spigot acc

#

waste of space

young knoll
#

... space?

pseudo hazel
#

if only you read ahead an extra sentence

young knoll
#

Are you storing the account on your computer?

pseudo hazel
#

use imgur or lightshot

shadow night
pseudo hazel
#

you arent?

#

xD

drowsy helm
#

Md pays this guy to host spigot forums

shadow night
#

lmaoo

obtuse hedge
#

it will return on any item that isnt a custom one

#

and my offhand is empty

#

so its not running past that point

shadow night
#

does isCustomItem work correctly

obtuse hedge
#

for my offhand

#

yes

obtuse hedge
lean ermine
#

could someone in dms give me a hand with a bossbar compass system ^^

obtuse hedge
#

even then if it didnt and made it past, itd still return on getting the custom item based on the stack

lean ermine
#

too much code and text to paste 😭