#help-development

1 messages ยท Page 252 of 1

nimble zinc
#

It isnt

#

Thats what I don't get

eternal oxide
#

odd

nimble zinc
#

But sometime it is

#

I don't get it

#

Maybe I've got a plugin that cancels the event

#

When not the same case

#

So when I perform myself it bypasses this plugin

eternal oxide
#

if it's a bungee plugin it will ignore performed commands (I believe)

nimble zinc
#

I just checked in vanilla and commands are case sensitive

#

/HELP doesn't work

eternal oxide
#

I never knew

nimble zinc
#

What's the difference between dispatchCommand and player.performCommand

tender shard
#

weren't builtin command made case sensitive in 1.19 or 1.18.2 or so?

fluid river
#

hi guys

graceful magnet
#

all (properly registered) commands, 1.19.2

last sleet
#

Could I get some clarification on when durability is consumed? I'm trying to override a BlockBreakEvent's drops by my own by setting the block to air anad providing my own drops. Problem is, durability isn't being consumed, even if setCancelled is false.

tender shard
#

there's the PlayerItemDamageEvent, no idea if that helps you

#

to get the drops, you'd normally use the BlockDropItemEvent. in BlockBreakEvent, you have no way to get the actual drops

last sleet
#

I do, that event has e.getBlock.getDrops()

tender shard
#

yes, it doesn't return the actual drops

last sleet
#

it doesn't?

tender shard
#

it returns a list of "hypothetical" drops

last sleet
#

well anyway I don't need the drops, I only need to check what the block is and set my own drops

tender shard
#

e.g. WHEAT will return 1x WHEAT and 1xSEED but sometimes, they don't drop seeds, and sometimes they drop more than one

last sleet
#

but it doesn't consume durability

tender shard
#

so you want to manually damage an item? I don't really understand the issue

eternal oxide
#

there is an event for blocks dropping items

tender shard
eternal oxide
#

don;t override in the break event

last sleet
#

the issue is, I'm overriding a block's drops by setting the blocktype to air, then dropping them by plugin, but doing that does not consume pickaxe durability

eternal oxide
#

he's just breaking it himself to then drop his own drops

#

if he uses teh correct event he can control the drops

tender shard
# last sleet the issue is, I'm overriding a block's drops by setting the blocktype to air, th...

https://github.com/JEFF-Media-GbR/JeffLib/blob/master/core/src/main/java/com/jeff_media/jefflib/ItemStackUtils.java#L229 This is how I damage items. It works the same way as in vanilla, e.g. it respects durability enchantments and stuff, calls a PlayerItemDamageEvent, and blah

GitHub

Avoid writing the same code over and over again - use JeffLib for your Spigot plugins! - JeffLib/ItemStackUtils.java at master ยท JEFF-Media-GbR/JeffLib

last sleet
#

alr, I guess I'm gonna use blockdrop then ^

fluid river
#

cancel BlockDropItemEvent if block matches + World#dropItem()

eternal oxide
#

will not do what he wants. He already has the correct answer

fluid river
#

will actually

#

he will lose durability

#

and get drop he wants

eternal oxide
#

will not damage teh tool used. Which was his original issue

#

if you cancel the break the damage to the tool is also canceled

fluid river
#

why lol

#

no need to cancel the blockbreak

eternal oxide
#

yes and no

fluid river
#

just cancel blockdrop and drop item manually in the world

eternal oxide
#

I didn;t notice you said blockdrop event

tender shard
#

and then call another BlockDropItemEvent ๐Ÿ˜›

#

for your custom item

#

with the cancelled event's blockstate

fluid river
tender shard
#

no, it only calls ItemSpawnEvent

#

how would it be supposed to know what block caused a drop

#

could also be a random drop, or an entity. and also the original blockstate is meanwhile gone

eternal oxide
#

No need, you don;t even cancel the drop event, just remove items from teh drops and drop whatever you want

fluid river
#

oh true

tender shard
#

I'd still call my own BlockDropItemEvent to notify other plugins about it

eternal oxide
#

perhaps

fluid river
#

i just thought it can call blockdropitem with block on given location or smth

#

but block is not getting destroyed so yeah

#

i love this so much

verbal slate
#

Guys, a strange idea came to me. But is it possible to use the bar next to the nickname in order to color-mark certain messages?

#

I was looking for this in the api, but I didn't find anything

river oracle
#

Uhm iirc that's partially client side

#

And hard coded

verbal slate
#

๐Ÿ˜ฆ

river oracle
#

The only thing you can do is make it green gray or red by either activating deactivating chat reporting or using only system messages

verbal slate
#

By the way, I didn't understand the encryption topic at all. What is it for? And will the NoEncrypted plugin, as well as enforce-secure-profile=false, be enough to disable this?

verbal slate
river oracle
river oracle
#

Activate chst reports by removing all chat formatting plugins and enforcing secure profile

#

Deactivate by not enforcing use a plugin

#

System message only via a plugin

verbal slate
#

I meant the decorative function of this, but as I understood, it is only possible to implement it from the client's side

river oracle
#

You can't use that bar as decorative

#

You'd prob have to override nms code for that

#

Best would be to use fabric as they use mixins a lot

verbal slate
#

okay

#

thx

torn shuttle
#

gaze upon my creation and despair

remote swallow
#

hows your dog

torn shuttle
#

dead as dirt

remote swallow
#

ratio

torn shuttle
#

technically things can go more inline, when I do conditions for actions those will have targets as well and that's inside of a script inside of the powers card

#

that's going to be pretty funny

junior geyser
#

I noticed in 1.19.3 the PacketPlayOutPlayerInfo class has disappeared. Does anyone know what it has been replaced by?

nimble zinc
#

Is there a way to register an eventListener to only some players to reduce server processing when a lot of players are present ?

worldly ingot
#

Just do an if statement in your listener

#

No need to overcomplicate

#

Your O(1) check is not going to overburden the server ;p

river oracle
#

It took me 8000 leaked infinite running async tasks to crash my server you should be fine with your if check

honest vector
#

Can anybody know the solution?

delicate lynx
#

ask geyser

quaint mantle
#

any of you know a site where you can convert a texturepack file to a link

#

not dropbox i swear there was an actual website for it

delicate lynx
quaint mantle
#

ty

valid basin
#

Guys, can someone who know javascript help me translate this to java? I'd appreciate it


