#help-development

1 messages · Page 1108 of 1

smoky anchor
#

No, however ppl in the Minecraft Commands discord server can surely help

peak depot
#

With custom resource packs can you have like multiple UIs under one name so I e.g can use the furnace inv as a normal furnace but also as a custom mashine when I give it a special tag or smth

pliant topaz
#

Not really

#

Such invs are made by having custom fonts and items with custom textures for overlays (which have a custom model data specified)

#

So in the Furnace you have the option to put such an item in one of the slots, which would sacrifice this slot to the purpose of showing the custom ui

blazing ocean
#

you literally just use a bitmap for the background

#

thats it

pliant topaz
#

well yes

#

but he wants the other as a normal furnace

blazing ocean
#

you just use a title

#

i don't get thr issue

pliant topaz
#

bruh

#

forget that u can change the title

#

i literally said 'by having custom fonts' 🤦🏻‍♂️

#

yep, my brain aint be braining again

upper hazel
#

what is better to store the link together with the text or separately in the database?

raw epoch
#

Omg i was sooo sleepy sorry -> when i am driving the boat with a shift trigger (event cancelled)

acoustic pendant
#

Using nms to set blocks is it posible to do it async? Or it has to be in the main thread as well

chrome beacon
#

The world is not thread safe

#

You can do it async with both api and nms as long as it's on the main thread

#

See work distro

#

?workdistro

rough drift
#

what do you think about Scala

blazing ocean
#

you're a borderline scripting language.

shadow night
blazing ocean
mossy prairie
#

What is the right way to remove tooltip attributes from a GUI item now that ItemFlags no longer work in 1.21?

eternal night
#

they work ™️ you just need to add a dummy attribute modifier first

mossy prairie
#
itemMeta.addAttributeModifier(Attribute.GENERIC_ATTACK_SPEED, new AttributeModifier("test", 0, AttributeModifier.Operation.ADD_SCALAR))
itemMeta.addItemFlags(ItemFlag.values());
itemStack.setItemMeta(itemMeta);```

Something like this?
eternal night
#

yea sure

mossy prairie
#

Enchantment still appears thought

eternal night
#

Hmm

slender elbow
#

highly flexible system

mossy prairie
#

Fixed the issue was how I was adding the enchantment totally my bad 🤦‍♂️

vocal cloud
#

how do i get a .png (any size) from myfiles
to change to a 128x128 and then to a ingame minecraft map that i can use later?

vocal cloud
#

yea but then to a minecraft map

hard socket
#

how can I check if a player hit a crit?

chrome beacon
hard socket
chrome beacon
#

Alternatively use NMS

hard socket
#

thnks

sage patio
#

what should i use for newer versions?

#

spigot-api 1.20.4

hard socket
#
    return player.getFallDistance() > 0.0F && !player.isOnGround() && !player.isSprinting() && !player.isInWater() && player.getVelocity().getY() < 0;
}```
this should do it
hard socket
sage patio
chrome beacon
sage patio
#

ow i saw can instead of can't for a second my bad

hard socket
sage patio
#

so what should i do in newer versions?

chrome beacon
#

You can calculate the block face yourself

hard socket
#

now you say that yeah it was changed

#

it used to be in the Block interface

eternal oxide
#

getBlockFace() has never been a method of Vector

sage patio
#
return location.getWorld().getEntities().stream()
    .filter(entity -> 
        VersionMediator.isItemFrame(entity) &&
        (!VersionMediator.supportEntityFacing() || entity.getFacing() == location.getDirection().getBlockFace()) &&
        boundingBox.contains(entity.getLocation().toVector())
    )
    .map(entity -> {
        final Location entityLocation = entity.getLocation();
        Vector flooredEntityLocation = new Vector(
            entityLocation.getBlockX(), 
            entityLocation.getBlockY(), 
            entityLocation.getBlockZ()
        );
        final Vector relativeLocation = flooredEntityLocation.subtract(location.toVector());

        final int x = (int) relativeLocation.dot(location.getDirection().getXDirection());
        final int y = (int) relativeLocation.dot(location.getDirection().getYDirection());

        final int height = layout.getSize().getHeight();
        final int width = layout.getSize().getWidth();

        if (y < 0 || y >= height || x < 0 || x >= width) {
            return null;
        }

        ItemFrame itemFrame = (ItemFrame) entity;
        return new FrameContainer(itemFrame, x, y);
    })
    .filter(Objects::nonNull)
    .collect(Collectors.toList());

#

this is the java code i'm trying to use

eternal oxide
#

That is not spigot api

raw epoch
#

hello, do someone have a plugin or something to disable players collisions?

sage patio
raw epoch
#

i'l check!

sage patio
raw epoch
pliant topaz
#

vanilla teams can do it to if u need to change it at some point in ur plugin

inner mulch
#

this is a general question, i was wondering, when i have a client-server setup, how does the client access server methods? does they client just have the servers-module as a dependency? or is this handled completely different?

(with sockets)

shadow night
inner mulch
pseudo hazel
#

probably

#

otherwise it would just be kinda stupid

inner mulch
#

this would also mean that the common module has a depency of the server-module, so that the packets can do their thing?

pseudo hazel
#

why

#

the packets are just wrappers for the data that gets sent

inner mulch
#

i thought of packets in more of a abstract method "doThing"

pseudo hazel
#

its like deciding to use json between your front and backend

shadow night
pseudo hazel
#

it would be a server.sendPacket(Packet.DO_THING(whatever))

#

they just agree on a format that the data will be in

#

and then the server and client send and receive these packets of data and from what they agreed on they know what to do

#

and that agreement is the packet module with all the packet definitions probably

jagged quail
inner mulch
pseudo hazel
#

do you mean implement as a server?

inner mulch
#

yeah how does the server implement the logic if it isnt directly in the packet

#

i would need a map or something

pseudo hazel
#

right, well there is like a giant listener on the client server connection that probably decodes the packets and then determines what to do

#

im not sure exactly the details of it

#

but it would have to be some big ass switch statement probably xD

inner mulch
#

not really

#

Map<Class<? extends Packet>, Runnable>>

pseudo hazel
#

or however else you wanna do it

#

right

#

same thing

robust cedar
#

LOOKING FOR CODERS @elfin turtle

#

DM HJIM

pseudo hazel
#

no

#

?services

undone axleBOT
pseudo hazel
#

and stop screaming please

chrome beacon
#

?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

kindred valley
#

?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! 🎉

inner mulch
#

is there a way i can detect whether a class is vanilla java or not?

chrome beacon
#

and why do you need to do that

inner mulch
#

like Object

#

Integer

chrome beacon
inner mulch
#

because im deserializing objects

#

and i dont need that for fields that exist in java

chrome beacon
#

odd design choice

inner mulch
#

?

chrome beacon
#

You can probably use the package name and class loder

#

