#help-development

1 messages · Page 1144 of 1

river oracle
#

no all transactions are between you and the plugin owner

river oracle
#

if you aren't satisified with their support you can charge back

urban saddle
#

how

river oracle
#

go through paypal

#

I'm not going to walk you through how to use paypal they have plenty articles on how to dispute purchases

urban saddle
#

ok

rough ibex
#

not bad but I would have better variable names

quaint mantle
#

is there a way to set player speed without changing client-side fov?

worthy yarrow
#

Perhaps an attribute if I had to guess

quaint mantle
#

its what im using

worthy yarrow
#

not too sure if that changes fov

quaint mantle
#

yep

#

it does

pliant topaz
#

maybe possible with shaders

worthy yarrow
#

Yeah tbf I don't think that's a very easy fix

quaint mantle
#

if i give player velocity potion effect but i modify the packet so it doesn't send that, client is gonna move at normal speed right?

worthy yarrow
#

I feel like that'd end up in a kick of the player

#

well maybe not if the speed is valid on server side

#

Idk try that, sounds like it could work

quaint mantle
#

okay thanks

quaint mantle
#

doesn't that change player fox?

nova notch
#

well did you try it

quaint mantle
#

ok

worthy yarrow
#

I assumed he did kek

nova notch
#

yeah me too cus you said the attribute and isnt that what this method changes

worthy yarrow
#

Idk the internals but I would imagine so yeah

nova notch
#

it should be the same in paper, but im pretty sure thats what i was using and it worked fine

worthy yarrow
#

I can't find the damn packet

quaint mantle
#

there's a change of fov and then it instantly goes to normal fov, is that fixable or smth?

nova notch
#

maybe theres a very hacky workaround but it probably isnt worth messing with

quaint mantle
#

damn ok

nova notch
#

actually i doubt it

#

it doesnt have to be perfect tho, i also have a habit of trying to fix the smallest things instead of focusing on the larger task at hand

quaint mantle
#

okay

blazing ocean
blazing ocean
# pliant topaz maybe possible with shaders

doubt, shaders allow you to calculate the FOV but not the delta, and you can't set them. There might be some hacky way to have hardcoded FOV with some renderer but definitely not easy

#

You can just tell your players to disable FOV effects ig

peak depot
nova notch
#

thats not how that works

magic beacon
#

anyone here a plugin dev?

#

I need help

peak depot
#

?ask

undone axleBOT
#

If you have a question, please just ask it. Don't look for staff or topic experts. Don't ask to ask or ask if people are awake or available. Just ask the question to the channel straight out, and wait patiently for a reply. Make sure you use the right channel regarding the topic of your question. Create a thread in case the channel is already in use!

magic beacon
#

I need a plugin dev but can’t type in spigot

pseudo hazel
#

?services

undone axleBOT
pseudo hazel
#

why cant you type in spigot

#

that sounds like somthing that should be fixed

chrome beacon
#

Doesn't meet the requirements

chrome beacon
pine spear
#

How can i save players cash data? In yml file ?

eternal oxide
#

?configs

undone axleBOT
quaint mantle
eternal oxide
#

It could be cash 🙂

glass halo
#

Does anyone know how to make a velocity command?

pseudo hazel
#

you mean for the velocity platform?

#

you would need to go to paper's discord server

glass halo
#

Alrighty, thanks. Working on trying to create a plugin for my proxy.

fading drift
#

whats the best way to go about only letting a player break player placed blocks

#

keep a list of player placed blocks tied to each world?

#

and check every block break

#

or is there like metadata I could add or something

pseudo hazel
#

?blockpdc

undone axleBOT
pseudo hazel
#

but it might be worth it to just use the chunk data directly

#

as you basically just store a boolean for the block

fading drift
#

unfortunately and I hate to say it I'm running 1.8.8

pseudo hazel
#

yikes

#

we all hate to hear it

#

idk anything about 1.8

#

there is probably nbt stuff you can do

fading drift
#

what do you mean by use the chunk data?

pseudo hazel
#

chunk has pdc in 1.14

fading drift
#

i see

pseudo hazel
#

so maybe it has nbt before that

#

probably does

fading drift
#

is there a method to get server mspt?

sullen canyon
#

This is going to work only if you have access to nms

shadow night
#

MinecraftServer.getServer() is a thing?

sullen canyon
#

not sure about newer versions, but it works in 1.8

shadow night
#

1.8 💀

quaint mantle
#

?1.8

undone axleBOT
fading drift
#

older than me

quaint mantle
fading drift
#

im joking discord

fading drift
#

no way mspt sits at 2.5

#

that can't be right

nova notch
#

at this point y'all need to explicitly state in every question that you're on a decade old version for some reason

#

it always goes like
question
answer
"actually I'm on 1.8"

mellow edge
#

the funny thing is that this version is so old even the API is not fully backwards compatible

nova notch
#

all in the name of pvp (it can be recreated with one method to change attack cooldown)

nova notch
sullen canyon
#

and you can't use new features because you will anyway have players with 1.8 version

nova notch
#

that's... the point I'm making

fading drift
mellow edge
remote swallow
#

It being at 1 mspt is good

pine spear
peak depot
cedar saffron
#

1.8 sucks

torn shuttle
#

this is going well

#

so uh

#

is there a way to manually unload a chunk

#

I think this might be keeping chunks alive somehow

pliant topaz
torn shuttle
#

oh wait this is way more cursed than I thought, supposedly this was before it even loaded those chunks

#

how did that happen

smoky anchor
#

what the heck are you doing

hushed spindle
#

does spigot have a way to view the configuration of a crafter

arctic temple
#

i'm getting into this problem
:[27,31] cannot find symbol
[ERROR] symbol: class GuildMessageChannel
[ERROR] location: class [name]

#

while trying to install the dv8tion

#

is there a soloution ?

tepid jewel
#

private void registerRecipes() {
Map<Integer, ItemStack> ingredients = new HashMap<>();
ingredients.put(10, new ItemStack(Material.IRON_INGOT, 2)); // 2 Iron Ingots
ingredients.put(11, new ItemStack(Material.IRON_NUGGET, 1)); // 1 Iron Nugget
ingredients.put(12, CustomItemManager.getCustomItem("super_gold_nugget")); // Super Gold Nuggets

    ItemStack result = CustomItemManager.getCustomItem("iron_gold_sword"); // Get the custom item with NBT
    CustomRecipe recipe = new CustomRecipe(ingredients, result);
    recipes.put("iron_gold_sword", recipe); // Use a unique key for the recipe
}

im currenlly coding a custom ui for crafting and 'super_gold_nugget' is a var declaed inanother class to be a gold nugget with special lore/nbt so how do i get it to check for multiple of these items in the crafting recipe

rough drift
blazing ocean
chrome beacon
#

You can force FOV with core shaders

#

You cannot however detect what FOV people are using on the server

blazing ocean
#

^^

blazing ocean
tepid jewel
chrome beacon
tepid jewel
#

So basicly

#

You can see in the other ingredients it checks for an amount

#

How do I do that for the last one

chrome beacon
#