async function ScanResult(scanUUID) {
const response = await axios.get(`https://api.echo.ac/query/scan?key=MTYxNzAzMzEzMjEwOT&uuid=${scanUUID}`) //get scan info for scan with UUID = scanUUID (would replace key with your key)

if (!result) 
  return ("no result")

if (result.detected = 1)
{
  return 1
}
else if (result.detected = 2)
{
 return 2
}
else 
{
  return 0
}
}```
honest vector
#

From what ik is that this is a authme problem

remote swallow
#

authme triggers once you have joined, it wont stop you from joining from what i remember

honest vector
#

It says this

remote swallow
#

its probably a geyser issue

honest vector
#

Let's see

quaint mantle
#

It's not Geyser but floodgate that's causing your issue, the prefix to be specific. Either yeet the prefix, yeet auth me cuz meh offline .. or edit auth me regex to allow the prefix.

verbal slate
#

Guys, how can I make a check that the item in my hand is ANY spawn egg?

remote swallow
verbal slate
#

SpawnEgg class deprecated

remote swallow
#

i did not see that lmao

verbal slate
#

oh there is a SpawnEggMeta

#

good

wet breach
#

Deprecated doesn't necessarily mean unusable

quaint mantle
#

Hello! Is there any functions exposed to the API; which I can use to edit the Knockback?

#

I haven't did Plugin programming for 2 years, so I'm kinda lost rn

remote swallow
#

set velocity

quaint mantle
#

thanks!

formal bear
#

It's better to have two listeners or one with case? For the EntityDamageEvent and events DamageCause

sullen marlin
#

Whatever you want

#

Won't they both need a conditional anyway

quaint mantle
#

How should I load default kits?
Should I stick to yaml, or via code directly?

#

i prefer the first option, but i'd like to have feedback

formal bear
#

yaml ofc u can change it anytime

quaint mantle
#

yes, that was a silly question thanks!

nimble zinc
#

What's the best way to prevent a chunk from unloading ? Is there a better way than loading it again as soon as it unloads (doesn't seem very efficient, plus I don't know if a chunk will unload at every tick when a player is not near it) ?

#

(I can't do chunkUnloadEvent.setCancelled(), idk why)

verbal slate
#

Guys, how do I check that the block == any carpet?

onyx fjord
#

one is to check if material name ends with CARPET

native nexus
#

Easy way check if name of material contains carpet

#

or that ^

sullen marlin
#

search the javadocs for ticket

remote swallow
#

?jd-s

undone axleBOT
nimble zinc
verbal slate
#

Thank both

chrome beacon
idle loom
#

Wouldn't this set the server's MOTD when it gets pinged, right?

@EventHandler (priority = EventPriority.HIGHEST)
public void onProxyPing(ProxyPingEvent e) {
  ServerPing ping = e.getResponse();
  ping.setDescriptionComponent(new TextComponent("Testing..."));
  e.setResponse(ping);
}```
all it does is bug out the version
honest vector
tender shard
remote swallow
#

ig the lower part isnt part of the structure

tender shard
#

I've checked the code for this structure and it has stuff like this: (1 sec)

opal juniper
#

Hmm

#

I dont have much experience with structures, but, intuitively there is probably another section

#

see where that structure is invoked in NMS i guess

#

weird though cause DesertPyramidStructure extends SinglePieceStructure

honest vector
remote swallow
#

ye

remote swallow
#

also go to geyser

torn shuttle
#

for april first paper and spigot should swap icons, it would be pretty funny

remote swallow
#

can confirm

torn shuttle
#

this is a longshot but anyone have experience using selectize on websites?

#

it looks cool but it requires jquery which I was trying to avoid

midnight shore
#

HI, how can i create an entity for a client using packets (obviously)? I want to show it not hide it from everybody else

midnight shore
#

wait i probably found a way

#

ty anyways

#

what does this mean?

quiet ice
torn shuttle
#

that sounds cursed

quiet ice
#

<#general message> being their mascot. Yes, I am not kidding.

torn shuttle
#

thanks, I hate it

#

almost as much as I hate installing jquery and a library only for it not to work

#

aha this thing requires it to already be appended to the page, that's why

karmic mural
quiet ice
tall siren
#

Bro

#

This is insane

torn shuttle
#

the functionality seems pretty cool

#

for my purposes

quiet ice
#

if action is 1 for example only the gamemode field will be present, for 4 there are no fields and so on. @midnight shore

kind hatch
torn shuttle
#

it does native multiselects, it can autocomplete based on different fields and so on

#

and it's a single line to hook it up to my system which is always a plus

kind hatch
torn shuttle
#

yeah a bit

#

enough that it is real useful for me

sacred prairie
#

Hi, i have a problem that if i rotate an item in item frame the value does not update in java, or at least on my debug messages. this is the code to check which rotation the item frame has: ```java
public void paint(){
for (Bundle<ItemFrame, Type> pack : frames.values()){
if(pack == null)
continue;

        ItemFrame frame = pack.getFirst();

        boolean isCorrect = false;
        switch (pack.getLast()){
            case Up -> isCorrect = frame.getRotation() == Rotation.COUNTER_CLOCKWISE_45;
            case Right -> isCorrect = frame.getRotation() == Rotation.CLOCKWISE_45;
            case Down -> isCorrect = frame.getRotation() == Rotation.CLOCKWISE_135;
            case Left -> isCorrect = frame.getRotation() == Rotation.FLIPPED_45;
            case Start,Stop -> isCorrect = true;
        }
        System.out.println(frame.getRotation());

        //set sea latern
        if(isCorrect) {
            frame.getLocation().subtract(1, 0, 0).getBlock().setType(Material.SEA_LANTERN);
        }else{
            frame.getLocation().subtract(1, 0, 0).getBlock().setType(Material.BLUE_TERRACOTTA);
        }
    }
}```
torn shuttle
bitter dust
#

how to get server tps?

StringBuilder sb = new StringBuilder( ChatColor.GOLD + "TPS from last 1m, 5m, 15m: " );
        for ( double tps : MinecraftServer.getServer().recentTps )
        {
            sb.append( format( tps ) );
            sb.append( ", " );
        }
        sender.sendMessage( sb.substring( 0, sb.length() - 2 ) );

this method get crash (sorry for my eng)

sacred prairie
torn shuttle
#

are they full on entities?

#

what a great game

sacred prairie
kind hatch
#

I think they are TileEntities.

chrome beacon
#

No

torn shuttle
#

I thought they were tileentities as well

chrome beacon
#

They are entities

midnight shore
#

Is there on wiki.vg a part for ProtocolLib's Spawn_ENTITY_LIVING?

sacred prairie
bitter dust
kind hatch
chrome beacon
bitter dust
sacred prairie
kind hatch
#

What?

torn shuttle
#

he's scanning rotations

kind hatch
#

How is the player involved here?

torn shuttle
#

not setting

#

I think his question is purely just querying the rotation

sacred prairie
#

im trying to get the rotation and set the block to a sea lattern if the rotation is correct but the rotation is not updating smh

torn shuttle
#

does it always give the same value or could it be that you are getting the value before the rotation is fully done

sacred prairie
frank kettle
#

Hey, is there a way to get the items dropped list from a block broken on the BlockBreakEvent?

I want to know how many items they are getting and use that count for some kind of xp multiplier on my plugin. Searched online but couldn't find any specific threads with this. Only thing I found was to make your own fortune code.

remote swallow
#

event.getDrops()?

sacred prairie
sacred prairie
#

yep

frank kettle
chrome beacon
#

No

frank kettle
#

i thought that gets the drops from the default block. not fortune included

#

I want with the fortune included.

chrome beacon
#

Use the BlockDropItemEvent

sacred prairie
chrome beacon
frank kettle
chrome beacon
#

Again use the BlockDropItemEvent

sacred prairie
frank kettle
frank kettle
kind hatch
chrome beacon
frank kettle
chrome beacon
#

It would

kind hatch
#

It shouldn't though.

kind hatch
#

If you are passing in a tool with fortune, it should take that into account when getting the drops.

frank kettle
chrome beacon
tender shard
kind hatch
#

