#help-development

1 messages · Page 206 of 1

brave sparrow
#

You need to supply way more information than just “it’s not working”

#

Nobody can help you with that

remote swallow
#

?notworking

undone axleBOT
#

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

timid berry
#

using intelkij and doing maven install
i get this error

Could not transfer artifact com.jolbox:bonecp-test-commons:pom:0.8.0.RELEASE from/to maven-default-http-blocker (http://0.0.0.0/): Blocked mirror for repositories: [spring-milestone (http://s3.amazonaws.com/maven.springframework.org/milestone, default, releases+snapshots), jboss-public-repository-group (http://repository.jboss.org/nexus/content/groups/public, default, releases+snapshots)]
brave sparrow
#

And now we can help you

#

The issue is that repo being http

timid berry
#

breh

brave sparrow
#

You have to force new versions of maven to accept http repos

#

Since they’re insecure

glad prawn
#

brah

brave sparrow
timid berry
#

bruh im not even sure of this option is the right way to turn all my files into a jar

#

how do i turn

#

these files

#

into a jar

#

that can be used

#

as a plugin

#

on my minecraft server?

remote swallow
#

whats the plugin and what version will it not work on

glad prawn
#

Your name

jagged monolith
timid berry
#

yes but how

#

i got both

#

installed

#

and none of them make sense

dusty estuary
#

anyone wanna co-op with me on a project, the workload is getting to big for me to handle it (especially when I am busy in real life)

jagged monolith
hybrid spoke
dusty estuary
# hybrid spoke yeah sure. why not blindly contribute to something you dont even know what it is

oh ok... sorry for not giving you info on that...
Its a project that allows players to edit minecraft server files (with perms ofc) in minecraft chat
https://github.com/Hasunemiku2015/MinecraftNano

GitHub

Modifying Minecraft server settings, in Minecraft! - GitHub - Hasunemiku2015/MinecraftNano: Modifying Minecraft server settings, in Minecraft!

glad prawn
#

🗿

timid berry
#

bruh

#

can someone compile this into a jar for me 😭

#

please

#

i cannot

#

for the life of me

#

😭

jagged monolith
timid berry
#

its too confusing

#

😭

jagged monolith
#

How did you make it, if you don't even know how to compile something

hybrid spoke
#

he didnt

jagged monolith
#

That much is clear... Compiling a project is a 5min thing. import > build

sonic goblet
#

Does anybody know if it's possible with WorldEdit's API to get the bounds of a paste after you've already pasted it? I intend to paste the schematic and then scan the blocks it contains and modify them as I need to but I can't find a way to get the area of the paste.

honest echo
#

why there is a space here ?

honest echo
jagged monolith
sonic goblet
honest echo
#

thats why am asking

jagged monolith
#

Whatever plugin you use for it is obviously adding a space.

solemn meteor
#

Hey! I'm getting an error when I try and open an existing repo from a friend, he doesn't know how to resolve the issue, can anyone help?

The error:
Could not find artifact org.spigotmc:spigot:jar:remapped-mojang:1.19-R0.1-SNAPSHOT in spigotmc-repo (https://hub.spigotmc.org/nexus/content/repositories/snapshots/)

#

I installed the NMS folder in C:\Program Files\NMS

#

if that is relevant information

eternal oxide
#

there is no such thing as an NMS folder. Run BuildTools with the --remapped switch

solemn meteor
#

I moved BuildTools to the folder and ran it there

#

will try with --remapped

#

it still extracted a maven, should I be worried

#

error no longer happens with --remapped, so my friend is dumb for not including --remapped

#

thanks!

quaint mantle
#

Yo guys, Can I show the minecraft's item on tab completer? like below pic

primal lake
quaint mantle
#

Materials.values();

#

I think this is the answer

primal lake
#

Yes

#
for (Material material : Materials.values()){
    list.add(material.name());
}
return list;```
#

Use that in your tab completer 🙂

hybrid spoke
#

no

#

dont

#

you dont want to iterate everytime over 400+ or something materials and basically throw away the result

fluid river
#
public List<String> materials = Arrays.stream(Materials.values()).map(Material::name).toList();```
grim ice
#

im so bored

#

anyone has a cool project i can contribute to?

#

something actually useful tho

chrome beacon
#

Oraxen

#

It's code base is a mess

#

I did a slight cleanup once but it still needs work

quaint mantle
#

Oraxen is a good plugin

hybrid spoke
grim ice
#

💀

#

baritone as a spigot plugin

rustic pecan
#
       if (block.getBlockData() instanceof Sapling) {
            Sapling sapling = (Sapling) block.getBlockData();
            sapling.setStage(sapling.getMaximumStage());
            block.setBlockData(sapling);
            block.getState().update();

        }

Hello everyone, I'm trying to grow a tree, unfortunately without success yet. Have I overlooked something?

Thanks for the help 😄

eternal night
#

a sapling being max stage does not mean it grows instanly

patent fox
#

where can i download protocol lib 1.19?

eternal night
#

basically the next time the tree would advance a stage, it would grow

eternal night
#

yea

rustic pecan
eternal night
#

the API has generateTree methods on the World interface

crimson terrace
#

anyone know a good GUI api? implementing it myself is getting sorta a clusterfuck

rustic pecan
brazen surge
#

So nobody answer me, I will ask again (ping at answer)
how to do lay at 1.12.2? (I found only sit, but hypixel developers do lay at 1.8.9 and I want to know how)

eternal night
#

you "lay" by forcing the player into a sleeping position

#

how exactly that works in a legacy version like 1.12.2

#

kinda good luck to you

patent fox
#

how can i make an npc with ai?

#

when i extend server players there is no register goals

eternal oxide
#

Players don't have AI

river oracle
#

Factssss

#

Idk why that's surprising

#

👻 boooo If no ai how the players moveeeee

slow snow
#

How could I avoid triggering the EntityDamageByEntityEvent, if there wasn't any damage done, like when you are in a WorldGuard PvP disabled zone?

eternal oxide
#

You don;t trigger it so you can;t prevent it being triggered

#

all you can do is cancel it

slow snow
#

I mean in my plugin

#

I check for EntityDamageByEntityEvent in my plugin, but dont want it to trigger if there is, for an example worlguard no pvp zone

eternal oxide
#

again, YOU can't prevent it being triggered because YOU don;t raise it

#

its always going to trigger. You need to ignore/cancel it if it's in a WG zone

slow snow
#

ok yeah thats what i meant, i want it to cancel if ther is a wg zone, or if there is no damage done

eternal oxide
#

if WG has a flag for no PVP then it should already be canceling the event. you shoudl listen to the event later than WG

slow snow
#

i gave wg flags just for an example, is there a way to cancel the event if there was no damage done?

#

in any scenario

eternal oxide
#

No, too many variables

#

You can't account for what other plugins do

river oracle
#

Easiest way would be to do server patches but you could also use other mixin methods best of luck with this

vast raven
#

Wich could be an event that is called when a TNT gets primed by redston, such as by a redstone block?

eternal night
#

on spigot i believe you only get the spawn event of the tnt

vast raven
eternal night
#

EntitySpawnEvent is not called ??

#

I have my doubts

tardy delta
#

acf weird, i do /vanish e and it says that player is already vanished :/ and its talking bout me

eternal night
#

that event is very deeply nested in the spawning logic, the primted tnt would trigger it

rustic pecan
#

Hello everyone, I have a small question regarding sugar cane, I can grow wheat and other crops without any problems, but with sugar cane and melons the whole thing does not work. Do I have to pay attention to anything special there?

tardy delta
#

is there a way to print all pdc entries of a player without knowing the datatype of eeach?

eternal oxide
#

yes

#

you can get them by plugin

#

actually nto sure about printing them

#

you can get the keys

slow snow
eternal oxide
#
        for (NamespacedKey keys : container.getKeys()) {
            if (!triggers.contains(keys.getKey()) && keys.getNamespace().equalsIgnoreCase(plugin.getName())) {
                plugin.getLogger().warning(String.format("Unknown trigger removed! %s.", keys.getKey()));
                container.remove(keys);
            }
        }```Somethign I did to remove old data
#

reading the actual data may be difficult

#

I did see code on here a while back about cloning a PDC.

tardy delta
#

i probably have to keep track of my namespacedkeys (as i only want to see entries my plugin added) thro a map<NameSpacedKey, PersistentDataType<?,?>> ig

eternal night
#

What exactly is the goal ?

vital sandal
#

is it possible to open a book and quill gui ?

tardy delta
#

its more for debugging purposes to see the whole pdc actually

tardy delta
#

i know /data get entity <player> exists but sometimes that prints like 50 lines and it difficult to read

dim bronze
#

so no, i don't think it is

vital sandal
#

so how about open it with packet ?

dim bronze
#

the server never sends the player a packet to open a book and quill because its handled client side

vital sandal
#

i assume we put it in main hand and open it

dim bronze
#

so there wouldn't be a packet for it

#

did a quick search of wiki.vg and open book packet is only for written books, and the open screen packet is only for inventories

#

is server bound, so the server can't tell the client to do it

hazy parrot
#

That is what I used

quaint mantle
#

[WorldEdit API] I'm making: After checking the blocks in the schematic, if there is no block in that location (In real minecraft), the block in the same Location stored in the schematic is pasted.
This is code However, only the type of the block was changed, but the data could not be changed (direction of the attic door, etc.):

public static void func(Location location, File file) {
        ClipboardFormat format = ClipboardFormats.findByFile(file);
        try (ClipboardReader reader = format.getReader(new FileInputStream(file))) {
            Clipboard clipboard = reader.read();
            for (int x = (int) location.getX() - 10; x <= (int) location.getX() + 10; x++) {
                for (int y = (int) location.getX() - 10; y <= (int) location.getY() + 10; y++) {
                    for (int z = (int) location.getZ() - 10; z <= (int) location.getZ() + 10; z++) {
                        BlockState block = clipboard.getBlock(BlockVector3.at(x, y, z));
                        if (block.getBlockType().getId().equals("minecraft:air")) continue;
                        Block toPlace = location.getWorld().getBlockAt(new Location(location.getWorld(), x, y, z));                                     
                        toPlace.setType(Material.valueOf(block.getBlockType().getId().substring(10).toUpperCase()));
                    }
                }
            }
        } catch (IOException ex) {
            ex.printStackTrace();
        }
    }
``` How do I paste everything in a block, including the block's data?
(Also:  I don't want to paste all the blocks at once, but I want them to appear one by one when the player goes within 10 blocks.)
tardy delta
vast raven
#

I'll give another check on EntitySpawnEvent

eternal night
#

EntityAddToWorldEvent is a paper specific event tho

vast raven
#

I'm using a Paper

eternal night
#

if you are on paper there is a better event xD

#

TNTPrimeEvent

vast raven
#

I'll check that too

eternal night
vast raven
#

Check on 1.12.2 javadocs

eternal night
#

1.12.2 KEKW

vocal cloud
#

L

vast raven
#

💀

vast raven
#

so let's get back to EntitySpawnEvent

eternal night
#

Well yea its a legacy version years old now

misty current
remote swallow
#

there is like 200 different levels of wrong in that screenshot

misty current
#

fr

#

registering illegal items is creating so much cursed stuff

#

this is fun

river oracle
#

Lol

idle brook
#

Hey, I created a BungeeCord server today. There are no error messages in the console and the server starts but there is always this error message (read timeout exception null). I set the online mode to false for all subservers and to true for bungee cord. In the config of the bungee cord portforwarding is also activated and also runs. Does anyone know anything about this?

vital sandal
#

anyway to get player input as book and quill ?

tardy delta
echo basalt
#

or does NO_NIGHT_VISION have a 0 on it

idle brook
#

ok

tardy delta
#

uh thats normal, theres a dif between not being vanished and being vanished where the plugin applied nightvision (configurable)

echo basalt
#

I mean on the name itself

#

why does it have a 0

tardy delta
#

uh values dont really matter, what would you suggest?

echo basalt
#

ehh

#

first make an enum

#

you can then call Enum#ordinal

robust sinew
#

(1.19 with remapped NMS) how do I change the direction an arrow is facing?

#

I know I have to use yaw and pitch but idk the method I should use

tardy delta
#

hmm ye would work too ig

#

should be careful with adding another constant in between others

robust sinew
#

how do I get the direction between two locations?

#

actually

#

I'll just google it

echo basalt
#

as in yaw/pitch or just a vector?

robust sinew
#

vector

#

Location1#subtract(Location2).toVector(); is what I found

echo basalt
#

end - start

robust sinew
#

I'm gonna try it now

#

hmmmmm

#

for some reason

#

arrow.teleport(arrow.getLocation().setDirection(arrow.getLocation().subtract(livingEntity.getLocation()).toVector()));

#

doesn't work

#

but I know it runs

#

because the other thing in the same place as it does

#

to set the arrow to not be affected by gravity

#

the arrow just keeps going straight forwards

tardy delta
#

i would say the static final field was better

sterile token
#

For that type of things you must use enums

tardy delta
#

im only using the byte value anyways

#

like always doing pdc.set(key, PersistentDataType.BYTE, State.NOT_VANISHED.flag);

vital sandal
#

is it possible to force a player using an item ?

wary harness
#

is it ok to use InventoryHolder interface

#

for custom gui

#

to check it instead of name

#

or that would be bad approach

echo basalt
#

it's an ok approach

wary harness
echo basalt
#

much better than checking name

robust sinew
#

?paste

undone axleBOT
sterile token
robust sinew
#

can anyone help?

echo basalt
#

The thing with checking name is that it's unreliable. Inventories don't have a UUID

sterile token
#

Yrah

#

Why inv doesnt have uuid

#

They should be uniq

#

For scalability

#

That are those things I dont like from spigot api

#

😂

tardy delta
#

cant you just compare with ==?

sterile token
#

that is for string

#

You should use equals

#

Because equals compare space memory

tardy delta
#

ik what im saying lol

#

== works for Player and World objects too

sterile token
#

Is not a good practice to use it for Objects

echo basalt
#

it has specific scenarios

#

== works because each player is strictly tied to one object

#

Same for each world

vocal cloud
#

UUID is for persistence. Since inventories generally do not persist you don't need a UUID

vital sandal
#

is it possible to force a player using an item ?

sterile token
#

Menú are not persist?

#

I dont think so

#

I have used api for more than 1y and i never had a null player inventory

#

🤔

#

Idk what u refer to

robust sinew
sterile token
#

You are not paying for instant support

#

So you cannot expext fast help

robust sinew
#

I just wanted to bring it back on the screen

#

sorry if it seemed rude or something

tardy delta
tardy delta
#

still need to cast to byte then

#

looks ugly

sterile token
#

Just dont use byte

#

🤦‍♂️

#

Change it to int

#

Lmao why ppl over complicate so much the self

torn badge
#

Anyone have an idea why cancelling BlockBreakEvent and setting setDropItems to false still drops a seed with this code?
Ageable blockData = ((Ageable) block.getBlockData()); blockData.setAge(0); block.setBlockData(blockData);

#

I wanna replant harvested wheat, that works, but sometimes it just drops an additional seed

#

I figured out that it doesn't drop that seed when I don't cancel BlockBreakEvent

sterile token
#

What?

#

You have make night mare

#

I dont even know what you want to cancel harcesting or break ing blocks?

torn badge
#

I need to cancel BlockBreakEvent, because otherwise the new block I plant just gets broken

#

But somehow when I cancel it a seed is dropped

eternal oxide
#

then don;t cancel it and plant a new wheat 1 tick later

torn badge
#

Yeah that's what I'm doing now

#

Just wanted to figure out why that's happening

#

I guess it somehow drops the existing block when replacing it

#

Well still sometimes dropping an additional seed

sterile token
#

That you cant disable it

#

If im not wrong

eternal oxide
#

wheat when harvested can drop 1-2 seeds

torn badge
#

Yeah but it drops twice

#

And the second drop is not registered in Block#getDrops

eternal oxide
#

My guess (as you've shown very little code) is you are not delaying the replacement and you are breaking the block while you are still in the break event

torn badge
#

No I am delaying it

eternal oxide
#

the code you showed above would not work delayed

#

when that code runs it's not going to be a block of wheat

#

it's already broken

torn badge
#

That's why I save the type

#

That's why it's called originalType

eternal oxide
#

ah

torn badge
#

It does set it, otherwise it would throw an error

atomic swift
#

is there a way to create a whole new gui menu

sterile token
#

?di

undone axleBOT
sterile token
#

Please!!

torn badge
#

But I don't know where this additional seed is coming from

sterile token
#

?ask

undone axleBOT
#

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

torn badge
sterile token
#

I dont like static getters for instance

fringe tusk
#

so is there a way to get a player head using textures from a url

sterile token
#

I mean that why the concept of di came

hazy parrot
#

not really

eternal oxide
#

getInstance is fine there as the plugin is a singelton

sterile token
#

I mean only for plugins

hazy parrot
#

and he did it for main class of his plugin

sterile token
#

But for java general its not okay

hazy parrot
#

it is for singleton classes lol

torn badge
#

The mix does it

sterile token
#

You must use di for projects

#

And singleton only for libraries

torn badge
#

What?

eternal oxide
#

wrong

#

First there is no "Must".

#

di is recomended but not a rule for anything

torn badge
#

You don't need to DI singletons, because there is only 1 instance of them

eternal oxide
#

^

sterile token
#

My programming teacher told me that we must use di for everything except libraries

eternal oxide
#

Yes, your teacher told you

sterile token
#

And i agree with him because he has study for that

tardy delta
#

my programming teacher tells stuff and i dont care lol

eternal oxide
#

Teachers are often wrong.

#

They teach from whatever book they are told to use

sterile token
#

I mean that why they are teacher they would told smth wrong if not they would have their título

hazy parrot
# sterile token I mean that why they are teacher they would told smth wrong if not they would ha...

In software engineering, the singleton pattern is a software design pattern that restricts the instantiation of a class to a singular instance. One of the well-known "Gang of Four" design patterns, which describe how to solve recurring problems in object-oriented software, the pattern is useful when exactly one object is needed to coordinate act...

eternal oxide
#

Those who can do, those who can't teach.

fringe tusk
#

so i've used this code to get a player head using textures from a url butit kept giving a player head with the default skins

public ItemStack getSkull(String url) {
        ItemStack head = new ItemStack(Material.PLAYER_HEAD);
        if(url.isEmpty()) return head;
        
        SkullMeta headMeta = (SkullMeta) head.getItemMeta();
        GameProfile profile = new GameProfile(UUID.randomUUID(), null);
        byte[] encodedData = Base64.getEncoder().encode(String.format("{textures:{SKIN:{url:\"%s\"}}}", url).getBytes());
        profile.getProperties().put("textures", new Property("textures", new String(encodedData)));
        Field profileField = null;
        try {
            profileField = headMeta.getClass().getDeclaredField("profile");
            profileField.setAccessible(true);
            profileField.set(headMeta, profile);
        } catch (NoSuchFieldException | IllegalArgumentException | IllegalAccessException e1) {
            e1.printStackTrace();
        }
        head.setItemMeta(headMeta);
        return head;
    }```
torn badge
#

Another thing, it's not happening when I'm debugging

#

So when the debugger pauses execution and I resume it

#

Really weird

hybrid spoke
#

the singleton pattern is awful and you should always choose DI over singelton where you can

hazy parrot
#

why ?

torn badge
#

Singletons are not awful by design, even the Minecraft Client class is a singleton

hybrid spoke
#

there are plenty of reasons and a major one is testing

hazy parrot
#

can you elaborate

hybrid spoke
hazy parrot
#

you still didn't explain anything

crimson terrace
#

a singleton which is accessible by static can easily be tested. not sure what you mean.

hazy parrot
#

im also not sure how they are not flexible

crimson terrace
#

the flexible part I do agree on

#

at least to a certain degree

hybrid spoke
#

singletons are static constants. how would you mock them?

torn badge
#

Why would you mock the plugin instance?

hybrid spoke
#

who is talking about the plugin instance

crimson terrace
hybrid spoke
#

no we do not. not everything is about minecraft

hybrid spoke
#

i mean if you singleton a string, sure you can test its content

#

but why would you singleton a string

torn badge
#

There are also pendants to plugin instances in general programming

crimson terrace
#

you can singleton a logger too

torn badge
#

For example the Minecraft class in the client, check its implementation

crimson terrace
#

you can singleton something that does other things. those things are testable too...

hybrid spoke
#

singletons are only useful for stuff that doesnt change, like loggers as you are right on

torn badge
hybrid spoke
torn badge
#

Nobody said you should singleton everything

crimson terrace
#

the whole idea of singletons is that there is only one instance of it, right? changing things about that singleton would carry over to all other uses too

#

so using singletons for stuff that changes makes sense, right

hybrid spoke
#

not really

crimson terrace
#

di is basically singleton city without making everything a forced singleton

hybrid spoke
#

you just described encapsulation pretty much

#

changing the internals without the interface

#

a change without notice

#

that has not much todo with the singleton pattern

torn badge
#

That's not what encapsulation is

hybrid spoke
#

except that its a static encapsulation which is totally garbage

echo basalt
#

static encapsulation != singleton

#

Singleton strictly enforces a one instance policy

crimson terrace
#

static singleton is pretty bad, agreed. but im talking about the idea of the singleton not the singleton pattern

hybrid spoke
echo basalt
#

While static encapsulation is just a static getter/setter with no one instance restrictions

echo basalt
#

Now, a non-static singleton seems a bit... off

#

Because it's impossible to tell whether the object is already set or not if we can just create another instance of the underlying class

#

What you want is a weird final object

hybrid spoke
#

never said that

echo basalt
#

talking about shreb here

hybrid spoke
#

ah

solemn meteor
#

im new to spigot thing, and i think this is a stupid question

#

but lets say i have 1.19 installed in buildtools

#

can i install a different version on the same folder?

eternal night
#

yea, just re-run build tools with the proper rev

#

I mean, don't run the server in the folder you run build tools in

#

if that is what you are asking eyes_zoom

solemn meteor
eternal night
#

yea you'd get a proper output jar

#

build tools should properly reset everything

solemn meteor
#

alright nice

#

thanks!

worldly ingot
#

Doesn't even reset. Just creates a new folder in the work dir and updates the Bukkit, CraftBukkit, and Spigot dirs to the correct revision

#

First build will take a while, subsequent builds of the same version should be much quicker

vital sandal
#

InventoryOpenEvent cannot be triggered asynchronously from another thread.

#

... :l

chrome beacon
#

Yeah don't open inventories async

atomic swift
#

can you create a whole new gui container using the api

lofty plank
#

player.sendBlockChange(location, blockData);
Does anyone know when using that above, how to have the blockData be a skull with a specific skin?
Atm I am using material.createBlockData()
And can only get a default player head

chrome beacon
#

Create the block data then get skull from the blockdata (by casting it) and then set the skull owner

lofty plank
#

I've tried that it does not work

chrome beacon
#

Show your code

#

?paste

undone axleBOT
lofty plank
#

I've deleted it now I'll re-write what I had

worldly ingot
#

There's actually no support for that

#

At least to my understanding

lofty plank
#

Yeah I didn't think so

worldly ingot
lofty plank
#

I am trying to send a PacketPlayOutTileEntityData

#

But I cant figure that bit out

chrome beacon
#

Forgot about that

chrome beacon
ancient plank
#

packets give me a headache

chrome beacon
#

They're not that bad to work with

static hollow
#

Is it possible to color player's name in scoreboard, but not in tablist? I'm using bukkit api for scoreboards (teams, objectives)
I've tried team.color(NamedTextColor.AQUA);, but it is coloring nick in tablist too.

chrome beacon
ancient plank
#

I tried doing some simple removing and adding back an entity on distance for a player but I could never figure it out, didn't really try that hard bc I eventually updated to use spigot's draft api for hiding and showing entities to a player

chrome beacon
#

Entity tracking is a pain

static hollow
chrome beacon
#

You're going to have to mess with packets to prevent it from showing in the tablist

#

It's not worth it and will cause flickering

static hollow
#

Okay, thanks.

worldly ingot
#

you might be able to override it with Player#setPlayerListName()

#

I'm not sure which one takes priority

static hollow
#

hm, okay, i'll try it

chrome beacon
#

but yeah give it a try

static hollow
#

Oh, hmm, do you think that TAB will override it?

chrome beacon
#

TAB could override it

lofty plank
static hollow
#

because i don't use it now, because i'm testing my plugin

#

Okay, thanks

#

yea, setplayerlistname works

worldly ingot
static hollow
#

thanks :)

chrome beacon
worldly ingot
#

Yeah that would maybe partially remedy it

lofty plank
#

It shouldnt give too weird a collission will it as you can walk over skulls?

#

Oh I guess yeah

worldly ingot
#

Ye if you're standing on it you're going to be raised up, but the clients that can't see them won't be raised up

lofty plank
#

yup

worldly ingot
#

You could try it. The server might just shrug it off

#

It's only like .35 pixels

atomic swift
#

can you create a whole new gui container using the api

opal juniper
#

it has to look like a chest / furnace / anvil etc

#

u need mods to actually make inventories

atomic swift
#

well not necessarily

#

can't u just modify the client jar

chrome beacon
#

Which is a mod

opal juniper
#

"modify" "mods"

#

lol

atomic swift
#

ded

#

can I make a slot hidden

chrome beacon
#

You can use a resourcepack

atomic swift
#

ik but can I make it hidden

chrome beacon
#

Vanilla shaders

#

and a texture

opal juniper
#

it seems like you are looking for a specific answer

atomic swift
#

yes

#

I just want the slot to be hidden

#

so nothing can happen to it

#

like you can't attempt to put an item in it

opal juniper
#

Use event listeners to not allow interactions on that slot

chrome beacon
#

That's impossible. The best you can do is hide the slot

opal juniper
#

and yea ^

atomic swift
#

ik

sacred prairie
#

Hi, im trying to spawn an invisible, named armorstand for a player. This spawnes the armor stand but he is not invisible and named

chrome beacon
#

You need to send the entity meta

#

It's another packet

sacred prairie
#

ye ok

#

thanks ill try that out

#

but what should i use as params

chrome beacon
#

The data watcher of your entity

sacred prairie
#

cuz i need an integer, and a boolean, the data watcher you can easily get by entityArmorStand.getDataWatcher()

chrome beacon
#

The int is probably the entity id

sacred prairie
#

hmm ye

chrome beacon
#

as for the boolean look it up on wiki vg

sacred prairie
#

makes sense

#

i think i should put in true

chrome beacon
#

I'm not sure why you're using unmapped nms

#

It's much easier to use mappings

sacred prairie
#

ye

#

true but im to lazy to install it and change everything

#

ok, thanks workes

gloomy scarab
#

Hello is there a way to add a new library to the libraries folder that will be loaded?

trim lake
#

How is InventoryInteractEvent? Im not getting anything if I do something in Inventory. why? ```@EventHandler
public void onInventoryInteract (InventoryInteractEvent event) {
Player player = (Player) event.getWhoClicked();

    Main.console.sendMessage("inventory interact");
    player.sendMessage("Interact event");
    player.sendMessage("Results: " + event.getResult());
}```
crimson terrace
#

did you register the event?

trim lake
#

yep, other events from that file works

river oracle
trim lake
#

I tired and that code is there. So idk if I did something from or mby I dont understand when the event is called? 😄 idk

sacred prairie
#

i think its the InventoryClickEvent

trim lake
#

Thats looks like a different event than InventoryInteract or am I wrong?

eternal oxide
#

InventoryInteractEvent is an abstract class. It can;t be listened to.

sacred prairie
#

yep

sacred prairie
trim lake
#

Than my bad. Thanks! Im pretty new in java.

sacred prairie
#

np

tardy flame
#

Can I get autograph?

#

Pls pls pls

static hollow
#

🤨

static hollow
#

oh, it's you xd

wary harness
static hollow
#

hah

#

i was recording 2-3 years ago

#

it was very cringe content xd

#

so kids were watching

wary harness
#

oh lol

#

I feel you man

river oracle
#

Feels bad

static hollow
#

it is possible to change displayname to just name on scoreboard?

#

Like... When i added vault, it has prefix now

tardy delta
#

if i did this to a fileconfiguration object FileConfiguration#getDefaults shouldnt return null right?

#

well actually ig reloading it removes the defaults

fluid river
#

why don't you just use default bukkit methods

#

for saving and reloading

lavish flare
#

Hello I am working on plugin that creates fake player and I need listen for packets that are coming to that player, is this even possible? I am getting error NoSuchElementException: packet_handler when try add listener to it

echo basalt
#

you can't really listen to packets that are coming from a fake player

#

because it has no connection

#

Its behavior is emulated

lavish flare
#

I tried before make connection via mcprotocollib but turned out it will not connect to forge server

#

I am a little pissed rn

#

Did anyone try this? I mean connect to forge server

lavish flare
#

Thing is I am working on plugin for hybrid server

echo basalt
#

something tells me you're trying to make a plugin that acts as a client for another server

#

either that or you're trying to send packets to fake emulated players which makes no sense

lavish flare
#

plugin that allows use minecraft chat from discord

#

I succeded actually, but only if there are no client-side mods on server

remote swallow
#

so discordsrv?

lavish flare
#

idk what that is

remote swallow
lavish flare
#

Ah yeah

#

I have this site as readed so probably didnt worked for some purpose

#

Well, something like that is simple

#

I am trying to achieve something like chatcraft

golden turret
#

is there a way to read a file using plain javascript?

tardy delta
fluid river
#

and?

vast raven
#

Hi, so basically I need to check when a TNT gets powered, I'm using paper, there is TNTPrimedEvent, but I'm in legacy (1.12.2) so I can't use it

#

How to check it then?

fluid river
#

EntityPrimeEvent?

vast raven
#

And casting the entity to tntprimed, and getting the source of the explosion would return the redstone block (for example)?

vast raven
#

it's debug time

fluid river
#

@tardy delta

tardy delta
#

and?

vast raven
#

the problem is that I need to check if the original TNT block is in a list

#

so I need to get the source block before the TNT becomes an actual TNTPrimed

fluid river
#
public FileConfiguration getConfig() {
    if (newConfig == null) reloadConfig();
    return newConfig;
}

public void reloadConfig() {
    newConfig = YamlConfiguration.loadConfiguration(configFile);
    final InputStream defConfigStream = getResource("config.yml");
    if (defConfigStream == null) return;
        newConfig.setDefaults(YamlConfiguration.loadConfiguration(new InputStreamReader(defConfigStream, Charsets.UTF_8)));
}

public void saveConfig() {
    try {
        getConfig().save(configFile);
    } catch (IOException ex) {
        logger.log(Level.SEVERE, "Could not save config to " + configFile, ex);
    }
}

public void saveDefaultConfig() {
    if (!configFile.exists()) saveResource("config.yml", false);
}
tardy delta
#

ik the def impl

#

well

fluid river
#

well just reproduce it for anything else than "config.yml"

tardy delta
#

thats what im currently doing

vast raven
tardy delta
fluid river
vast raven
fluid river
tardy delta
#

do i need to close an inputstreamreader lol?

vast raven
# fluid river

I need to get an event called when the TNTPrimed spawns

crimson terrace
fluid river
#

i guess it's placed in the stack memory

vast raven
#

EntitySpawnEvent doesn't get fired with TNTPrimed

fluid river
#

so gets auto-closed with method end

vast raven
#

EntityAddToWorldEvent does but you can't cancel it

tardy delta
#

no clue

vast raven
#

Removing the entity creates a visual bug

tardy delta
#

as long as it doesnt break its fine

fluid river
vast raven
crimson terrace
#

scheduled tasks get run at the end of every tick, right?

#

maybe thats enough so you can schedule the task for the same tick

grim ice
#

does anybody have a clue on how to obfuscate gradle projects

fluid river
#

and like half of the tick is on "waiting state"

#

after everything is done

tardy delta
#

this should work

fluid river
#

it's so cold

#

that i can't smoke on a balcony

grim ice
#

lol

fluid river
#

i'm currently in like 2 layers

#

it's not even winter

#

mother russia wtf

tardy delta
#

imagine smoking

echo basalt
#

smoking just feels like a deranged activity to me

#

so is drinking

remote swallow
tender shard
#

smoking is very healthy

echo basalt
#

I smell cap

vocal cloud
#

Smoke and drink for extra hospital visits later in life

fluid river
#

deanoning myself with shitty camera

#

i feel like i'm 16

#

after i shaved

echo basalt
#

I'm always 5 years younger when I shave

fluid river
#

i still need passport for like every action

#

my student's card has no influence

echo basalt
#

imagine having a passport lmao

#

I should make one

misty current
#

nms is fun

echo basalt
#

after all I got a sponsored trip to the states in like 8 months

vocal cloud
#

Going to the land of milk and honey kekw

fluid river
#

how

echo basalt
#

I got an ID

fluid river
#

where

echo basalt
#

And that's all

fluid river
#

is it some european thing?

echo basalt
#

Yeah

fluid river
#

one sec

echo basalt
#

I can travel within europe with just my ID

#

Well

#

In theory I have an expired passport I last used 10 years ago

fluid river
#

is it like a card

vocal cloud
#

America gonna irradiate you with scanners

fluid river
#

which i sent

echo basalt
fluid river
#

well in russia we don't have this

#

sadly(or not)

echo basalt
#

except I'm not from slovenia

echo basalt
#

I've tripped the metal detector in ukraine once

#

I was like... 7?

#

security guard patted me down extra hard

vocal cloud
#

They put me a big box once cause they didn't trust me or something

echo basalt
#

I can imagine the mfs being like

vocal cloud
#

Hahahah machine go brrr

echo basalt
#

"Why are you here?"

#

and I'm just like

#

"Well... my employer sponsored this trip"

vocal cloud
#

"are you here for work"

#

"no"

echo basalt
#

"no"

vocal cloud
echo basalt
#

like

#

it's weird

#

I'll work on a project and once I'm done with the project

#

I'm being flown to the states to just meet the team and hang out

vocal cloud
#

Victory beer

echo basalt
#

I don't think I can legally drink in the states

vocal cloud
#

Gotta be 21

echo basalt
#

here in europe you can be 14 and just go to a supermarket and no one gives a shit

fluid river
#

imlusion since you unblocked me i guess

#

can you help me

echo basalt
#

I've seen cashiers ask for ID to buy a red bull but not a beer

echo basalt
#

this is proof

fluid river
#

😭

vocal cloud
#

Rekt

fluid river
#

freejavalessons

echo basalt
#

if you know so much about java, help yourself

fluid river
#

it's connected to discord

#

not java

echo basalt
#

I mean...

#

what could you possibly need within discord

fluid river
#

can you remove this message plz

echo basalt
#

there are java apis for it

#

no

fluid river
#

it's literally in the middle of my topic

#

between some parts of code

#

also

#

you should feel owwww after this

echo basalt
#

bold of you to assume I feel anything

fluid river
#

i'm brave

echo basalt
#

I literally dream about cold blooded murder every night

glad prawn
#

xd

echo basalt
#

so do I*

fluid river
#

died

glad prawn
#

💀

fluid river
#

i literally changed from so do i to so i do

#

and then started recalling all my english classes

echo basalt
#

🤦

grim ice
#

@echo basalt lmao ur friends with rehold

echo basalt
#

who

#

oh that guy

lilac dagger
#

hey guys, which name would you guys give to a class that adds players to a game?

echo basalt
#

I ended up ghosting him because I was low on time

#

lemme... remove him

lilac dagger
#

game display is a bit mismatched in my opinion

echo basalt
#

GameDisplayManager

lilac dagger
#

but it doesn't manage game displays

echo basalt
#

GameManager?

lilac dagger
#

that's something else

flint coyote
#

GameManager / GameManagement, ye

lilac dagger
#

it doesn't que players

#

it simply adds

#

i am thinking at PlayProvider

#

PlayHelper

flint coyote
#

Would also add the starting and more things about the game to that class

echo basalt
#

ehh that structure is a bit eh..

grim ice
#

GameHosting / GameHost

lilac dagger
#

hosting is a good one

grim ice
#

i dont like ending classes with "Manager"

#

its pretty lazy

flint coyote
#

That's the whole point. Programmers are lazy

lilac dagger
#

usually a manager is mangled with a lot of stuff

#

other than the scope it is intended for

flint coyote
#

And everyone knows what a "xyzmanager" is used for

lilac dagger
#

i also like PlayFacade

flint coyote
fluid river
grim ice
#

it isnt a helper

fluid river
flint coyote
#

I mean I won't complain if someone doesn't use "manager". But at the end it seems very clear to me what UserManager/PlayerManager/SessionManager etc. are supposed to do

fluid river
#

with GameManger you would add Player to Game

grim ice
#

I wouldnt name it game manager eitherway

fluid river
#

Don't think Game.add(Player) would do better

sacred mountain
#

whats the best way to spawn anvils so that the player won't lag

grim ice
#

I would have it named a UserManager

#

it doesnt manage the game, it manages the users

sacred mountain
#

i'm assumning as entities and not blocks since that would update the lighting iirc

fluid river
#

FallingBlock is an entity

lilac dagger
sacred mountain
lilac dagger
fluid river
#

so if you just set blockdata to Material.ANVIL.createBlockData()

lilac dagger
#

i have a playlist inside game manager

fluid river
#

it's gonna work fast

lilac dagger
#

which handles the games

#

it only exposes GameDisplays

sacred mountain
#

is it not better to spawn an entity instead of a block since the client will have to render the changes when it's not a fallingblock entity

tranquil prairie
#

?paste

undone axleBOT
tranquil prairie
#

Hey I am creating a scoreboard and for some reason I cant see some of the lines/scores

#

I can see time1,time2, and time3

worldly ingot
#

Can anybody see the scoreboard? Player#setScoreboard()

tranquil prairie
#

yes I can see the scoreboard perfectly fine

worldly ingot
#

Oh just specific lines

tranquil prairie
worldly ingot
#

blank and blank1 are identical for one. They need to be different lengths

#

" " & " "

tranquil prairie
#

alright I didnt notice that I can see it but the times one arent identical so

#

its weird that only those are the ones not showing

worldly ingot
#

Yeah. I'm not sure what about those scores in particular would result in them not showing up

tranquil prairie
worldly ingot
#

Could be that scoreboards treat 0-9 as the same char for some inexplicable reason

sacred mountain
#

any screenshots? i worked with scoreboards for a bit

echo basalt
#

funny how during the past 5-6 years I never messed with scoreboards

valid basin
#

Does someone have a good util for making hollow spheres?

#

like circles ykwim

echo basalt
#

it's just a bunch of trig

river oracle
#

god I fucking hate trig

#

but damn is it so useful

pallid oxide
lilac dagger
#

@pallid oxide yea 😄

#

it'll take a little longer but it's gonna be here soon

manic furnace
#

How do I convert an nms-world back to an bukkit-world?

lilac dagger
#

getBukkitWorld i think

#

or getCraftWorld

#

not sure which one exactly

pallid oxide
lilac dagger
#

kinda @pallid oxide

sterile token
pallid oxide
# lilac dagger kinda <@198099414089203717>

good suggestion, ability to add skins to weapons without copying whole weapon:3 hehe
I had this system where i had to dig really deep so i could add my own skinsModels: stringlist to guns.yml
so it would automaticly create Gun object to the skin:D

sterile token
#

I leave it there, if someone want to use it or improvee it

pallid oxide
#

File could be created when the object is created and u could get the name from the file

sterile token
pallid oxide
#

oki 2s

sterile token
#

In the case of using that utility class i created once its initialized the file is loaded

echo basalt
#

it's not that big of a plugin honestly

sterile token
echo basalt
#

because I write big plugins for a living

pallid oxide
#

but

sterile token
#

Would you be interested on working for a +$250 budget plugin?

pallid oxide
#

But plugin like that is big for some people

glad prawn
#

He has more than u xD

echo basalt
#

I think that like 70% of plugins I wrote this year were made for sharding

valid basin
echo basalt
#

setPassenger for legacy shit

undone axleBOT
echo basalt
#

you should just... try all methods suggested by your IDE

sterile token
#

If u still want to get support please move to latest version

#

😂

pallid oxide
#

and depends how u want ur stuff to work (the file part)

valid basin
#

but unfortunately my players like 1.8.8

sterile token
#

I tried removing the boolean out

#

But then its get fuck

#

Because its try to get the parent which is null, so then you have issues

pallid oxide
#

i mean why is your boolean capital case, what happens if u type new FileHandler(plugin,name,null)?
do you have use case for it or a reason?
Boolean can be null, boolean cant

sterile token
#

Good aproach i would change that

#

👍

#

I seen you bunch of experience

pallid oxide
#

:) thanks

sterile token
#

Zoltus

pallid oxide
#

yes?

sterile token
#

I can dm some personal questions?

pallid oxide
#

yes

sterile token
#

ok

#

If you dont care

pastel relic
#

How do I open a book for a player so it shows up on their screen but it doesn't give them the book in their inventory?

wide ember
#

Every time I try to set the display name of an item via item meta, I end up with this error: Incompatible types. Found: 'void', required: 'org.bukkit.inventory.meta.ItemMeta'
Code:
public ItemMeta Beermeta = BeerDrink.getItemMeta().setDisplayName(ChatColor.GOLD+"Beer"); (all the other code is as it should be and alright, but when I put in the text after the chatcolour, the error always pops up)

ancient plank
#

Think long and hard, what do you think #setDisplayName() returns

pallid oxide
#

setDisplayName does not return anything

#
ItemMeta beerMeta = BeerDrink.getItemMeta();
beerMeta.setDisplayName(ChatColor.GOLD+"Beer");
#

this would work and sry adelemphii for ruining it:D im bored

sterile token
#

Java feeling idiot

#

Telling me that save() will be null

#

🤡

wide ember
sterile token
#

Because tems like void, etc are java bases

pastel relic
#

sorry for the double ping

wide ember
sterile token
#

I ave learnt java 1y ago and i never forgot what was void

quaint mantle
sterile token
#

You are not paying anyone to get instant support

#

Atleast take the time for reading the rules

quaint mantle
#

im not asking for fast responses, im just seeing if anyone knows

sterile token
#

this not the channel tho

quaint mantle
#

well

sterile token
#

Just wait patiently and dont fuck bruh

#

😡

#

I dont like impatient ppl

quaint mantle
#

im not impatient

quaint mantle
sterile token
#

😂

#

So go to your channel and tag there

#

Dont came to disturb into other channels

#

PROGRAMMING tho

quaint mantle
#

ok

sterile token
#

LMAO what amazing society we have created

sterile token
undone axleBOT
sterile token
#

Please send the error you are getting

wide ember
#

K one second

pastel relic
wide ember
#

quite a few

sterile token
# quaint mantle ok

And sorry for being in that actitude i know that i sound rude but im like girls every 28 of each month. I have lot of problems and dont like more problems

wide ember
#

Cannot resolve symbol 'requireNonNull'
Unknown class: 'Beermeta'
Identifier expected
Unexpected token
Invalid method declaration; return type required
Missing method body, or declare abstract
Unknown class: 'ChatColor.GOLD'
',' expected
Identifier expected
'class' or 'interface' expected

#

whoops

quaint mantle
wide ember
river oracle
#

are you coding with notepad++ or sum lol

wide ember
#

intellij

river oracle
#

please learn basics of java or atleast how to utilize an IDE

#

they are great tools you shouldn't bee getting these syntax errors

sterile token
#

Yeah i realize that

#

I think he havent learnt java and dont want to admit it

#

Its really obvious when you dont learnt java and try to code

wet breach
#

or some other dependency that provides those checks

sterile token
wet breach
#

Its the only one I can think of right now because my brain isn't letting me think of the appropriate dependencies

#

so hopefully saying that others here can fill in the blanks 😛

sterile token
#

frostalf

#

Lombok doesnt have anything to do with his errors

wet breach
sterile token
#

I mean lombok is a library for speeding up coding

wet breach
#

annotations library or unit dependency for those checks is what is needed

#

finally my brain lets me think of the word 😛

sterile token
#

lombok does nothing to do with unit dependency

#

😂

wet breach
#

so please stop telling me what I already know

wind blaze
#

Does anyone know how to make armor tank more hits (only like 1 dura every 4 hits from good swords)

sterile token
wet breach
#

duration

wind blaze
#

Lose 1 durability every other hit

sterile token
#

oh ok

wet breach
#

or durability

#

close enough XD

wind blaze
#

Do you know how I could do that

wet breach
#

you would need to listen for the interact events for combat and basically have to keep track of these armor values yourself

#

to then appropriately apply your custom math for it

#

not saying it is easy, but it is doable with the API though 🙂

wind blaze
#

:/

hot panther
#

Hello, I was about to use StringUtils from org.apache.commons.lang.WordUtils, but now I noticed that they are no longer included in the spigot jar.
How can I still use the StringUtils now?

wind blaze
#

Are there no easier ways? Just make Unbreaking enchantment better or smth

wet breach
#

?bootstrap

undone axleBOT
#

Bootstrap Jar
The main spigot-1.18.jar is now a bootstrap jar which contains all libraries. You cannot directly depend on this jar. You should depend on Spigot/Spigot-API/target/spigot-api-1.18-R0.1-SNAPSHOT-shaded.jar, or the entire contents of the bundler directory from your server, or use a dependency manager such as Maven or Gradle to handle this automatically.

Please read the release notes for further information: https://www.spigotmc.org/threads/9-years-of-spigotmc-spigot-bungeecord-1-18-1-18-1-release.534760/#post-4305163

hot panther
sterile token
sterile token
sterile token
# hot panther Thank you!

Na dont worry, i mean my answer wasnt what you were expecting but if you didnt know that then can now have it in care

wind blaze
#

How would I take first (best) key out of linkedhashmap<uuid, integer) after sorting from most to least?t

sacred mountain
#

now my stuff is inaccurate

sterile token
#

LinkedHashMap<UUID, Integer> sorted = originalLinkedHashMap.stream().sorted();
sorted.whatYouNeed()

eternal night
fading spindle
#

I coded something that in theory change the players max health to 5 hearts whenever they join, but for some reason this doesn't seem to work. i put in 10 as the value becaise i thhink it's referring to healthpoints

sterile token
fading spindle
sterile token
fading spindle
#

ok

sterile token
#

It means its not mandatory

#

?listening-events

#

?event-listening

#

?eventlistener

echo basalt
#

10/10 verano as always

#

?events

#

maybe

#

idfk

#

pretty sure that static listeners aren't supported

fading spindle
#

wait my bad i forgot to add @eventhandler

sterile token
echo basalt
#

you sure

sterile token
#

I mean someone told that some months ago that they works but its not recommended

wind blaze
sterile token
wind blaze
#

kk ty

echo basalt
#

actually yeah they seem to work

sterile token
#

I told you hahaha

#

wait spigot uses ASM to execute them?

#

🤡

eternal night
#

no

#

paper does

sterile token
#

oh paper 🤢

#

dont remember that shity toxic comm

eternal night
#

you do realise ASM here is a pretty good deal for you ?

tall dragon
#

i have a question for yall. would you guys use a library that contains everything. think about "command managers, menu system, config system, etc"
which could lead to bloat that you don't actually use in your plugin. or would you go with seperate libraries for each use? meaning you would for example have just a "menu system, config system" and leave anything you do not need out. this would eliminate tying the systems together though

echo basalt
#

I just have a folder with them all in their own package

#

and just copypaste whatever I need

eternal night
#

usually those libraries end up with the same issue as any other jack of all trades

sterile token
echo basalt
#

Unless I have duplicates

tall dragon
echo basalt
#

Then I'd just... make a core plugin

echo basalt
#

but in that case I just bundle them both

tall dragon
echo basalt
#

Example: my menu util needs items, placeholders and colors

sterile token
tall dragon
#

could you show me that library? or is it private

sterile token
#

I never finished it but you can take a look more or less

tall dragon
#

would love that

sterile token
#

i will invite you to the repo

tall dragon
#

looking for inspiration to get it right

sterile token
#

ok

#

i would use this structure

#

library-parent (Default POM)
library-plugin
library-core
library-menu
library-chat
library-etc

tall dragon
#

hmm

#

and library-plugin would then just get all of them i assume

sterile token
#

yes

#

core will include every module

pallid oxide
#

I mean i have never seen a single forum which isnt toxic lol

tall dragon
#

right. that sounds good. cuz right now i have the problem of having alot of stuff shaded in that i do not actually need

sterile token
#

Also there is something but from java 17 for modules

#

I dont know how its called

tall dragon
#

and you shade this library right?

#

or would you make it a seperate plugin