Make a copy and set the amount?

tepid jewel
chrome beacon
#

?

#

what are you confused about

tepid jewel
rare flicker
#

as for copying, you can make an itemstack from another with new ItemStack(theItemToCopy)

chrome beacon
#

Not sure what putting it multiple times in the map comes from

#

but other than that it checks out

rare flicker
#

they want to use it multiple times in the same recipe

chrome beacon
#

Nothing would prevent them from doing so in the code above?

rare flicker
#

oh wait i completely misunderstood the question

chrome beacon
#

I mean you could be right

#

The question is a bit vague on what the actual problem is

rare flicker
#

I think they want to make a recipe with multiple different custom items

rare flicker
#

then i'm confused xD

tepid jewel
#

Re explain

rare flicker
#

Unrelated

i'm trying to run buildtools to get the 1.21.1 jar and i get an error
Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.13.0:compile (default-compile) on project spigot-api: Fatal error compiling: error: release version 17 not supported -> [Help 1]
Even though i'm running java 21
building 1.20.1 works just fine however

chrome beacon
#

You're currently using the JRE

tepid jewel
#

ok so the code is supposed to create a recipe in a custom ui for an item, it uses up 2 regula iron ingots, 1 regular iron nugget and then 3 custom gold nuggets, how do i make it so the code can have the right amount of the nuggets

chrome beacon
#

Assuming you're on Ubuntu it should be:

apt install openjdk-21-jdk
#

(or another vendor if you prefer ofc)

rare flicker
#

openjdk is fine

#

but that's quite odd given i've been making plugins for a while and having no issues

#

guess i got confused with opênjdk being named well... openjdk

chrome beacon
rare flicker
#

But fair enough

chrome beacon
#

Yeah it is a bit confusing

#

They really should specify clearly if it's just the jre

#

but generally you can just check if the javac command exists or not

chrome beacon
rare flicker
#

missing a closed parenthesis

chrome beacon
#

item = smth
item.setAmount

rare flicker
rare flicker
blazing ocean
#

Zypper... damn you running SUSE?

rare flicker
#

yup

blazing ocean
#

Never seen anybody run it lmao

rare flicker
#

i run solely because of btrfs

#

otherwise i can run KDE plasma on any distro, just need to look up a command every once in a while

blazing ocean
#

Garuda uses btrfs by default too

#

Would love to reinstall arch on btrfs tbh

rare flicker
#

Just picked the first i knew used it ¯_(ツ)_/¯

#

and so far, it runs, so i'm happy as it is x)

quiet ice
#

Fedora also uses BRTFS, in fact that is what I'm running on right now.

rare flicker
#

I'm a simple man of simple needs

blazing ocean
rare flicker
#

xDDD

blazing ocean
blazing ocean
quiet ice
blazing ocean
#

my dwm and st builds are prob modt important

rare flicker
#

and just deleting the target folder magically fixes it

quiet ice
#

Well these errors you are only likely to see if you have complicated or f-ed up generics

eternal oxide
#

However Eclipse will have no bearing on running Buildtools

#

you are running BT under java 17 as your error states

rare flicker
#

nono, in this case i want to have access to the old mob-specific shaders you get in spectator

#

you can cause the cient to trigger it with faking a mob and spectating it with packets

#

and that's the caveat

#

packets

quiet ice
#

Well, BT is running on whatever version - that is not of relevance. The question is what version maven is using - which corresponds to %JAVA_HOME%

rare flicker
#

oh right

#

i just uninstalled java

#

makes sense

quiet ice
#

Use export instead

tepid jewel
quiet ice
#

export | grep java or somethin

rare flicker
chrome beacon
#

That can cause issues

tepid jewel
#

?

chrome beacon
#

Copy the itemstack with the ItemStack(ItemStack) constructor

#

also show us how you're removing items

#