Is that not what you're wanting?

tender shard
#

all it can tell you it's 1x diamond when using a pickaxe and 0x diamond when using anything else than a pickaxe

#

it returns the "default drops" for this itemstack and nothing else

frank kettle
tender shard
kind hatch
frank kettle
#

Olivo told me the right direction.

#

im fixing my code on it

torn shuttle
#

aw yee bby I love webdev

tender shard
#

BlockBreakEvent is fired at the top of PlayerInteractManager

#

then when it was not cancelled, it calculates the drops, otherwise it sets back the block

frank kettle
#

yes we found it already

#

BlockDropItemEvent is the one to use for such thing

#

I may be thinking of a bug it might cause.

#

if I break a furnace or a chest with items inside. this function will be called and it will "glitch" the system

#

I might really need to create my own fortune system

#

since this event says the event.getBlock will most likely always come as AIR since it's called after block being broken, i can't really check if they are breaking a ore

wet breach
frank kettle
#

only way would be to check the drops but a chest or a furnace or any other "storage" would bring it up

wet breach
#

and then fire your own custom event for such things

tender shard
#

just get the blockstate

frank kettle
tender shard
chrome beacon
#

or just filter the list to only contain the drop types from getDrops

frank kettle
frank kettle
wet breach
#

most people overlook making their own events

frank kettle
#

fcking true

#

I didn't notice that part

#

amazing alex, ty

tender shard
chrome beacon
#

True

tender shard
#

although no problem, containers will always only drop one of itself

chrome beacon
#

If you break a container it will always drop 1. Fortune don't work so you can just give xp from get drops

#

;/ too slow

kind hatch
#

Jfc, do none of you realize that #getDrops(ItemStack tool) will do the calculations with the enchantments applied to the tool you provide?

chrome beacon
#

Doesn't match

frank kettle
#

game will drop X, code will say it would drop Y

tender shard
#

as you see yourself, sometimes it returns 4, sometimes 1, sometimes 3

#

the drops were not calculated yet, so although it says 4 now, it doesnt mean it actually also will drop 4

#

as you see yourself, the output of getDrops(itemstack) is random

kind hatch
#

Oh ffs. I'm dumb.

#

I don't remember it being like this at one point.

#

It used to calculate things properly.

tender shard
#

that's not possible

chrome beacon
#

^ doubt

tender shard
#

it's like a dice

#

it can be 1-6

#

now I ask you "throw the dice" and it returns 3

#

then I throw it too and it's 5 now

#

it's the exact same thing

frank kettle
#

what's the rng of it? does anyone have a table with that? for fortune

#

like, from where to where per fortune

tender shard
#

probably the ServerLevel's RandomSource

kind hatch
wet breach
#

are people just confusing this with loot tables?

kind hatch
#

Did they change fortune to loot table logic?

frank kettle
kind hatch
frank kettle
#

๐Ÿ˜ฑ

kind hatch
#

The math is there, you just gotta plug in the level.

frank kettle
#

didn't see it. went right to the table

frank kettle
#

๐Ÿซ‚

kind hatch
#

๐Ÿซ‚

frank kettle
#

๐Ÿ˜”

#

stop pointing out im dumb and didnt notice

#

๐Ÿฅน 2nd time already

#

but tyty

kind hatch
#

I'm curious now. Does #getDrops(ItemStack tool) not returning the proper value intended functionality then? Or is this a bug?

chrome beacon
#

It works just as intended

#

getDrops returns what would be dropped if you broke the block

#

It's just that a block doesn't always drop the same things

kind hatch
#

Yea, but it's not returning what you would expect.

ruby pebble
#

Is there a way to increase the maximum durability of an item?

kind hatch
#

Which means it's not documented well.

#

Or it's a bug.

chrome beacon
#

You can however make it use less durability like the unbreaking enchant

frank kettle
chrome beacon
#

If you want to improve the Javadoc you can always do that

#

?stash

undone axleBOT
kind hatch
#

But that's dumb. It should return exactly what the game shows. Not an approximation.

chrome beacon
#

It's not an approximation though

sacred prairie
#

i mean there is randomniss involved if i get it correctly

frank kettle
#

the block.getDrops does a "simulation" if you would break that block.

#

like Olivo has helped before, if you need the event when drop items happen, use the event BlockDropItemEvent

#

this one will tell the right numbers.

#

@chrome beacon btw, im trying to make a "Harvesting" event and I'm using the event PlayerHarvestBlockEvent. But now I'm not sure which to use for each crop. like Wheat/Carrots/potatoes can be called on this event or on the blockbreak or on the blockdropitem. and the Sweet Berries can be called on the playerHarvest or on the blockdropitem as well.

Do you perhaps know for this what would be the best?

ruby pebble
frank kettle
#

i guess blockbreak is called first, so i should use the ones after in case blockbreak is cancelled.

chrome beacon
sacred prairie
frank kettle
#

but seems like there's 2 options which makes it weird to know exactly which to use. if anyone has used them and knows whats the different and which should be used for this. would appreciate

chrome beacon
frank kettle
#

is there any specific reason for it?

#

or just preference

sacred prairie
orchid gazelle
#

//push

chrome beacon
#

If you need the drops and don't care about cancelling the block breaking the BlockDropItemEvent is what you would use

frank kettle
#

time to use BlockDropItemEvent for everything ๐Ÿ˜‚

chrome beacon
#

The only downside is that the event doesn't exist in old versions (if you're trying to support that)

frank kettle
#

nah, the server is on 1.19.2

#

i do use viaversion to allow older versions

#

but not the server side

chrome beacon
#

Then great you don't have to deal with the pain of multiversion support

frank kettle
#

time to fix code then

#

ty again mr Olivo

chrome beacon
#

No problem ๐Ÿ™‚

ruby pebble
#

my english is bad, sorry

chrome beacon
#

?

#

What's the problem

frank kettle
#

now I'm curious on the unbreaking

#

is each level 1 more use, or % rated?

chrome beacon
#

Time to open the Minecraft wiki again

frank kettle
#

like unbreaking 10, is it 10+1 uses per durability, or some weird formula % behind it?

chrome beacon
#

Minecraft is very well documented

kind hatch
#

It's a percentage chance to not use a durability.

frank kettle
frank kettle
#

that's weird but also kinda makes sense

chrome beacon
#

Looks like the formula is 100 / (level + 1) % chance that using the item reduces durability

frank kettle
#

at the end of the day, on items with big durability the chance will always end up being close to average anyways

#

but its crazy how it's a chance to take down durability

#

curiosity fixed ๐Ÿ˜‹ ty

wet breach
#

think it is only how much durability is taken away is all that changes

kind hatch
#

Tools and armor have different calculations.

wet breach
#

been a while since I have needed to really look at mc internals

frank kettle
kind hatch
#

Tools always go down by one, and unbreaking calculates a percentage change to not tick damage based on the level.

#

Armor is another story.

echo basalt
#

^

#

unbreaking is just a chance to not damage the item

#

armor is a full equation

torn shuttle
#

minecraft certifiably has one of the worst item durability systems ever conceived

echo basalt
#

but binding limits to the material instead of to the item meta is a bit mehh

ruby pebble
torn shuttle
kind hatch
torn shuttle
#

