#help-development

1 messages · Page 599 of 1

flint coyote
#

yeah then just delete it on chunk unload

#

as elgar suggested

#

if you want to, you can still respawn it on chunk load.
Dunno if that's necessary if they can summon it anytime and anywhere anyway

eternal oxide
#

I'd do...
Player uses summon command...
Search all loaded worlds for your horse.
If found teleport to player.
If not found spawn a new one.

#

on chunk unload delete any player spawned horses

#

that would ensure no duplicates and the worlds stay clean

silver viper
#

thanks to both of you, im working on a similar plugin and the advises are really helpful

eternal oxide
#

Sounds like someone is paying for a plugin and multiple people are attempting to be first

silver viper
#

i'm working on a plugin that im going to release for free >_>

tribal valve
#

where to add plugin.yml file

zealous osprey
#

you mean the config.yml file, right? It should be in the "resource" directory

silver viper
#

the error you're encountering is that the config.yml isn't in the resources folder

tribal valve
#

oh yea sorry

echo basalt
#

Every .yml file goes in the resources folder

#

simple enough

tribal valve
#

okay thanks

split gull
#

how can i add a tag container tag to a PDC

chrome beacon
#

or what tag container

split gull
chrome beacon
#

You'd add it just like anything to pdc

#

?pdc

trail coral
#

in blockplaceevent how do i get the Item that was placed?

chrome beacon
#

Yes

trail coral
#

thanks

tribal valve
#

how to ban someone that's on another server, i have 3 servers, proxy, hub and game 1, and how do i ban someone on hub when im on game 1

trail coral
tribal valve
#

yea

trail coral
#

are you making a plugin in bungeecord

tribal valve
#

n

#

o

trail coral
#

then you cant

tribal valve
#

why

trail coral
#

💀

#

because a spigot server cant interact with another spigot server

tribal valve
#

so if i would do a bungeecord plugin, would it work on every server

#

or i would must do a bungeecord plugin and also a spigot plugin for the other servers

trail coral
#

no just a bungeecord server

#

i mean plugin

tribal valve
#

so if i would only do a bungeecord plugin, the commands would be visible on spigot servers?

trail coral
#

yes

#

getProxy().getPlayer(uuid).kick()

tribal valve
#

and no databases?

trail coral
#

this would kick a player

trail coral
#

just on bungeecord

tribal valve
#

okay thanks

trail coral
#

np

karmic mural
#

Heyo, I've been trying to use Block.getBoundingBox().overlaps(player.getBoundingBox()) in an if statement, but it always evaluates to false. Anyone know what I can do? I'm trying to check if the player is within a specific block and was suggested this, but I haven't gotten it to work

trail coral
#

how do i convert a block to byte[]

trail coral
#

if a player overlaps a blocks box

eternal oxide
#

that code is fine

trail coral
#

how do i store blocks in a chunk pdc

karmic mural
#

I think I had it the other way around before but I'll try again.

chrome beacon
trail coral
#

how do i even convert a block to byte[] 😭

trail coral
chrome beacon
#

Exactly I told you how to do it

trail coral
#

do i convert a block to string and then back to block?

chrome beacon
#

You don't

#

You store the location

trail coral
#

how would i store a location

#

along with the world

eternal oxide
#

?morepdc

undone axleBOT
chrome beacon
#

The world is included in the location

#

^^

trail coral
#

how do i convert a location to byte[]

chrome beacon
#

Don't ignore us

#

You've gotten your answer

trail coral
#

what answer dawy

#

dawg

karmic mural
trail coral
eternal oxide
#

then your other code is wrong

karmic mural
eternal oxide
#

?nocode

undone axleBOT
#

It’s hard to answer a programming question without code
Oh no! You ran into a problem. But no worries, people are willing to help, but first they need to see your code. This is because otherwise, they would be providing help based on guesses instead of concrete knowledge. Whether it be a compile error, runtime error, or an unexpected output, I'm sure that if you were to provide code, you'd receive a quick solution.

eternal oxide
#

sysout before teh test. make sure your code is getting there

karmic mural
#

I just checked

#

It gets there, passes it

#

All the code before and after is executed whenever it should be

eternal oxide
#

not sure if AIR gives a full bounding box

karmic mural
#

It's only that one if statement that is always false

#

Hmm, good point. I'll look into that

eternal oxide
#

This method will return an empty bounding box if the geometric shape of the block is empty (such as air blocks).

karmic mural
#

Funny hacky way would be to place a block that doesn't suffocate but has a full bounding box, and then checking that for overlap before removing it again? lmao

eternal oxide
#

or just test if its empty and expand

karmic mural
#

Sorry, could you elaborate?

eternal oxide
#

a boundingbox has an expand method

#

if it's zero expand by 1

karmic mural
#

I see, thank you

cobalt thorn
#

its possible to use shaders to tilt your screen, i wanted to make a system for a wallrun with this mechanims any idea how can i implement shaders on a "custom" feature like that?

eternal oxide
#

you could probably trigger a shader by equipping a pumpkin

karmic mural
#

I printed the bounding box 'cause it was still not working... No wonder it doesn't work lol

cobalt thorn
karmic mural
#

Cool to know, though. If a block is without a bounding box, the default values are all XYZ = 0

eternal oxide
#

expand in x,y,z by 1 and it shoudl work

karmic mural
eternal oxide
#

you need to locate it

#

it should use relative world coords

karmic mural
#
        int posX = toPlace.getX();
        int posY = toPlace.getY();
        int posZ = toPlace.getZ();

        BoundingBox block = new BoundingBox(posX, posY, posZ, posX+1, posY+1, posZ +1);

        if (block.overlaps(p.getBoundingBox())) {
            AddToVoid(itemClicked, e);
            p.sendMessage("overlaps");
            return;
        }

