#help-development

1 messages Β· Page 661 of 1

slow socket
#

Hey guys can you help me out

river oracle
#

Based on where the event is called right now the answer is no, this wouldn't be possible to my knowledge

young knoll
#

I assume it’s the same packet for both

river oracle
young knoll
#

I mean

#

You could add NBT to the sign

river oracle
#

I don't agree with that change for an event to work

young knoll
#

Then make users do it

#

Via pdc ofc

river oracle
#

yeah I think I'm not going to do this one. Its not reasonably possible

dense blaze
#

Any good guides on setting up an action bar message for 1.20?

river oracle
#

setting up? wdym by this

sweet sonnet
#

Is it possible to hide death messages only for certain players

young knoll
#

You can remove the standard death message and then send it manually to certain players

stuck flax
#

Can you set an entity's name to a component?

river oracle
#

pray for the components PR to be merged soon

stuck flax
#

If I did use nms, would keybind components be formatted as they're supposed to?

river oracle
#

Bungeechat? if so just serialize it into a string using the craft copmonents than you can just serialize it into the NMS component

young knoll
#

I imagine keybinds work in entity names

#

Pretty sure they are just translatable components

river oracle
#

signs are officially a pain

sweet sonnet
#

is there an event for when a player gets /msg-ed

river oracle
#

?jd-s

undone axleBOT
river oracle
#

yeah looks like you'll have to do what I said above

lavish hemlock
#

I'm having trouble figuring out how to spawn a fake player via ProtocolLib. I don't use NMS since I just don't want to bother with porting the plugin for each minor and major version.

#