what's the largest number you can think of illusion

echo basalt
echo basalt
torn shuttle
#

see he doesn't even know a single number

echo basalt
#

uh, sure

torn shuttle
#

compression is a stupid excuse, it's a bad system just like the damage system

kind hatch
echo basalt
#

y=mx+b

sacred prairie
#

any1 knows why item frames just change theyr entity id and how to update them so you have the correct entity id again?

river oracle
sacred prairie
#

its a normal line function

river oracle
#

No really?

#

Myes I was about to do some crazy ass chunk scanning for specific blocks then I realized chunks are a persistent data holder o am i relieved

sacred prairie
#

do you know how to work with item frames cuz im stuck ๐Ÿ˜ข

river oracle
#

Gross entities

sacred prairie
#

ye

river oracle
#

I've never 3ven touched entities

sacred prairie
#

oh

river oracle
#

Crazy considering it's been almost 2 years now

sacred prairie
#

entitys have an id and the just change it

#

and idk how to get the new id

peak depot
#

what to code?

sacred prairie
#

? wdym

peak depot
#

not u just normal question

#

a new one

echo basalt
amber vale
#

How do I get the direction a furnace is facing?

river oracle
#

Laggy messy unfun. Not even mentioning if you need nms with them lol

worldly ingot
#
Directional furnace = (Directional) block.getBlockData();
BlockFace face = furnace.getFacing();```
subtle folio
echo basalt
peak depot
#

Guys, what can I code I ran out of ideas

tardy delta
#

essentials 2.0

amber vale
#

like

#

made from blocks

#

and they walk around like normal mobs

#

lol

#

What would be an efficient way of making multiblocks without the code becoming 100 if lines?

tardy delta
#

multiblocks?

vast raven
#

I've a problem, I need to pass a player parameter in a method of CorspeRebornAPI (a corpse plugin as the name suggests), the problem is that sometimes I need to spawn a corpse of a player just by his name or his uuid

#

The plugin MUST takes a player as parameter, but sometimes the player can be offline

dusk flicker
#

Do they have a method for an offline player object or only Player?

#

If you really need an offline player and they don't support it I'd ask the dev to add it or write a pr yourself

sacred prairie
quiet ice
#

My most fun projects till now was to write a chunk-based claiming plugin. On it's own no big deal, but then one can hyperoptimise it

#

These are only the chests current loaded

#

I assume you are better of reading the world data directly

vivid skiff
#

It loads all the chest witch are already in a loaded chunk right?

misty ingot
#

plugin ideas?

#

im bored and have no ideas for what to make

quiet ice
#

As they are already loaded

#

Not sure how they behave if the loot hasn't been generated yet though

vivid skiff
#

Can you give me an example on a way to do it?

quiet ice
#

Define "it"

vivid skiff
#

To get the contents off all the loaded chest

tardy delta
#

InventoryHolder#getInventory

#

iirc

quiet ice
#

nah

vivid skiff
#

Have some ideas?

tardy delta
#

cast blockstate to Chest

vivid skiff
#

I already did it

#

.

tardy delta
#

then call getInv?

#

hm

glass mauve
#

how long would be the vector player.getEyeLocation().getDirection()?

meager lynx
#

how do we make the hunger more higher for the user

worldly ingot
meager lynx
#

like they should get hunger a bit faster

glass mauve
#

ah ok

#

means 1 = 1 block in minecraft?

worldly ingot
#

Yes

meager lynx
#

can we use the setSaturation

worldly ingot
#

Saturation is (in a very oversimplified way) a second hunger bar, so probably not quite what you want

meager lynx
#

i see

worldly ingot
#

To make people hungry more quickly, you have to give them the hunger effect. There's no other way to go about doing that unless you intend on having a task timer that ticks every few seconds and decreases hunger or whatever

#

(which is a valid solution - you can do that too)

meager lynx
#

i meant like

#

in peaceful

#

the hunger is slow / doesnt lower

#

how do i make it medium

#

does the server need to change it

worldly ingot
#

Oh, yeah, then your only solution is to handle hunger yourself

#

I don't even know if hunger exists in peaceful mode or if it can be set to anything lower than 20

worldly ingot
#

The artifact id looks to be LielsUtils, not lielsutils

#

Maven is case-sensitive

amber vale
#

Why can't I cast Block into Furnace? (yes I am using org.bukkit.block.Furnace and not the material one)

tardy delta
#

blockstate?

quaint mantle
#

set 5 to {kills::%player%}
doesnt work

chrome beacon
quaint mantle
#

where

quaint mantle
remote swallow
amber vale
frank kettle
#

Hey, i don't know where to ask this but has anyone used Orebfuscator (Anti Xray) or some other kind of anti x-rays?

The problem I'm having is I made my own mine 3x3 pickaxe, and it's not updating the blocks correctly around and gives "visual bug".
(Video attached below)

Has anyone dealt with something alike and knows a way to fix it?

#

I've added to my code the Orebfuscator API to try to fix but still hasn't worked. I will post the code below:

remote swallow
#

didnt choco tell you what to do

frank kettle
#
OrebfuscatorService orebfuscator = Bukkit.getServicesManager().load(OrebfuscatorService.class);
if (orebfuscator != null) {
    Collection<Block> collection = new HashSet<>();
    for (Location loc : blocks_to_break) {
        for (BlockFace face : Main.getInstance().blockFaces) {
            collection.add(loc.getBlock().getRelative(face));
        }
    }
    orebfuscator.deobfuscate(collection);
}```
frank kettle
#

breakBlock would cause an infinite loop i do not know how to break

remote swallow
#

how

frank kettle
#

because breakBlock would cause the breakblock event to be called again and again

#

so it would cause the 9 broken blocks to then make the player mine the 9 blocks around per each. and then another 9 per each and so on

remote swallow
#

one method you could do is check where the playing is looking, only remove the blocks around and 1 diagonal of the block if they are looking at it

faint cypress
#

Hey there.

I'm trying to make a MiniMessage (Adventure Chat API) TagResolver.
I can see that I can do:

TextColor color = //Something
TagResolver.resolver("base_style", Tag.Styling(color));

I want to be able to apply all of the TextDecoration in a Style, but it doesn't work (Presumably because a Style contains hoverevents, clickevents, etc)...

Style style = //Something
TagResolver.resolver("base_style", Tag.Styling(style)); // Doesn't work
// Instead have to...
TagResolver.resolver("base_style", Tag.Styling(color, TextDecoration.ITALIC, TextDecoration.BOLD));

What is the cleanest / most efficient way to extract all of the TextDecoration from a Style like this?

remote swallow
#

you probably want to use components

twilit roost
#

How can I turn my plugin into dependency?
I'm already using it as a dependency, but don't want to always have to put that plugin into /plugins

frank kettle
rotund ravine
quiet ice
twilit roost
#

not really ig
just need those Spigot things

glossy venture
#

how do i expand a stream
like i input a String[] lines, call Arrays.stream(lines) -> Stream<String>, and then .map(s -> s.split("\n")) -> Stream<String[]>, how would i flatten/expand that stream into a Stream<String> that can be collected to a List<String>

hybrid spoke
#

so just use spigot as a dependency in your plugin, mark it as provided and let others shade your stuff in

glossy venture
#