```  Works like a charm at least
quaint mantle
#

is there any other way to pay cause my counry dont accept paypal

karmic mural
quaint mantle
#

yes

#

i want to pay

#

but my counrty on accept paypal

#

dont*

silver viper
#

contact the author

cedar lotus
#

Is this possible to modify NMS method using a plugin? I tried to use javassist but it gives to me an error. Did I do something wrong?
javassist.CannotCompileException: by java.lang.reflect.lnvocationTargetException

        try {
            ClassPool classPool = ClassPool.getDefault();
            CtClass ctClass = classPool.get("net.minecraft.world.entity.player.EntityHuman");
            CtMethod method = ctClass.getDeclaredMethod("fv"); //sweepAttack
            method.setBody("System.out.println(\"Sweep\");");
            ctClass.toClass();
        } catch (NotFoundException | CannotCompileException e) {
            e.printStackTrace();
        }
tribal valve
#

so i wanted to split my plugin in half so its on two different servers and now it gives me this error:
Error occurred while enabling freakcore v1.0-SNAPSHOT (Is it up to date?)
java.lang.IllegalArgumentException: The embedded resource 'config.yml' cannot be found in plugins\freak-core.jar
and i did have a config.yml but its now deleted and in the other plugin (which works)

silent steeple
#

is there a config.yml

ocean hollow
#

why "replace" can be ignored?

tribal valve
silent steeple
tribal valve
quaint mantle
tribal valve
silent steeple
quaint mantle
#

is there anyway to download deluxecombat for free?

tribal valve
#

well i have the old classes in the target folder

#

do i need to delete them too?

silent steeple
#

is there a full stacktrace

#

or is that it

silver viper
tribal valve
silent steeple
tribal valve
#

?paste

undone axleBOT
tribal valve
remote swallow
#

oh fook

#

im not pink

silent steeple
#

send line 18 of FCore

remote swallow
#

you dont have config.yml in ur resources folder

remote swallow
ocean hollow
#

yeah, i made it

#

thanks

tribal valve
#
package com.freakcore;

import com.freakcore.commands.Fly;
import com.freakcore.commands.Gamemode;
import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
import org.bukkit.plugin.java.JavaPlugin;

public final class FCore extends JavaPlugin {

    public static String prefix = ChatColor.BLACK + "[" + ChatColor.WHITE + ChatColor.BOLD + "FREAKMC" + ChatColor.BLACK + "] " + ChatColor.RESET;
    public static String noCommand = ChatColor.RED + "Nie ma takiej komendy";
    private static FCore instance;

    @Override
    public void onEnable() {
        Bukkit.getLogger().info(prefix + "Enabling FREAK-CORE");
        // There was a save config here (line 18) but now in line 18 is "instance = this;"
        instance = this;

        getCommand("fly").setExecutor(new Fly());
        getCommand("gm").setExecutor(new Gamemode());
    }

    public static FCore GetInstance() {
        return instance;
    }

    @Override
    public void onDisable() {
        Bukkit.getLogger().info(prefix + "Disabling FREAK-CORE");
    }
}
tribal valve
silent steeple
#

oh

hybrid spoke
#

oh i thought this just came out of nowhere

remote swallow
silent steeple
#

you should do saveDefaultConfig() if u want a config

tribal valve
tribal valve
#

because i don't need one

remote swallow
#

so dont have a saveConfig anywhere

#

¯_(ツ)_/¯

tribal valve
remote swallow
#

have you rebuilt

#

and copied the new jar

tribal valve
#

idk how to rebuild with maven

silent steeple
#

are you using eclipse

hybrid spoke
#

there is the problem

remote swallow
#

run the package goal again

tribal valve
#

amma do package

silent steeple
#

maven lifecycle package

remote swallow
#

that isnt needed, just run package

#

install for most spigot plugins isnt needed, it adds it to your local maven repo

tribal valve
#

i did package and still nothing

#

same error

remote swallow
#

did you copy the jar

silent steeple
#

send the stacktrace again

tribal valve
remote swallow
#

run clean package and use the newjar

silent steeple
#

its the same line 18 evidently u didnt change anything

tribal valve
silent steeple
#

ur not putting it on ur server correctly then

hybrid spoke
#

ctrl+s

silent steeple
#

turn your server off

#

maven clean then package

#

then put the new one

tribal valve
#

in the target folder i have the old classes that used the config file and the old FCore that had the config save

remote swallow
#

use the jar with no prefix or suffix

#

freak-core-1.0-SNAPSHOT.jar

hybrid spoke
#

mvn clean install -U
mvn package

remote swallow
#

why install? just run mvn clean package

tribal valve
#

okay, i cleaned it and it doesnt have the old classes

hybrid spoke
#

wait a second

#

why were you editing the target FCore

remote swallow
silent steeple
#

wait he was

tribal valve
#

nah, just selected it

silent steeple
#

ok

tribal valve
#

still it gives the error

#

i will unpack the jar and see if it has the line 18

hybrid spoke
#

did you reload

tribal valve
#

oh wait

#

OMFG

silent steeple
#

...

tribal valve
#

i was doing this: <outputFile>C:\Users\natiy\OneDrive\Pulpit\mc\plugins\freak-core.jar</outputFile> and i forgot that i have changed to bungeecord and my plugins folder is now in different folder

silent steeple
tribal valve
#

im doing a lot of builds, i just made it faster

#

i tried it and it works without errors

#

sorry guys

ocean hollow
#

why it doesn't work?

remote swallow
#

oh wait thats sql

#

you shouldnt be doing it like that

#

use = ? and PreparedStatement.set(1, value)

hybrid spoke
#

brb changing my name to DROP TABLE

ocean hollow
#

like that?

young knoll
#

Do the same for X

remote swallow
#

yeah, except you should do the same for X

ocean hollow
remote swallow
#

set 1 head
set 2 head
set 3 head
set 4 head
set 5 player.getname

#

iirc

ocean hollow
remote swallow
#

@young knoll im gonna give this to you

icy beacon
#

how do i get the name of the item (i don't even care about the language) if both displayName and localizedName are empty

#

seriously contemplating stealing a language file and making a map

remote swallow
#

smh

#

get the type

#

to string it

#

and format it

icy beacon
#

wait shit

#

i just remembered that my commission dude is a bitch

remote swallow
#
/**
     * Converts UPPERCASE underscore full material names to something easier to read
     *
     * @param mat to format
     * @return String of an easy-to-read Material name
     */
    public static String getNiceMaterialName(final Material mat) {
        final StringBuilder builder = new StringBuilder();
        final Iterator<String> iterator = Arrays.stream(mat.name().split("_")).iterator();
        while (iterator.hasNext()) {
            builder.append(WordUtils.upperCaseFirstLetterOnly(iterator.next()));
            if (iterator.hasNext()) builder.append(" ");
        }
        return builder.toString();
    }


/**
     * Turns the first letter of a String to uppercase, while making the rest lowercase
     *
     * @param word String to change
     */
    public static String upperCaseFirstLetterOnly(final String word) {
        return upperCaseFirstLetter(word.toLowerCase(Locale.ROOT));
    }

    /**
     * Turns the first letter of a String to uppercase
     *
     * @param word String to change
     */
    public static String upperCaseFirstLetter(final String word) {
        if (word.length() < 1) return word;
        if (word.length() == 1) return word.toUpperCase(Locale.ROOT);
        return word.substring(0, 1).toUpperCase(Locale.ROOT) + word.substring(1);
    }
icy beacon
#

he will require russian

#

i'll have to scrape a lang file

remote swallow
#

ratio

icy beacon
#

last time i worked with a nice dude on a big project

icy beacon
#

this dude, he won't

#

i bet

hybrid spoke
#

just take it from the material and translate it

remote swallow
#

out enum the enum

#

material("russian name")

icy beacon
#

there are multiple ways of translating keys and what not in minecraft actually

hybrid spoke
#

if he requires russian he can also pay for the google api key

icy beacon
#

but fyi they didn't wor k much

hybrid spoke
#

not even sure if it costs anything

icy beacon
#

this would work if a locale file was bundled with the server jar

#

but it just returns the english name

hybrid spoke
#

just give him a messages.yml

icy beacon
#

because only english is bundled

hybrid spoke
#

and let him translate it manually

icy beacon
#

tbh scraping these from a json file will take like a 5-10 minutes

#

start the stopwatch

#

i'll lyk when i;'m done

hybrid spoke
#

?stopwatch

#

should be a command

#

?learntoread

#

sad

tribal valve
#

i know its spigot mc but anyone know what to implement in command class in bungeecord plugin?

hybrid spoke
#

?bing

undone axleBOT
remote swallow
tribal valve
#

oh thanks

#

it says that sendMessage is deprecated, why

remote swallow
#

it wants you to send a component

tribal valve
#

oh

prime epoch
#

is there a simple way to limit enchants? for example a function like

  Bukkit.enchantmentTable.setEnchantmentLimit("sharpness", 2);
remote swallow
#

with bukkit api probably not, you'd need to use nms

icy beacon
#

restart your stopwatch

tribal valve
#

how to convert string to player in bungee

prime epoch
flint coyote
tribal valve
#

how to ban player

wraith dragon
#

hey guys what does the interpolation method do for display entities?

flint coyote
# tribal valve how to ban player
Bukkit.getBanList(Banlist.Type.IP).addBan(target.getAddress().getHostName(), reason, expires, source); // IP BAN
Bukkit.getBanList(Banlist.Type.NAME).addBan(target.getName(), reason, expires, source); // NAME BAN
tribal valve
#

but im doing Bungeecord not bukkit

flint coyote
#

oh

desert tinsel
#

is there any way to create a vanilla map and set a custom centerX and centerZ, cause when I try to do it with this: java ItemStack item = new ItemStack(Material.FILLED_MAP); MapMeta meta = (MapMeta) item.getItemMeta(); MapView view = Bukkit.createMap(Bukkit.getWorld("world")); view.setCenterZ(player.getLocation().getBlockZ()); view.setCenterX(player.getLocation().getBlockX()); meta.setMapView(view); item.setItemMeta(meta); player.getInventory().addItem(item);, there is no cursor, and I need the vanilla cursor that tracks the player's location to that location

flint coyote
tribal valve
echo basalt
#

The cursor is something else

mellow pebble
#

tko je napravio scenu a mi smo

#

cek cek cek

#

KUKUUUUUS

tribal valve
#

speak english

mellow pebble
#

👋🏻

icy beacon
# hybrid spoke ?stopwatch

ok so apparently the language file is a magic shit so i only have about 400 items translated and the rest i'm looking up manually in minecraft but copilot is helping a ton ngl

#

specifically the colored items and shit for example are not translated normally

tribal valve
icy beacon
#

(which makes sense to split them)

mellow pebble
#

wasting hours of my life watching that dumb sience fiction

#

rather would be dead instead of doing that

icy beacon
#

please fight in DMs

mellow pebble
#

it is not fighting silly

tribal valve
#

nah, not accepting him into my dms

icy beacon
mellow pebble
#

well in that case

icy beacon
#

#general

mellow pebble
tribal valve
#

damn

mellow pebble
#

get rekt

#

AHHAHA

#

there is no really function for banning players as you might think you can execute ban command like this

ProxyServer.getInstance().getPluginManager().dispatchCommand(proxy.getConsole(), "ban " + player.getName() + " " + reason);

so ban will be ran through console and that is if you have third party plugin that allows you to do such thing

hybrid spoke
#

charon being a karen

#

even rhymes

mellow pebble
#

if that is not what you were looking for then you will have to use database and make your own functions to call when you want to ban player unban player etc you will just check if they are in database and then disallow their connection

#

really no other way of doing such thing i mean you dont have to use database you can store it locally but idk i prefer database for that

mellow pebble
upper hazel
#

class horse can be serilizible?

mellow pebble
upper hazel
#

try {
ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
BukkitObjectOutputStream data = new BukkitObjectOutputStream(outputStream);
data.writeObject(horse);
data.close();
return Base64Coder.encodeLines(outputStream.toByteArray());
}catch (IOException e){
Bukkit.getLogger().warning(e);
return null;
} this can?

mellow pebble
#

NOOOOOOOOOOOOOOOOOOOO

#

?paste

undone axleBOT
mellow pebble
#

or

#

`