The issue at hand is that, while the player info update packet does work (the fake player's name can be tab-completed), the spawn player (i.e. named entity spawn) packet does not do anything.

#

Most of the time I see people recommend just extending the player entity in NMS but, as I said, I'm trying to avoid NMS.

idle sun
#

I am very new to this, so forgive me for my dumb question but how do I check if the item in hand is the custom item it should be? I am trying to develop a plugin in PaperMC
On another note, the text color of the custom item that was set using rgb seems to reset on player rejoining unless I use color coding in the string?

river oracle
idle sun
#

okay thank you πŸ˜“

sterile breach
#

Hey, in order for a plugin message to be sent from the bungee to a spigot server, it must have received a message from that server beforehand, or not necessarily?

I still can't figure out how to specify what player corresponds to in onPluginMessageReceived(String channel, Player player, byte[] bytes)

What player corresponds to (how it is determined) because to send the message I do player.getServer.getInfo.sendmessagedata

So it sends the message to the server and not to the player.

onPluginMessageReceived(String channel, Player player, byte[] bytes)?

simple schooner
#

10 days have passed, and I still have vague understanding of java

burnt current
#

hi, i decompiled a bukkit plugin, fixed a bug with it (hopefully), and now i want to recompile it. but im running into an issue; i dont know how to import the dependencies listed in the plugin's code.

very new to all this but any help would be appreciated, i need to import the following:

/*     */ import dev.sergiferry.playernpc.api.NPC;
/*     */ import dev.sergiferry.playernpc.api.NPCLib;
/*     */ import org.bukkit.Bukkit;
/*     */ import org.bukkit.ChatColor;
/*     */ import org.bukkit.Location;
/*     */ import org.bukkit.Material;
/*     */ import org.bukkit.entity.ExperienceOrb;
/*     */ import org.bukkit.entity.HumanEntity;
/*     */ import org.bukkit.entity.Player;
/*     */ import org.bukkit.inventory.ItemStack;
/*     */ import org.bukkit.plugin.Plugin;

how would i go about this? as of right now i literally only have decompiled .class files to go off of while trying to recompile this plugin.

sterile breach
hushed spindle
#

im trying to save a bunch of custom recipe types to json files and both have itemstacks as their property, but now i dont understand why one recipe type is saving itemstacks like this(img1) while the other one does it properly like this(img2)

the confusing part is that both use the same itemstack type adapter, how could it be producing the first result to begin with? ItemStack{DIAMOND x 1} is obviously not valid json

zealous osprey
#

one is json one is yml?

hushed spindle
#

the type adapter is a ConfigurableSerializable adapter so it basically converts them to yml format

zealous osprey
#

well the first image looks like you just called ItemStack#toString()

hushed spindle
#

i just dont know how it could produce that ItemStack{DIAMOND x 1} bit because thats breaking it all

#

i didnt

#

like i said both use the same adapter

zealous osprey
#

could you provide the code where you save it to file ?paste

#

?paste

undone axleBOT
hushed spindle
zealous osprey
#

then could you also please provide where you added the adapter? I assume in the Valhalla recipes class

hushed spindle
#

thats an interface so no

#

and heres the adapter itself

#

the only difference really between those types of recipes is that the one that goes wrong stores its ingredients like Map<ItemStack, Integer>

zealous osprey
#

sorry, but idk what's the issue.

hushed spindle
#

yeah lol

hybrid spoke
simple schooner
#

should I be worried

hushed spindle
#

no

#

its one of those things that are impossible to master

#

but you can still do pretty alright in the meantime

#

there's just always new things to learn

austere cove
#

at some point things will just click and make sense

#

thats what I have been telling myself anyways /s

simple schooner
#

But It's okay to forget stuff right

zealous osprey
#

It's human to forget sometimes

hybrid spoke
#

you cant keep everything in your head

#

nobody can

#

except autistic people

simple schooner
#

It's very hard to learn when you have adhd

pseudo hazel
#

even they cant

#

there is always a limit

hushed spindle
#

honestly intellij is very nice for me because it constantly reminds of you little improvements you can make

hybrid spoke
#

use your adhd to your advantage

hushed spindle
#

πŸ—Ώ

hushed spindle
zealous osprey
#

You said that it happens, when the itemstack is paired with an int in a map.
Why not set the integer value of the map to the count value of the itemstack and serialize it then?

hushed spindle
#

because i need it to work with amounts higher than the allowed stack size

#

this type of recipe needs to be usable for things like 100 ingots or something

#

the only thing i can think of is that under the hood its calling toString() for map keys

zealous osprey
#

Make an intermediate item that's like "compressed iron ingots" a 3x3 of 64 ingots and use those in your recipes

lost matrix
#

Otherwise keys support primitives/Strings/UUIDs only.

hushed spindle
#

ahhh that makes sense

#

why is that disabled by default to begin with

zealous osprey
#

performance maybe

hushed spindle
#

perfect, thank you so much!

zealous osprey
#

that's neat woth the <> and the striked through

hushed spindle
#

lol

zealous osprey
#

if only it were a pixel higher

hushed spindle
#

i'd probably use like a diamond symbol or some other symbol but i couldnt be fucked

#

grrr yes

#

also i think its disabled by default because otherwise it would format it as a complex object which takes up a couple more lines

hybrid spoke
zealous osprey
hybrid spoke
#

also it doesnt reach till the end

#

awful

zealous osprey
#

eh, I think in this case the <> are a bit too much

sweet sonnet
#

looks weird

zealous osprey
#

ye

hybrid spoke
#

just that the inner text isnt centralized either

zealous osprey
#

it was just a quick and dirty thing I threw together

hybrid spoke
#

im a fan of simple shit

#

f.e. a gray > infront of the text

smoky anchor
#

If only it was possible to reliably center text in MC

zealous osprey
#

"f.e."?

hybrid spoke
#

for example

zealous osprey
#

ahh

hybrid spoke
smoky anchor
#

players can have resourcepacks that change font sizes is what I'm mainly talking about

hybrid spoke
#

thats their problem

pseudo hazel
#

centering text is for babies anyways

#

use titles if you want centered text

hybrid spoke
#

yeah imma add a title to my items lore

#

big boy stuff

quaint mantle
#
                String sql = "SELECT * FROM friendrequests WHERE sender = ?";
                try (Connection connection = HikariCP.getConnection(); PreparedStatement statement = connection.prepareStatement(sql)) {
                    statement.setString(1, sender.getUniqueId().toString());
                    ResultSet resultSet = statement.executeQuery();
                    String receiverDb = resultSet.getString("receiver");
                    if (args[1].equalsIgnoreCase(receiverDb)) {
                        System.out.println(receiverDb);
                    }```,
#

for get variable from db

#

am i use .next method for resultset ?

#

and why ?

#

i can't do only resultSet.getString ?

austere cove
#

next increments the cursor

tender shard
quaint mantle
#

yes

tender shard
#
if (args[1].equalsIgnoreCase(receiverDb)) {
  System.out.println(receiverDb);
}

what is this supposed to do?

quaint mantle
#

if args1 equals name in database do something

ocean hollow
#

Is it possible to somehow get from TranslationComponent what language is translated into? Well, or get the text that will display to the player

tender shard
#

you can get the player's locale using... surprise: Player#getLocale()

#

the text displayed to the user is not possible to get

#

it could be anything

#

also the server doesnt even have the default language packs

ocean hollow
#

how do I use this? My goal is to translate the material into another language, and then from the resulting text, find out what text, and save it to a variable

tender shard
#

getLocale only gives you en_US or similar

ocean hollow
#

I see, if I only need to translate into one language, is it best for me to use some kind of translator?

tender shard
#

Is it only for materials?

ocean hollow
#

materials and entityType

tender shard
#

I have this where you can load the client's translation file ( you gotta upload that to the server from the client's assets) and then it can translate materials, should be easy enough to do it for entitytypes too. https://github.com/JEFF-Media-GbR/JeffLib/blob/master/core/src/main/java/com/jeff_media/jefflib/MaterialUtils.java#L69

it currently still uses a weird way to turn a material name into a translation key but since 1.19.X, there's also getTranslationKey() for both material and entitytypes so you can use that instead of getMinecraftNamespacedName(Material)

GitHub

Avoid writing the same code over and over again - use JeffLib for your Spigot plugins! - JEFF-Media-GbR/JeffLib

ocean hollow
#

Not quite understood, but what file should he insert? Like?:

tender shard
#

yeah that's the one

ocean hollow
#

Okay, thanks πŸ‘

quaint mantle
# tender shard yeah that's the one
            if (args[0].equalsIgnoreCase("accept")) {
                String sql = "SELECT * FROM friendrequests WHERE receiver = ?";
                try (Connection connection = HikariCP.getConnection(); PreparedStatement statement = connection.prepareStatement(sql)) {
                    statement.setString(1, sender.getUniqueId().toString());
                    ResultSet resultSet = statement.executeQuery();


                    while (resultSet.next()) {
                        String receiverDb = resultSet.getString("receiver");
                        String senderDb = resultSet.getString("sender");
                        if (sender.getUniqueId().toString().equalsIgnoreCase(receiverDb)) {
                            ProxiedPlayer playerDb = ProxyServer.getInstance().getPlayer(args[1]);
                            if (senderDb.equalsIgnoreCase(playerDb.getUniqueId().toString())) {
                                System.out.println("worked");
                            }
                        }
                    }```
#

i did this

#

but i have problem

#

if player is offline

#

not working

#

how do i solve this?

#

i store uuid in database

#

so for offline ppls need write uuid

lost matrix
#

Dont use proxied players if you want it to work for offline players...

quaint mantle
#

but i don't wanna this

quaint mantle
#

for get offline player

lost matrix
#

Either use mojangs API or create a table String | UUID for last seen names.
Bungeecord has no OfflinePlayer like spigot.

quaint mantle
#

well mojangs api not work for offline servers ? πŸ˜„

lost matrix
#

Ofc not...

quaint mantle
#

or can i store friend request sender name ?

#

i mean like this

#

brb

lost matrix
#

I would not do that

quaint mantle
#

like this

quaint mantle
lost matrix
#

You will need a Table String | UUID either way because
the user wont input a UUID

peak jetty
#

in my 1.19 server crystals only do 1 heart damage for some reason

pseudo hazel
#

on just spigot?

peak jetty
pseudo hazel
#

?whereami

quaint mantle
quaint mantle
peak jetty
simple schooner
#

but it's not spigot

pseudo hazel
#

yes but we dont know wtf paper is changing, they have a discord too

peak jetty
#

πŸ’€

pseudo hazel
#

and this would be the wrong channel either way

peak jetty
#

no but i use paper on another server as well and crystals are fine

pseudo hazel
#

like I said, it could be some weird config option of paper

#

try there first

zealous osprey
#

did you stand directly ontop of the crystal when you received the damage?

lost matrix
#

Or a random plugin messing with damage

peak jetty
#

i tried removing the plugin jars

echo basalt
tender shard
quaint mantle
tender shard
#

probably because they blocked you

pseudo hazel
#

oof

hybrid spoke
pseudo hazel
#

?

quaint mantle
#

😦

upper hazel
#

Is it safe to upload schematics to the world and also check the place where the structure will be loaded for the presence of a private in an asynchronous thread?

echo basalt
#

Depends

hybrid spoke
echo basalt
#

FAWE supports async pasting but it's also seen as subpar

upper hazel
#

just WG

#

WE

echo basalt
#

Then you gotta paste sync

hybrid spoke
#

then get fawe

#

fawe distributes the paste process other than worldedit

echo basalt
#

well depends

quaint mantle
#

i don't understand am i need uuid in offline server ?
or names is fine ?

upper hazel
#

hm

echo basalt
#

if you do the Operations.complete thing it's still blocking

#

but you can call it in another thread

quaint mantle
simple schooner
#

names can change

quaint mantle
#

i mean non premium minecraft server

hybrid spoke
quaint mantle
echo basalt
quaint mantle
tender shard
echo basalt
#

Which is why he can't react to my messages because I block pirates :)

quaint mantle
upper hazel
#

?paste

undone axleBOT
hybrid spoke
upper hazel
lilac dagger
#

@echo basalt i'm a filthy pirate

echo basalt
#

icky

lilac dagger
#

clean that link

echo basalt
#

bluds using the avast antivirus paste

#

?paste

undone axleBOT
upper hazel
echo basalt
#

icky that you're loading chunks

lilac dagger
upper hazel
#

oh wait

lilac dagger
#

are those hex bytes?

hybrid spoke
#

who says icky

simple schooner
#

you said it

hybrid spoke
#

icky is smth i would only expect from alex smh

lost matrix
echo basalt
#

damn smile's bullying me

pseudo hazel
#

yikesy

echo basalt
#

MOOOM

hybrid spoke
quaint mantle
#

now im not working for offline

#

can u unblock me ?

echo basalt
#

sounds like copium

quaint mantle
#

πŸ˜„

upper hazel
echo basalt
#

.

#

Pasting a bunch of methods won't help us understand what's going on

smoky berry
#

how do you set an objective to multiple display slots?

#

you can do this normally in vanilla with commands

simple schooner
#

holy shit

echo basalt
#

If you read the post it's a shady company

#

unless that's the one other dude

#

yeah it's the shady dudes

lost matrix
#

Also 60k/yr for a software engineer is (depending on where you live) an entry level payment. And a low one that is.

echo basalt
#

Well it's plugins so

#

Β―_(ツ)_/Β―

#

At least it's remote

lost matrix
#

True

echo basalt
#

60k/yr is more than what most docs make here

#

Earning more than 15k/yr here makes you on the top 10%

lost matrix
#

o.O

hybrid spoke
#

15k/yr is trainee payment

simple schooner
#

I live in a 3rd world country full of dipshits

echo basalt
#

Don't we all

lost matrix
#

With 15k you would end up on the streets here... You cant get a single room for under 1k/month

tender shard
#

15k is below minimum wage here

hybrid spoke
#

in berlin there is no way you go under 700/month

echo basalt
#

If you come up to the conclusion that numbers don't add up

tender shard
#

15k is not even 8$ per hour

echo basalt
#

Then you're write

hybrid spoke
#

but like saxony its actually cheaper

zealous osprey
echo basalt
lost matrix
echo basalt
#

No they just live with their parents until they get laid

echo basalt
#

and then they and their SO eat toilet paper

#

because you can't afford toilet paper by yourself

zealous osprey
lost matrix
#

Ah that makes sense

#

Ill stay with my dad until i got my masters. Dont feel like burning my money earlier.

echo basalt
#

I want to move out soon

#

thing is I'm 18 and broke

lost matrix
#

Yeah i kinda get that

echo basalt
#

got 50$ in savings

upper hazel
#

?paste

undone axleBOT
echo basalt
#

I don't think I'd make it for a month

zealous osprey
simple schooner
#

It's almost impossible to get rich in these days.

pseudo hazel
#

just get a job lol

upper hazel
simple schooner
#

You'll work till you die

echo basalt
#

I make plugins for a living

#

Thing is I just blew like 300 bucks last night on some new glasses

upper hazel
echo basalt
#

nope

#

job

upper hazel
#

lol

pseudo hazel
#

doesnt sound like plugins make that much then

hybrid spoke
echo basalt
#

It does

hybrid spoke
#

you live by your parents

echo basalt
#

So?

pseudo hazel
#

do you just sell premium plugins or work for people?

echo basalt
#

I live at their house

lost matrix
#

Im still in the process of fighting my way into Nvidia. 3rd interview comming up next week PES_SweatWhat

echo basalt
#

I don't live with them

hybrid spoke
#

so you do it as an extra

upper hazel
zealous osprey
hybrid spoke
#

freelancing

echo basalt
#

P much

pseudo hazel
#

right

echo basalt
#

Got a contracted job at 20$/hr

#

And juggling between like 5 projects

pseudo hazel
#

nice

zealous osprey
# echo basalt So?

Nothing, I just hope you enjoy the work you do, then do what you like.
Your life, your decisions. Hope you don't overwork yourself and get burnt out from it.

hybrid spoke
#

i would love to get overworked

zealous osprey
#

.-.

hybrid spoke
#

but i cant get to motivate myself

pseudo hazel
#

you dont

upper hazel
hybrid spoke
#

i just want to get the feeling once

#

then suffer in pain

hybrid spoke
#

get into drugs

#

nearly die

simple schooner
#

just force your self to

hybrid spoke
#

get my live together

#

be successful

#

rich af

echo basalt
#

contracts are common in the higher-end servers

hybrid spoke
#

buy twitter

hybrid spoke
upper hazel
echo basalt
pseudo hazel
#

how else did it become number 1 played game

upper hazel
#

especially if the income comes from donations

zealous osprey
#

Hypixel? Mineplex (rip) or other?
Mine your Mind, FTB, etc.

hybrid spoke
echo basalt
#

I want to get into hypixel honestly

hybrid spoke
#

each player is a potential customer

echo basalt
#

but most of my income isn't even from servers

hybrid spoke
#

you could live off a 50 player server if done right

echo basalt
#

I've done that

hybrid spoke
#

just like you could live off 50 viewers on twitch

pseudo hazel
#

yeah 50 whales

#

idk what you would have to do for that though

hybrid spoke
#

be a business person

echo basalt
#

I know this old dude that plays marbles all day

pseudo hazel
#

sounds like a 1 in a billion

echo basalt
#

on twitch

#

while listening to psytrance

hybrid spoke
echo basalt
#

for 10 hours per day

#

every day

pseudo hazel
#

yes, but people that make such a marketing plan are like 1 in a billion

echo basalt
#

you just need to know what you're doing

pseudo hazel
#

yes

#

yall make it sound so easy

echo basalt
#

Maybe because we know what we're doing

#

Been doing this for like 6 years

#

At least half of my income comes from youtubers

upper hazel
pseudo hazel
#

welcome to any free to play market

quaint mantle
#

if i change my username while on the server
do i have to log out of the server to update my name?

pseudo hazel
#

probably

#

iirc name changes arent like instant

#

but you cant do them often anyways

zealous osprey
#

probably, you might even need to restart your client completely.

pseudo hazel
#

I think its like once a month

zealous osprey
ocean hollow
upper hazel
echo basalt
#

they look for me

quaint mantle
#

aight ty

clever lantern
#

how do i draw items with odds taken from config

tender shard
pseudo hazel
#

using rng

upper hazel
echo basalt
#

sure

hybrid spoke
upper hazel
#

burse

#

I'm just wondering where more uncles usually sit with their large servers and look for a plugin maker aha)

alpine urchin
#

im a plugin maker

echo basalt
#

why would I leak the secrets and let competition in

pseudo hazel
echo basalt
#

Yeah

hybrid turret
#

I want to disable dying using a boolean. I implemented it using the EntityDamageEvent.

Now I want to have seperate booleans to disable only damage by players or damage by anything BUT void.

How do I get the "but void" part done?

This is what i currently have (please ignore that noDeathPlayer is public without getter lmao):

echo basalt
#

If you know your shit people will come to you

upper hazel
pseudo hazel
#

then I assume you have to approach youur first clients yourself and then let them do the rest

hybrid spoke
#

nah you gotta advertise yourself

#

publish yourself to the others

#

represent yourself

#

reach out to clients

tender shard
hybrid turret
#

No exact opposite.

#

Disable any damage EXCEPT void

#

To prevent the forever falling lol

upper hazel
#

I don’t think that this is enough for such amounts there is some kind of store site where this person is sitting, I’m sure

echo basalt
#

There are multiple discord servers and teams

pseudo hazel
#

what are you talking about

echo basalt
#

Teams take cuts tho

pseudo hazel
#

youll have to build it up from nothing

echo basalt
pseudo hazel
#

you cant get 10 clients at once

#

lmao

upper hazel
pseudo hazel
#

you gotta network

hybrid turret
echo basalt
pseudo hazel
#

start by building a portfolio

echo basalt
#

build a history of cool stuff

#

Do some basic SEO so people can find it

upper hazel
echo basalt
#

Nop

#

Just make a github portfolio

#

If you search "Spigot skyblock core" my project is in the first page

hybrid turret
#

do spigot servers that want developers even still exist in 2023? lol

echo basalt
#

I have some github stuff like that minigame tutorial

hybrid turret
#

Aren't like all servers these days on paper?

echo basalt
#

And a full suite of tutorials here if you search for the search index

upper hazel
echo basalt
#

coding

upper hazel
#

oh i want see

echo basalt
#

Look for it then

upper hazel
#

and usually all sorts of tutorials in bukkit api are in githubs? Not for beginners but advanced
?

echo basalt
#

Not all

#

Some are in spigot

upper hazel
#

well then tell me how many years do you need for medium-high skill level

#

in bukkit api

echo basalt
#

like 3

hybrid spoke
#

individually

hybrid spoke
#

you cant just say i need 3 years to be at this point

echo basalt
#

But it depends

tender shard
#

"how many hours do I need to play piano perfectly"

upper hazel
#

I'm 2 years old so far

echo basalt
#

I know people that have been doing it for a year with guidance

#

I've been coding for 12 years and doing spigot for the past 6

#

I look up to 7smile7 that has been doing java for like 3 years

upper hazel
echo basalt
#

so y'know

#

it's weird

echo basalt
smoky anchor
#

Yo illusion, when you're on the topic of the minigame tutorial
Do you think you could expand upon how to work with the player states ?
And mainly how to correctly integrate it into the Game.
Also, how could I contribute to fix some code errors?

echo basalt
#

Yeah so for states

#

At least when I last used them

#

Each player state had a "kit" associated

#

And a kit is just a representation of items and potions etc

#

On TNT Tag, for example, the "bomber" was a state

zealous osprey
#

@echo basalt
Goto bed XD

echo basalt
#

shush

upper hazel
echo basalt
#

Anyways this isn't exactly clean because I was pretty underpaid

#

and the screenshot looks tiny ffs

zealous osprey
upper hazel
#

bisnes

echo basalt
#

business

upper hazel
#

business

#

yea

onyx fjord
#

Biznes

upper hazel
#

i rus

onyx fjord
#

😎

upper hazel
#

translate not worked

echo basalt
#

Anyways the player states end up looking pretty simple

#

Another thing is that the player state system on github is meant for multiple states per player while this one is just a single state

#

But you can easily tweak it to fit what you want

#

Does that answer your question?

upper hazel
#

okay, you have experience how did you deal with such a problem of abstract classes when there is a common logic for 2 classes but there is nothing else there is constructor and that's it

#

public class AthenaTalisman extends Talisman {
public AthenaTalisman(AbstractConfig config, double attack, double speed, JavaPlugin plugin, SchematicManager schematicManager, String fileName) {
super(config, attack, speed,plugin,schematicManager,fileName);
}
public AthenaManager getSettings(){
return (AthenaManager) config;
}
}

echo basalt
#

generic types

hybrid turret
#

Is EntityDamageEvent.DamageCause.ENTITY_ATTACK the correct DamageCause for being damaged by any Entity including Players? (I know there's an event for that but that isn't viable in this case)

upper hazel
#

just constructor

echo basalt
#

No clue what your structure looks like

#

But what i've been doing lately which is kinda enterprisy is making an interface and an abstract implementation of it

smoky anchor
#

So it could also represent like potion effects, teams, abilities and such.
My understanding from what I saw on github was that I could combine some simple states to create something more complex.
For example: a state that gives a player team (prefix, color...) and another state that makes them "invincible" with potion effects.

echo basalt
#

Uhh yeah you can make that

gray thicket
#

Error while importing Spigot Shaded Jar

echo basalt
#

Think of hypixel's bedwars, where you could apply an "invisible" state when they drink a potion

#

Ideally you only ever have 1 state managing the player's items

upper hazel
#

there is an abstract class talisman and there are 2 classes of heirs 1 has its own private method and class 2 has nothing but the logic of the abstract class. Empty class

echo basalt
#

otherwise things go boom

echo basalt
#

Explain the problem, what you got and what problem you're facing

upper hazel
#

they have a common logic

echo basalt
#

Also it's fine to make mostly empty classes

#

abstract factory go brr

upper hazel
#

oh good

hushed spindle
#

im doing wacky things with the anvil which requires me to set an experience cost to the anvil, without an experience cost the result becomes unclickable. im setting it to 3 and updating the player's inventory, but this is not working specifically on spigot. on purpur/paper this works fine

#

anything i can do to get around this issue?

echo basalt
#

Sounds hacky, I don't have an answer

hushed spindle
#

i saw that Player#updateInventory() is marked unstable, could that be it

#

i hate how hacky anvil mechanics are in general

echo basalt
#

updateInventory just sends a packet with the player's inventory contents

hushed spindle
#

you'd think that but that method was required to get it to work before, on paper/purpur this is still the case

#

spigot just decided to stop working

echo basalt
#

NMS time

hushed spindle
#

gdi

echo basalt
#

load the fileconfig

#

It's basic configuration api

tender shard
#

YamlConfiguration.loadConfiguration(...)

hushed spindle
#

looool delaying the inventory update by 1 tick worked

#

bastard

#

stupid silly spigot

hybrid turret
#

lmao

glossy venture
chrome beacon
#

Yeah I've done that before

glossy venture
#

basically how do i avoid this bullshit

chrome beacon
#

You'd run all of your code inside of your class loader

glossy venture
#

ig but shouldnt there be a way for my custom class loader to just not load it again

#

if its already defined

#
public static ClassLoader transformingClassLoader(Predicate<String> namePredicate,
                                                  ClassLoader parent,
                                                  ClassTransformer transformer) {
    return new ClassLoader(parent) {
        @Override
        public Class<?> loadClass(String name) throws ClassNotFoundException {
            Class<?> klass = this.findLoadedClass(name);
            if (klass != null) {
                return klass;
            }
#

this is what i currently have

eternal night
#

I mean, it is too low in the chain. The fact that you have two classloaders responsible for a "shared" class is an issue

glossy venture
#

or does this.findLoadedClass only work for classes from this loader

#

not for parents

#

oh nvm it does not check parents

vital ridge
#

Is there a good way to update an itemstack?

#

Its in an inventory of mine

#

I'm clicking it and the click is updating some of the inventory itemstack's item metas

#

And I need to close and open the inventory to see the updated itemmetas

#

I assume I'd need to get the updated item's and just remove and add them back quickly to see the updated itemmetas?

#

Though idk how should I do that since I'm doing it all in a for loop which iterates through the inventory's contents

glossy venture
glossy venture
smoky berry
#

how do you set an objective to multiple display slots?

glossy venture
#

im pretty sure bukkit should automatically update the inventory

vital ridge
glossy venture
#

aight

wet breach
vital ridge
#

With bukkit#createinventory

young knoll
#

It should update automatically provided you change the itemstacks actually in the inventory

lilac dagger
young knoll
#

Afaik they are mirrors

vital ridge
#

If that counts the same as what you meant

wet breach
#

Well if anything you can always close and reopen the inventory to make it update. Or just add an item to a slot and remove it. Really anything to make it send another packet

young knoll
#

Just doing setItem over the old item should work

wet breach
#

I think what is happening is that fpr whatever reason item meta doesnt count in regards to the server as the inventory changing and thus the packet that is sent for routine update check isnt updating the integer to signify a change appropriately that is the only thing i can think of.

#

Could be a bug or something overlooked. May be worth making a jira ticket

#

?jira

undone axleBOT
wet breach
#

Since that treats it as being removed and added

glossy venture
#

bro what where is it finding the loaded class

#

why is it loaded

wet breach
#

Are you including test classes?

glossy venture
#

it seems like it was an issue with junit

wet breach
#

And as for it being loaded you do call newInstance

#

So i mean if you didnt want to load probably shouldnt call that? Lol

glossy venture
#

no i want to load it with a class loader

#

but fucking junit loaded it for no reason

#

with the app loader

wet breach
#

Oh interesting

glossy venture
#

so now i have to test with public static void main

wet breach
#

Well junit will load test classes in the test directory

glossy venture
#

oh true

#

ig

#

because nested classes wont be recognized as nested

#

it works now

wet breach
young knoll
#

Now if only plugins loaded early enough to intercept most minecraft classes loading

#

Sadge

wet breach
#

That would only be possible with some kind of wrapper

#

Or maybe some hacky reflection where you reload everything into a custom loader

eternal night
#

You can already kinda do that by injecting shit

#

spigot runs stuff loaded through commodore

#

and iirc you can inject yourself there

#

terribly hacky shit

young knoll
#

Currently I just runtime attach an agent and then retransform

upper hazel
#

Is it possible that chunks are loaded so quickly by the player that structures appear often with a chance of 0.00000001?!

eternal night
#

ah, right, you inject a custom CraftMagicNumber instance

#

And then overwrite public byte[] processClass(PluginDescriptionFile pdf, String path, byte[] clazz) {

#

in there

young knoll
#

Does that run for minecraft classes

eternal night
#

no

#

for plugin classes tho

young knoll
#

Ye that’s what I figured

eternal night
#

I mean, paperclip could do it

#

given it already acts as a wrapper

young knoll
#

Just need to move spigots plugin loading to super early in the server startup

#

Sadly that would break plugins using onLoad and expecting stuff to already exist

eternal night
#

I mean, if you ever want to support that

#

just support mixins

#

but eh, supporting mixins is a dangerous game

young knoll
#

I mean loading before the server thread is spun should be before any classes are loaded

#

Actually you’d have to go before datapacks are loaded too

eternal night
#

Yea but how are you going to modify the already existing classloader ?

#

Like, that classloader is constructed by the bundler's main method and contains all libraries and the server jar in the versions dir

young knoll
#

I mean I already doing some hacky injection into it

#

It would at least prevent the need to runtime attach

#

Or well, prevent the need to reload

#

It would also allow injecting into registries without hacky unfreezing

vestal matrix
#

1.12.2 doesnt have colored panes in the material enum?

eternal oxide
#

1.12 probably uses damage values

upper hazel
#

help there is an asynchronous method for the appearance of a structure with certain conditions. Everything happens through the chanck load event, but even with a chance of 0.00001, the dungeon appears very often

tender shard
vestal matrix
#

:/

upper hazel
worldly ingot
#

The best part is that stained glass panes didn't support the MaterialData API

vestal matrix
#

is there a way to know what number each color is though?

worldly ingot
#

Nope. Gotta do it manually

#

You can maybe get away with DyeColor but iirc there were some blocks that weren't the same as others

austere cove
#

it is

vestal matrix
#

alr ty

worldly ingot
#

\o/ You're in luck

tender shard
#

getWoolData was already deprecated in 1.8 kek

worldly ingot
#

Yeah because it was a magic number

#

Ideally you'd use the Wool MaterialData

austere cove
#

kid me remembered all the item ids

#

and hated when commands stopped supporting them

#

looking back flattening was such a QoL improvement

hybrid spoke
#

wool:14

echo basalt
twin venture
#

hi , how i can update inventory items for an offline player?

quartz anchor
#

is there a better way to use libraries from jitpack other than shading/shadowing it to jar?

hybrid spoke
#

having it on the server i guess?

#

rest api πŸ€”

lilac dagger
#

i don't have a map manager

smoky anchor
chrome beacon
#

137

zealous osprey
#

122

pseudo hazel
#

lol, I have a class specifically for matching dye colors with chatcolors and block colors of all sorts

#

which I mostly used for team based minigames

ocean hollow
#

how do i make CraftItemEvent understand that i am taking items with a shift, not just 4 pieces?

cunning crater
#

does anybody know?

hushed spindle
#

simply check if the player has that permission?

#

player.hasPermission("plugin.something.*")

eternal oxide
#

no

#

Wildcards are not simple to implement

cunning crater
cunning crater
eternal oxide
#

yes I dev GroupManager

cunning crater
#

Could you by any chance link me to some resources or explain if you have time?

eternal oxide
#

it depends on what exactly you are doing

#

you will not get wildcards to work through Player#has without some ass reflection

cunning crater
#

I see. Is there anywhere that has some info on how that's done? I imagine I have to somehow override the permission check and manually check?

eternal oxide
#

I don;t do it as I dislike that type of reflection

#

LuckPerms does

cunning crater
#

How do you do it then?

eternal oxide
#

look at LP source if you want to do reflection of permissible

cunning crater
#

Alright, thanks

median berry
#

How to disable the display of nicknames when autocomplete in a chat without a command?

zealous osprey
#

For all commands or just the ones you've created?
Cause you could always just return an empty list if you don't want anything to show up

median berry
#

I just need to be able to tap nicknames in a chat without commands

tribal flare
#

any suggestions?

smoky anchor
tribal flare
#

pdc?

smoky anchor
zealous osprey
tribal flare
#

Yes but since there is no way to get the current conversations a Player is in rn I can't cancel the previous conv directly

smoky anchor
#

So make it possible to get the current conversation ?
I don't think I will be able to answer such a "vague" question sry.

tribal flare
#

Ok so i'll just store the convs somewhere, ok

#

I hoped for the conv api to have something useful (like cancel itself when the player executes a command)

twilit creek
#

Hello, small question, what is the PacketPlayOutEntityDestroy Packet in NMS 1.20.1?

tender shard
#

?switchmappings

tender shard
twilit creek
cunning crater
#

I have a per-player scoreboard in 1.8.8 spigot, however I also want to have custom display name in the nametag position of the player (using teams?).

Is there an efficient way to do that? I don't want to register teams for all per-player scoreboard and assign all players to a team on all scoreboards.
Hypixel for example has per-player scoreboards and also has custom player nametags.

eternal oxide
#

So you want custom names without having to write teh code to do it in Teams?

cunning crater
#

Nono, I can write the code using teams if that's the correct way, but with per-player scoreboards doesn't that use a lot of resources?

Ranks * Players teams to register.
Players ^ 2 players to assign to teams.
On player join I'd have to edit add the player to a team on all player scoreboards as well

small iron
#

Sorry, Can we make our 1 plugin support multiple versions?
For example, 1.17.x - latest

smoky anchor
#

yes

#

not sure how "latest" is gonna work for you because in the future some things may not work
but yes, you can support multiple versions in one jar

hybrid spoke
#

if you have nothing special in it it should work right away for any higher version

small iron
young knoll
#

Nope

#

Make sure you depend on the 1.17 api when writing code too

kindred sentinel
#

Why doesn't this working?

    @EventHandler
    public void onClick(InventoryClickEvent event) {
        if(event.getWhoClicked() instanceof Player){
            NMShelpers NMShelper = new NMShelpers();
            Player player = (Player) event.getWhoClicked();
            ItemStack currentItem = event.getCurrentItem();
            int chosedSlot = event.getSlot();
            int mainHandSlot = player.getInventory().getHeldItemSlot();
                if(!currentItem.getType().isAir() && chosedSlot == mainHandSlot) {
                    ItemMeta a = currentItem.getItemMeta();
                    a.setLore(Arrays.asList("ABC", "DEF"));
                    currentItem.setItemMeta(a);
                    System.out.println("READY");
                }
        }
    }

The condition is triggered, but the lore of the item does not change

lilac dagger
#

set the current item to yours

kindred sentinel
#

How?

lilac dagger
#

event.setcurrentitem

alpine cairn
#

?paste

undone axleBOT
lilac dagger
#

i think

kindred sentinel
# lilac dagger event.setcurrentitem

even this doesn't working

    @EventHandler
    public void onClick(InventoryClickEvent event) {
        if(event.getWhoClicked() instanceof Player){
            NMShelpers NMShelper = new NMShelpers();
            Player player = (Player) event.getWhoClicked();
            ItemStack currentItem = event.getCurrentItem();;
            int chosedSlot = event.getSlot();
            int mainHandSlot = player.getInventory().getHeldItemSlot();
                if(!currentItem.getType().isAir() && chosedSlot == mainHandSlot) {
                    ItemMeta a = currentItem.getItemMeta();
                    a.setLore(Arrays.asList("ABC", "DEF"));
                    currentItem.setItemMeta(a);
                    event.setCurrentItem(currentItem);
                    System.out.println("READY");
                }
        }
    }
kindred sentinel
#
    @EventHandler
    public void onClick(InventoryClickEvent event) {
        if(event.getWhoClicked() instanceof Player){
            Player player = (Player) event.getWhoClicked();
            ItemStack currentItem = event.getCurrentItem();;
            int chosedSlot = event.getSlot();
            int mainHandSlot = player.getInventory().getHeldItemSlot();
                if(!currentItem.getType().isAir() && chosedSlot == mainHandSlot) {
                    ItemStack item = player.getInventory().getItem(chosedSlot);
                    ItemMeta itemMeta = item.getItemMeta();
                    itemMeta.setLore(Arrays.asList("A","B"));
                    item.setItemMeta(itemMeta);
                    System.out.println("READY");
                }
        }
    }

This too isn't working, condition triggered but the lore of the item didn't change

young knoll
#

Try setItem at the end

kindred sentinel
young knoll
#

That’s weird

#

Definitely should

kindred sentinel
#

YEAH IT'S TOOOO WEIRD

#

I didn't have any problems with that last time i did something like this

shadow night
#

what packet am I looking for if I want to fake an entity?

young knoll
#

Several

#

Mainly you need the spawn entity packet

#

And then the entity meta packet to change anything about it

shadow night
#

hmmm

timid hedge
#

It dosent send anything in the console and i dont get a title ingame

    @EventHandler
    public void onPlayerDamage(EntityDamageByEntityEvent e) {
        Entity victim = e.getEntity();
        Entity attacker = e.getDamager();
        if (e.getCause() == null) return;

        if (!(victim instanceof Player && attacker instanceof Player)) return;

        Player victimPlayer = (Player) victim;
        Player attackerPlayer = (Player) attacker;

        ItemStack attackerWeapon = attackerPlayer.getItemInHand();
        Material weaponType = attackerWeapon.getType();
        
        if (attackerPlayer.hasPermission("Vagt") && (!(victimPlayer.hasPermission("vagt")))) {
            System.out.println("1");
            if (weaponType != Material.STICK) return;
            System.out.println("2");
            if (attackerPlayer.getItemInHand().getItemMeta().getDisplayName().equalsIgnoreCase("Β§aSTICK")) {
                System.out.println("3");
                if (attackerPlayer.getWorld().getName().equalsIgnoreCase("A")) {
                    System.out.println("4");
                    victimPlayer.addPotionEffect(PotionEffectType.BLINDNESS.createEffect(100, 1));
        }
    }
}
shadow night
#

if (attackerPlayer.hasPermission("Vagt") && (!(victimPlayer.hasPermission("vagt")))) { how would this pass, wtf even is this

timid hedge
#

What do you mean?

shadow night
#

as far as I am aware of, permissions are always lowercase and the both are the same permission, but you are checking if one is true and the other is false

timid hedge
#

Okay it have changed it to this now, and the point is i am checking if the attacker has permission "vagt" and the victim dosent becuase if both have permission vagt i am going to cancel the event, i havent just done that yet i will fix this before im going to the next thing
if (attackerPlayer.hasPermission("vagt") && (!victimPlayer.hasPermission("vagt"))) {

shadow night
#

ah, didn't notice they're different players, sorry. But it was weird to have a permission with uppercase and also to have a permission without having the plugin before it, like myplugin.mypermission

simple schooner
#

Good night chat

timid hedge
quaint mantle
#

hex colors not working

#

be like this

#

ChatColor.of("#FF3600")

#

i used this

young knoll
#

?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.

quaint mantle
#

what need i do for use hex colors ?

#

this method is wrong ?

young knoll
#

No that’s correct

timid hedge
#

How do i fix this, it says that it is always true and false

        boolean attackerPermission = attackerPlayer.hasPermission("vagt");
        boolean victimPermission = victimPlayer.hasPermission("vagt");
        
        if(victimPermission && !attackerPermission){
quaint mantle
#

sender.sendMessage(new TextComponent(ChatColor.of("#FF3600") + "\uE002 Kendine arkadaşlık isteği gânderemezsin!")

#

this is my full code

#

something wrong ?

topaz panther
#

wdym

quaint mantle
#

i can't use hex color codes

topaz panther
#

here?

quaint mantle
#

wut ?

topaz panther
#

oh sorry

#

you meant ingame?

quaint mantle
#

yes

#

my message is black

topaz panther
#

Idk bout hex but ill try to figure it out hol up

young knoll
#

That’s not how you use components

#

Use .color to set the color

topaz panther
#

^

young knoll
#

Also I recommend the component builder

quaint mantle
#

oh wait

#

i know

smoky oak
#

quick question, do all events that can possibly (naturally) move items into or out of a player's inventory part of InventoryEvent?

lost matrix
#

No

shadow night
#

well, I think you can get items besides clicking an inventory loll

smoky oak
#

i mean itemstacks

echo basalt
#

no

#

EntityPickupItemEvent is an EntityEvent iirc

smoky oak
#

welp, time to read through all even remomtely related events lol

#

i want to block specifically tagged items from entering or leaving player inventories

echo basalt
#

just make uhh

#

scheduler

lost matrix
#

πŸ‘€

smoky oak
#

alright i know that aint a good idea

echo basalt
#

easiest solution

#

Easily testable

#

hold a hash of the inv

#

uhh

#

magic

smoky oak
#

that'd work for not picking items up

#

but not from blocking them from leaving

#

i really doubt i can tell minecraft 'hey delete itemstack with this uuid'

echo basalt
#

you can hold a reference of the old inv

young knoll
#

Wait why is picking up an issue

#

That’s not an item leaving the inventory

smoky oak
#

different problem, related to project

young knoll
#

Ah you want them to not enter too

#

That’s… odd

smoky oak
#

i need to figure out both

#

my idea was to just get a list of all events that could move itemstacks and work on those

#

but i am pretty sure I'm not remembering all ways you could do that

young knoll
#

Click, drag, drop, pickup

smoky oak
#

what about the number keys?

young knoll
#

Those are part of click

smoky oak
#

ah

hushed spindle
#

if i had any hair id be ripping it out rn

#

only some custom unicode characters decided to just stop working

topaz panther
hushed spindle
#

and i have no idea why

smoky oak
#

java source code doesnt support unicode iirc, maybe thats the issue

hushed spindle
#

nah it works

#

i mean, usually

smoky oak
#

i do remember it replacing ascii-8 characters with ?

hushed spindle
#

got my default.json here and the top one doesnt work while the bottom one does

smoky oak
#

so

#

not for me

young knoll
#

Check client logs for any errors

hushed spindle
#

Unable to load font 'minecraft:default' in fonts.json in resourcepack, guess that would be it

#

but why

young knoll
#

Is there anything else

hushed spindle
livid dove
# echo basalt Easily testable

Easily broken by a catered bot. Would need to have random test intervals. Also wouldnt this create a snapshot of inventories every time the scheduler runs?

hushed spindle
#

i wish there was more documentation on resource packs because you really cant find anything

young knoll
#

Not much I can tell ya other than make sure everything is setup correctly

#

And that the png is correct

lost matrix
#

png has a size limit

timid hedge
lost matrix
#

Thats a common problem

young knoll
#

The error points to that file, but doesn’t seem to say anything about why

lost matrix
#

And use lower range unicode chars

young knoll
#

Use the private block

hushed spindle
#

the pngs are 176x137 which i think is fine

young knoll
#

Actually that is in the private block so it’s fine

hushed spindle
#

and they worked like an hour ago as well, its a specific range of menus that just suddenly doesnt work any more

young knoll
#

Well you must have changed something

hushed spindle
#

i didnt touch them ever since i got them working so idk

#

ill check it out later

#

maybe i just gotta restart my pc or something

remote swallow
#

whats the issue

timid hedge
#

It is always true and false

remote swallow
timid hedge
#

So what should i do to prevent it?

river oracle
#

@young knoll I'm curious if you know the policy on this for Craftbukkit. Essentially for one of my changes to the code I
need to wrap some NMS code that returns a boolean in an if block how would I comment that for CB example below

Normal Call:

this.nmsMethod(() -> {
 // operator
}, boolean);
// rest of logic

Modified Call

if(this.nmsMethod(() -> {
 // operator
}, boolean) {
 // craft bukkit logic here
}
// rest of logic here

like wonder do I have to wrap the entire if statement in craft bukkit comments or can I do a one liner?

remote swallow
#

glass

young knoll
#

It does say

#

In the screenshot

timid hedge
#

Why dosent it send anything in the console or give me blindness?

        boolean attackerPermission = attackerPlayer.hasPermission("vagt");
        boolean victimPermission = victimPlayer.hasPermission("vagt");

        ItemStack attackerWeapon = attackerPlayer.getItemInHand();
        Material weaponType = attackerWeapon.getType();


        if (attackerPermission && !victimPermission) {
            attackerPlayer.sendMessage("You hit " + victimPlayer.getName());
            System.out.println("1");
            if (weaponType != Material.STICK) return;
            System.out.println("2");
            if (attackerPlayer.getItemInHand().getItemMeta().getDisplayName().equalsIgnoreCase("Β§aSTICK")) {
                System.out.println("3");
                if (attackerPlayer.getWorld().getName().equalsIgnoreCase("A")) {
                    System.out.println("4");
                    victimPlayer.addPotionEffect(PotionEffectType.BLINDNESS.createEffect(100, 1));
                }
river oracle
# young knoll Probably the whole thing

adding proper BlockState support to SignChangeEvent is a real pain in the ass. This event is broken as hell and it seems no one noticed, outside of people not liking the fact it doesn't support color

zinc grove
#

setPlayerListHeaderFooter(ChatColor.BOLD + "" + ChatColor.of("#7B12ED") + "Welcome to My Server", "Have fun playing!");

How would I make the text both bold and colored, I thought it was this but its not working

young knoll
#

Bold after color

zinc grove
#

oh ok

young knoll
#

Also you can remove the + β€œβ€ and just toString one of them

kindred sentinel
#

So could anyone help me? Please, i don't know what's wrong

 @EventHandler
    public void onClick(InventoryClickEvent event) {
        if(event.getWhoClicked() instanceof Player){
            Player player = (Player) event.getWhoClicked();
            ItemStack currentItem = event.getCurrentItem();;
            int chosedSlot = event.getSlot();
            int mainHandSlot = player.getInventory().getHeldItemSlot();
                if(!currentItem.getType().isAir() && chosedSlot == mainHandSlot) {
                    ItemMeta a = currentItem.getItemMeta();
                    a.setLore(Arrays.asList("ABC", "DEF"));
                    currentItem.setItemMeta(a);
                    event.setCurrentItem(currentItem);
                    System.out.println("READY");
                }
        }
    }

The condition is triggered, but the lore of the item does not change

young knoll
#

You tried setting the slot right?

#

Not the current item

kindred sentinel
#
    @EventHandler
    public void onClick(InventoryClickEvent event) {
        if(event.getWhoClicked() instanceof Player){
            Player player = (Player) event.getWhoClicked();
            ItemStack currentItem = event.getCurrentItem();;
            int chosedSlot = event.getSlot();
            int mainHandSlot = player.getInventory().getHeldItemSlot();
                if(!currentItem.getType().isAir() && chosedSlot == mainHandSlot) {
                    ItemStack item = player.getInventory().getItem(chosedSlot);
                    ItemMeta itemMeta = item.getItemMeta();
                    itemMeta.setLore(Arrays.asList("A","B"));
                    item.setItemMeta(itemMeta);
                    System.out.println("READY");
                }
        }
    }
  @EventHandler
    public void onClick(InventoryClickEvent event) {
        if(event.getWhoClicked() instanceof Player){
            NMShelpers NMShelper = new NMShelpers();
            Player player = (Player) event.getWhoClicked();
            ItemStack currentItem = event.getCurrentItem();;
            int chosedSlot = event.getSlot();
            int mainHandSlot = player.getInventory().getHeldItemSlot();
                if(!currentItem.getType().isAir() && chosedSlot == mainHandSlot) {
                    ItemMeta a = currentItem.getItemMeta();
                    a.setLore(Arrays.asList("ABC", "DEF"));
                    currentItem.setItemMeta(a);
                    event.setCurrentItem(currentItem);
                    System.out.println("READY");
                }
        }
    }

That's what i tried

tall dragon
median berry
#

how can I disable this feature?

#

Events don't work

carmine mica
#

well there are no events for that, so not sure how they couldn't work

zinc grove
#

How do I make 2 lines in the playerlist?

eternal oxide
median berry
carmine mica
#

those are for commands

#

well one of them is, the other is clearly deprecated with a message saying it no longer works

median berry
#

I need no commands, just hide the players from there or change the nicknames there, my game is concluded on this that no one knows the nicknames

median berry
kind hatch
#

Player#setCustomChatCompletions() should help you.

eternal oxide
#

those events are for your own commands

carmine mica
#

those are added by the client

#

you can hide all other players, and so the client won't suggest any names

kind hatch
#

They can be removed in commands though? Just pass in an empty array list.

carmine mica
#

I wonder if you could also prefix each player's game profile name sent to a client with like a legacy color code that's invisible to prevent name matching

carmine mica
#

in commands, not in regular chat

kind hatch
#

Sounds like a bug.

carmine mica
#

no

young knoll
#

The client do what it do

hoary roost
#

In "intellij idea" i use the "Minecraft Development" plugin, but i cannot find the 1.8.8 minecraft version... where do i find that?

echo basalt
#

you find that in 2015

pseudo hazel
#

1.8 is ancient

timid hedge
#

Why dosent it send anything in the console or give me blindness?

        boolean attackerPermission = attackerPlayer.hasPermission("vagt");
        boolean victimPermission = victimPlayer.hasPermission("vagt");

        ItemStack attackerWeapon = attackerPlayer.getItemInHand();
        Material weaponType = attackerWeapon.getType();


        if (attackerPermission && !victimPermission) {
            attackerPlayer.sendMessage("You hit " + victimPlayer.getName());
            System.out.println("1");
            if (weaponType != Material.STICK) return;
            System.out.println("2");
            if (attackerPlayer.getItemInHand().getItemMeta().getDisplayName().equalsIgnoreCase("Β§aSTICK")) {
                System.out.println("3");
                if (attackerPlayer.getWorld().getName().equalsIgnoreCase("A")) {
                    System.out.println("4");
                    victimPlayer.addPotionEffect(PotionEffectType.BLINDNESS.createEffect(100, 1));
                }
hoary roost
pseudo hazel
#

well the intellij plugin does simply not support that version

#

youll have to find another way

hoary roost
pseudo hazel
#

I have no clue sorry

hoary roost
#

Hmmm, okay, i will keep searching

kindred sentinel
zinc grove
#

Im trying to use placeholder api in my plugin and I copied the things in the github but it says "Cannot resolve method 'warn' in 'Logger'

public void onEnable() {
        getServer().getPluginManager().registerEvents(this, this);

        if (Bukkit.getPluginManager().getPlugin("PlaceholderAPI") != null) {
            /*
             * We register the EventListener here, when PlaceholderAPI is installed.
             * Since all events are in the main class (this class), we simply use "this"
             */
            Bukkit.getPluginManager().registerEvents(this, this);
        } else {
            /*
             * We inform about the fact that PlaceholderAPI isn't installed and then
             * disable this plugin to prevent issues.
             */
            getLogger().warn("Could not find PlaceholderAPI! This plugin is required.");
            Bukkit.getPluginManager().disablePlugin(this);
        }
    }
#

ty

rain pier
#

[ERROR] Could not load 'plugins/SharedHealth.jar' in folder 'plugins'

org.bukkit.plugin.InvalidPluginException: Abnormal plugin type

at org.bukkit.plugin.java.PluginClassLoader.<init>(PluginClassLoader.java:83) ~[spigot-api-1.20.1-R0.1-SNAPSHOT.jar:?]

at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:145) ~[spigot-api-1.20.1-R0.1-SNAPSHOT.jar:?]

at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.java:394) ~[spigot-api-1.20.1-R0.1-SNAPSHOT.jar:?]

at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:301) ~[spigot-api-1.20.1-R0.1-SNAPSHOT.jar:?]

at org.bukkit.craftbukkit.v1_20_R1.CraftServer.loadPlugins(CraftServer.java:433) ~[spigot-1.20.1-R0.1-SNAPSHOT.jar:3853-Spigot-3bce793-d91e5aa]

at net.minecraft.server.dedicated.DedicatedServer.e(DedicatedServer.java:219) ~[spigot-1.20.1-R0.1-SNAPSHOT.jar:3853-Spigot-3bce793-d91e5aa]

at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:973) ~[spigot-1.20.1-R0.1-SNAPSHOT.jar:3853-Spigot-3bce793-d91e5aa]

at net.minecraft.server.MinecraftServer.lambda$0(MinecraftServer.java:304) ~[spigot-1.20.1-R0.1-SNAPSHOT.jar:3853-Spigot-3bce793-d91e5aa]

at java.lang.Thread.run(Thread.java:1589) ~[?:?]

Caused by: java.lang.InstantiationException: sharedhealth.sharedhealth.SharedHealth

at java.lang.Class.newInstance(Class.java:678) ~[?:?]

at org.bukkit.plugin.java.PluginClassLoader.<init>(PluginClassLoader.java:79) ~[spigot-api-1.20.1-R0.1-SNAPSHOT.jar:?]

... 8 more

Caused by: java.lang.NoSuchMethodException: sharedhealth.sharedhealth.SharedHealth.<init>()

at java.lang.Class.getConstructor0(Class.java:3641) ~[?:?]

at java.lang.Class.newInstance(Class.java:665) ~[?:?]

at org.bukkit.plugin.java.PluginClassLoader.<init>(PluginClassLoade-

#

What i do rong?

young knoll
#

Seems like you have a constructor in your main class

zinc grove
#

I'm trying to add placeholders to the player list and when I add

headerText = PlaceholderAPI.setPlaceholders(event.getPlayer(), headerText);

underneath the strings for the player list lines, the plugin stops working

young knoll
#

Send your main class

#

?paste

undone axleBOT
remote swallow
#

that exception doesnt have anything to do with plugin.yml

rain pier
eternal oxide
#

its nto an event causing your error

#

more like you didn;t extend JavaPlugin

rain pier
#

instead of registerEvents(this, this), I typed registerEvents(this, plugin)

#

Except i was using my main class

#

so I got a bit confused

#

but I fixed it now

smoky oak
#
try{
  config.set(path,value);
  config.save("config.yml");
 } catch (IOException exception) {
  exception.printStackTrace();
}
``` Does this save a change to the default config? I'm looking at <https://www.spigotmc.org/wiki/config-files/>
opal juniper
#

should work, not sure if that is in the correct directory though, I would use:

config.save(new File(getDataFolder(), "config.yml"));
remote swallow
#

if its config.yml why not JavaPlugin#saveConfig

opal juniper
#

yeah its just a general example, so yeah for the config that will work

ocean hollow
#
    public void crafting(CraftItemEvent event){
        Player player = (Player) event.getWhoClicked();
        ItemStack itemStack = event.getCurrentItem();

        if(itemStack == null){
            return;
        }
        if(DataManager.getPlayerQuest().get(player) != null){
            Quest quest = DataManager.getPlayerQuest().get(player);

            quest.updateCompleted(QuestType.CRAFT, itemStack.getType().toString(), itemStack.getAmount());
        }
    }```

How can I find out how many items a player has crafted? (taking into account whether he pressed the shift, etc.)
#

thanks

upper hazel
#

hey how i can use async loop metod?

tender shard
#

async loop metod?

ocean hollow
#

Scheduler?

pseudo hazel
#

to do what

upper hazel
#

asynck loop stream

#

async

#

async stream with loop logic

#

how repetedTask but async

#

i try spawn structrure

#

but i have list

#

undestood?

tender shard
#

please try to formulate one coherent sentence

tall dragon
#

ooh angry alex again!

tender shard
#
new Thread(() -> {
  for(Thing thing : myThings) {
    // awesome async loop
  }
}).start();
upper hazel
#

i want to run this method in an asynchronous thread CYCLING

  • translate
tall dragon
#

so u just want to run an async repeating task

#

?scheduling

undone axleBOT
tall dragon
#

u can read this

upper hazel
#

thf

smoky anchor
#

Hi hello
Developing plugin for 1.20.1 (Spigot)
How the hell do I get docs in here

#

I'd really love to see this in IntelliJ

remote swallow
#

download javadoc jar

#

idk where the button is tho, somewhere in the maven tab or somethin

#

might be in the double shift menu

tender shard
#

press shift twice, then download sources and documentation

smoky anchor
#

I swear to fuck
I have done that and it did not work before
I-
I apologize for wasting your time
I opened Team class and clicked the button and it just automagically worked

#

ty anyways XD

tender shard
#

it sometimes takes a while or sth, idk lol

quartz anchor
#

i kinda missed the jar-in-jar thing from fabric

sage patio
#

anyone knows how can i get a list of Player (or OfflinePlayer) from a luckperms group? (luckperms support is very slow to respond unfortunately)

worldly ingot
#

You could probably get a Set of UUIDs with which you could convert to OfflinePlayer with Bukkit#getOfflinePlayer()

sage patio
#

that is fine too, the problem is how

warm saddle
#

Is there something buggy with cancelling chat events with bungeecord api? I have a plugin that cancels the ChatEvent however when the player next sends a message that isn't cancelled they will be kicked for having an unsigned chat

worldly ingot
#

And you can get a Group object rather simply with LuckPerms.getGroupManager().getGroup(groupName);

orchid trout
#

lombock enabled eclipse but no work

#

help

worldly ingot
orchid trout
worldly ingot
orchid trout
#

i did that

worldly ingot
#

Though there's also a Lombok plugin iirc that makes things a bit nicer

orchid trout
sage patio
worldly ingot
#

I would try using the downloadable installer then if the plugin repo didn't work

#

Double click that .jar file and it will try to find your Eclipse instances. If it can't find them, point to it yourself

orchid trout
#

ok

#

didnt work

warm saddle
worldly ingot
#

Not sure. I've not worked much on proxies enough to know how to resolve it

cunning crater
slender elbow
#

even if you have 100k players, what you're saying is gonna be a few tens of MB at worst

#

I would be more interested in your approach to get to that player count in the first place πŸ˜„

tender shard
#

easy. everyone who joins has to bring at least 2 friends

#

they in turn also have to bring 2 friends

#

etc

orchid trout
#

pyramid scheme

tender shard
#

no you only need ONE player, which can be yourself

#

and boom you got infinite players

opal juniper
eternal needle
quaint mantle
#

how to check when a anchor explodes a blockl

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.

sterile breach
ocean hollow
#

why main is null?

sterile breach
native bramble
#

why do resultSet.next() can be false even if database is not empty?

#

even if i create new variable resulSet?

smoky oak
#
Age | Name
119 | MOTERIUS

FROM ages SELECT Name WHERE Age<25 GROUP BY Name -> Emptyset

#

database queries can return nothing if no match is found