oh shit thanks

limpid umbra
#

Send JSON message without building TextComponent

fickle helm
#

Is buildtools and 1.19.3 remapped broken right now? I can't get mine to build when I use the --remapped option

high vector
kind hatch
#

I think that's NMS. You'll need to depend on spigot to get access to those classes.

high vector
#

how do I add that?

kind hatch
#

Change your dependency. ArtifactID should be spigot instead of spigot-api.

opaque scarab
#

Hi. How and what packet should I use for posing an armorstand? This is in Spigot 1.19.2 with the Mojang remappings

kind hatch
undone axleBOT
opaque scarab
#

For posing an armorstand using a packet so it would only apply to a certain player, I;m guessing I have to use a ClientBoundSetEntityDataPacket, but it says it require a โ€œFriendlyByteBufโ€ ? What should I do?

rotund ravine
# opaque scarab For posing an armorstand using a packet so it would only apply to a certain play...

The ClientBoundSetEntityDataPacket is used to update the data of an entity on the client-side. To use this packet, you'll need to create a FriendlyByteBuf and then write the necessary data to it. This data will include the entity's unique ID, as well as the updated values for the entity's data. Once you've written the data to the FriendlyByteBuf, you can then use it to create a ClientBoundSetEntityDataPacket and send it to the client.

Here's an example of how you might use the ClientBoundSetEntityDataPacket to update an armor stand's pose:

// Create a FriendlyByteBuf to hold the entity data
FriendlyByteBuf data = new FriendlyByteBuf();

// Write the entity's unique ID to the buffer
data.writeLong(armorStand.getUuid().getMostSignificantBits());
data.writeLong(armorStand.getUuid().getLeastSignificantBits());

// Write the updated pose data to the buffer
data.writeByte(0); // This is the "index" of the data we're updating
data.writeByte(0); // This is the "type" of the data we're updating (0 for a Pose)
data.writeByte(0); // This is the "flags" for the data we're updating (0 for a Pose)

// Write the individual values for the pose
data.writeByte(armorStand.getBodyPose().getX());
data.writeByte(armorStand.getBodyPose().getY());
data.writeByte(armorStand.getBodyPose().getZ());

data.writeByte(armorStand.getLeftArmPose().getX());
data.writeByte(armorStand.getLeftArmPose().getY());
data.writeByte(armorStand.getLeftArmPose().getZ());

// Repeat this process for the right arm, left leg, and right leg poses

// Create a new ClientBoundSetEntityDataPacket using the data from the buffer
ClientBoundSetEntityDataPacket packet = new ClientBoundSetEntityDataPacket(data);

// Send the packet to the client
client.sendPacket(packet);

ChatGPT says this.

opaque scarab
#

@rotund ravine Thanks!

worldly ingot
#

lol, I can't verify how accurate that is, but if it's not spot on, it's damn close

rotund ravine
#

Don't look at my recent posts on the spigot forums

worldly ingot
#

I was messing with it earlier today and it's been great

tardy delta
#

what a gentleman that friendly bytebuffer

rotund ravine
#

It even answers in different languages

worldly ingot
sullen marlin
#

Wtf

worldly ingot
#

Okay, I'm a moderator, I'm obliged to tell you that the forums should be in English

#

lmao

sullen marlin
#

That code was chatgpt?

rotund ravine
#

Yeah

sullen marlin
#

It's like a million times better than autopilot

opaque scarab
#

Wait what?

#

That was an AI?

rotund ravine
#

Yes

worldly ingot
#

Yeah ;p All AI based on a question

opaque scarab
#

Thatโ€™s crazy

worldly ingot
#

It's honestly impressive the code it generates and with how much accuracy

sullen marlin
#

Also someone please check if it's correct, it looks pretty close (does that packet include that uuid or just entity Id though?)

kind hatch
#

Entity id

worldly ingot
#

Yeah that's what I mean. If it's not spot on, it's close

sullen marlin
#

Also entity metadata has more complicated serialisation

opaque scarab
#

Probably accurate enough for me to figure it out

sullen marlin
#

Not really it's a garbage way

worldly ingot
#

Jan did you copy/paste the OP's question verbatim? PES_HahaLol

sullen marlin
#

The problem with AI is it's always 100% confident

sullen marlin
#

Like people on the internet

worldly ingot
#

That's awesome. I hope it's accurate and he replies with "Solved"

opaque scarab
#

@sullen marlin How would you set the armorstand pose on the client then?

worldly ingot
kind hatch
gleaming grove
#

JavaPlugin::onEnable() is called before or after ServerLoadEvent event?

rotund ravine
#

depends

gleaming grove
#

nvm must be before

worldly ingot
#

How can it be before? ;p

gleaming grove
#

because you firstly need somehow register event

opaque scarab
#

@gleaming grove Itโ€™s before Iโ€™m sure

rotund ravine
#

@worldly ingot i read that as worldloadevent

worldly ingot
#

Oh mb I read the question backwards lol. Yeah, plugins enable first otherwise why call an event

opaque scarab
#

@gleaming grove An instance of the event class is created usually in OnEnable

gleaming grove
#

does MD5 or someone else made events lifecycle documentation?

sullen marlin
#

chatgpt finally has me convinced

#

Im playing with it today

rotund ravine
#

I told ChatGPT to write it again differently, it gave me this.
Here is an example function that sets an armorstand's position and pose using the ClientBoundSetEntityDataPacket and FriendlyByteBuf classes in Spigot:

public void setArmorstandPositionAndPose(Armorstand armorstand, Vector3f position, Quaternionf rotation, Vector3f headRotation) {
  // Create a new packet
  ClientBoundSetEntityDataPacket packet = new ClientBoundSetEntityDataPacket();
  
  // Set the entity ID
  packet.setEntityId(armorstand.getEntityId());
  
  // Create a new FriendlyByteBuf to hold the entity data
  FriendlyByteBuf data = new FriendlyByteBuf();
  
  // Set the position and rotation of the armorstand using the data buffer
  data.writeVector3f(position);
  data.writeQuaternionf(rotation);
  data.writeVector3f(headRotation);
  
  // Set the entity data in the packet
  packet.setData(data);
  
  // Send the packet to the client
  armorstand.getPlayer().sendPacket(packet);
}

This function takes an Armorstand object, a Vector3f representing the position, a Quaternionf representing the rotation, and a Vector3f representing the head rotation as parameters. It creates a ClientBoundSetEntityDataPacket, sets the entity ID to the ID of the armorstand, creates a FriendlyByteBuf to hold the entity data, writes the position, rotation, and head rotation to the data buffer, sets the entity data in the packet, and finally sends the packet to the client.

opaque scarab
#

@rotund ravine So this code actually works?

kind hatch
#

I'm pretty sure there is no empty constructor on that packet though.

rotund ravine
opaque scarab
#

Rip

rotund ravine
#

I would need to supply it with more data, so If there was an error I could mention it to it and tell it to rewrite it to fix it.

faint cypress
#

In my plugin I have a Map<UUID, PlayerData>.
When a Player logs in I load the PlayerData by reading a database like:

public class AsyncPlayerPreLoginListener implements Listener {
    @EventHandler
    public void onPlayerPreLogin(AsyncPlayerPreLoginEvent event) {
        // Contact db and get the information needed to make a PlayerData.
        // ???
    }
}