upper hazel
#

a

#

just message

#

nevenmind

mellow pebble
#

yes

#

i know it is a message

#

silly russian

upper hazel
#

i mean code this can serizible

#

hah

#

a??

#

so this serizible?

mellow pebble
#

why dont you test ?

upper hazel
#

bc long

mellow pebble
#

long

upper hazel
#

i hope you know

mellow pebble
#

it is

upper hazel
#

yes

desert tinsel
upper hazel
#

how i can serilize class if he not have interface serizble

glad prawn
#

impl it 😮

upper hazel
#

Class horse

#

this not my class

#

how i can serilizate horse entity

ocean hollow
#

You can save just uuid, and then find a horse using it

silver viper
#

just serialize the properties of the horse

upper hazel
#

and all the data about it is recognized? And not the fact that the horse will not be removed

upper hazel
silver viper
#

create a class and store the information in it

upper hazel
#

i need serization for save in nbt

silver viper
#

and create a persistent data type that could store the class

ivory sleet
#

If you have an interface you can always use @DelegateDeserialization

thick venture
#

Does anyone know why LivingEntity#playEffect(EntityEffect.HURT) does not get displayed?

upper hazel
silver viper
vivid hill
#

can you manipulate the jump hight? probably with velocity. but also to like 0.43 if the default jump hight would be 1?

silver viper
#

store whatever data you want to store in the class

upper hazel
#

end all this i can set in horse7

silver viper
#

then create a persistent data type for the class

paper cosmos
#

When I try to build a server jar for 1.20.1 I get an error "could not resolve dependencies for project..." What do I need to do?

silver viper
chrome beacon
#

?paste

undone axleBOT
magic raptor
#

at the end i managed to solve my issue, serverkickevent provides "state" that helped me

icy beacon
#

people who were translating item names to Russian were SO consistently inconsistent

#

fucking

#

irritating

#

as

#

SHIT

remote swallow
#

just ship the client russian json

#

that probably has all of the items

karmic mural
icy beacon
#

that's the thing

#

it had like 29%

#

the rest was done by joining stuff

#

for example i could not find orange wool for the life of me

#

and honestly i just want to foolproof everything

#

i know that dumbass will fail to do something if i don't do it for him

#

just 371 more 🙂

#

it was ~800 so

paper cosmos
chrome beacon
#

paste it's contents in to the paste and send the link

#

?paste

undone axleBOT
eternal oxide
icy beacon
#

copilot does wonders

prime epoch
icy beacon
prime epoch
#

The use of AI in most things is just straight up unethical. In programming its unpredictable and makes worse programmers. AI also leaves alot of security problems

rough drift
#

AI is ethical my guy

#

It's the same as saying a CPU is unethical

icy beacon
rough drift
#

an AI just chooses based on math, it's not unethical

icy beacon
#

you know, translating colors by hand 10+ times would make my speech to you less ethical, if anything

#

copilot recognized the pattern and did it for me

#

just one of the parts

rough drift
#

Would you say that a categorization model is unethical? I'll give you a really simple example: LVQ

It just has groups and moves them, the closest group to the point you add is categorized as that, is that unethical?

paper cosmos
prime epoch
#

i first said ai is unethical in most things which doesnt make it all. Code samples generated from AI have shown to have alot of security problems. Using AI for the core code is unpredictable and can lead to unmaintanability. Saying the CPU is unethical is just out of context. Lets say an AI caused abunch of fully qualified people to lose their jobs, so thats not unethical in some way? you can also make the argument that AI is ethical in advancing medicine. Im not gonna debate ethics since thats so long and it'll go back and fourth all day about scenarioes where its ethical and unethical. To call it completely ethical though is completely wrong. Me saying it was disgusting wasn't a dig at you @icy beacon and was just a sarcastic comment lol