(if it doesn't help)

quiet ice
# rare flicker

I guess it's one of those J21 releases that don't support J17?
Or you are using a JRE where a JDK would be required, but idk the naming conventions of suse (under fedora you'd want the -devel suffix instead).

rare flicker
#

that was it yeah

#

Olivo pointed it out and indeed

brazen badge
rare flicker
#

i had a jre x)

quiet ice
#

idk why distros don't distribute JDKs by default.

rare flicker
#

ItemStack implements cloneable??

chrome beacon
#

yes

quiet ice
#

Class ItemStack
java.lang.Object
org.bukkit.inventory.ItemStack

All Implemented Interfaces:
Cloneable, ConfigurationSerializable, Translatable

rare flicker
#

That's... a lot less verbose than using the constructor

#

nice

quaint mantle
quiet ice
#

I guess it's there for … whatever reason

tepid jewel
chrome beacon
#

The item stack

#

You can just use the clone method

#

instead

chrome beacon
quaint mantle
tepid jewel
chrome beacon
#

yes

tepid jewel
# chrome beacon yes

so this?
ItemStack (ItemStack CustomItemManager.getCustomItem("super_gold_nugget");

#

or am i missing smth

rare flicker
#

i found the naming convention...
its java-17-openjdk-devel

#

why

chrome beacon
shadow night
tepid jewel
blazing ocean
chrome beacon
#

Just make it valid Java code first

shadow night
tepid jewel
chrome beacon
#

yeah it's a constructor

#

you need to mark it as such

#

with the new keyword

rare flicker
#

and its missing a closing parenthesis

chrome beacon
#

yeah

tepid jewel
chrome beacon
#

yes

quiet ice
# rare flicker *why*

Because it's "only" for developers. Same thing why there is imagemagick and imagemagick-devel I assume. The latter includes the C header files.

tepid jewel
chrome beacon
#

?learnjava

undone axleBOT
#

For Beginners:

Codecademy - Learn Java: Interactive Java programming course from basics to more advanced concepts. Perfect for absolute beginners.
https://www.codecademy.com/learn/learn-java
JetBrains Academy - Java Developer Track: Learn by doing with projects and challenges. It covers Java fundamentals to advanced topics.
https://www.jetbrains.com/academy/
Udemy - Java Programming Masterclass for Software Developers: Updated courses that cover Java 8 to Java 17 features. Suitable for those who prefer structured learning.
https://www.udemy.com/course/java-the-complete-java-developer-course/

For Intermediate to Advanced Learners:

Oracle Java Tutorials: The official guides by Oracle for Java programming—great for understanding the depth of Java.
https://docs.oracle.com/javase/tutorial/
Baeldung - Learn Java and Spring: Focus on Spring Framework and modern Java technologies. Best for intermediate learners aiming to expand their knowledge.
https://www.baeldung.com/

Practice and Hands-on Learning:

Exercism - Java Track: Solve exercises and get feedback from mentors. Great for practicing coding skills.
https://exercism.io/tracks/java
LeetCode: Practice your coding skills and prepare for technical interviews with Java.
https://leetcode.com/

Free Resources and Documentation:

Java Programming and Documentation: A comprehensive collection of Java programming guides, tutorials, and API documentation.
https://docs.oracle.com/en/java/

Community and Support:

Stack Overflow: A vast community of developers. Great for getting help with specific problems or understanding concepts.
https://stackoverflow.com/questions/tagged/java
r/learnjava on Reddit: Join the community of Java learners and get advice, share resources, and discuss projects.
https://www.reddit.com/r/learnjava/

Remember: Learning to program takes practice and patience. Don't hesitate to experiment with code and participate in community discussions. Happy coding! 🎉

chrome beacon
#

I'm not going to spoon anymore

#

take some of the java courses above

quiet ice
magic beacon
#

Looking for a plugin dev anyone able to help?

chrome beacon
undone axleBOT
blazing ocean
#

imagemagick is so good!

torn shuttle
chrome beacon
#

string

torn shuttle
#

thanks bby

chrome beacon
#

s t r i n g

rare flicker
#

You can instanciate a string from its bytes!

torn shuttle
#

but I said A string

#

so you lose

#

go take some courses

rare flicker
#

new String(new byte[]{0x00})

quiet ice
#

StandardCharsets.UTF_8

rare flicker
#

dammit

quiet ice
#

jk

torn shuttle
#

guys I want to write a string but I want to store it as a long

quiet ice
ivory gale
rare flicker
#

oh no... he mentionned the Sun class

#

we're all doomed

chrome beacon
#

Unsafe 🔫

rare flicker
quiet ice
rare flicker
quiet ice
rare flicker
#

I mean, i suppose it is to be expected from the user with a literal IDE PFP

quaint mantle
rare flicker
#

nope, just Suse

blazing ocean
quaint mantle
#

I will do that

#

windows + any linux

rare flicker
#

i will stay away from windows and mac for as long as i can (except for studies because program compat)

quaint mantle
#

I want to keep playing sometimes

blazing ocean
#

SUSE isn't exactly the best desktop distro

I use arch btw

rare flicker
#

I play on linux anyways

blazing ocean
#

I have a mac, a windows and several linux VMs

rare flicker
blazing ocean
quaint mantle
blazing ocean
#

i3 is ew

blazing ocean
rare flicker
#

no clue what that is

blazing ocean
#

I tried to actually, in a VM

blazing ocean
quiet ice
#

I like GNOME unironically heh
i3 isn't that great I admit

rare flicker
#

; -;)

blazing ocean
#

dwm >>>>

quiet ice
#

But then I also only used i3 for only a few hours

rare flicker
#

meanwhile...
Do i need to manually put it in my m2 folder or smth?

blazing ocean
#

the API is not remapped

#

use spigot instead of the api

quaint mantle
blazing ocean
#

it's a dynamic window manager

quiet ice
#

whatever that means

rare flicker
blazing ocean
#

if you depend on spigot you grt the API too

blazing ocean
rare flicker
#

yeah i do, i just want acess to all the packet classes, which apparently no longer requires net.minecraft.thebaneofmyexistencthatchangeseveryversion thanks to the mojang mappings

blazing ocean
#

real

quaint mantle
blazing ocean
eternal night
#

dynamic here iirc means "ass"

quaint mantle
blazing ocean
quiet ice
#

No, it means "look at me, I'm so pretty! Huehuehuehue"

shadow night
quiet ice
#

idk

quaint mantle
#

archinstall

rare flicker
#

I'll take it i need to manually put it in the maven folder

quiet ice
#

Well, it's for writing memory outside the heap - probably quite useless for the most of us

blazing ocean
eternal night
quaint mantle
rare flicker
#

yeah i just did

eternal night
#

then it should be in your local maven repo

chrome beacon
#

You probably built 1.21.1

#

but you're depending on 1.21

eternal night
#

Yea

#

1.21.0 is dead

quiet ice
eternal night
blazing ocean
rare flicker
slender elbow
eternal night
#

your heart is dead Sadge

slender elbow
#

not in your heart

eternal night
#

jspecify hater

slender elbow
#

true

#

dumb ass group

eternal night
#

dumb ass triage

slender elbow
#

trueeee

quiet ice
#

jspecify? Isn't that the new null annotation lib?

slender elbow
#

i was about to close that scoreboard issue

#

and you were like

#

NU UH

eternal night
#

And I was even on my phone Sadge

slender elbow
#

😭

hybrid spoke
quaint mantle
#

maybe a debian?

eternal night
#

its just gnome xD

chrome beacon
quiet ice
#

unriced mind you, you can still rice GNOME to some stupid degree, but that is not my cup of tea

hybrid spoke
upper hazel
#

You know that feeling when you have a friend who knows a lot of theory and practice at midle level, but for some reason writes code worse than junior and is always in a hurry to write code?

#

idk how fix it

#

i tired refactor his code

#

😭

quaint mantle
#

You guys have friends?

quaint mantle
#

why?

glossy laurel
#

How to remove the cooldown of picking up experience orbs

vast ledge
#

Dont

glossy laurel
vast ledge
slender elbow
river oracle
glossy laurel
#

_ _

#

_ _

#

yooo??

#

what the hell

#

that didnt work

spring nacelle
#

um i am trying to creatae a plugin using maven

#

but

#

nvm idk how or why but it worked

pure dagger
#

anyone knows how to make nicknames invisible?

#

over head

echo basalt
#

scoreboard teams

pure dagger
#

how do you do it...and.. will it work when they have luckperms plugin? can it destroy it?

glossy laurel
pure dagger
#

no there are more

#

can you just tell me if you know, if luckperms can break it?

glossy laurel
#

probably not

pure dagger
#

oh

#

thats

#

good

torn shuttle
#

hm I think I might've just had a big brain idea

#

so my world gen is really slow to paste the blocks

#

so how about I just don't

#

and queue them

#

so that they only paste the first time a chunk loads

#

functionally instant pasting

#

slower chunk loading but

#

eh

#

who cares

blazing ocean
spring nacelle
#

:[16,26] package com.mojang.authlib does not exist

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.myplugin</groupId>
<artifactId>MyFirstPlugin</artifactId>
<packaging>jar</packaging>
<version>1.0-SNAPSHOT</version>
<name>MyFirstPlugin</name>
<url>http://maven.apache.org</url>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot-api</artifactId>
<version>1.19.2-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>

</dependencies>
<repositories>
<repository>
<id>spigot-repo</id>
<url>https://hub.spigotmc.org/nexus/content/repositories/snapshots/</url>
</repository>
</repositories>

</project>

#

why does it say com.mojang.authlib not exits or something

#

doen't spigot add it bydefult

slender elbow
#

no

#

and you don't need it either

#

you can use the perfectly functional profile api

spring nacelle
#

i am trying to spawn armor tand with custom playe'rs head texture

slender elbow
#

good

spring nacelle
#

and tht is?

slender elbow
#

there is API for profiles for player heads

#

Bukkit.createProfile or something

spring nacelle
#

Ooh

slender elbow
#

then SkullMeta.setProfile or something

#

and uhh you can do PlayerProfile.setTextures or whatever

spring nacelle
#

i don't undersstaand PlayerProfile.setTextures part

#

i mean

#

nvm i think i got it let mt try

#

private ItemStack getCustomTextureHead(String texture) {
ItemStack skull = new ItemStack(Material.PLAYER_HEAD, 1);
SkullMeta skullMeta = (SkullMeta) skull.getItemMeta();
UUID uuid = UUID.randomUUID().toString();
Bukkit.createPlayerProfile(uuid).setTextures(texture);

    skull.setItemMeta(skullMeta);
    return skull;
}

i got da proile but.... how can i set its texture to head or get profile's head?

chrome beacon
# spring nacelle private ItemStack getCustomTextureHead(String texture) { ItemStack skull...

Spigot 1.18.1 added the new PlayerProfiles class, which finally allows us to use custom heads without needing any reflection! You can obtain them as normal items, or actually place them down into the world. I’ll show you how both works: Creating a new PlayerProfile First, we gotta create a new PlayerProfile object. To do so,...

spring nacelle
chrome beacon
#

.1

spring nacelle
chrome beacon
#

They're the same

#

So both

river oracle
#

If you update to latest you'll get lots of new api that's extremely beneficial

spring nacelle
#

🥲

#

but err said i com.mojang don't exists

chrome beacon
#

You probably forgot to add the repo

#

or the dependency for it

spring nacelle
#

so whata are they?

#

i mean whts the link

chrome beacon
#

Don't have the repo rn

#

Try a google search

spring nacelle
#

couln't find

vernal owl
#

hey there, is there a api for spigotmc.org resources to query different plugins programmatically?

#

needing that for a update function! 😄

remote swallow
vernal owl
#

nah no original mojang resources, i need the ability to query 3rd party Plugin meta

remote swallow
#

that link was for @spring nacelle

vernal owl
#

my bad

remote swallow
#

aslong as you have the id of it

vernal owl
#

oh cool! tysm

spring nacelle
remote swallow
#

add that link as a repo to your pom

spring nacelle
#

ok

pure dagger
eternal oxide
#

if they have another plugin that uses scoreboards/teams it will break yours

pure dagger
#

is it possible to make it so it unbreakable (xd)

grim hound
#

Let's say that I want to, for example, build packet events as a .jar, but with all of its packages having a prefix to avoid conflicts

#

I'm talking about creating a jar of the library here (and not creating a plugin of my own with prefixed the packages of the library)

pure dagger
#

i mean to make it so it works still

grim hound
true perch
#

I imported an old project from a VCS.
When attempting to navigate the code, it states there's no declaration to go to although it exists. How can I fix this?

echo basalt
#

let it index

#

prob try to build or just gradle refresh

#

Worst case scenario it's some wonky dependency you're missing

true perch
#

My previous PC broke so I have to rely on what I uploaded to the vcs

quartz gull
#

How would I implement a social media verification system, would springboot socials be a viable option, and would it be possible to code a plugin without using a website. Anyone know of any API's or free websites, or is it impossible

remote swallow
#

to start with what do you mean with a social media verification system

#

what does it do and how should it work

wet breach
remote swallow
#

then yeah you could host some form of api in ur plugin weather thats with spring or something id say is easier like javalin

young knoll
#

Discord is a social media

#

And is pretty easy to connect to your server

remote swallow
river oracle
#

in the modern sense its nowhere near comparable to other social medias imho

young knoll
#

Social media are interactive technologies that facilitate the creation, sharing and aggregation of content (such as ideas, interests, and other forms of expression) amongst virtual communities and networks.

#

Get definitioned

#

Discord 100% counts

river oracle
#

like you can end up with funny idea of academic databases technically being social media

young knoll
#

If you can create, share and aggregate content

#

Then yeah technically it is

umbral flint
#

Did you guys know you could do this?
List<int> test = new ArrayList<int>();

umbral flint
late sonnet
umbral flint
#

I just found it interesting

remote swallow
#

Pointless generic def on the initializing

umbral flint
#

Nope

#

it's required

#

otherwise it will think it's an ArrayList<Object>

sly topaz
#

you definitely can't do that

umbral flint
#

I haven't tried compiling yet but my IDE is not screaming at me

sly topaz
#

that's because the IDE just does static analysis, compiling it won't work

#

in a not-so-far future when project valhalla is done, it may be possible, but right now it isn't

umbral flint
#

it doesn't work you're right

#

Surprised the IDE does not catch that though

young knoll
#

Bit late to the party

slender elbow
#

a certain other IDE does catch that

quiet ice
#

You mean - ECLIPSE?

slender elbow
#

i don't even know what they're using, but any mediocre ide does lmao

sly topaz
#

inb4 vscode

robust pebble
#

ik this might be a lil stupid but whatever I have a plugin with the lore of the item in the yaml but I want it to have line breaks

here Is the yaml file as of rn and what i wanna do with it

itemLore: "Line 1 , Line 2 , Line 3"

over here im just trying to have multiple lines so it shows up that way in the item lore

#

how would I do this in the yaml

drowsy helm
#

use a list

echo basalt
#

ms-paint-ide

#

my beloved

drowsy helm
#
lore:
  - 'abc'
  - 'def'
  - 'xyz'

OR

lore: ['abc', 'def', xyz']
sly topaz
#

you can just split the string if you want it to be a single line, or use a list like shown above

quiet ice
# sly topaz inb4 vscode

Well, I'd wager a bet that they are using an IDE from the future where primitives in generics is fully supported … well, jk - I don't.

robust pebble
#

alr thanks

sly topaz
quiet ice
#

JSON-style elements in yaml make a lot of sense for single-element stuff

slender elbow
#

intellij most certainly warns you

river oracle
#

they probably need to invalidate caches

#

sometimes intellij just forgets its supposed to do anything and just acts as a downgrade from notepad

quartz gull
quaint mantle
#

does anyone know whats the best way to optimize scoreboard creation?

merry cove
#

How can I check if a Goal has been completed? do I need to calculate speed / distance and double verify if it has done the 'moveTo' ? unsure how to handle it best?

quaint mantle
#

hey guys im really at a loss for how to implement saving and loading itemstacks from a sqlite database using bukkitobjectinput/outputstream

#

i know how to use databases, but i cant seem to find info about input and output streams and putting those into and out of a database

drowsy helm
#

it's as simple as serializing it to a string

quaint mantle
#

honestly i havent started i have no idea how to work with bytes or input/output streams

#

ive only ever done like primitives into a db

#

and out

#

💀

drowsy helm
#

are you using an ORM?

slender elbow
#

I mean if you're gonna put it in a database you should use a blob

#

no need to b64 it

quaint mantle
#

🤣

quaint mantle
drowsy helm
#

yeah you can just use the raw bytes

#

instead of string

quaint mantle
#

whats the process like for converting an itemstack to bytes, st oring in db, and converting back? i th ink im just a bit unclear on the steps honestly haha

drowsy helm
#

if you look at the gist i sent it does exactly that

quaint mantle
drowsy helm
#

if you want just the bytes ignore the Base64Coder stuff

quaint mantle
#

interesting i think i might be able to pull something together

#

ill let u guys know how it goes

#

btw who coded that? was that u? its epic lol

drowsy helm
#

I did ages ago, but I'm 99% sure i just copied it off some old forum post

#

it's just basic bukkit stream stuff

quaint mantle
#

i need to learn more about streams and bytes and stuff. idk where to look though to find the core theory behind it

mild plover
#

Hey guys, how are you?

#

I'm starting in the programming field for a few months now and would like to find clients on Discord. Could someone help me?

#

Where could I be finding people to work with?

drowsy helm
undone axleBOT
drowsy helm
#

if you have only been coding for a few months, you SHOULD NOT be working for someone especially charging them

#

work on your own projects and learn, because it takes minimum a year or two before you should start making production code

merry cove
#

Get a portfolio or something. release a few free good plugins, get some feedback, update them. You wouldn't hire a plumber who saw a few youtube videos to do your plumbing because he did his own plumbing.

quaint mantle
#

yo @drowsy helm your code was really helpful thanks. do you know any good resources to learn about input streams n stuff? i really want to get a deeper understanding of how it works haha

drowsy helm
#

uuh there was a tutorial thing on it let me find it

#

can't find it, but if you want to learn how it works look at Java's ObjectOutputStream

#

the bukkit one is just a wrapper of it, same concept though

quaint mantle
#

thanks!

sly topaz
#

BukkitObjectOutputStream 💀

quaint mantle
#

im open to ideas

#

does anyone know whats the best way to optimize scoreboard creation?

#

also @drowsy helm got it working 🔥

#

thanks again so much

drowsy helm
#

like any other way is just wrong

granite burrow
#

is there a way to prevent certain people from getting a death message?

Im currently having an issue where I want plugins to be able to see the death message but not the player's (im replacing the death message). The only way I have found to prevent the message from being sent twice in a row is by either making the death message null, or by turning off the send death messages game rule and turning it back on. However, this doesn't work with plugin compatibility since the plugin I am attempting to be comptaible with checks if the game rule is active and will prevent the message from being sent (plugin im refering to is EssentialsX discord and its been a pain in my butt)

quaint mantle
#

Or smth like dat

quaint mantle
#

I dont remember if it was deprecated

quaint mantle
#

plugins don't listen for death message, js listen for pdeathevent

granite burrow
quaint mantle
#

ig that would be possible js with packets, i don't know other way or msth

#

smth*

granite burrow
quaint mantle
granite burrow
quaint mantle
#

idk what its called but theres a gamerule for that

granite burrow
quaint mantle
#

rip 😦

granite burrow
#

Yeah, im stuck between a rock and a hard place lmao

quaint mantle
#

Lol

quaint mantle
#

but it's to hard to implement so don't do it if it isn't very important

drowsy helm
#

if you just want to intercept a death message it's pretty easy with packet events

quaint mantle
#

but if u have to detect the death messages of other plugins and detect if they match with smth and that

#

i mean it's easy to intercept it , yea, but if essX discord sends another it's totally other thing

granite burrow
#

I've never worked with packets but I may look into it. I try to avoid using packets since it messes with compatibility a little and makes everything all complicated, but I might not have any other option

granite burrow
quaint mantle
#

u have to use nms of each version ur server is compatible with

#

too hard to be good

granite burrow
#

yeah, all this is for one user lmao so I might not add but feel like it would be nice for them :/

Edited:
I might just try to send a custom death message if they have a functional API for it on essX

quaint mantle
#

plugin compatibility = cryworthy

#

😦

#

xD

sly topaz
#

but it is well-known as broken specially for ItemStacks since ItemMeta serialization used to break with version upgrades

quaint mantle
sly topaz
#

this way the data can be passed off to DFU when necessary

#

if you want a human-readable format, then there needs to be a bit more tinkering but it isn't impossible either, it involves using the NMS codec to export it as JSON

quaint mantle
drowsy helm
#

indeed

quaint mantle
#

so my databases are gonna break each update using the input/output streams?

sly topaz
quaint mantle
#

that's fair. i'll let you know if i have any issues. hopefully they drop that update soon

sly topaz
#

for it to be fixed, the format that BOOS outputs needs to have some kind of version identifier and pass it onto DFU and do the necessary upgrades

quaint mantle
#

does anyone know whats the best way to optimize scoreboard creation?

#

and what's more efficient? send packets of entities (like decorative pets that are armor stands) and particles or actually spawning them?

quaint mantle
#

wait actually manually re-adding all the data does sound like a LOT to fix

#

🤣

sly topaz
quaint mantle
#

i hope they add it soon

#

😤

willow radish
#

Does anyone know how I can disable/minimise the Mob damage effect that shows black hearts

willow radish
#

No, I can provide a picture in dms if u would like

sly topaz
#

I mean, that's the only potion effect that makes black hearts as far I'm aware lol

willow radish
#

I have dmed you a picture of it.

sly topaz
#

this is what they meant for context

#

what is even that effect, I don't play newer MC versions so I do not recognize it

willow radish
#

I found a solution but I'm not smart enough to know what to do, anyone understand this;

"Correct, it is indeed possible with ProtocolLib. All you have to do is listen for https://wiki.vg/Protocol#Particle_2 on a highpriority packetListener and cancel out the packets that contain your particle type."

quaint mantle
#

does anyone know whats the best way to optimize scoreboard creation?
and what's more efficient? send packets of entities (like decorative pets that are armor stands) and particles or actually spawning them?

chrome beacon
#

Make the pets display entities and spawn them

#

That's a good balance between easy and performance

quaint mantle
#

do you guys ever code something and you get to the point where it's so complicated htat you have no clue whats going on

#

xD

chrome beacon
#

Everyone has done so at some point

quaint mantle
#

im trying to get better at writing easy to digest comments but its hard sometimes when you dont even understand everything cause its so complicated XD. i feel like i need to go back after the fact and process what ive done and make changes/write comments

chrome beacon
#

A good goal is to structure the code in a way that it doesn't need comments

#

That's not always possible ofc

sly topaz
#

it leads to the idea that comments are secondary when they're not, any mildly complex system will have to semantics which methods and classes agree on but cannot be described on the signature alone

chrome beacon
#

I'm not saying you shouldn't use any comments

glossy laurel
#

How do I damage someone ignoring all damage reductions? (Like armor)

sly topaz
glossy laurel
chrome beacon
#

Proper documentation will always be necessary for larger and complex systems

sly topaz
#

if not, setHealth

glossy laurel
# sly topaz if not, setHealth

Sethealth ignores absorption hearts. I was making .damage() with custom damage cause as void but I think that would ignore totems.

sly topaz
glossy laurel
glossy laurel
#

Its not good

sly topaz
#

besides, damage method doesn't either, does it

#

nevermind, it does

glossy laurel
#

Or whatever it was called

#

It lets you can add location, type and entity

quaint mantle
#

cause itk eeps me on track and stops me a bit from overthinking

#

and staring at a wall of code without comments is defo really brain-frying for me

#

🍤

glossy laurel
#

It doesnt get affected by armor right?

#

Or like

#

MAGIC

#

Ig

sly topaz
#

something like this may work

public static void damage(Damageable damaged, double amount, DamageSource source) {
  if (!(damaged instanceof Attributable attr)) return; // shouldn't ever not be the case but free cast so...
  var event = new EntityDamageEvent(damaged, DamageCause.CUSTOM, source, amount);
  damaged.getServer().getPluginManager().callEvent(event);
  if (event.isCancelled()) return;
  damaged.setLastDamageCause(event);
  var maxHealth = attr.getAttribute(Attribute.GENERIC_MAX_HEALTH).getValue() + damaged.getAbsorptionAmount();
  damaged.setHealth(maxHealth - amount);
}

I don't know the ramifications here so use at your own risk lol

sacred ice
#

Hello, (correct me if I am wrong) but I don't think there is way of knowing if a sound is being played to a player, because there is a delay between player.playSound(...) and when it actually plays to the player there a delay and this delay comes from the client loading the audio ... does PacketPlayOutNamedSoundEffect fires when playing or when starting loading ?

eternal night
#

playSound immediately sends that packet

#

whatever delay occurs afterwards is outside of the servers control

sacred ice
#

Yes, but i mean does the client sends a packet to say "i am playing" when he is ready to play

silent slate
chrome beacon
silent slate
#

how to iimport my plugin then?

#

i have a plugin locally with the jar file

chrome beacon
#

Use mvn install on the other project

silent slate
#

whats that

chrome beacon
#

The maven command to install it to your local maven repo

#

After you've done that add it as a regular dependency

silent slate
#

i go into LaserStaff and execute maven install? And remove that pom thing and only add it to the dependencies via intellij

chrome beacon
#

Never add dependencies via Intellij

#

Use your pom

silent slate
#

huh

#

but uve just told me to delete the thing in the pom

#

this

<dependency>
<groupId>me.mondlw.laserstaff</groupId>
<artifactId>laserstaff</artifactId>
<version>1.0</version>
<scope>system</scope>
<systemPath>${laserstaff.dir}/LaserStaff-1.0.jar</systemPath>
</dependency>

chrome beacon
#

I told you to make it not a system path dependency

#

And what to do instead

silent slate
#

so remove the systempath thing and what to write instead?

chrome beacon
#

Add it as a regular dependency

silent slate
#
  1. install LaserStaff
  2. remove systemPath and rename scope to what?
  3. How to add it as a dependency
chrome beacon
#

using the dependency information specified in the laserstaff project pom

#

scope should probably be provided

silent slate
#

this is in the LaserStaff
<groupId>mondlw</groupId>
<artifactId>LaserStaff</artifactId>
<version>1.0</version>
<packaging>jar</packaging>

#

this right?

<dependency>
<groupId>mondlw</groupId>
<artifactId>LaserStaff</artifactId>
<version>1.0</version>
<scope>provided</scope>
</dependency>

sacred ice
silent slate
#

and again, deleted a whole bunch of random stuff that doesnt make sense to me, with the same error still there

pseudo hazel
silent slate
# chrome beacon Send the new error

same old one

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-resources-plugin:3.3.1:resources (default-resources) on project laserservermanager-1-21: filtering H:\Lukas\MC\Altstadt\LaserServerManager-1.21\src\main\resources\LaserStaff-1.0.jar to H:\Lukas\MC\Altstadt\LaserServerManager-1.21\target\classes\LaserStaff-1.0.jar failed with MalformedInputException: Input length = 1 -> [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```
chrome beacon
#

Do you have the LaserStaff jar in your resources folder??

silent slate
#

ye

chrome beacon
#

That would be why

silent slate
#

delete?

chrome beacon
#

If you don't need the jar there

#

yes

silent slate
#

right

#

why wasnt thatz so ez from the beginning

fading drift
#

is Material[][][] for storing a 3d array of objects cooked?

blazing robin
#

guys how can I upload a image on here?

nova notch
#

?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

blazing robin
#

https://imgur.com/a/OJ19Gan

I tried to retrieve B location from A
A Location is literally random. (it could be -, + [So This is the hard point])

how can I get B location ?

blazing robin
warm mica
blazing robin
nova notch
#

probably would help if you explain what it is you're trying to do

warm mica
#

Yes, explaik what this is about. B could be anywhere in the universe

blazing robin
#

Actually, Im trying to create a guild plugin,

So A is main guild building and the B is kinda farm area

So there's could be existed the distance so I tried to retrieve B by its distance but as you know, the A location could be - or + so Yeah I'm confusing

nova notch
#

There's no possible way to get a precise location using just a distance from another location

#

It could be anywhere within that outer radius

blazing robin
#

what if A locations are assigned? then it could be getting B location by its distance?

eternal oxide
#

You need a vector to get a second location not just distance

blazing robin
#

oh, both must be assigned hmm got it thank you guys

eternal oxide
#

just a vector is enough

#

a Vector has a length so it includes how far away it is

nova notch
#

I still have no clue what's going on but as long as you fix it good enough

blazing robin
nova notch
#

Location and vector

blazing robin
#

oh

eternal oxide
#

you need 1 location and a Vector

nova notch
#

A location is a point in space, a vector is a direction

eternal oxide
#

The Vector tells how far and in what direction

rare flicker
#

A vector is essentially a direction plus a distance.
Its like saying "the farm area is 150 blocks northeast of the guild building"

nova notch
#

Oh yeah and magnitude

blazing robin
#

oh I completely understood

rare flicker
#

(technically speaking, locations are also vectors but with an added world, yaw, and pitch)

blazing robin
rare flicker
#

yup

blazing robin
#

ahh

rare flicker
#

its just 3 numbers, xyz
so a vector from guild to farm would be composed of how much you need to change each number by to arrive at the farm

so if guild is at 100 50 100
and farm at 120 50 200
your vector from guild to farm would be
120 - 100 => 20
50 - 50 => 0
200 - 100 => 100
so 20 0 100

blazing robin
#

so get location by its distance is just nonsense

rare flicker
#

well yeah

#

it would be anywhere on a circle

blazing robin
#

yeah exactly

rare flicker
#

if im east of you 100 blocks or west, you'd have no way tell

eternal oxide
#

depends what "distance" represents

nova notch
#

basically you're trying to get from your house to the store with the knowledge that the store is 1km away

blazing robin
nova notch
#

it doesn't work, right

rare flicker
#

but if i tell you, move 20 blocks towards x, 0 towards y, and 100 towards z, you have no way to get it wrong

eternal oxide
#

If distance in yoru case is a double, it can;t be done. If distance is a Vector it can

blazing robin
#

thanks guys now I think I know how to make it as possible

rare flicker
#

^^

shadow night
nova notch
#

Yeah in theory that works but just like it would take you ages of walking around looking for it, it'd take forever to loop through all of those possible locations

#

And it's only even possible at all assuming there's a way to check the location is indeed the correct one

rugged fern
#

I have a problem with my SkinChanger plugin. If i try to set the skin, other players can see it, the player itself cannot: This is the code: ```java

package dev.itzyami.manager;

import com.google.gson.JsonArray;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
import com.mojang.authlib.GameProfile;
import com.mojang.authlib.properties.Property;
import net.minecraft.server.v1_8_R3.*;
import org.bukkit.Bukkit;
import org.bukkit.craftbukkit.v1_8_R3.entity.CraftPlayer;
import org.bukkit.entity.Player;

import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.URL;
import java.util.UUID;

public class SkinManager {

public static void changeSkin(Player player) {
    GameProfile profile = ((CraftPlayer) player).getHandle().getProfile();
    PlayerConnection connection = ((CraftPlayer) player).getHandle().playerConnection;

    connection.sendPacket(new PacketPlayOutPlayerInfo(PacketPlayOutPlayerInfo.EnumPlayerInfoAction.REMOVE_PLAYER, ((CraftPlayer)player).getHandle()));

    profile.getProperties().removeAll("textures");
    profile.getProperties().put("textures", getSkin());

    connection.sendPacket(new PacketPlayOutPlayerInfo(PacketPlayOutPlayerInfo.EnumPlayerInfoAction.ADD_PLAYER, ((CraftPlayer)player).getHandle()));
}

private static Property getSkin() {
    return new Property("textures", "ewogICJ0aW1lc3RhbXAiIDogMTcyNzc3Nzk4ODY5NywKICAicHJvZmlsZUlkIiA6ICI5N2VmNDYyMzdhNGY0ZTQxYWY2ZTljYjg2MTdmNzc2OSIsCiAgInByb2ZpbGVOYW1lIiA6ICJZdWthcmlLYXplIiwKICAic2lnbmF0dXJlUmVxdWlyZWQiIDogdHJ1ZSwKICAidGV4dHVyZXMiIDogewogICAgIlNLSU4iIDogewogICAgICAidXJsIiA6ICJodHRwOi8vdGV4dHVyZXMubWluZWNyYWZ0Lm5ldC90ZXh0dXJlL2Q4YjJmYzVlOGQxZTkyZTFhMDE5NGJmY2QwMmY1OGJlYWUxOTM3YWViZDRjODQ2NjgxMTIyNDJmNmI2ODc4OGUiLAogICAgICAibWV0YWRhdGEiIDogewogICAgICAgICJtb2RlbCIgOiAic2xpbSIKICAgICAgfQogICAgfQogIH0KfQ==", "CZ3ryW08UMYvUsmW1spFEdoF+1+5hEmTeAHok+ZvshaL7s8GLPaI7yJayh/rDcG8s2dZh2QdwOsXVOfb50RTRWJVlFlDwYGbappm1EpaGEoLBOv2qZI+BGG0XZ3P74IevgTsNg+gTRmHXglprv/UMMne7xFK3h6s8TbzOACoe6HCTPmkzoOz8i1bR7u83Kk8Gy+OU47QAPgTFQBbh+6IIiO7b9e/wkj3ZhiPTeJKmASAIe2/8dCA8+ciF8Y4920D2USPBM2qh7WTeaY79znigpvBIb/i1qfK5fZDg3gVYPSC2o0VvDIZqtlNwXEcwfMbz97MALMUD44W9jGpz/pPicc3iiG3Yor7iIqKFLttCsjWCy+mCkEIeUzcOmtQZsKH9xWGteGXnhWJqkqNLoD7OwKCVQBeaMQSGyG+CTetQTrD980vlTcapfm5ai+fURCEiFEiv25H/qtAPvaGwqDKDGQLTsvN7aB/vc6OMXJGL7idm/BVhzSd4qjJGmh4y67Kd9CBGQ13Jg7ubhTRcOxhNgpdw88pbepZOdapYLo3zyyQLpQeASXWQUIBFkvVBeB+BWUbZrjlNHM/yemq053O5yJZjYgzEhMLO8CzlZk0cDdnaz3cYaZWpvBfO/SkL8VNwcQBoAzpHkt4rbFUYiS6H9r+PWdHqjworCOZ4201ljs=");
}```
#

getSkin() is for testing purposes

spring nacelle
#

[17:14:51 ERROR]: Error occurred while enabling MyFirstPlugin v1.0 (Is it up to date?)
java.lang.NullPointerException: Cannot invoke "org.bukkit.command.PluginCommand.setExecutor(org.bukkit.command.CommandExecutor)" because the return value of "com.myplugin.MyFirstPlugin.getCommand(String)" is null
at com.myplugin.MyFirstPlugin.onEnable(MyFirstPlugin.java:13) ~[?:?]
at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:263) ~[patched_1.15.2.jar:git-Paper-393]
at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:380) ~[patched_1.15.2.jar:git-Paper-393]
at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:483) ~[patched_1.15.2.jar:git-Paper-393]
at org.bukkit.craftbukkit.v1_15_R1.CraftServer.enablePlugin(CraftServer.java:472) ~[patched_1.15.2.jar:git-Paper-393]
at org.bukkit.craftbukkit.v1_15_R1.CraftServer.enablePlugins(CraftServer.java:386) ~[patched_1.15.2.jar:git-Paper-393]
at net.minecraft.server.v1_15_R1.MinecraftServer.a(MinecraftServer.java:488) ~[patched_1.15.2.jar:git-Paper-393]
at net.minecraft.server.v1_15_R1.DedicatedServer.init(DedicatedServer.java:298) ~[patched_1.15.2.jar:git-Paper-393]
at net.minecraft.server.v1_15_R1.MinecraftServer.run(MinecraftServer.java:909) ~[patched_1.15.2.jar:git-Paper-393]
at java.lang.Thread.run(Thread.java:840) [?:?]

eternal oxide
#

command is missing from your plugin.yml

peak depot
spring nacelle
#

tanks

spring nacelle
shadow night
blazing ocean
peak depot
#

/ the rest have brain cells

blazing ocean
shadow night
#

Nvim is actually quite handy

blazing ocean
shadow night
#

Very nice

blazing ocean
#

:D

grim hound
chrome beacon
#

Shadow has a remapping option

solid lake
#

can't put variable in switch ?

pseudo hazel
#

you can only switch on constants

solid lake
#

bruuh

#

my constant is like : "§5§lTelekinesis §7• §8Automatically place items directly into your inventory" this

#

and i have lot of other constants like that

pseudo hazel
#

dont compare with a name

worthy yarrow
#
@Override
    public void handleThrow(UUID playerId, ThrowTechnique technique, Disc disc) {
        Player player = Bukkit.getPlayer(playerId);
        if (player == null) {
            return;
        }
        Location throwLoc = player.getLocation();
        Vector direction = player.getEyeLocation().getDirection().normalize();
        int discSpeed = disc.getSpeed();
        DiscType discType = disc.getType();

        switch (discType) {

            case DRIVER -> {

                switch (technique) {
                    case BACKHAND -> {}
                    case FOREHAND -> {}
                    case ROLLER -> {}
                    case FLEX -> {}
                    // More techniques...
                }

            }
            case MID_RANGE -> {}
            case PUTTER -> {}

        }

I feel like this is just stupid, the nesting of switches, I am not sure what else I could do for determination of the throw technique... in this style I'd have to write out the algos for flight paths in each case of the technique switch which means I'd have to do the same for mid and putters. Perhaps delegating this operation(s) to a handleThrowBasedOnTechnique method? I'm not so sure any ideas are welcome... There are only ever 3 disc types so I really am not even sure if the disc type switch is necessary

pseudo hazel
#

thats not a constant, but thats an item name

#

and those should not be used for comparing if an item is equal

solid lake
#

i need it for add custom enchant you know

pseudo hazel
#

even worse

#

you should use pdc

solid lake
worthy yarrow
#

?pdc

worthy yarrow
#

Pdc is pretty easy

solid lake
#

i'm not english haha i don't know what is this exactly

worthy yarrow
#

A guide

solid lake
#

i don't understand all english x)

blazing ocean
solid lake
#

i can use custom tag for custom enchant for resume ?

pseudo hazel
#

for what?

#

if you dont understand it, translate it with like chatgpt or google

solid lake
#

to summarize* sorry

worthy yarrow
pseudo hazel
#

yes you can put a tag for each enchantment you want

#

and then read out the tags

worthy yarrow
solid lake
pseudo hazel
#

then you can atleast get rid of this switch here

#

and then in each disc type you would handle your throw differently

worthy yarrow
#

actually yeah I like htat

pseudo hazel
#

and maybe have utility functions on how some techniques are thrown normally that can then be used and modified by the discs throw function

#

use the fact that everything is an object to its advantage

worthy yarrow
#

Yes indeed

worthy yarrow
#

I'm also trying to keep the code somewhat reusable

#

I think the handle throw method in each disc is a good start for this though so I'm gonna go work on that

pseudo hazel
#

yeah

#

and then see where you can write more stabdalone pieces for the techniques and whatever

grim hound
chrome beacon
#

Gradle can be a bit of a pain to use

grim hound
#

could you hold my hand through the process?

chrome beacon
#

Are you using Groovy or Kotlin

grim hound
#

kotlin

chrome beacon
#

yeah idk then I use Groovy

grim hound
#

I can probably translate to kotlin

#

like I'm really new

slender elbow
#

i mean

#

you don't have the shadowjar plugin

#

so there is no shadowjar task

grim hound
#

oh it's a gradle plugin?

#

okay

shadow night
#

Bruh

pure dagger
#

why did it work now? LOL

#

you siad it wont work because its.. umm minecraft vanilla command or something lke that

shadow night
#

Tf

river oracle
#

Dispatch command should work for any command

pure dagger
#

it didnt work before

river oracle
#

Idk who said it wouldn't work with a minecraft command but they're just wrong

pure dagger
#

@shadow night explained why so

#

but it works now

river oracle
#

Or a server bug that was patched

pure dagger
#

weirddddd

river oracle
#

But yeah dispatchCommand can run any command

#

It's not just bukkit commands that be idiotic design. Bukkit has a lot of that but that's even beyond bukkit xD

grim hound
#

why doesn't this shade the jar?

#

the built jar is empty

remote swallow
#

?paste ur build.gradle

undone axleBOT
pseudo hazel
#

yikes dont shade packetevent

remote swallow
#

that too

slender elbow
#

you can totally shade packetevents

pseudo hazel
#

yes its better not to

remote swallow
#

you can but its not recommended

slender elbow
#

sure

pseudo hazel
#

but like shading it will still work

#

so idk qhat the actual issue is here

#

i meant to say ideally dont shade packevents

remote swallow
#

once they paste their build.gradle we can figure out why its not shading

grim hound
#

(but I will shade it, just later on)

pseudo hazel
#

okay fair

#

lmao

#

your loss

shadow night
grim hound
#

well I am trying to come up with a system that allows for the integration between all pe instances

remote swallow
slender elbow
#

i mean, for that reason you might as well just use the plugin

#

and not shade it

remote swallow
grim hound
slender elbow
#

paper sex

grim hound
remote swallow
#

take it from shadow

pseudo hazel
#

interesting destination

shadow night
remote swallow
#

shadow doesnt modify the output of jar it has its own output

grim hound
#

I guess I see the issue

#

but I can't set the dest dir in shadow

remote swallow
#

from(tasks.shadowJar) will fix it

remote swallow
#

1 moment

slender elbow
#

having a separate copy task is the way to go

#

you are just taking the jar from the wrong task

remote swallow
#

thanks jb toolbox

#

i cant open ij bc it decided to install an eap

grim hound
#

then like this?

remote swallow
#

from(tasks.shadowJar)

grim hound
#

okay

#

nice, works

#

why the hell does it say all now?

remote swallow
#

thats the classifier shadow adds

#

set archiveClassifier to an empty string in shadowJar config

shadow night
remote swallow
#

early access

#

eap is early access program

shadow night
#

Aren't you supposed to like, agree to it or something

remote swallow
#

once you open it

blazing ocean
river oracle
slender elbow
#

because it's fucking paper

river oracle
cedar saffron
valid burrow
#

can someone explain to me how Material.getMaterial works

#

cause either minecraft misteriously removed carrots

#

or im stupid

#

"Cause: java.lang.IllegalArgumentException: carrot is not a valid material"

#

or literally ANY other material i tried

chrome beacon
#

Show your code

#

You probably forgot to use uppercase or smth

valid burrow
#

Material material = Material.getMaterial(materialId);

valid burrow
chrome beacon
#

That method is case sensitive

valid burrow
#

alr

chrome beacon
#

It's mentioned in the javadoc :P

nova notch
chrome beacon
grim hound
#

And already had one without the three-letter suffix

young knoll
#

Use matchMaterial instead

#

It’s more forgiving

slender elbow
#

Registry moment

young knoll
#

Pretty sure it just redirects to the registry method now

#

Not sure

#

Yes pretty sure but not sure

river oracle
#

That'd be wild

young knoll
#

Hey that has a registry too

halcyon hemlock
#

Everyone

#

@hi

valid burrow
#

is there a specific reason effects applied to the player during the EntityResurrectEvent are just whiped from exsistence

chrome beacon
#

What effects are you adding

slate siren
#

?paste

undone axleBOT
valid burrow
#

strenght, speed

#

tried multiple

#

i mean i found a workaround

chrome beacon
#

hm odd

valid burrow
#

but still weird

chrome beacon
#

Did you delay by a tick?

valid burrow
#

ya

#

oh i found out why

#

a totem of undying removes potion effects lol

chrome beacon
#

ah

zealous osprey
nova notch
#

fr?

slender elbow
#

exit end portal counts as a respawn but idk if they handle that specially

nova notch
#

i went through the end portal both ways and i still have my potion in 1.21.1

pure dagger
#

i need to set key a name with "." in it, how do i make it possible?

#

in config

pseudo hazel
#

why

#

why do you need to do that

#

maybe you can escpape it using \.

nova notch
#

this is why underscores exist

pure dagger
#

ok i dont need

#

that

#

but i want

#

hah

pseudo hazel
#

permissions should be values, not keys

pure dagger
#

but they are keys 😔

pseudo hazel
#

well

#

then save it as it is

#

with teh dots

pure dagger
#

but i cant with dot

pseudo hazel
#

why not

pure dagger
#

because then its hierarchy

pseudo hazel
#

so?

pure dagger
pure dagger
#

idk