How can I give this data back to the main thread, before PlayerLoginEvent or PlayerJoinEvent is called?
I was going to do java Bukkit.getScheduler.runTask(plugin, () -> { plugin.giveDataMethod(uuid, and, the, data, that, i, loaded) } );
...but I'm not meant to do that right?
How am I meant to pass this information to my Map<UUID, PlayerData> on the main thread?

kind hatch
#

It'll handle the thread switching.

faint cypress
#

Thankyou both, but to just to reaffirm the first bit of my question - will this guarantee that it will run before PlayerLoginEvent are PlayerJoinEvent called?

idle loom
#

Wouldn't this set the server's MOTD when it gets pinged, right?

@EventHandler (priority = EventPriority.HIGHEST)
public void onProxyPing(ProxyPingEvent e) {
  ServerPing ping = e.getResponse();
  ping.setDescriptionComponent(new TextComponent("Testing..."));
  e.setResponse(ping);
}```
all it does is bug out the version
kind hatch
#

The AsyncPlayerPreLogin event is fired before the PlayerJoinEvent, so it should be a guaranteed thing.

tardy delta
#

what site is that?

rotund ravine
#

ChatGPT

tardy delta
#

ty

#

have to login lmao

faint cypress
#

I think that's what has me confused. If I'm telling Bukkit "hey schedule this to run", how can I know it's going to run before PlayerLoginEvent & PlayerJoinEvent?

kind hatch
#

So only if the state is set to allowed, will the player be allowed to join.

#

But the event needs to finish first before any following events can work off of it.

faint cypress
#

Thanks so much, I appreciate the help. ๐Ÿ™‚

faint cypress
kind hatch
#

That's ChatGPT

rotund ravine
#

It's an AI, I just asked it question

solid cargo
#

idk if this belongs on here or #help-server but here goes nothing:
if bungeecord is in offline mode and another player with the same name connects to the proxy, does it kick all the players with that name?

faint cypress
#

Are you guys shitting me?

rotund ravine
#

No?

faint cypress
#

What year is it holy

solid cargo
#

its twenty twenty, too

kind hatch
opaque scarab
#

@faint cypress Um the year is 2347?

faint cypress
#

I've never seen something like that before, my mind is actually blown wtf

opaque scarab
#

Obviously

#

@rotund ravine So is the AI based on GPT-3?

kind hatch
faint cypress
#

Apologies for my aneurism lol but I can't believe that's real - how long has that existed, at least to that ability?

kind hatch
#

It's recent

#

At least publicly

dusk flicker
#

ChatGPT is the best

solid cargo
#

thank god

faint cypress
#

Still in shock, genuinely LOL.
Anyways thanks for sharing this moment with me lads and thanks for the help again ๐Ÿ˜›

solid cargo
#

can someone send me the direct link?

kind hatch
solid cargo
#

ty

gleaming grove
#

Why does it happens when I run server there is 0 Entitis (should be 93) for certain chunk by after reload entitis appears

rotund ravine
#

Is your plugin running postworld?

gleaming grove
#

no, what is that?

rotund ravine
#

If not it will load before the world so obviously no entities

gleaming grove
#

so instead ServerLoadEvent I should use some "WordLoadedEvent"?

rotund ravine
#

Simply make the code that checks for entities run in a bukkit runnable that runs after 1 tick. The runnables run after server has loaded.

gleaming grove
#

i try that, but ServerLoadEvent suppose to work excatly like your approach

rotund ravine
#

You sure?

gleaming grove
#

not at all

worldly ingot
#

Entities are loaded into chunks asynchronously, so in all likelihood they're not loaded by the time your plugin runs on startup

#

They are, however, loaded after a reload because reloads don't remove entities

worldly ingot
#

Only as of recently are entities loaded async from chunks

#

It's like a 1.17 thing or something. Can't recall

gleaming grove
#

but entitis should be loaded when chunk is loaded right?

rotund ravine
#

Havenโ€™t been here that recently i see

worldly ingot
rotund ravine
#

Also Piano plugin??

worldly ingot
#

September of last year, so yeah, 1.17

opaque scarab
#

So Iโ€™m wondering, whatโ€™s better? Mojang mappings for MNS or Spigot mappings?

orchid gazelle
#

Now go bonk mojang for making crawling not be a Pose

buoyant violet
#

guys

#

i made a number guess game

#

but its with the old fashion way the 3 cups and with a ball

#

and i tried it out but

#

it goes 0-1-2-3

#

but i want to do 1-2-3

#

where is the ball?
cup 1, 2 o 3?
2
you lost, the cup with the ball was in the cup n.0

Process finished with exit code 0

rotund ravine
#

Just + 1

buoyant violet
#

ok ty

midnight shore
#

hi, does anyone know the fields in ENTITY_DESTROY packet type (ProtocolLib)?

worldly ingot
#

If you open up the server code, itโ€™ll match whatever the packetโ€™s fields are

#

PacketPlayOutEntityDestroy iirc

jovial gazelle
#

guys i need help

#

Picked up _JAVA_OPTIONS: -Xmx10250M
Unrecognized VM option 'UseConcMarkSweepGC'
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
Press any key to continue . . .

#

i keep getting this error

tacit night
#

Where can i find the 1_16_R3 version of spigot, also for the maven repository.
Im currently using the 1.16.5-R0.1-SNAPSHOT from spigot-api. But i need the Class "PacketPlayOutCustomPayload" and other classes which the version i use not have

undone axleBOT
chrome beacon
#

And instead of spigot-api use spigot

tacit night
#

so i have to seperatly import it

#

thx

void mason
#

hi guys, before 1.14(i think) it was possible to make tripple chest with a bug, and i search a way to make a menu with the same size of a tripple chest. is it possible ?

#

sorry if my english is not good

sullen marlin
#

No

river oracle
#

you just ruined some poor guys dream with the truth

#

you monster

void mason
#

so its not possible to have more than 6 row in a menu ?

#

why this world is so rude ๐Ÿ˜ฆ

#

XD

#

k thanks

#

im stupid 6 is more than i need XD

long zephyr
#

Hello :3, how could i get the saved images on the resources?, if you look the pictures the plugin is saving the folder well, but i dont know how to make to load on the server. I've tried with :

plugin.saveResource(PATH,false); // PATH = images/markers/default and images/markers/custom
hazy parrot
#

what are you trying to achieve

long zephyr
#

.png

hazy parrot
#

and where are you putting those <include>-s

long zephyr
hazy parrot
hazy parrot
long zephyr
#

i need to load the images from the resources to the server plugin folder

hazy parrot
#

oh

#

just change path from

#

images/markers/default to images/markers/default/imageName.png

long zephyr
#

i have 76 .png D:

hazy parrot
#

I don't even want to ask

long zephyr
hazy parrot
#

either open jar as zipentry and walk trough dirs or save names inside of some set and saveResources for every entry of set

long zephyr
#

ohhh how could i open the jar as zipentry ?

hazy parrot
#

something along those lines ๐Ÿ˜„

long zephyr
valid solstice
#

Is there a way to not play specific sounds to a Player?

#

or to cancel those sounds?

idle loom
#

Wouldn't this set the server's MOTD when it gets pinged, right?
Am I doing something wrong?

@EventHandler (priority = EventPriority.HIGHEST)
public void onProxyPing(ProxyPingEvent e) {
  ServerPing ping = e.getResponse();
  ping.setDescriptionComponent(new TextComponent("Testing..."));
  e.setResponse(ping);
}```
all it does is bug out the version
arctic moth
#