eternal oxide
#

For an AI to be unethical it would have to be aware of what it is doing.

prime epoch
#

im talking about the use of AI not the AI itself

rough drift
eternal oxide
#

thats better 😉

rough drift
#

AI itself is a tool

icy beacon
#

do you know that computer used to be a profession? by your logic, computers are unethical

eternal oxide
#

two different things

icy beacon
#

if using AI is unethical, then send me straight to hell right now, but with access copilot and chatgpt

opaque scarab
#

AI can’t be ethical or unethical unless it somehow has the freewill of a person. If not, the use case determines if it is unethical

rough drift
#

Exactly

icy beacon
# eternal oxide two different things

"Lets say an AI caused abunch of fully qualified people to lose their jobs, so thats not unethical in some way?"
replace the word AI with the word computers

eternal oxide
#

Big business is pushing AI to replace humans in the workplace and increase profits. Thats unethical

prime epoch
icy beacon
#

ai is not that good to completely replace people yet

carmine mica
#

its unethical to replace humans in the workplace? why?

eternal oxide
#

AI doesn;t

opaque scarab
desert tinsel
#

How to create a custom treasure map?

icy beacon
#

yet

rough drift
#

it just rehashes it's inputs

prime epoch
prime epoch
icy beacon
#

if so then it's sentient

eternal oxide
icy beacon
#

if ai is sentient why didn't copilot yet tell me to fuck off with my unreasonable prompts

prime epoch
icy beacon
#

"ai has the ability to create its own decisions" yet chatgpt can't decide to start doing stuff that it's restricted from doing (unless you deeply gaslight it, or even that doesn't help)

eternal oxide
icy beacon
#

ayple

prime epoch
paper cosmos
prime epoch
icy beacon
#

did you start the argument to compensate the time i saved using copilot

eternal oxide
shadow night
icy beacon
#

that's a heavy underestimation

shadow night
#

It is

icy beacon
#

you can train a parrot to say words when it recognizes a pattern, yet it doesn't understand what the fuck it is saying

#

not the best example but kinda comparable to chatgpt

#

anyway i'll go continue being unethical as hell

shadow night
#

Copilot is really good, when it knows what it has to do. Sometimes it gives code I wanted to write, but a little better and that all in a second. Without it I would be writing code for way longer

prime epoch
eternal oxide
#

I'll never use AI just like I'll never use a self checkout

desert tinsel
opaque scarab
#

Unrelated, but does anyone know of a way to stop tree generation when chunks are generated?

#

I can add a populator with custom generation, but how would I override the existing tree populator?

#

Keep in mind I have very little experience with custom generation LOL

shadow night
#

Well, this is why we need mixins

quaint mantle
#

lovely

shadow night
#

Had the same happen to me

#

Is it frozen too?

#

Stupid question

remote swallow
#

its the mc dev plugin

prime epoch
#

Is there an event in bukkit for when the player puts on armor?

quaint mantle
quaint mantle
shadow night
remote swallow
remote swallow
shadow night
quaint mantle
remote swallow
#

i had to disable the java bytecode decompiler plugin to make my ij not die if i touch the class

quaint mantle
icy beacon
shadow night
quaint mantle
#

thats exactly what happens alot

#

Material and u die

quaint mantle
shadow night
remote swallow
#

no clue

#

i was bored one day so manually downloaded souces and javadocs so i can disable the bytecode decompiler and not die opening the material class

shadow night
quaint mantle
#

i love custom drops

public void onDeath(EntityDeathEvent event) {
        event.getDrops().clear();
        event.setDroppedExp(0);

        Random random = new Random();

        for (RNGDrop drop : getDrops()) {
            int randomNumber = 0;
            if(drop.getRate() > 0) {
                randomNumber = random.nextInt();
            }

            if(randomNumber == 1 || randomNumber == 0) {
                event.getDrops().add(drop.getStack());
            }
        }
    }
shadow night
remote swallow
#

real

shadow night
#

And what if we also put indexing onto a different thread

remote swallow
quaint mantle
#

i swear i did that

remote swallow
#

nextInt(bound)

quaint mantle
#

im not even lying

remote swallow
#

smh

quaint mantle
#

i swear i did

shadow night
#

My IJ deleted some code before crashing with the 3 gigs of mem thingy

#

Reverted it, actually

quaint mantle
#
public void onDeath(EntityDeathEvent event) {
        event.getDrops().clear();
        event.setDroppedExp(0);

        Random random = new Random();

        for (RNGDrop drop : getDrops()) {
            int randomNumber = 0;
            if(drop.getRate() > 0) {
                randomNumber = random.nextInt(drop.getRate());
            }

            if(randomNumber == 1 || randomNumber == 0) {
                event.getDrops().add(drop.getStack());
            }
        }
    }
remote swallow
#

there we go

quaint mantle
#

is this even a good way to add custom drops

#

prob

#

idk

paper cosmos
remote swallow
#

it doesnt have a browser

#

you have to manually type the full address

fluid river
#

jree fava

paper cosmos
#

How can I download authlib-4.0.43.jar manually?

icy beacon
#

anybody having problems with anvilgui 1.7.0-SNAPSHOT?

Caused by: java.lang.IllegalStateException: AnvilGUI does not support server version "1_19_R1"
        at com.roughlyunderscore.anvilgui.version.VersionMatcher.match(VersionMatcher.java:32) ~[?:?]
        at com.roughlyunderscore.anvilgui.AnvilGUI.<clinit>(AnvilGUI.java:43) ~[?:?]
        at com.roughlyunderscore.anvilgui.AnvilGUI$Builder.<init>(AnvilGUI.java:336) ~[?:?]
        at com.roughlyunderscore.ui.sell.SpecifyAmountToSellUI.createAndOpen$lambda$7(SpecifyAmountToSellUI.kt:141) ~[?:?]
        at com.roughlyunderscore.gui.guis.GuiListener.onGuiClick(GuiListener.java:102) ~[?:?]
        at jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104) ~[?:?]
        at java.lang.reflect.Method.invoke(Method.java:577) ~[?:?]
        at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:306) ~[spigot-api-1.19-R0.1-SNAPSHOT.jar:?]
        ... 20 more
Caused by: java.lang.ClassNotFoundException: com.roughlyunderscore.anvilgui.version.Wrapper1_19_R1

maven:

<dependency>
  <groupId>net.wesjd</groupId>
  <artifactId>anvilgui</artifactId>
  <version>1.7.0-SNAPSHOT</version>
</dependency>

<repository>
  <id>codemc-snapshots</id>
  <url>https://repo.codemc.io/repository/maven-snapshots/</url>
</repository>

<relocation>
  <pattern>dev.triumphteam.gui</pattern>
  <shadedPattern>${shadedPackage}.gui</shadedPattern>
</relocation>
#

i even tried to Class#forName this class in onEnable but no

#

for reference, the class does exist

#

in my maven anvilgui jar it's also there

#

but for some reason not in the plugin jar file

#

there's nothing lol

remote swallow
#

are you minimizing

icy beacon
#

uhh i don't think so

#