though I see no reason to do so

slender elbow
#

module

#

but yeah it just sounds like you're doing something wrong

inner mulch
#

how else am i supposed to deserialize?

chrome beacon
#

??

slender elbow
#

well, how are you deserializing?

#

and what does skipping "fields that exist in java" mean and how does that play a role in your deserialization process

inner mulch
#

im saving fields name and value, if its a object thats not from plain java i will get the values and fields from that too

#

im not breaking it down to bytes

slender elbow
#

so, you aren't deserializing Lists?

inner mulch
#

yes, both applications are java so i can just send lists in their normal form

slender elbow
#

and why not other objects

#

this is so absurdly confusing

#

what are you serializing to? what's your target format

inner mulch
#

it doesnt matter, whats the proper way to deserialize?

slender elbow
#

it does matter

#

there is no one universal way of serializing an object without knowing the target format

#

like, how does this format work that you need to serialize custom types and objects but a built-in ArrayList isn't?

inner mulch
#

because both applications are java, but both applications dont have all the same libraries

slender elbow
#

you still need to serialize lists and maps in some form

#

you can't just send that through the wire like you can pass it to a method

inner mulch
#

i will try that

#

it does work

#

i can send maps

slender elbow
#

but they are being serialized somehow to be able to be sent over the network

tender shard
#

ah yes

slender elbow
#

you can't just send a List through a network socket lol

#

not to mention that the individual elements of the list/map might be custom types as well

tender shard
#

what did you send? the list's hashcode?

inner mulch
#

no

#

the list object

slender elbow
#

can you please for heaven's sake show some code

#

the suspense is killing me

inner mulch
#

ObjectOutputStream objectOutputStream = new ObjectOutputStream(socket.getOutputStream());
objectOutputStream.writeObject(new HashMap<>());

slender elbow
#

💀 object stream

inner mulch
#

?

slender elbow
#

guess what

#

that is serializing to a byte array

inner mulch
#

nice

slender elbow
#

you can provide any Serializable object to the OOS

#

you don't have to manually serialize anything

#

but ¯_(ツ)_/¯

#

that aside, what you asked for isn't exactly viable, not all classes in the jdk are Serializable, meaning the OOS will fail to serialize them (e.g. ByteBuffer)

inner mulch
#