Is there a server side method to give players a certain amount of stingers/arrows in their body?

arctic moth
fluid cypress
#

sometimes (or maybe always) when i change a players gamemode while loading (for example the join event or world change), the player is in creative mode, but cant fly, any idea why?

idle loom
quaint mantle
#

can someone help

river oracle
#

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

wet breach
river oracle
#

explain whats wrong in more detail

quaint mantle
#

the event doesnt work

idle loom
#

more detail

river oracle
#

what about it doesn't work

#

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

idle loom
#

MORE MORE!!

quaint mantle
#

it literally doesnt work

#

no errors

#

no nothing, just doesnt do anything

river oracle
#

ahhaa

long zephyr
quaint mantle
#

idk what more bruh

river oracle
#

is your plugin enabling

quaint mantle
#

huh>

#

what do u mean

river oracle
#

/pl make sure its enabled

#

make sure it turned on

quaint mantle
#

it is

idle loom
quaint mantle
#

i can craft it

#

just doesnt do the event

wet breach
#

The issue could be with the instance check of which entity

river oracle
#

have you added any debug statements

quaint mantle
#

no

wet breach
#

On phone so can't check. But getentity I am pretty sure is going to return the entity shooting the bow and not the arrow

river oracle
#

it would be Player no?

#

iirc from my minigame code from like this summer it should be player

wet breach
#

Should be whatever entity is shooting bow. But their condition is checking it for arrow and most likely failing there

river oracle
# quaint mantle no

debug statements in the future though at the top of the event to ensure it works than within each nest so you can figure out where it goes wrong

quaint mantle
#

Okay

wet breach
#

if (event.getEntity() instanceof Arrow) this is most likely where it is failing which is the start of your code block

idle loom
#