actually fuck

#

Minimized 2265 -> 1803 (79%)

remote swallow
#

modify

icy beacon
#

i never ever in my life minimized intentionally lol

#

it was just turned on

icy beacon
paper cosmos
paper cosmos
#

I mean I did it. Thanks anyway

ocean hollow
#

how do placeholders work? do they need to be updated regularly? or how?

echo basalt
#

That's not how it works

shadow night
#

no no

icy beacon
#

i mocked him basically

upper hazel
#

лол

shadow night
#

I'm english

icy beacon
#

and told him that he was using the wrong channel

upper hazel
#

why

icy beacon
#

well it's simple

upper hazel
#

i not can here speak in my

#

oh

#

not confortable

#

i dont want use translate*(

icy beacon
upper hazel
#

ehhh

icy beacon
upper hazel
#

ok

#

so why my idea bad

icy beacon
#

because who were you even talking to????

#

i mocked you because you were talking to the void

upper hazel
#

ah i say obaut save horse in json

icy beacon
#

dude

#

i know

#

i speak the language

#

for fucks sake

upper hazel
#

ok

#

you say this bad idea but wy

#

why

remote swallow
#

why do you need to save an entity

upper hazel
#

oh why

#

i say

eternal oxide
#

you don't save the horse, you save the details of the horse

upper hazel
#

yes

icy beacon
#

save the entire world lol

#

block per block

shadow night
icy beacon
#

entity per entity

upper hazel
#

no mean i dont know how i can save horse in string format bc he not serizble

icy beacon
#

you do NOT NEED TO DO THAT

remote swallow
#

there isnt a reason to save an entity

upper hazel
#

i need

remote swallow
#

why

shadow night
#

or an it or they

upper hazel
#

bc i wont save in nbt

#

save horse in nbt

remote swallow
#

@icy beacon can you ask why they need to save this horse and translate it

icy beacon
#

нахуя тебе лошадь сохранять

upper hazel
#

for nbt

icy beacon
#

сохранять нужно ее важные данные

upper hazel
#

NBT

icy beacon
#

а не саму лошадь

#

чел я с тобой по русски говорю потому что ты на английском не ебашишь

#

"нбт" ну и что тебе это нбт дало

upper hazel
#

тебя не забанят?

icy beacon
#

меня попросили тебя спросить

#

крч тебе все нбт все равно не нужно лол

#

это во первых

#

во вторых на версиях 1.14+ есть persistentdatacontainer в котором можно зранить данные

#

а не нбт

glad prawn
#

Whats that

icy beacon
#

короче идея сохранять лошадь в файл хуйня так и так

flint coyote
#

I can read that

glad prawn
#

Same

icy beacon
#

если ты хочешь ее сохранить в файл, проще прочитать файл существа который уже есть в папке мира

remote swallow
#

we can speak russian now

icy beacon
#

а не выебываться

upper hazel
#

мне нужно для плагина поскольку я хочу создать копию лошади если это нужно

upper hazel
icy beacon
#

потом по uuid найдешь ее и скопируешь то что надо

#

я хз есть ли метод для полной копии но это явно будет проще

remote swallow
upper hazel
#

она исчезнуть может я ее по миру ищу

icy beacon
#

пассивные мобы не деспавнятся

upper hazel
#

но если чанк не загружать то и получить не возможно

#

а я откуда буду знать где она

icy beacon
#

если лошадь существует значит чанк вокруг нее существует

shadow night
icy beacon
#

блять тебе не надо знать где она

upper hazel
#

ну вот видишь

icy beacon
#

ты ее найдешь по uuid

upper hazel
#

как я ее найли если она к примеру не прогружена будет

icy beacon
#

берешь метод

#

ищешь в списке существо с тем uuid

#

и все

upper hazel
#

это задевает тех кто прогружен

icy beacon
#

список всех entity проживающих в мире

#

это во первых

upper hazel
#

ох а мне сказали что только тех кто прогружен игроком

icy beacon
#

ну лошади на 200000;200000 например не существует потому что ты там не был

#

но тебе и не надо

#

ты не можешь всех мобов в мире найти просто потому что их столько нет

#

есть только те кто существуют в прогруженных чанках

#

а если лошадь попытается забрести в непрогруженный то она либо не сможет либо прогрузит его

remote swallow
#

i think at this point its better to just say what to do and leave them to it

icy beacon
#

это не синглплеер

#

yeah im attempting to

upper hazel
#

лошадь прогружает чанки???

icy beacon
#

блять я не ебу проверь

#

это была теория

#

"либо либо"

#

good luck my friend as this is hopeless and a massive xyproblem

undone axleBOT
icy beacon
#

even though you explained your idea, you are trying to do something else and i have no clue

shadow night
upper hazel
#

но чанк выгружается если там долго не быть

icy beacon
#

so i just wish you the best of luck

#

i believe in you

#

(though not much)

upper hazel
#

💀

shadow night
#

Lmao

#

(I wouldn't believe in somebody like that either)

ocean hollow
# upper hazel 💀

if you don't have enough horses, then you can just create a loop that checks the stored uuid until it finds a horse

#

if the mob dies, then stop the cycle

sterile breach
#

Hi, i need it to get some info about the user when he logs in, the problem is that i need info from each user every time a chat is sent so dealing with direct requests is really not optimizes but otherwise I could have just made a hashmao where I store the player and the data but doing with caffeine is always better I imagine?

eternal oxide
#

You get teh data you need when the player logs in. You keep it in memory so it's easy to access until they log out

upper hazel
#

wow this rally work

#

lol

#

i was think this not load if chunk unload

ocean hollow
#

what's the difference between TimeStamp and DateTime? (MySQL)

eternal oxide
#

one is auto the other you provide

ocean hollow
#

TimeStamp itself sets the time which is now?

#

what is the best way to arrange a cooldown

#

for 24h+

eternal oxide
#

Instant/DateTime

wet breach
# ocean hollow what's the difference between TimeStamp and DateTime? (MySQL)

TimeStamp is the time of whenever the function was invoked, in most cases TimeStamp is used on an auto basis but there is occasions where it needs to be invoked manually, however the timestamp only refers to the time it was invoked. DateTime is a date or time that you specify and needs to be in a particular format that mysql supports which there is a variety

wet breach
#

so you would just check the timestamp from the DB and compare it to the time of now and see how long it has been

tranquil ridge
#
Patching Block.java
Exception in thread "main" java.lang.RuntimeException: Error patching Block.java
        at org.spigotmc.builder.Builder.lambda$main$2(Builder.java:676)
        at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(Unknown Source)
        at java.util.stream.ReferencePipeline$2$1.accept(Unknown Source)
        at java.util.stream.ReferencePipeline$3$1.accept(Unknown Source)
        at java.util.Iterator.forEachRemaining(Unknown Source)
        at java.util.Spliterators$IteratorSpliterator.forEachRemaining(Unknown S
ource)
        at java.util.stream.AbstractPipeline.copyInto(Unknown Source)
        at java.util.stream.AbstractPipeline.wrapAndCopyInto(Unknown Source)
        at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(Unknown Sour
ce)
        at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(Unknow
n Source)
        at java.util.stream.AbstractPipeline.evaluate(Unknown Source)
        at java.util.stream.ReferencePipeline.forEach(Unknown Source)
        at org.spigotmc.builder.Builder.main(Builder.java:627)
        at org.spigotmc.builder.Bootstrap.main(Bootstrap.java:27)
Caused by: difflib.PatchFailedException: Incorrect Chunk: the chunk content does
n't match the target
        at difflib.Chunk.verify(Chunk.java:86)
        at difflib.ChangeDelta.verify(ChangeDelta.java:78)
        at difflib.ChangeDelta.applyTo(ChangeDelta.java:44)
        at difflib.Patch.applyTo(Patch.java:43)
        at difflib.DiffUtils.patch(DiffUtils.java:70)
        at org.spigotmc.builder.Builder.lambda$main$2(Builder.java:664)
```Anyone can help me ? I want to setup 1.8.8 buildtools
wet breach
#

86400 seconds are in a day, add 3 more zeroes 86,400,000 is how many milliseconds in a day

eternal oxide
#

or Instant.now().plus(24, TimeUnit.HOURS)

#

would be 24 hours time

river oracle
#

Damn kids these days use Instant instead of math fucking lazy kids back in my day we added nd shit

eternal oxide
#

Got bored taking my socks off every time I went over ten

shadow night
#

What the fuck is all that

pseudo hazel
#

wtf is Xmaterial

#

maybe they have a discord

#

or documentation

upper hazel
#

now i can teleport my horse but if i not in world were horse plugin not can searh him

eternal oxide
sudden tusk
#

Hi, Can Anyone Help Me? I Cant make spigot 1.20 or latest version of minecraft plugin because my minecraft above 1.16.5 gets an GLFW error my PC Specs:
Device name: DESKTOP-NINDB45
Processor: Intel(R) Core(TM) i3-2330M CPU @ 2.20GHz 2.20 GHz
Installed RAM: 4.00 GB (3.84 GB usable)
Device ID: 6F24D6B6-E105-448D-AD28-D516BB6318A9
Product ID: 00326-30000-00001-AA893
System type: 64-bit operating system, x64-based processor
Pen and touch: No pen or touch input is available for this display

I KNOW ITS NOT RELATED TO SPIGOT BUT OVERALL MINECRAFT.

upper hazel
sinful kiln
#

I'm currently doing some changes to a Minecraft class called DefinedStructure which basically represents the structure block schematics of minecraft for my Spigot contribution.
My change converts the BlockPosition, IBlockData and NBTTagCompound (entity tag) of each block to a CraftBlockState for plugin use later on.
However I noticed that some blocks have an entity tag that doesn't have a id field which is required by minecraft to create a TileEntity.
Therefore I'm getting Skipped BlockEntity with id (normally it would print the id however there is no id so no id in the message) in the console.
There are multiple options to fix this issue however I don't know which one would be best suitable:

  1. Create the CraftBlockState without the NBT data and load the NBT data afterwards
  2. Add the id field to the NBT data based on the IBlockData

I would like some opinions on this if possible.
In my opinion the first solution sounds best however I'm unsure if it won't cause any problems

errant shale
#

would some1 maybe vc with me so i can screenshare, bc i would be alot easier for me to understand?

#

i have a problem in plugin

sudden tusk
#

any tutorials for spigot 1,16,5

remote swallow
#

run buildtools with java 8

kind prawn
#

can a ItemStack hold more items then the items stack size?

eternal oxide
#

stacksize is restricted by material

ocean hollow
lost schooner
#
    public static Map<Enchantment, Integer> getAllEnchantments(ItemStack item) {
        if (item == null) {
            return null;
        }

        EnchantmentStorageMeta enchantmentMeta = (EnchantmentStorageMeta) item.getItemMeta();
        Map<Enchantment, Integer> enchantments = new HashMap<>();
        assert enchantmentMeta != null;
        // Combine the standard enchantments of the item with its stored enchantments
        enchantments.putAll(enchantmentMeta.getEnchants());
        enchantments.putAll(enchantmentMeta.getStoredEnchants());

        return enchantments;
    }
#

So I'm trying to get the item's enchantment meta but the assert is failing

#

What I'm confused about is - why is EnchantmentStorageMeta a type of ItemMeta? Wouldn't an item have multiple types of metadata?

#

And, how do I make sure to modify the EnchantmentStorageMeta of an item? Because if I use instanceof there is a chance that the meta is an instance of another type

#

In what cases would it even be an instance of another type?

remote swallow
#

EnchantmentStorageMeta is for enchanted books

lost schooner
#

So only enchanted books have it?

wet breach
remote swallow
#

everything else just uses normal meta for enchants

wet breach
#

you want to divide millis by 1000 first, and then multiply by 60 after

lost schooner
#

So would it be better style to say if item.getType() == Material.ENCHANTED_BOOK and then just downcast the meta?

#

Or to use if meta instanceof EnchantmentStorageMeta

wet breach
#

so (((TimeStampMillis / 1000)*60)*60)

ocean hollow
#

I did this: I immediately save the time when the cooldown ends, and then check it

remote swallow
wet breach
ocean hollow
#

the code with the problem in mathematics was made by ChatGPT)

wet breach
#

Lol

#

what you had is similar to what I have, but when you actually work out the math, yours comes out wrong then what mine would. 😛

sinful kiln
wet breach
#

because order of operations

eternal oxide
#

I'd not bother with all teh math

wet breach
eternal oxide
#

thats why we have Instant/Duration/etc

wet breach
#

there is a big difference in how I have it, and how the math is worked out, vs the way they had it

lost schooner
#

This might be a stupid question but am I right in saying that the anvil does only 5 things:

  • Repair breakable items using other items of the same type
  • Repair breakable items using the material they were crafted with
  • Apply and upgrade enchantments using books
  • Apply and upgrade enchantments using items of the same type
  • Rename items
#

I need to reimplement the anvil due to needing slightly different functionality 😑

quaint mantle
#

rename items?

lost schooner
#

Ah good point

orchid gazelle
#

hi is it a good idea to keep a lot of BukkitRunnables that are not started in an ArrayList?

river oracle
#

Why are you storing non started runnable

orchid gazelle
#

I wanna basicly just call code when something based on Objects happen

orchid gazelle
river oracle
orchid gazelle
#

there will be an async loop checking for conditions based on registered Hooks(which are in the ArrayList)

#

and then it somehow has to call the code that is specified in the Object

#

but idk how it would be done better than with BukkitRunnables

old cloud
#

Could you say exactly what you are trying to accomplish?

orchid gazelle
#

so PlayerInteractEvent but with holddowns

#

and different pieces of codes gotta get called based on different timings, like one has to call 500ms after the first click and the next 2000ms

old cloud
#

Why don’t you create the runnable just when you need it

#

Otherwise you create and store it and might never use it

orchid gazelle
quaint mantle
#

where can one find the spigot source

echo basalt
#

Pretty sure I had code for hold-interacts

old cloud
river oracle
undone axleBOT
visual granite
#

Hi everyone !
Is it possible to disable native 1.20 feature of rightclick-editing signs ? Its suuuuuuuuuper annoying

orchid gazelle
echo basalt
#

I don't remember ever sending it

river oracle
visual granite
#

Without coding ^^'
I dont know how to do this ^^'

echo basalt
orchid gazelle
visual granite
#

Okay ^^

old cloud
river oracle
#

Hold down interacts

orchid gazelle
#

@echo basalt ohh sorry it was the code of someone else yesterday

old cloud
quaint mantle
#

is the player count on a server found anywhere in bukkit or is it just the mc jar

orchid gazelle
orchid gazelle
quaint mantle
hazy parrot
#

Bukkit.getOnlinePlayers() returns list

quaint mantle
#

no

#

nvm

hazy parrot
orchid trout
#

where do the sources go when i run build tools or click download sources?

quiet ice
#

Is anyone aware of some library that basically does regex on steriods? i.e. I'm looking for something that can evaluate something like follows:

{
  "priority": 100, 
  "validFor": {
    "locales": ["DEU", "FRA"],
    "patternMatches": "[\d\.]+(,\d+)?[KMGTY]?"
  },
  "value": {
    "pattern": "([\d\.]+)(?:,(\d+))?([KMGTY]?)",
    "transform": [
      {
        "validFor": {
          "ifNotPresent": ["{2}"]
        },
        "data": "0",
        "store": { "variable": "{2}", "as": "STRING", "via": "STORE" }
      }, {
        "concat": [ "{1}", ".", "{2}" ],
        "store": { "variable": "ret", "as": "DECIMAL", "via": "ADD" }
      }
    ],
    "return": "ret"
  }
}

I know, cursed beyond belief but without some cursed combination of sscanf (which would require the FFI anyways) and regex it is hard to do otherwise

river oracle
unborn dew
#

I assume the right way for me to add a local .jar file I want to use without doing any distribution is something like:

mvn install:install-file -Dfile=<path\to\file>\PluginIWannaUse.jar -DgroupId=com.group -DartifactId=artifact -Dversion=ver -Dpackaging=jar

then doing the import as Provided right in my Pom.xml?

quiet ice
#

Yeah, though personally I am more of a fan of using file://-repos

unborn dew
#

Alrighty - Just wanna make sure 😄

robust portal
#

Coming back to this

#

I had to modify it a bit but it still doesnt work

vivid cave
#

also you should save hand1 like

#
ConfigurationSection hand1 = config.getConfigurationSection(args[1]+".items.hand1");
#

i don't understand why you modified my code, it looked way better

#

and pls tell me whats not working

robust portal
#

The enchantemtns arent adding, that is all

vivid cave
#

ah

#

hold on

vivid cave
#

do a .toLowerCase()

#

entry.getKey().toLowerCase();

#

it will fix it

#

i tested

#

namespacedkey can't find with uppercase

#

i just tested

unborn dew
# unborn dew I assume the right way for me to add a local .jar file I want to use without doi...

Well that worked locally, but now I need to fix my ,github\workflow\maven-publish.yml file for that Local .jar file....

Fails cause Maven cant find it anywhere XD
Exact Error: https://github.com/Wolfieheart/ArmorStandEditor/actions/runs/5447666453/jobs/9909961763

GitHub

Spigot/Paper etc. plugin to allow players to edit armorstands without commands. - [CORE] ArmorStandEditor-Reborn 1.20.x-44 · Wolfieheart/ArmorStandEditor@dca536a

#

Local building works a charm - Just remote not so much

opaque scarab
#

Any good way to stop the tree populator in certain biomes?

robust portal
#

@vivid cave here right

#

@vivid cave, nothing still

shadow night
#

I wrote L and wanted to write o and it crashed yaay

robust portal
#

@vivid cave

unborn dew
remote swallow
#

you dont override the onCommand

unborn dew
#

Yeah your OnCommand needs an @Override at the start

remote swallow
#

also GG will never be 6

#

the bound is hieghst number, the highest it will be is 5 iirc

#

sure

scenic mural
#

New to this so it may be a dumb question, but how can i change the file destination when building my plugin? Would be nice to have it saved directly in the plugins folder of my server

scenic mural
#

would this be relevant if im using gradle?

#

or am i dumb lol

#

that method seems easy enough though. appreciate the link!

quiet ice
#

though make sure you have the rights to distribute the jar file first, otherwise it gets messy

robust portal
#

Yo people I need help

lost schooner
#

How do I get the name in the anvil rename box from a PrepareAnvilEvent

robust portal
#

Everythings working except adding the enchantments

remote swallow
#

NamespacedKey.minecraft

robust portal
#

Doesnt work either

remote swallow
#

lower case the getKey

robust portal
#

Nada

remote swallow
#

did you test it in under 30 seconds?

robust portal
#

I did lol

remote swallow
#

damn ur quick

#

add sysouts

brazen violet
#

how can i cast ProxiedPlayer to player or should i ask this in an other dc bc this is only for spigot?

remote swallow
#

proxied player is for bungee, the bukkit player class doesnt exist on it

sterile breach
#

hi, how to make "secure" gui (I heard that you don't just have to get the name)

robust portal
#

Log shit

#

Neither popped up

#

@remote swallow

remote swallow
brazen violet
#

yeah i mean how can i just use p.getUniqueID etc in bungee

remote swallow
#

call the method?

remote swallow
brazen violet
remote swallow
#

getUniqueId

brazen violet
#

i dont think you understand

remote swallow
#

its on the method

brazen violet
#

still not what i need

remote swallow
#

loop over online players

#

you asked how to call p.getUniqueId(), i gave you how to call p.getUniqueId

brazen violet
#

for bungee

remote swallow
#

yeah, its on ProxiedPlayer

#

sure

#

just get the item and just add it to their inv

brazen violet
#

how can i do ProxiedPlayer p = p.getUniqeID dosnt make sens to me????

remote swallow
#

you want to know how to get the proxied player then

brazen violet
#

YES

remote swallow
#

where do you need it

lost schooner
#

Do I get the item name from the rename box from the PrepareAnvilEvent or something?

brazen violet
lost schooner
#

I'm not sure where it can be accessed

remote swallow
#

do you need it when they join? when they leave?

brazen violet
#

in an command there i need it

remote swallow
remote swallow
lost schooner
brazen violet
#

thats not what im asking still

remote swallow
remote swallow
wet breach
#

if you need to obtain the proxiedplayer

remote swallow
#

you ask one thing them say something else

wet breach
#

alternatively you can use commandsender too

remote swallow
#

you said you need it in a comamnd so instanceof check the sender, most events probably have a getter otherwise

wet breach
#

it just depends at what point you are trying to obtain the proxiedplayer object

remote swallow
#

no, change the ((Player)sender) to po

wet breach
#

anyways, you have the link to the API docs for bungee

#

just look at it I suppose lol

brazen violet
remote swallow
#

ProxiedPlayer

#

i told you this earlier

#

sure

brazen violet
#

Yeah

ProxiedPlayer p = AND THEN WHAT THATS WHAT IM ASKING

remote swallow
undone axleBOT
lost schooner
#

Interesting, it seems that anvil rename is completely built-in functionality

remote swallow
#

the same item

wet breach
#

seems they lack the understanding of java

remote swallow
#

change the for loop

brazen violet
lost schooner
#

I'm confused as to how you can find whether an item is being renamed if you don't put an item as the result first

brazen violet
#

good thanks

remote swallow
#

but you should do an instanceof check before blindly casting

wet breach
#

also, they could have just looked at the api link

remote swallow
undone axleBOT
wet breach
#

it clearly shows Proxied player deriving from CommandSender lol

lost schooner
#

Is it even possible to do a "rename check" before determining the result item, or using some sort of cursed placeholder item?

remote swallow
lost schooner
#

Lol

#

I used to like it and then I tried Rust

#

And C# and others

wet breach
#

Java isn't all that bad

remote swallow
#

the for (player po : ...) is called a for loop

wet breach
#

anyone who decides to learn modern java is lucky in that Java is quite good and don't have to endure the times of 1.6 or before java

lost schooner
# wet breach Java isn't all that bad

Its syntax is very annoying and makes it a bit hard to read in a lot of places, though I'd say that's more the fault of C because it's highly derivative of C

remote swallow
#

you just have to change it to get a random item

lost schooner
#

I really like Rust's syntax of fn(args) -> ReturnType

wet breach
#

syntax has nothing to do with whether Java is good or not. Every language has its own syntax and whether you like it or not has nothing to do with it being optimal

#

you are free in how you want to place everything as well

#

as long as the rules are followed

#

you want spaces after parameters you can do that

lost schooner
remote swallow
#

make a list, populate said list and get a random entry of it from a getter

lost schooner
#

Not to say Java is a bad language

#

We can continue in #general if you want @wet breach

ocean hollow
quiet ice
#

I wouldn't ever be able to use any language that doesn't use maven.

wet breach
#

you can't argue opinions

quiet ice
#

Maven is just too good. A gift from god

robust portal
#

Everything is speleld right

#

Conifig

vocal cloud
#

My favorite thing about java is how I don't have to compile per OS

languid canopy
#

Hey just a high level question for anyone who knows. I'm trying to run an event listener for each instance of aa custom class to see if a player enters its location.
Question 1 -> is this possible
Question 2 -> would it be more efficient to store all class locations in a hashmap and just perform a search on each playermoveevent? that seems like a lot

remote swallow
#
public class ExampleClass {

    private final List<ItemStack> stacks = new ArrayList<>();
    

    public ExampleClass() {
        // add stuff to the stacks list
    }


    private ItemStack getRandomStack() {
      return stacks.get(ThreadLocalRandom.current().nextInt(stacks.size));
    }
remote swallow
robust portal
#

Fuck me I forgot to update it

chrome beacon
languid canopy
#

jeez, should I just plug into the worldguard API?

chrome beacon
#

You can do that if you want

brazen violet
#

and how can i get the target for ProxiedPlayer target = ??

remote swallow
#

what is the target

#

or do i pull my crystal ball out

brazen violet
#

another player like if i do ( its spigot just to provide it ) fly [Player]

remote swallow
#

same

remote swallow
brazen violet
remote swallow
#

you get the name from the command?

rare rover
#

how would i do this without making it all wonky

private static final Map<UUID, Map<Material, List<PlayerGenerator>>> playerGenerators = new HashMap<>();```
i was thinking something like this but i would have to .stream() it everytime since i gotta sort the materials
```java
private static final Map<UUID, List<PlayerGenerator>> playerGenerators = new HashMap<>();```
#

i hate the first one

#

i dislike doing that

#

but any alternatives

remote swallow
#

no

#

that hurts

#

the constructor is seperate

#

?learnjava first

undone axleBOT
dire bluff
#

ive created a recipe plugin with PrepereItemCraftEvent but the problem is that when i do the ercipe this happens

remote swallow
#

you should add recipes with the built in recipe api

dire bluff
#

wdym

dire bluff
#

bro i know about them

#

i did it with the PrepareItemCraftEvent bcs i need to put itemsstacks

remote swallow
#

put them where

#

?paste thecode

undone axleBOT
dire bluff
#

wait

remote swallow
#

you have all the code twice

#

there is no reason for that

dire bluff
#

hmmm where

remote swallow
dire bluff
#

before that the same thing was happening

#

anyways true

remote swallow
#

still dont get why you cant just use the recipe api

dire bluff
#

bcs i want stacks

#

of each item cost

#

64amethyst= 1 amethystx64

chrome beacon
#

Use a combination of the two

remote swallow
#

my brain hurts too much

chrome beacon
#

Register a recipe and then check stack sizes in the event

dire bluff
chrome beacon
#

It is

#

Why wouldn't it be

dire bluff
#

hmm with hashmap ?and how i will get the ammound of the material

chrome beacon
#

For loop

dire bluff
#

i dont mean for each mnaterial

#

i mean how can i check teh ammound

#

amount

chrome beacon
#

??

river oracle
#

Just register a normal recipe

dire bluff
#

i dont need just one

#

with this API i do it just 1

river oracle
dire bluff
#

.......

river oracle
#

So you'll need to amke your own custom recipe system from scratch

dire bluff
#

k

#

i will figure it outby my own

river oracle
#

Have funnnn!!!!!! DonutKon

tranquil ridge
#

Can anyone help me about buildtools

#

I did with git bash java -jar BuildTools.jar --rev 1.8.8 but i have some problem

#
Patching Block.java
Exception in thread "main" java.lang.RuntimeException: Error patching Block.java
        at org.spigotmc.builder.Builder.lambda$main$2(Builder.java:676)
        at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(Unknown Source)
        at java.util.stream.ReferencePipeline$2$1.accept(Unknown Source)
        at java.util.stream.ReferencePipeline$3$1.accept(Unknown Source)
        at java.util.Iterator.forEachRemaining(Unknown Source)
        at java.util.Spliterators$IteratorSpliterator.forEachRemaining(Unknown S
ource)
        at java.util.stream.AbstractPipeline.copyInto(Unknown Source)
        at java.util.stream.AbstractPipeline.wrapAndCopyInto(Unknown Source)
        at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(Unknown Sour
ce)
        at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(Unknow
n Source)
        at java.util.stream.AbstractPipeline.evaluate(Unknown Source)
        at java.util.stream.ReferencePipeline.forEach(Unknown Source)
        at org.spigotmc.builder.Builder.main(Builder.java:627)
        at org.spigotmc.builder.Bootstrap.main(Bootstrap.java:27)
Caused by: difflib.PatchFailedException: Incorrect Chunk: the chunk content does
n't match the target
        at difflib.Chunk.verify(Chunk.java:86)
        at difflib.ChangeDelta.verify(ChangeDelta.java:78)
        at difflib.ChangeDelta.applyTo(ChangeDelta.java:44)
        at difflib.Patch.applyTo(Patch.java:43)
        at difflib.DiffUtils.patch(DiffUtils.java:70)
        at org.spigotmc.builder.Builder.lambda$main$2(Builder.java:664)
pseudo hazel
#

way easier than creating your own recipe system

quaint mantle
robust portal
#

yo yo yo back with another question

#

Trying to set a spawner location but i need to be able to set multiple? how would I go about automatically adding to the next number so if #1 was set it would make #2

#

Nvm I believe I got it

flint coyote
#

why do you need a number?

#

could just go with

spawnerLocations:
  - x:
    y:
    z:
 -  x:
    y:
    z:
robust portal
#

Wow didnt even think of that

wet breach
#

the advantage to using a number however is if you wanted to specifically refer to a single spawner