:(

shadow night
slender elbow
#

but not all objects are serializable

blazing ocean
#

RegistryFriendlyByteBufs my beloved

slender elbow
#

what does that have to do with anything

blazing ocean
#

idk you mentioned bytebufs

slender elbow
#

I like rollercoasters

shadow night
slender elbow
#

metal window frames are better

shadow night
#

Hmm maybe, but what about carrying over the bits instead?

serene estuary
#

How does the knowledge book handle custom items? As in, items with a custom model/texture which apply NBT tags to override PAPER?

I have a working custom item, with a working recipe (which shows in the knowledge book), but despite having the correct ingredients in my inventory, the recipe only shows as red. Clicking the red recipe puts all the correct items in the table -- I'm curious why this would be and if the crafting table/knowledge book is funky when it comes to custom items/recipes?

dawn flower
#

is there something that is similar to threads but isn't really threads? it's still sync but i can stop execution

blazing ocean
dawn flower
#
line 1
line 2
line 3
line 4
line 5```
if this code was in the "thread" and i stop the "thread" execution at line 3 it wouldn't pass to line 4 or 5
#

and if i delay the "thread" at line 2 by 100 ms, it would take 100ms after line 3's execution to execute line 4

#

if that makes sense (it prob doesn't)

blazing ocean
fallow estuary
#

Hi can someone help me? Im trying to fix a plugin for my server, the thing is not working is a unclaim system to a towny alternative.

The error is for the code lines:

    `val edit = FastBlockEditSession(world)`  *fastblockeditsession is highlighted red*

    `val edit = FastBlockEditSession(world)`   *fastblockeditsession is highlighted red*

import phonon.blockedit.FastBlockEditSession blockedit is highlighted red

pseudo hazel
#

is phonon some kind of library or something?

fallow estuary
#

phonon is the name of the creator

#

i can send you the source if you want

#

i compiled the plugin as it says on the guys github

dawn flower
#

can you delay a loop without delaying the whole thread

dawn flower
#

that won't work

hazy parrot
#

?

dawn flower
#

that delays a statement

hazy parrot
#

why

dawn flower
#

i want to delay the next iteration

hazy parrot
#

it takes runnable

#

oh next iteration

eternal oxide
#

scheduler. just write your code properly

hazy parrot
#

not async

#

but u get idea

dawn flower
#

honestly

#

i'm not sure

#

prob not, it iterates a list without a delay

hazy parrot
#

can u show what are u trying to do

dawn flower
hazy parrot
#

and what u want to be delayed ?

dawn flower
#

something similar to skript's delay

hazy parrot
#

for (ParsedElement element : parent.getElements()) loop ?

dawn flower
#

yeah

brazen badge
#

Why the itemDisplay is like this and not an item on the ground?

ItemDisplay itemDisplay = (ItemDisplay) world.spawn(item.getLocation().subtract(0, .2, 0), ItemDisplay.class, (item_display) -> {
                        item_display.setItemStack(item.getItemStack());

                        item_display.setItemDisplayTransform(ItemDisplay.ItemDisplayTransform.GROUND);
                    });
dawn flower
#

dear lord

#

use an Item entity

dawn flower
#

i can't tell if they're genius or i'm dumb, but i'm prob gonna do that as well

brazen badge
humble tulip
#

Trying to build my own cross server auction house(for learning redis). I have not yet built the cross server commutation part that actually uses redis yet but I'm looking for any tips you giys might have about ensuring that something isn't bought twice. My general setup is going to be as such

Item posted on auction house, push to mysql and redis and send a message on a pub sub channel. Then when a player tried to buy the item, I check that it's still in redis before allowing them to buy it. And then removing it. The issue sort of lies here where by another server with a player also can check if the item exists in redis before removing it and in essence, the item is able to be bought twice

chrome beacon
#

You just gotta scale it down

humble tulip
#

Is there any sort of Map.remove like in java where I can get and remove in 1 op?

brazen badge
humble tulip
#

That way i can attempt removal and see if something was actually removed

humble tulip
#

Looking here

#

Oops out of date

#

Will look in a more uptodatw one

chrome beacon
#

hm not sure about jedis actually

#

nvm me ig

chrome beacon
#

String commands have getdel

#

you can use

humble tulip
#

I'm not 100% set on anything yet and idk redis well which is why I'm doing this project to learn

humble tulip
dawn flower
#

https://paste.md-5.net/agakijefeg.cs

    actions:
        - "test":
            - "broadcast test1"
            - "broadcast test2"
            - "test":
                - "broadcast test3"
        - "broadcast test4"```
"test" just executes what's inside of it, TurboAction#next just calls the other next method
grim hound
#

ever

#

use bukkit scheduler for async

#

bukkit scheduler for async should only really be used when you would like to have your task executed at the time of the tick loop, just async to the thread

dawn flower
#

ok now it broke again lmfao

#

https://paste.md-5.net/nipoyetogu.cs

    actions:
        - "test":
            - "broadcast test1"
            - "broadcast test2"
            - "test":
                - "broadcast test3"
        - "test":
            - "broadcast test4"
        - "broadcast test5"```
it broadcasts from test1 to test3 then spams test4 and never gets to test5
grim hound
#

how can I get all the keys used after in a config section?

chrome beacon
#

after what

grim hound
#

for example in a myster-boxes I'd like to get all keys used

dawn flower
#

ConfigurationSection#getKeys(false)

grim hound
#

like here 1 was used

chrome beacon
grim hound
#

oh there's getConfigurationSection

#

nice

#

thanks

inland kernel
#

Hey,
I'm trying to implement automated tests into my plugin. Do you know any good (and up to date) framework?

sharp heron
#

There is MockBukkit

#

To implement unit tests if it's why you call automated tests

tropic heart
#

Hello, is there anyone who can help me out with making custom spawners? like Pig spawners?, i know i can drop one down and put an egg on it but i cant seem to be able to pick those spawners up

chrome beacon
dry thistle
#

Hello guys, i seem to have a very common problem but i don't find any solution.
I want to have an inventory with one empty slot and the player to put an inventory into that slot. After putting the item into the slot I want to close the inventory and do something with the item. My problem is that in the InventoryClickEvent, the currentItem and also the inventory is the old version like before the action happend. So both of them are null at the point the event is called. But I just want to know which item the player put into the empty slot. Do you guys have an idea how to solve this problem ?

chrome beacon
#

you probably want getCursor

#

Do note there are other ways of moving the item such as the number keys

#

and also draging an item causing the InventoryDragEvent

fallow estuary
#

Can someone help me pls? Im trying to compile a plugin

`FAILURE: Build failed with an exception.

  • What went wrong:
    Could not determine the dependencies of task ':compileJava'.

Could not resolve all dependencies for configuration ':compileClasspath'.
You must have git installed and available on your PATH in order to use paperweight.`

chrome beacon
#

It does tell you what to do

fallow estuary
#

i have git installed

chrome beacon
#

Looks like it's not on your path

fallow estuary
#

how do i fix it

chrome beacon
#

The installer should place it there but if it for some reason didn't

#

you can put it there manually

fallow estuary
#

like the git installer?

chrome beacon
#

Are you on Windows

fallow estuary
#

yes

chrome beacon
fallow estuary
#

ok

chrome beacon
#

Open environmental variables for the system and find PATH

#

add a new entry pointing to the bin folder of your git install

fallow estuary
#

what

fallow estuary
chrome beacon
#

Which part

fallow estuary
#

the new entry

#

pointing to the bin etc

chrome beacon
#

Path is a list, you'll see when you get there

primal mica
#

hi, my sword is "losing" attributes when the item is not full health, I'm setting setAttributesModifiers(null), but if I getAttributesModifiers() before is also null

Sword full health -> (have attributes)
Sword not full health -> (lost damage attributes)

worthy yarrow
worthy yarrow
chrome beacon
#

It exists in both

worthy yarrow
#

Oh thats right

primal mica
chrome beacon
chrome beacon
#

well not install but you get what I mean

fallow estuary
#

oh wait i cant send img

worthy yarrow
#

Yeah

#

?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

chrome beacon
#

use addItemFlags

fallow estuary
fallow estuary
#

the last one is the path

chrome beacon
#

now add a new entry with the path to the bin or cmd folder of your git install

#

just like the other entries are

fallow estuary
#

what? like i put the downloads path ?

#

like this

chrome beacon
#

No the folder where git is installed

fallow estuary
#

oh ok

#

git cmd bash or gui

chrome beacon
#

They are both in the same folder

primal mica
fallow estuary
chrome beacon
#

C:\Program Files\Git\cmd

fallow estuary
#

ok

#

this?

chrome beacon
chrome beacon
fallow estuary
#

ok

primal mica
chrome beacon
#

There is something else messing with damage then

fallow estuary
#

same error

chrome beacon
#

items won't just randomly loose their attack

chrome beacon
fallow estuary
#

ok

primal mica
#

when I set AttributesModifiers to null with no enchants and sword full life nothing happens, but setAttributesModifiers to null when it has enchantment or ir damaged the sword lose the attack damage

chrome beacon
#

so why are you setting it to null

#

when you know it's the issue

primal mica
#

because I have 2 system of combats, player can toggle it with /toggle-combat

worthy yarrow
#

So then what's the issue what

#

It sounds like that's what you want

chrome beacon
primal mica
#

I'm setting to null to reset the combat to "vanilla (1.9 cooldown)"

chrome beacon
#

Don't forcibly remove them all

#

That will just break things for no reason

primal mica
#

hm so I have to remove it by uuid? but it is already null by default

chrome beacon
#

?

#

Why do you want to remove something that doesn't exist

primal mica
#
private ItemStack fixDamage(boolean attackSpeed, ItemStack itemStack)
{
    if(itemStack != null && TYPE_DAMAGES.containsKey(itemStack.getType()))
    {
        ItemMeta meta = itemStack.getItemMeta();
        
        meta.setAttributeModifiers
        (
            attackSpeed ? null : TYPE_DAMAGES.get(itemStack.getType())
        );
        
        itemStack.setItemMeta(meta);
    }
    
    return itemStack;
}
chrome beacon
#

That's a bad way of doing it

#

As I said don't forcibly override all of the attribute modifiers

#

Add the ones you want

#

and remove them when you no longer need them

primal mica
#

ok I 'll try it

worthy yarrow
#

This is a nitpick but why would attack speed be a boolean? I'd try to find a better descriptor for that variable

#

I mean I understand why, just feels very misleading

primal mica
#

attackSpeed is like "newCombat"

worthy yarrow
#

Yeah I get that

#

It's just you can modify the actual attack speed attribute by a float iirc, that being said this should be called like newCombat or something

primal mica
#

so instead of set null i will try to loop (if it is not null) and clear them all

chrome beacon
#

no

#

Remove only the ones you have added

primal mica
#

but it is weird because in doc it says "Set all Attributes and their AttributeModifiers. To clear all custom attribute modifiers, use null. "

chrome beacon
#

Do NOT remove modifiers added by someone else

primal mica
#

is that what I want clear all CUSTOM attributes

#

"To set no modifiers (which will override the default modifiers), use an empty map."

eternal oxide
#

didn;t paper drop CB versioning at 1.17?

chrome beacon
#

You're running a 1.18.2 plugin on a 1.20.1 server

blazing ocean
eternal oxide
#

ah okies

chrome beacon
fallow estuary
#

Ok srry

earnest girder
#

I'm having a weird problem with World#getFullTime

#

it is always returning the same value, 15129

chrome beacon
#

Did you freeze the daylight cycle

earnest girder
#

oh lol

#

yes

#

and just to clarify, the method is basically System#currentTimeMillis but for ticks instead of milliseconds, right?

chrome beacon
#

no it gets the time of day

#

what you're looking for is getGameTime

inner mulch
#

RequestCreateMap implements Request, so what is wrong with this?

inner mulch
#

PECS?

chrome beacon
#

Producer Extends, Consumer Super

#

You're trying to put stuff in that map so it should be super

#

Instead of extends

inner mulch
#

okay let me try

#

java :(

#

i feel like i have to do some casts

chrome beacon
#

Could you show the RequestCreateMap

inner mulch
#

sure

chrome beacon
#

You're most likely better of not using a wildcard in this case

#

I don't really see why you would want to

inner mulch
#

i need to use wildcards so that all the classes of a type are accepted, no?

chrome beacon
#

That applies without the wildcard too

inner mulch
chrome beacon
#

You sure you have the right import

inner mulch
#

yes im gonna invalidate caches now

#

still the same

#

when hovering over the requestcreatemap it even shows

#

so im not sure what java wants from me

chrome beacon
inner mulch
#

this works now :)

#

seems like it was a cache issue

chrome beacon
#

yeah

fallow estuary
#

How do i update a plugin? from 1.18.2 to 1.20.1

trim quest
fallow estuary
#

yes it is open source

trim quest
fallow estuary
#

i need to update it because of a NMS class that changed from 1.18.2 to 1.20.1

trim quest
#

even changing version of plugin 1.18 to 1.18.x(latest) can cause a problem

#

R1 to R2

fallow estuary
#

oh

#

is it hard to fix?

#

i mean to like update

eternal oxide
#

outdated plugin

fallow estuary
#

yeah ik

#

i want to update it

eternal oxide
#

I have never heard of phonon

fallow estuary
#

his nodes plugin is for geo servers

eternal oxide
#

there is an official Flagwar plugin for towny

fallow estuary
#

a copy of towny with different war and territory sistem

fallow estuary
#

the plugin works doing small territories so you cant annex a town capturing a few chunks only

eternal oxide
#

last I checked Towny is NCND so you likely will not get any help with a fork

trim quest
fallow estuary
trim quest
#

hm

#

if you want to rebuild some old projects just start with version independent project architecture. @tender shard has brilliant guide for it you should look at it!

fallow estuary
#

Ok thx

trim quest
#

you can give support for 1.8 to current version

#

but this will take a lot of time

worthy yarrow
#

💀 1.8

#

gross

mellow pebble
#

?paste

undone axleBOT
trim quest
# worthy yarrow 💀 1.8

I have fantasies from 1.5.2 . Smth like making hunger games plugins in 2024. it was our childhood gaming pleasures with my friends.

worthy yarrow
#

I mean

#

I was a bedwars chad

remote swallow
worthy yarrow
#

I got banned...

eternal oxide
#

did too many yo mama jokes?

mellow pebble
#

i know many of you will not help me because it is question for help with something im making for legacy version but if you can take a look and see for yourself because i dont know what would be fix for this it should work normally console normally prints names for each server icon but it throws error anyways

https://paste.md-5.net/gerelorava.http

remote swallow
worthy yarrow
#

so I got banned for scaffolding

eternal oxide
#

lots of words I do not understand 🙂

mellow pebble
worthy yarrow
#

Scaffolding is a cheat that lets you just sprint + place blocks

worthy yarrow
#

Well I thought I'd explain since elgarl said they don't understand kek

mellow pebble
worthy yarrow
#

See that's the thing, I wasn't cheating so I wasn't flagging, a literal hypixel admin banned me

mellow pebble
worthy yarrow
#

Moonwalking came out like maybe 2 months after ninja bridging and was like 1.8 blocks /sec faster so I started practicing and then got decent

#

Brought it to hypixel and then got banned 😦

mellow pebble
#

is unban purchesable ?

worthy yarrow
#

Made an appeal, they reviewed the clip and said it was sufficient proof that I was cheating lmao even though I never flagged watchdog so like smh

worthy yarrow
mellow pebble
worthy yarrow
#

This ban was like 6 years ago

buoyant viper
#

got banned on hypixel around 6 years ago too

#

(i was cheating)

mellow pebble
remote swallow
#

i got banned for turning my auto clicker on

mellow pebble
#

would some of you care to help me a bit im in dead end situation in my code :3

remote swallow
#

i totally turned it on accidentally

worthy yarrow
#

Tbf it really doesn't look legit kek

#

But I swear it is, I've literally done it

mellow pebble
#

?paste

undone axleBOT
sullen canyon
#

moderators used to false ban too and there was no way to get unbanned even if you had evidences, I literally know no situation when someone got their ban appeal accepted

eternal oxide
#

I only play on my own hosted servers. I know I can;t get banned then 🙂

sullen canyon
#

I believe now they almost do not ban anyone if they aren't sure or if it's not obviously blatant

buoyant viper
#

sadly i was, in fact, cheating

buoyant viper
kindred sentinel
#

How to generate another world with borders?

#

Like new dimension

chrome beacon
kindred sentinel
#

Ty

acoustic shuttle
#
[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```

Any Idea why it does this with any dependency file I add but when I remove the plugin it works(Except I need it to remap cuz im using nms)
Like I don't get why it's checking the repos for the local files also everything was working perfectly withh 1.19.3 and rn I'm updating to 1.21.1

It isn't just item-nbt-api-plugin it's literally any plugin I try to add as a dependency

Using Java 21
eternal oxide
#

update version of special source

acoustic shuttle
#

its 2.0.3

eternal oxide
#

and probably others too

acoustic shuttle
#

I update item-nbt-api

#

I used it in another project

#

and the others are made by me

#

so ik they're fine

#

(Also I used them all in a 1.21.1 project earlier)

eternal oxide
#

special source is old

acoustic shuttle
#

Is there a newer version?

eternal oxide
#

no I just said it was old for no reason

acoustic shuttle
#

I mean like I couldn't find it

#

2.0.3

acoustic shuttle
eternal oxide
#

um, I was sure there was a newer one

#

I'm sorry you are upto date

#

in which case post your full pom and build log

#

?paste

undone axleBOT
acoustic shuttle
#

alr 1s

acoustic shuttle
#

I gtg I'll be back soon if u have any questions or sum I'll answer them when Im back

humble tulip
#

So I was of the impression that redis is a cache and does not persist

#

But it does infact persist

#

That's good ig

#

How do i ensure my redis cache is uptodate with my actual data?

#

Guess I'll faafo

#

Best way to learn

worthy yarrow
#

Does that mean fuck around and figure it out

#

Faafo I mean

inner mulch
humble tulip
copper scaffold
#

How can i create custom enchants in 1.21?

sand spire
#

Do boss bars have a decent performance impact or can I just spam them? If they do, how about packet boss bars

slender elbow
#

they have basically no impact

wind veldt
#

Hey guys is there a point in making my own NPCs or should I just use Citizens API

worldly ingot
#

Citizens is probably just fine for most use cases

blazing robin
#

hey guys i wanna remove dropped item when the player break block,

            Player player = blockBreakEvent.getPlayer();
            ItemStack item = player.getInventory().getItemInMainHand();

            if (item.getType() == Material.AIR) return;

            Block block = blockBreakEvent.getBlock();
            block.setType(Material.AIR);
            blockBreakEvent.setCancelled(true);

            System.out.println("test ");

I tried this but it doesn't work well how can I cancel to drop item?

buoyant viper
#

looks like theres a setDropItems method

blazing robin
buoyant viper
#

probably yeah

blazing robin
#
            if (blockBreakEvent.isDropItems()) {
                Block block = blockBreakEvent.getBlock();

                blockBreakEvent.setCancelled(true);
                blockBreakEvent.setDropItems(false);
                block.getDrops().clear();
                block.setType(Material.AIR);
                System.out.println("hi?");
            }
#

it doesn't work still...

fading beacon
#

Is there a way to grab ALL passive mobs into 1 entityType

stuck oar
#

Does anyone know how I can make stacked spawners? Like is there something I can do to the blocks data

stuck oar
blazing robin
blazing robin
inner mulch
#

Its most likely one of ur plugins dropping items but not calling that event while doing so

sterile breach
#

I have a message broker to link my servers and my proxy, is better to have one channel per server or one channel for proxy and one another channel for all servers ?

agile anvil
#

It totally depends on what kind of messages you want to exchange

sterile breach
#

It dépend, in the most time all servers need to get it but sometimes just 1 need to get it

agile anvil
#

Then it's better to only use one. It is way easier to manage and shouldn't have some efficiency issues

sterile breach
#

Maybe I can use one global and one per server ?

blazing robin
#

Hey guys is there any way to retrieve all color stained glass & pane?

blazing robin
agile anvil
#

When you need only one server to get it, do some logic on your message to identify the server

agile anvil
blazing robin
agile anvil
#

you can remove the unecessary material.name().contains("STAINED_GLASS_PANE") ("STAINED_GLASS_PANE" is included in "STAINED_GLASS")

#

And don't forget to fill this glass list only once for performance issues

sterile axle
#

does Player#setRespawnLocation set the spawn location even for the player's first join?

#

i.e. if I call it in PlayerJoinEvent (or earlier, maybe PlayerLoginEvent), will they spawn at the location I set? or do I need to teleport them?

agile anvil
#

It's not written on the doc. Might have to try it yourself

sterile axle
#

yeah i wasn't getting the info i needed from doc so asked here

#

ill try it out. thx

#

update: it doesn't

copper spade
#

how do I do setResourcePack("http://localhost:8888/rp.zip) for whatever reason it says failed to download 1 of 1 but the pack definitely works and is fine if I host on google drive etc.

How do you get localhost working with setResourcePack(), bearing in mind I have gone into my server's docker container (pterodactyl) and I can curl the resource perfectly fine!

blazing ocean
copper spade
#

Ah. How would I get it to download off the servers localhost? Ad the console never displays any errors! Very annoying, I have tried adding debug statements etc.

blazing ocean
#

i meant the clients console. you would need to expose that port and use the external ip

copper spade
#

Hmmmm. Super annoying you can't just use local files, as its packaged in with my plugin. Is there any nicer ways to handling resource packs?

blazing ocean
#

nope, that's the only way

#

since the client has to download it

#

it cannot be sent directly as that would exceed the packet size limit i believe?

#

so that's not a thing

wet breach
copper spade
#

Yeah, makes sense. Shame the server can't mandate it, I can have it set in server.properties and do it that way, but I don't like it.

blazing ocean
#

well you can

#

you just need those extra arguments to the method

copper spade
blazing ocean
#
  • you can kick on rejection, there's an event for status change
#

also for the sake of your users, i would provide the hash to that method call so it actually gets updated on change / no need to redownload it every time

copper spade
#

I could have saved a few hours just by joining this discord yesterday!

Ideally I wanted the resourcepack within the jar, that then uploads it to the server (which it does), spins up a http server and pulls it down. But if it is starting the http server on the server, the client cant grab that unless I open the port

wet breach
copper spade
#

Yeah I need to open up a port then

blazing ocean
copper spade
#

Thank you both! Can't believe I missed client v server localhost! So silly.

wet breach
copper spade
#

I'll probably dump it on a random point anyhow to avoid any clashes, unless there is a neat way to host the file on 80 or 443

And have it like http(s)://<myserver>/resourcepacks

wet breach
#

Yes you can unless you already have a webserver listening on those ports

copper spade
#

Maybe NGINX?

wet breach
#

If you have nginx then why you need resource pack in your plugin?

blazing ocean
#

i would recommend using something like javalin inside of your plugin, i host my pack servers on (mc port) - 1 or similar

wet breach
copper spade
blazing ocean
#

i run a web server on that port which provides the pack

wet breach
#

If port for mc is 25565 then minus 1 which id 25564 for port

copper spade
#

Sorry, I am VERY new to all of this 😁 Very helpful

wet breach
#

And with that time for me to go home

blazing ocean
#

essentially, i:

  • compile my resourc pack
  • create a zip file to /tmp
  • read the bytes of that and store it in memory
  • remove the file
  • start a web server which then responds with those bytes

my system is a bit more complex since i am using my own resource pack compiler library but it should get the point across

copper spade
#

It does. I will get that working later, thanks all

smoky anchor
stuck oar
#

like if you right click a spawner block with another spawner it adds it to the "stack", for easier placement of spawners

pliant topaz
#

i mean, you could increase the amount of mobs that spawn each cycle

stuck oar
#

yeah that is something i think i would do but is there some data value i can change so that when they are broken it drops the amount in the stack

agile anvil
#

Use Persistant Datacontainer on that placed spawner. When you break that bloc just get the value and change the drops

stuck oar
#

alright thank you

normal thicket
#

    @Override
    public void onEnable() {
        // Plugin startup logic
        getServer().getPluginManager().registerEvents(new NewShit(), this);
    }

    @EventHandler
    public void onPlayerJoin(PlayerJoinEvent event){
        Bukkit.broadcastMessage("Welcome To Our Beautiful Server");
    }```
what I am doing wrong? I just started going into spigot
#

did I register wrong class?

blazing ocean
#

you cannot create a new instance of your plugin

#

you can just registerEvents(this, this)

#

for more stuff, see

#

?di

undone axleBOT
normal thicket
blazing ocean
normal thicket
#

new NewShit() registers it again yeah?

blazing ocean
#

yeah

copper spade
#

@blazing ocean Got my resource pack working with your suggestions 🙂

blazing ocean
#

👍

copper spade
#

Is there a way to play the potion drink animation, as I cancel the normal consume and then do custom actions

stuck oar
#
            cs.setSpawnedType(EntityType.CREEPER);```


anyone know why this doesnt work
#

im not familiar with spawners so if its bad lmk

tardy delta
#

update it?

#

blockstate.update() or whatever

sonic goblet
#

^

blazing ocean
tender shard
umbral flint
#

Should I have multiple repository patterns and combine them into a single service, or just implement the service directly?

hazy parrot
#

What is multiple repository patterns

chrome beacon
hazy parrot
#

Repo pattern is a pattern where there will be layer that have no business logic, it's just interacting with db

#

And yes, u usually have multiple repos, depending on your model

hazy parrot
umbral flint
#

Okay that's how I have always done it

tender shard
hazy parrot
#

Oh

stuck oar
#

nvm

#

ty

blazing ocean
tender shard
#

i don't get it

copper spade
#

Any ideas on how to install ProtocolLib with Gradle on 1.21.1 on Pterodactyl

I think I need the jar on my Pterodactyl server, is there no way I can do this through my build.gradle and plugin.yml?

For other jars I just use

libraries:

  • "io.javalin:javalin:6.2.0" as an example
tender shard
#

plugin.yml can only load libraries from maven central

blazing ocean
vocal cloud
#

quick question how do you get a block cords like diamond_block?

tender shard
#

you mean the name

copper spade
tender shard
vocal cloud
#

oke thanks

blazing ocean
vocal cloud
#

is that in all worlds all cods?

tender shard
#

cods?

vocal cloud
#

x y z

tender shard
#

you want to get a list of all coordinates where a certain block type is placed?

vocal cloud
#

yea

blazing ocean
vocal cloud
#

or in a rotation of like 100 of a player

tender shard
#

then you have to loop over all blocks that are within X blocks of the player, check their block type, add the matching ones to a list or set or whatever, and return it at the end

vocal cloud
#

o sounds lagy XD

copper spade
#

So I have dependencies {
compileOnly("io.papermc.paper:paper-api:1.21.1-R0.1-SNAPSHOT")
compileOnly('com.comphenix.protocol:ProtocolLib:5.1.0')
}

and repositories {
mavenCentral()
maven {
name = "Minecraft ProtocolLib"
url = "https://repo.dmulloy2.net/repository/public/"
}

it downloads fine but then on the server i get org.bukkit.plugin.UnknownDependencyException: Unknown/missing dependency plugins: [ProtocolLib]. Please download and install these plugins to run 'PotionMaster'.

tender shard
vocal cloud
#

?

tender shard
robust helm
blazing ocean
vocal cloud
copper spade
blazing ocean
#

no, you need the plib plugin too

copper spade
#

Urgh thats a shame. I guess I could upload the jar to the plugins dir in my gradle build.

onyx fjord
#

can i send basecomponent as title somehow?

blazing ocean
#

you need to install the plugin on the server

blazing ocean
onyx fjord
#

bruh

tender shard
copper spade
onyx fjord
#

hell nahw

#

i dont like it's workflow

blazing ocean
copper spade
#

Send a post request to the server with the jar file

blazing ocean
#

🤨

#

just install the jar on your server once

copper spade
#

ok ok ok

blazing ocean
#

that works for every plugin that uses it

#

so you only need one plib jar in there

robust helm
#

When making an api for my server(lets say for storing data to a database): Do i create it as a normal plugin or as some weird library thingy?

chrome beacon
#

a plugin is fine

robust helm
chrome beacon
#

The database url should be provided in a config file

#

Don't hardcode it in to the plugin

robust helm
#

or a seperate KitAPI class for general methods

chrome beacon
#

If you want the KitAPI class you'd usually just have it as a wrapper for the kit manager

#

to make other developers life easier

robust helm
#

and the KitAPI is not the JavaPlugin child right?

chrome beacon
#

no

#

That would be KitPlugin or smth like that

robust helm
#

Alr thank you!

pale plover
#

How to send mob setPose packet

vocal cloud
#

quick question how do i make a while a player is online like:
while (isPlayerOnline) {

}
copper spade
#

Is there no way to send a drinking animation without mods?

vocal cloud
#

texturepacks?

chrome beacon
#

Yeah you can use some resource pack trickery

#

It's quite hard though

pale plover
chrome beacon
vocal cloud
pale plover
chrome beacon
vocal cloud
#

no?

#

idk

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
#

^^ suggest following some Java tutorials before starting with Spigot

vocal cloud
#

lol well i tryed but java is rily big

#

i thought to just start and learn on my way

chrome beacon
#

yeah but skipping it won't help you

copper spade
# vocal cloud texturepacks?

How would I do this. I already have a texture pack remapping food items to look like potions. Could I add the drinking animation to that then ?

tender shard
#

i really don't understand why IJ only sometimes shows the parameter name

vocal cloud
#

like forced texturepack?

pale plover
#

kotlin 🤢

copper spade
#

No no texture pack is working but how could I make it so that the item has the drink animation?

vocal cloud
#

ummm wait

copper spade
#

I assume it’s because I do an event cancel so that stops it and then I apply stuff but obviously won’t have the animation

#

If it’s not possible that’s fine

remote swallow
pale plover
#

How to send mob setPose packet

tender shard
remote swallow
#

It's like if the method param is the same name as a variable you pass it doesn't have it but if it's diff it does

tender shard
#

huh I think it's because of generics

#

oh no wait it isn't. I think it's just bugged

hybrid trellis
#

Why do I get this error?```fix
Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.13.0:compile (default-compile) on project untitled: Compilation failure
[ERROR] location of system modules is not set in conjunction with -source 17
[ERROR] not setting the location of system modules may lead to class files that cannot run on JDK 17
[ERROR] --release 17 is recommended instead of -source 17 -target 17 because it sets the location of system modules automatically
[ERROR]
[ERROR] -> [Help 1]

pale plover
#

How to send mob setPose packet

chrome beacon
hybrid trellis
#

No I don't think so

#

it appeared after I added a library

chrome beacon
#

Send your pom

#

?paste

undone axleBOT
hybrid trellis
chrome beacon
#

Try removing source and target

#

and use release instead

tardy delta
hybrid trellis
#

Now I get a empty error just a build failed

chrome beacon
#

Send the entire build log

#

also systemPath dependencies are deprecated

#

You shouldn't be using them

pale plover
#

How to send mob setPose packet

tardy delta
#

playerconn.sendPacket?

chrome beacon
#

^^

#

connection.sendPacket pose packet

#

Anyways stop spamming the same question over and over again

#

If no one answers you improve the question with more information or open a thread

pale plover
#

Cannot resolve method 'sendPacket' in 'ServerPlayerConnection'

hybrid trellis
tardy delta
#

throw a few getHandle s at it?

#

few casts

#

that should do the trick with nms

#

😉

chrome beacon
#

^ in order of what's best to do

hybrid trellis
#

Is mvn a command or?

chrome beacon
#

yes

#

That's the maven command

#

mvn install

tender shard
# hybrid trellis What should I use then?

Sometimes you have a certain .jar file that you need as dependency, but the author of that .jar was too lazy to properly upload it to a public repository. That’s bad, but not a problem. There are two ways to solve this, but only one proper way. The proper way: install the dependency The proper...

tender shard
#

my current code:

@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
fun onBlockPlace(event: BlockPlaceEvent) {
    forEach(event.player, PlaceBlock::class) { tracked ->
        if(event.itemInHand.type == tracked.quest.task.data) {
            progress(tracked)
        }
    }
}
@Suppress("UNCHECKED_CAST")
private inline fun <reified T: Task<E>, E> forEach(player: Player, taskKClass: KClass<T>, action: (TrackedQuest<E>) -> Unit) {
    questManager.getTrackedQuests(player.uniqueId).filter { it.quest.task is T }.forEach {
        action(it as TrackedQuest<E>)
    }
}

does anyone know if I can somehow change it so that I can call it just like this: ```kotlin
forEach<PlaceBlock>(event.player) { ... }

?
#

currently I have to pass the class as parameter and I'm not even using the parameter

tardy delta
#

if you dont have the Klass param, you have to call it as forEach<T> no?

#

i think to clean this up you can also do ```kt
getTracked().mapNotNull { it.quest.task as? T }.forEach(action)

tender shard
#

if I specify the generic parameter for the method in <..> I have to specify both

#

however E should be "detected" from T, as it's a Task<E>

tardy delta
#

ah wait you have two type params

tender shard
#

I think I could make the task class sealed

tardy delta
#

why do you even need the E?

tender shard
#

so that I got the correct type here (e.g. Material for "BreakBlock" as T, which looks like the second screenshot:

tardy delta
#

cant you just not care and specifiy the bound as Task<*>?

#

im loosing my mind already

tender shard
#

I could but I don't like that

tardy delta
#

idk ive done too much data oriented programming recently 😂

#

no generic bounds there

tender shard
#

you can run it from within intellij, or you download and install maven locally

hybrid trellis
chrome beacon
hybrid trellis
#

I get the same response inside intelliij atleast if I use the terminal

chrome beacon
tender shard
#

alternatively, as said, use IntelliJ, but use the "run maven goal" button

chrome beacon
#

and find install

tender shard
#

do you have the dependency as project, or do you only got the .jar file?

chrome beacon
#

The project is on github

chrome beacon
tender shard
#

clone the repository with intellij, then open it, double click on maven -> install, done

hybrid trellis
#

I have never used intellij so I got no idea how to clone a repo

tender shard
#

File -> New Project -> From Version Control

#

then enter the github URL as olivo sent it

hybrid trellis
#

Okay there, and does Install just say Install?

#

Or anything else

chrome beacon
#

yeah just install

#

double click it

#

to run

brazen badge
#

A simple question. If I code a plugin in 1.18.2 and I set in config a 1.21 material for an ItemStack, I'll get an error?

eternal night
#

Yes

#

The server doesn't know that data version

hybrid trellis
#

None say specifically install on the maven tab

chrome beacon
#

Should be under lifecycle

hybrid trellis
#

Huh 😭

brazen badge
tender shard
#

wtf is wrong with my IJ today

#

why is that one line orange

shadow night
#

because yes.

hybrid trellis
#
[ERROR] Failed to execute goal on project multiworld-api-core: Could not resolve dependencies for project com.dev7ex:multiworld-api-core:jar:1.6.5-SNAPSHOT
[ERROR] dependency: com.dev7ex:facilis-common-core:jar:1.0.5-SNAPSHOT (provided)
[ERROR]     Could not find artifact com.dev7ex:facilis-common-core:jar:1.0.5-SNAPSHOT
tender shard
#

does that project have subprojects?

hybrid trellis
#

API and the base plugin

tender shard
#

you have to run it on the root pom

shadow night
#

Holy fuck that's quite a few subprojects

tardy delta
#

quite common for multi version modules

shadow night
#

Never wrote those

tardy delta
#

ig they only contain at most two files

hybrid trellis
shadow night
tardy delta
#

speaks about kotlin being less bloat

uses java

#

how ironic

shadow night
tardy delta
#

people are scared of the kt stdlib being that big

tender shard
#

i'm only scared of not having access to kt stdlib

shadow night
#

Yeah 2mb women are indeed quite big

tardy delta
#

i mean in 2024, what is 2mb

shadow night
#

A whole 2000 kb

tardy delta
#

im wondering how its even that big, how big is javas stdlib?

shadow night
#

That's what makes the difference

#

But it's huge

tardy delta
#

uh ye

brazen badge
#

from 1.18.2 to 1.21.1

chrome beacon
eternal night
#

You develop against 1.18.2 API and pray it works

#

Otherwise I guess look at something like XMaterials

chrome beacon
#

XSeries in general is pretty good for crossversion support

brazen badge
chrome beacon
#

Then it's fine

#

You won't have any errors

brazen badge
halcyon hemlock
#

good morning everyone

#

(its 11pm)

pseudo hazel
#

wdym, its 5pm

remote swallow
#

no its 4pm

nova quail
#

Hello! Can someone please help? I made a pickaxe with a custom enchantment that breaks 2x3 blocks when mining. I've made it so that when a player mines with this pickaxe, the blocks break naturally. However, when I do this, the pickaxe becomes unbreakable because the plugin destroys the blocks. How can I make it so that the blocks are destroyed using the player's pickaxe, so the durability also decreases?
My code: https://paste.md-5.net/ibelamoneq.java

eternal oxide
#

do the breaks 1 tick later.

#

that will allow the event to finish and apply damage to the tool

nova quail
#

yeah

#

thanks

#

Now all works correctly

halcyon hemlock
copper scaffold
#

How can i create custom enchants in 1.21?

slender elbow
#

data packs

topaz kestrel
#

any ideas on how to create a map reset system without copying the world

late sonnet
topaz kestrel
#

i dont want to store the whole world data

#

i just want to restore blocks

late sonnet
#

i mean if the reset is for a map created you can just save what need (chunks and not data) and use that... or copy the world and "clear" that useless data?

topaz kestrel
#

how so?

maiden thicket
#

hey, i wanted to ask if any of you guys were able to create like a dark screen effect for players for a horror game using resource packs or anything, and if so how? i've attempted shaders which work but for clients using sodium and i assume optifine as well it won't work, and the darkness effect won't do it because it pulses in and out, and the blindness radius is just too tiny

gentle inlet
#

Anyone know a way I could send data from my plgin e.g a current cooldown of ability to a mod (So i can show it on a hud)

topaz kestrel
clear plaza
#

Does anyone know how I can create an explosive crossbow ?

nova quail
#

Hello! I have made a pickaxe that mines in a 3x3x2 area, but now I need to create a pickaxe that will mine in a 3x3x1 area, so it will only mine one block forward and three blocks around it. I don't understand this math. Can someone please help?
Here is my code: https://paste.md-5.net/ifidokuzid.java

worthy yarrow
#

You should probably study some more math

nova quail
#

Yeah that's probably

#

I have problems with math

clear plaza
#

XD

nova quail
#

Can someone help please

#

I am a little bit stupid

brittle geyser
clear plaza
worthy yarrow
#

To be fair yes it can, I wouldn't rely on it obviously, but it has gotten a lot better at math so I've heard

hybrid trellis
tender shard
#

show a screenshot

#

?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

hybrid trellis
prime epoch
#

I plan on making a 1.7/1.8 pvp server but my question is should i use the 1.20 verison of spigot and only allow connections on 1.7/1.8 or develop using the 1.8 version of spigot?

worthy yarrow
#

Stay updated, there are really easy ways to emulate 1.8 pvp in 1.20.x ie weapon attributes iirc

#

?1.8

undone axleBOT
prime epoch
#

bloody hell 9 years

#

im acc old

prime epoch
worthy yarrow
#

I mean you just get so much more stuff whether it be QOL or whatever, staying up to date would really help the development imo

eternal oxide
#

why would you build against 1.20 if your actual target is 1.8?

worthy yarrow
#

1.8 pvp

eternal oxide
#

still no reason to build against 1.20

prime epoch
#

updated versions of spigot have alot more features no?

blazing ocean
#

yes

worthy yarrow
#

A lot more

prime epoch
#

and less support from other plugins for 1.8 / legacy verisons

eternal oxide
#

yes but he is building for 1.8

worthy yarrow
#

If you're just looking for the pvp aspect of 1.8 I mean

#

It's easy to do now

tender shard
worthy yarrow
tender shard
#

you also need to run mvn install on "facilis-common-core", whatever that is

#

alternatively, run the command from my blog post through IJ

#

just open any maven project in IJ, then click "Execute Maven Goal" , then enter the mvn install:install-file ... command

tender shard
#

show a screenshot

hybrid trellis
#

So confusing

tender shard
#

well then delete the pom.xml or rename it

#

mvn install:install-file doesnt need a pom but if there is one, it shouldn't be a broken one

hybrid trellis
#

Weird error

fallow crag
#

where can I promote my Spigot project?

buoyant viper
blazing ocean
#

modrinth

fallow crag
fallow crag
blazing ocean
#

💀

tender shard
#

SkullMeta

worthy yarrow
#

It's almost as if we were in the spigot discord

tender shard
#

ah yes, that's exactly what I wanted as tab completion

worthy yarrow
#

How did the jdocs get in there kek

tender shard
#

I accidentally did this:

acf.commandCompletions.registerAsyncCompletion("quest_ids") {
    questManager.getQuests().map { Quest<*>::databaseId.toString() }
}

instea of this:

acf.commandCompletions.registerAsyncCompletion("quest_ids") {
    questManager.getQuests().map { it.databaseId.toString() }
}
worthy yarrow
#

Wait the (Kotlin..) bit is apart of the id?

#

I mean I get the issue here for the databaseId descriptor but uh how did the kotlin comment get in there too?

tender shard
#

idk, but I'll find out now

tender shard
#

nah it has to be in { }

#

because I need to call toString on it

blazing ocean
#

just add another map

tender shard
#

that'd ofc work too

tender shard
worthy yarrow
#

Wait so then wheres the kotlin comment held?

jovial grove
#

Which plugin's event will be executed first, the one that loaded earlier or later?

#

If they have the same priority

eternal oxide
#

in load order, if all other things are equal

jovial grove
eternal oxide
#

no

#

the one which loaded first fires first, IF all other things are equal

jovial grove
#

Thanks

eternal night
#

not that that is behaviour that should be relied on

jovial grove
eternal oxide
#

when the listeners are registered

jovial grove
jovial grove
eternal oxide
#

do you nee4d one to go first?

jovial grove
slender elbow
#

that's what priorities are for

eternal oxide
#

then don;t listen on the same priority

#

only priority can guarantee order

jovial grove
#

Got you

jovial grove
tender shard
hybrid trellis
#

Even if I use the template multiworld gives me

#

It says it's wrong

tender shard
#

finally my listener looks good

eternal oxide
#

I did a similar one for block protection

#

Mine was superior though as it was Java 😉

tardy delta
#

.forEach(progress) cmon

blazing ocean
#

you mean ::progress?

tardy delta
#

dunno how its scoped

#

whats the @Inject doing

slender elbow
#

injecting :5head:

tender shard
#

and then you get instances through the injector

this.questManager = injector.getInstance(QuestManager::class.java)
tardy delta
#

youre not instantiating manually?

#

lol

river oracle
#

bro hasn't seen late stage DI

#

kekw

tender shard
tardy delta
#

weird

tender shard
#

thanks copilot

#

that's exactly what I want

river oracle
#

I hate copilot

#

idk how people use it lol

tender shard
#

it kinda became worse over time

eternal oxide
#

or, you got better but it stayed the same

river oracle
#

probably worse over time

#

AI is getting dumber

#

well somewhat dumber

#

I wouldn't be surprised if the training set is so poluted its damaging the actual output at this point

tardy delta
#

well people write code with ai, and its feeding on it

#

||and then you have rad who writes awful rust code||

tardy delta
#

dont think c cares about dependency injection frameworks

#

so neither do i in kotlin

gleaming grove
# tardy delta weird

DI container it's just more efficient when you project is growing and you want to keep DI principals

  public void withDIContaner() {
        var container = Dependance.newContainer()
                .registerSingleton(A.class)
                .registerSingleton(B.class)
                .registerSingleton(C.class)
                .registerSingleton(D.class)
                .build();


        //Creating instance
        A instance = container.find(A.class);
    }

    public void withoutContainer() {

        //Creating instance
        D d = new D();
        C c = new C(d);
        B b = new B(c);
        A instance = new A(b);
    }

tardy delta
#

now you have no clue about the data streams between components

gleaming grove
#

well, it's not canceling the data streams architecture

grim ice
#

is EntityDamageByEntity safe for all usages?

#

meaning, does this trigger for every entity getting damaged by another entity?

#

including bows and such

river oracle
#

it should work for every case of an entity damaging an entity