Nesting code :(

wet breach
#

So it isn't that the event isn't working just your condition check is incorrect

idle loom
#

my soul aches

river oracle
idle loom
river oracle
wet breach
#

I use tab but my ide is setup to change tab to spaces

river oracle
#

idk if thats like standard

wet breach
#

It is

river oracle
#

okay I'm normal ๐Ÿ˜ฎโ€๐Ÿ’จ

wet breach
# quaint mantle ah

That event you are using. The method you want to get the arrow is getProjectile()

river oracle
#

wait remembered I use vscode ๐Ÿ˜จ

smoky gate
#

yo

#

how do i make a plugin start/load after the world has finished loading?

#

i have set load to POSTWORLD in plugin.yml

#

but it still loads before the world

#

thanks in advance

wet breach
#

Post world is the default. I assume you have code that needs executing when the world is finished loading?

round finch
#

What java guava for?

wet breach
#

O.o

#

Pretty generically vague question

round finch
#

Like collection

worldly ingot
#

It's just a collection of utility classes. If you need a util, Guava probably has it

wet breach
#

Not only that but it has collections that are better then the standard ones too

round finch
#

Really

wet breach
#

One of my favorites from guava is the cache collections

round finch
#

All I'm thinking about is data management

#

And data science stuff

#

Later rn just curious

round finch
#

Damnit

wet breach
#

Guava is shaded into the server jar just fyi

round finch
#

Really wtf!

#

Didn't know

#

Minecraft have a insane amount of libraries..

wet breach
#

Also you have apache commons too shaded in if guava methods are too heavy for your liking

round finch
#

Wish i knew of that lmao

#

I'm pretty generic in java

wet breach
#

Lol

round finch
#

Or i believe....

#

Working on learning more programming

Got pretty decent in sql

wet breach
#

Always handy. Maybe learned a bit of thing or two from my recent talks of sql

smoky gate
#

currently trying to retrieve world border from world โ€œworldโ€ but i get null due to the plugin loading before the world

wet breach
smoky gate
#

yea, i did but it still seems to scan through the code and send an error

wet breach
#

Don't have your code execute anything until that event is fired and then maybe wait a tick or two after

smoky gate
#

also it ends up working when i use /reload but i cant do that every time i start up the server because it resets the plugin statistics

smoky gate
wet breach
#

Then create a delayed task to wait a few ticks after

smoky gate
#

ok

#

but also it starts loading quite a while before the overworld starts load

wet breach
#

Just check to see which world it is loading. If it isn't overworld do nothing

smoky gate
#

hmm ok

quaint mantle
#

how would i set the damage of a projectile?

wet breach
#

Cast projectile to arrow

#

Arrow has setDamage() method

#

Just make sure to check that the projectile is an instanceof arrow fiirst

shut field
#

I'm getting a NoClassDefFoundError from a dependency I have:

wet breach
#

?paste show entire pom

undone axleBOT
wet breach
#

What you have above isn't all of it

wet breach
#

Remove java.version tag

shut field
#

I can give the log file too if you want that

wet breach
#

Not needed

remote swallow
#

You probably need to relocate jda

wet breach
#

Your java tag version is setting to use java 8 when you are wanting java 10

#

So remove that tag

shut field
shut field
wet breach
#

Now try it

remote swallow
#

Try that if it still doesnt work googlr maven shade example

shut field
#

same issue

wet breach
#

The version of the dependency did you ensure is compiled for java 10? And not compiled for a newer version

#

Need to ensure you use correct versions for the java version you are compiling for. Also not sure why you need to compile for java 10 would recommend 11

remote swallow
#

jda 5 beta only came out like 3 weeks ago so i would guess its compiled for a lot later version

shut field
#

does it have to be on the same version Minecraft is?

remote swallow
#

java 17 is the current version minecraft uses

wet breach
shut field
#

I will be continually keeping it on the newest version

wet breach
#

But I think your issue is using a dependency that is compiled for a higher java version then what you are trying to compile for. Which won't work

shut field
#

so how do I put this on Java 17

remote swallow
#

change the version in pom and
file > project structure > project at the top > change jdk to 17

wet breach
#

Set target and source from 10 to 17

#

And the additional thing from above too

shut field
#

didn't you tell me to remove the verssion?

wet breach
#

No. I told you to remove java.version tag. You have another spot that is setting the version which is part of the compiler plugin in pom

#

Says source and target

#

When you had java.version tag it was conflicting with the compiler settings

remote swallow
#

line 16 if its <java.version>1.8</java.version> can be removed and line 27 & 28 should have value of 17

shut field
#

thanks, I'll try it again

remote swallow
#

should be good to go then

wet breach
#

Make sure to do a clean build

shut field
#

NoClassDefFoundError

wet breach
#

Show the full error please

shut field
#

ofc

#

error starts at line 216

wet breach
#

Open your plugin jar and see if the dependency was in fact shaded in

remote swallow
#

was the pom even shading it

wet breach
#

Think the empty config section might be making it not do so

remote swallow
#

yeah

#

one sec

wet breach
#

Also they need to ensure if using intellij that they are having maven compile and not the ide

remote swallow
#
              <relocations>
                <relocation>
                  <pattern>net.dv8tion.jda</pattern>
                  <shadedPattern>aspireinc.torture.libs.jda</shadedPattern>
                </relocation>
              </relocations>
shut field
remote swallow
#

put that between the configuration tags in maven shade

wet breach
#

Lately some people have been mistakenly not have maven actually compile

#

I think you have to use the big green play button for intellij when usinaven instead of right clicking build

#

But also note I don't use intellij either lol

remote swallow
#

depends

#

if you tell ij to make the green button run maven clean package or gradlew build it builds it

#

otherwise it just does nothing

shut field
remote swallow
#

line 41 it looks like

shut field
#

I put it there

#

it still isn't visible in the jar file

remote swallow
#

how are you building

wet breach
#

Then most likely maven isn't being used

remote swallow
#

or there using the maven tab on the side

wet breach
#

You would know more on that then mr

#

Just know that maven isn't being invoked otherwise it should have shaded

shut field
wet breach
#

No

remote swallow
#

press crtl twice, then type mvn clean package

#

then for following builds you can press the green play button near top right

shut field
#

like same error, but when I viewed what was in the JAR JDA5 is in it

remote swallow
#

same error or different

shut field
#

same NoClassDefFoundError at the same line

valid solstice
#

Hello just wanted to know, does 1.8.9 plugins work in 1.8 servers?

remote swallow
shut field
#

runs the createDefault method of the DefaultShardManagerBuilder class

remote swallow
#

idk what could cause that, so the best i can probably advise is going to JDA's discord and see if they know whats up

gleaming grove
#

How to teleport Armorstand when player is set as passager?

#

here is method I use to create Armorstand ```` public static ArmorStand create(Location location, String id)
{
ArmorStand armorStand;
armorStand = location.getWorld().spawn(location, ArmorStand.class);
armorStand.setVisible(false);
armorStand.setCollidable(false);
armorStand.setGravity(false);
armorStand.setAI(true);
armorStand.setMarker(true);
armorStand.setNoDamageTicks(0);
armorStand.setInvulnerable(true);
armorStand.setInvisible(true);
armorStand.setRemoveWhenFarAway(true);
armorStand.addEquipmentLock(EquipmentSlot.HEAD, ArmorStand.LockType.REMOVING_OR_CHANGING);
armorStand.setRotation(0, 0);

    var metadata= armorStand.getPersistentDataContainer();
    metadata.set(PluginConsts.PIANO_NAMESPACE, PersistentDataType.STRING,id);
    return armorStand;
}```
wet breach
#

Have you tried teleporting it?

gleaming grove
#

that was first thing I;ve done

golden turret
#

how can I move this to the left?

tardy island
#

how do i associate an item in an itemstack with my plugin? like can I add pluginname.itemname in the items metadata somehow?

gleaming grove
solemn frigate
#

sup, by the time the PlayerJoinEvent is fired, is there a player.dat file created for the player that just joined in /world/playerdata ?

#

like if player bob joined the server for the first time, at the PlayerJoinEvent is there a file <bob's uuid>.dat in /world/playerdata ?

hushed pawn
#

Hello, im trying to learn oop, xd, i rewrite my plugin, and now i have Bot object, when i create this object, bot appears and start working for some player, how can i create bot for every another player?

#

Maybe it not how i suppose to use oop

rotund ravine
#

@hushed pawn show how you have tried

hushed pawn
#

But everything is just for one player

#

What is the right way to do it for different players at the same time?

#

I have to type this string 100 times for 100 players?

#

With different object names

tardy island
#

getItem().getItemMeta().getLore() == Arrays.asList("BundleItems") are these not equal? the lore is ["BundleItems"]

wet breach
rotund ravine
#

Google what == does in java

tardy island
#

omg

#

lmao

#

thanks so much

hushed pawn
tardy island
#

@rotund ravine thanks man, would have been stuck on that forever. used .equals() instead ๐Ÿ™‚

bright jolt
#

I can't find a statistic for distance flown with Elytra on the Spigot API. Unless I'm overlooking something here.

bright jolt
quaint mantle
#

Is VisibilityManager removed from HolographicDisplays?

wet breach
vast raven
#

Is there a way to create an online player without using NMS?

eternal oxide
#

protocollib

quaint mantle
#

what's NMS?

remote swallow
#

net.minecraft.server

quaint mantle
#

oh, k k

#

hola. i have a function inside a class, this function simply gets all the players and does stuff with em in a while (true). I want to run this function as a thread 24/7 without messing up the main spigot server thread(s)

vast raven
# eternal oxide protocollib

I mean not in that sense of having the player as NPC, maybe if I explain the problem it would be better, isn't it?

remote swallow
#

?scheduling

undone axleBOT
quaint mantle
#

thanku

misty ingot
#

I am trying to make a ban plugin and want to take duration input in that mo,w,d etc format
for ex /ban {player] 2d12h7s (2 days, 12 hours and 7 seconds)

how I can make this happen?

misty ingot
#

I figured it out literally right after writing that message lmao

remote swallow
#

String.split('d')
String.split('h')

#

or String.replace("h", "hours ")

ivory sleet
#

Could use regex all the way

quaint mantle
#

I want .runTaskTimerAsynchronously(); to run forever in 30 second intervals. i dont understand wtf }.runTaskTimer(plugin, 20L * 10L /*<-- the initial delay */, 20L * 5L /*<-- the interval */); is

hazy parrot
#

Initial delay is delay before first start and other one means that It will run every "interval" ticks

quaint mantle
#

is that a 25 second interval im confused

#

OHHH

hazy parrot
#

It means it will run every 5 seconds

quaint mantle
hazy parrot
#

More or less

quaint mantle
#

so 20L * 30L it run every 30 seconds?

hazy parrot
#

More or less, make sure that every second don't have exactly 20 ticks

#

Due to lag or whatever

quaint mantle
#

np

#

tysm

#

new AuthenticationDaemon().runTaskTimerAsynchronously(this, 20L * 30L); gives me error 'runTaskTimerAsynchronously(org.bukkit.plugin.@org.jetbrains.annotations.NotNull Plugin, long, long)' in 'org.bukkit.scheduler.BukkitRunnable' cannot be applied to '(gg.brotherhood.brotherhood.Brotherhood, long)'

#

P.S the AuthenticationDaemon() is a class that extends BukkitRunnable

#

it has a public run method like the docs tlel me to

remote swallow
#

use


Bukkit.getScheduler().runTaskTimerAsync(plugin, () -> { code }, 20l * 30l);
quiet ice
#

Use JavaPlugin.getProvidingPlugin(getClass()) instead of this

maiden thicket
#

javaplugin, long, long

#

first long is how many ticks delay before the first run

#

second long is how often in ticks you want it to run

quaint mantle
#

got it working

#

thanks yall

peak depot
#

how does the bungeecord module manager work

midnight shore
#

how is this possible?

maiden thicket
#

what version is the server

midnight shore
#

Latest version of ProtocolLib and server is 1.17.1

maiden thicket
midnight shore
#

wdym

maiden thicket
midnight shore
#

yeah I guess

#

i have protocol lib in the pom

#

and also in the server plugins

maiden thicket
#

is your plugin using spigot 1.17.1

midnight shore
#

yes