#help-archived

1 messages ยท Page 208 of 1

pastel nacelle
#

it suggests you values for the selector parameters?

stoic shell
#

I looked in nms a few days ago, but bukkit has so vastly modified the command system that I don't know what to use to do that.

#

I mean how most of the vanilla command arguments work when they need to select an entity

lone fog
#

If you want stuff like @a and @p to show up in addition to player names

#

You can just add them to the list in your tabcomplete function

stoic shell
#

uh

lone fog
#

But you need to write the code to handle them as well

stoic shell
#

rich autcomplete

spring coyote
#

he probably means like @e[type=creeper]

#

stuff like that

stoic shell
#

with @e[type=...] sort of stuff too

subtle blade
#

bukkit has so vastly modified the command system that I don't know what to use to do that.
Bukkit literally has not changed whatsoever

spring coyote
#

it gets more complex than just @a

lone fog
#

Then yeah you will want to see what mojang uses

stoic shell
#

I mean bukkit vastly modified the vanilla command system

subtle blade
#

It hasn't. Mojang has. Bukkit makes use of the changes Mojang has made

#

In terms of front-facing API, Bukkit has not changed at all

stoic shell
#

well I was talking about the modified nms

#

xD

subtle blade
#

Again, CraftBukkit makes no changes to vanilla commands. At least none significant enough to consider at fault of CB

#

There is no API for rich tab completion however as that's a bit more difficult to accomplish abstractly

lone fog
#

Mojang uses net.minecraft.server.v1_16_R1.ArgumentEntity

stoic shell
#

well, I did try this...

lone fog
#

You can take it a look at that to parse your target selectors

subtle blade
#

You can use the entity selection API just fine (Bukkit#selectEntities(String)) though you can't make use of its tab completion

stoic shell
#
    public static void registerCommodoreCompletions(Commodore commodore, PluginCommand command) {
        commodore.register(command, LiteralArgumentBuilder.literal("explode")
                .then(RequiredArgumentBuilder.argument("targets", ArgumentEntity.d())) // Single target: false, only players: true
        );
    }```
lone fog
#

Oh neat, dodn't even need to use nms

stoic shell
#

I can already parse the selectors, just wanting to add autocomplete

#

the above code however, provides absolutely no autocomplete for the command argument for some reason

#

I've looked in the source of some vanilla commands in nms and they use ArgumentEntity for tab-completion as Coll1234567 said

#

however when I try to use it in my plugin for a command autocomplete, it does nothing

wicked cape
#

Any ideas?

pastel condor
#

any recommendations for a fast way to translate a yml file?

jaunty night
stoic shell
#

I think that text is handled client-side.

jaunty night
#

Are they called tool tips or smth

pastel nacelle
#

you can hide the attributes of the item, I believe

#

beyond that, you're fucked

jaunty night
#

That will work, will I have to use packets for that?

wicked cape
#

If a p2w factions server could remove it, i'm sure anyone else can. lol

spring coyote
#

In the Item data there is a hideflags, set it to 63 and it should hide everything. If it doesnt hide it then I dont think you can.

#

caps: HideFlags

jaunty night
#

Will that remove any lore I add as well?

pastel nacelle
#

no, only the item attributes

#

the + - attack shits

spring coyote
#

I dont recall all of the hideflags numbers by memory but I know that you can change the values

jaunty night
#

I see

spring coyote
#

so if u put it to a different number, it would hide different things

#

===
{HideFlags:VALUE}
VALUE ranges from 1 to 63, representing 63 combinations.

When adding to create a unique VALUE:[1]

Adding 1 will hide Enchantments

Adding 2 will hide Attributes modifiers

Adding 4 will hide Unbreakable

Adding 8 will hide CanDestroy

Adding 16 will hide CanPlaceOn

Adding 32 will hide Others, such as potion effects & shield pattern info

In binary form:

[+32] [+16] [+8] [+4] [+2] [+1]

For example: "000111" has a value of 7, and it will hide Enchantments, Attribute Modifiers, and Unbreakable.

wicked cape
#

nice code blocks pog

#

use > ```

pastel nacelle
#

2 is the one you're looking for

crimson sandal
#

I wish comments mid file didn't get removed when you call saveConfig()

jaunty night
#

I see, to add multiple I'll have to use bitwise operations I assume?

pastel nacelle
#

or just sum them up in your head, or use +

spring coyote
#

I think you can just add the 2 numbers. If you want to hide enchants and attributes, put 3 cuz enchants is 1 and the attributes is 2.

pastel nacelle
#

since they are each just powers of 2, bitwise or and + will act the exact same here

jaunty night
#

Cool, thanks for the help ๐Ÿ˜„

pastel nacelle
#

4 is 0b0100, 2 is 0b0010, 4+2=6 is 0b0110

quick arch
#

you can remove them with item flags

crimson sandal
#

Weird, this error just randomly started showing up D: Caused by: java.lang.ClassNotFoundException: com.jamesdpeters.minecraft.chests.misc.Values at java.net.URLClassLoader.findClass(URLClassLoader.java:382) ~[?:1.8.0_201] at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:171) ~[patched_1.16.1.jar:git-Paper-128] at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:100) ~[patched_1.16.1.jar:git-Paper-128] at java.lang.ClassLoader.loadClass(ClassLoader.java:424) ~[?:1.8.0_201] at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ~[?:1.8.0_201]

subtle blade
#

Usually happens as a result of a reload

crimson sandal
#

Ohhhh

#

Yeah I'm testing on Paper not Spigot

#

Weird, never had that happen on Spigot

subtle blade
#

It happens

pastel condor
#

this is the spigot discord though...

crimson sandal
#

Yeah? Some of my users had some bugs on Paper so I was just testing on that ๐Ÿ˜„

jaunty night
#

then they must of been reloading so just advise against it, you can also ask on the paper discord as well.

quick arch
#

oh boy don't make Choco go on a rant about the piece of wood that we write on

subtle blade
#

wha?

quick arch
#

what

crimson sandal
#

Yeah I was just saying I haven't had that issue on Spigot ๐Ÿ˜„ Choco just clarified it was due to a reload ๐Ÿ˜„

pastel nacelle
#

paper has done changes to the plugin classloader to fix some issues

#

unfortunately the fix seems to cause some new issues

subtle blade
#

No, that's actually an issue that happens on Spigot too and I'd imagine it happens equally as often on CB

#

reload isn't perfect

frigid ember
#

Could someone get the DEVELOPER contact from the plugin for probedwars?

subtle blade
#

(and is the reason it isn't recommended for production use lol)

frigid ember
#

?-?

pastel nacelle
#

yeah I don't know about this specific issue

frigid ember
#

thx

pastel nacelle
#

i just know that the plugin classloaders of paper and spigot aren't quite 1:1

frigid ember
#

he doesn't answer there.

#

@subtle blade

pastel nacelle
#

don't buy bad plugins

frigid ember
#

do you have discord contact?

stoic shell
#

welp never got a reply back on my problem

pastel nacelle
#

best advice I have is to see how nms does it

frigid ember
#

no.

crimson sandal
#

Paper imported the Lidded PR I made for CB but they didn't make any changes to the TileEntityChest so it literally just doesnt work sigh

frigid ember
#

but don't you have discord? It would be much better!

pastel nacelle
#

????

subtle blade
#

I only have what you have access to

#

If you don't have his Discord, neither do I

frigid ember
#

ok

pastel nacelle
#

paper folks are kinda busy figuring out why the light queue sucks ass

frigid ember
#

do you know any good bedwars plugin to use MARKET PAY?

pastel nacelle
#

jesus christ

subtle blade
#

Looks to me like they fixed it a few hours ago, james

quick arch
stoic shell
#

alright, shelved autocomplete for a little...

#

next up, how do I loop a music track in a certain area?

rotund orbit
#

Trying to make a custom recipe use custom iteme as ingredients. How do I use the ExactChoice object when setting the Ingredients of a recipe? Or do I have to use the prepare item craft event to cycle through the items being used for the recipe to make sure it is the custom items being used and not regular items?
Would anyone be able to help me with this when they have the chance?

ashen stirrup
#

IIRC, you can use ItemStacks in the recipe.

nocturne crane
#

Can anyone help me with some errors...?

ashen stirrup
#

Essentials: /etps

subtle blade
#

tps doesn't really exist at any given point

#

It's a measurement of ticks over time

#

Hence... y'know... ticks per second

#

I suppose ticks over just 1 second would probably achieve what you want but it's not a great measurement of tps

#

That can vary literally every second

#

More than likely. Essentials is open source. You're welcome to take a peek

quick arch
#

You can just make your own tps measurement

rotund orbit
#

Is casting an item stack to a recipe choice a good idea?

subtle blade
#

Well, it will throw an exception so probably not

#

Though you can wrap an ItemStack in an ExactChoice if you'd like

rotund orbit
#

And I can set the ingredient to an ExactChoice? thank you!

subtle blade
#

Well, thanks Discord for breaking the fuck out of that URL

nocturne crane
subtle blade
#

Looks like a plugin doing something it shouldn't be. You writing a plugin?

#

If you can send the crash log that would yield more information

spring coyote
#

I am creating a player variable. This player variable does not represent any online player, I am just using it to store some information. Is there a way that I can set the UUID of this player?

#

Also I cant find how to initialize a player variable with preset information, like you can do with EntityPlayer npc = new EntityPlayer(randominfo)

nocturne crane
#

yep i can send the crash log one moment

#

oh wait

#

i do have to send it privately...

#

i cant send it here

subtle blade
#

Why's that?

lone fog
#

Not verified

#

You can use hastebin

#

?paste

worldly heathBOT
lone fog
#

Also I cant find how to initialize a player variable with preset information, like you can do with EntityPlayer npc = new EntityPlayer(randominfo)
Player is an interface, you would have to initiate a CraftPlayer

#

Surely there is a better way to store this information?

#

Btw, did spigot get an API method to set the texture of a skull with a Base64 string?

subtle blade
#

No

lone fog
#

Didn't think so, just checking

nocturne crane
#

oh alright

#

thank you

subtle blade
#

wow that uh... yeah that told us a lot less than I'd anticipated lol

nocturne crane
#

lol

#

is there any info that you want that can help you figure it out?

#

i can list plugins if that helps ig

subtle blade
#

Nah that's in the crash log, it's okay

nocturne crane
#

alright

subtle blade
#

I think that's fine though it looks like, for some reason, those threads are in-lined instead of being properly paragraphed lol

nocturne crane
#

i've had the same crash like 3 times

subtle blade
#

The only thing from that that stands out to me are the following:

#

IridiumSkyblock:com.iridium.iridiumskyblock.gui.GUI$$Lambda$4779/712622894@1022425

#

and I know that crash is caused by items being set to air by a plugin when the server did not expect air

nocturne crane
#

so just remove iridium?

subtle blade
#

Given that GUIs are mentioned in that stacktrace, I'm going to pin it on that. So I think IridiumSkyblock is at fault here. You can talk to the developers there, create an issue, contact them on Discord, however they want you to report issues

nocturne crane
#

because other the plugin itemjoin I have no clue what might be causing it

#

no one has even interacted with the skyblock plugin

#

...

#

well it isnt that as I havent generated any islands with it yet

#

it hasnt been used yet

subtle blade
#

If you've not yet used it, I'd say yeah uninstall for now and see if you still have the issue. If not, you can probably send that information to the developer and they may be able to fix it

#

That's my best guess is IS

solid sundial
#

So I've created my NPC plugin to generate a skin based on the user's input. the command runs like this:
/cnpc create <name>
I would like it to be '/cncp create <npcid> <name> where the id is a string generated by the user following creation of the NPC.
I would like to use this as means to be able to select each NPC by itself, judging by the string created.
Does anyone know how I would do this?
@solid sundial

pastel nacelle
#

npcid -> npc map?

nocturne crane
#

alright thank you choco

subtle blade
#

o/

wanton delta
#

uh choco

#

@subtle blade

#

does this git look.... fine?

#

ive not pushed anything lol

#

im merging a bunch of branches together if context is needed

#

but the alternative is to rebase every branch after i merge

subtle blade
#

oh

wanton delta
#

so the commits look nicer

subtle blade
#

Well, Bukkit had another diverging commit

wanton delta
#

well this isnt bukkit for me

subtle blade
#

oic

wanton delta
#

its my own personal thing :p

subtle blade
#

That looks terrifying ๐Ÿ™‚

wanton delta
#

LOL

#

see the alternative is to merge then rebase then next branch i want to merge then repeat

#

which leaves me with a nice single file line of commits ๐Ÿ˜Œ

#

but

#

i was looking at workflows online

quick arch
#

How to make a rainbow with git 101

wanton delta
#

idk if its me gone wrong or the workflows are just incredibly oversimplified and this is normal lol

#

and thats my dev branch, so if i were to merge that onto master

#

master would basically look the same

#

which i hadnt thought about

#

idk why i thought itd look different

#

but it seems that... its fine... ?

#

its just i have a lot of branches

#

so i suppose thats why it may feel complicated

stoic shell
#

how can I detect when a sound(track) has ended?

#

or how do I loop a soundtrack?

wanton delta
#

this is my kraken screenshot. .and i just realized i was in #help-archived ๐Ÿ™ƒ

quick arch
#

Rainbows, those are fun

stoic shell
#

anyone?

wanton delta
#

sounds are clientside

#

so theres no way to tell

#

best thing to do is to replay the sound after a time you know it will end

spring coyote
#

^

stoic shell
#

uh

nocturne crane
#

Out of curiosity can you let a player only have worldedit in a certain world?

stoic shell
#

how would I know when it would end?

lone fog
#

Time it

wanton delta
#

you just need to know how long it is

lone fog
#

And hope the client isnโ€™t lagging

subtle blade
#

Sound won't be affected by client lag

lone fog
#

Ah, thatโ€™s good

stoic shell
#

well I just wanted to loop pigstep at a location

lone fog
#

I wasnโ€™t sure if there was a separate sound thread

stoic shell
#

I already have the code playing the sound, now it just needs the loop part

subtle blade
#

Yeah there's no reliable metric for that

lone fog
#

Out of curiosity can you let a player only have worldedit in a certain world?
I think a lot of permission plugins support per world perms

subtle blade
#

You have to write in some magic values based on the known time

stoic shell
#

2:28

solid sundial
#

@pastel nacelle wdym

stoic shell
#

so play every 248 seconds...?

subtle blade
#

Pretty much, yeah

#

From the server, that's going to be your only way to do it

stoic shell
#

hmm

#

can I use an async bukkit repeating task?

subtle blade
#

Sure

#

Bukkit API is volatile and often inaccessible asynchronously (mostly those that modify the state of the world) but yeah you can do that through the scheduler

#

There are async methods for each runTask() method

spring coyote
#

Can anyone help with this:
I am trying to give an npc (EntityPlayer) the ability to punch. First I needed to check if there where any entities within 3.1 blocks that hit a specific line coming from the npc's direction. When I tried to make this line for myself, it worked properly. However, when I tried to make this line for the npc, the direction would be offset. I did some testing and realized that the yaw was corrupted.

Creating npc:
https://cdn.discordapp.com/attachments/571542376930344960/738226866254512248/unknown.png
(The server.sendPacket() is a method I made to send a packet to all online players)
Making npc punch:
https://cdn.discordapp.com/attachments/571542376930344960/738226171094892654/unknown.png
(The particle line made by the honey does not match with the packet sent to me.)

stoic shell
#

Is there any reason to use one over the other for stuff like this?

quick arch
#

pretty sure async can continue running even if the server's lagging ๐Ÿค”

#

sound does that too iirc

nocturne crane
#

Out of curiosity can you let a player only have worldedit in a certain world?
Is this possible?

spring coyote
#

If there isnt a built in way by worldedit then I think youd have to change the plugin code

#

Tho I dont know much about it

subtle blade
#

Async tasks are not bound to the main server thread, yeah

#

They're still run on 20 tick intervals though

#

If you're doing something that would otherwise halt the main thread, namely IO - website queries, reading from/writing to file - it should probably be async

quick arch
#

it should probably be async
tldr; anything that will take long to process

nocturne crane
#

If there isnt a built in way by worldedit then I think youd have to change the plugin code
... i was asking if there was a worldedit integration of some sort or if worldedit supports it... otherwise changing the code might be the only option

frigid ember
#

how do u make a players armor disappear when they get invis

quick arch
#

packets

frigid ember
#

no way api can do it?

lone fog
#

I think a lot of permission plugins support per world perms
@nocturne crane

quick arch
#

well, there's a way but it's dumb

#

fully remove their armor, give it back when it ends

#

:D

spring coyote
#

@nocturne crane

frigid ember
#

lol

lone fog
#

What packet would you use for that

frigid ember
#

i thought as much; so i already tried packets

quick arch
#

yeah, someone had to do that cause they are only 2 weeks into Java

frigid ember
#

PacketPlayOutEntityEquipment

quick arch
#

kek

#

I can do it with ProtocolLib

frigid ember
#

the issue im having rn is

#

when it ends, the armor doesnt re-appear

lone fog
#

Probably need to send another packet

frigid ember
#

(they still have the armor on, but the client doesnt know)

quick arch
#

yeah you have to listen for that

#

oh, you have to send another packet

frigid ember
#

i did send another packet

quick arch
#

๐Ÿค”

frigid ember
#

?paste

worldly heathBOT
quick arch
#

client dumb

frigid ember
#

this is the code im using

stoic shell
#

Why is scheduleAsyncRepeatingTask deprecated?

lone fog
#

Itโ€™s not

frigid ember
#

use BukkitRunnable?

stoic shell
#

?

frigid ember
lone fog
#

Are you sure the method is being called when the effect ends

frigid ember
#

LOL im stupid

#

ur right

#

it was commented out

quick arch
#

nice...

subtle blade
#

scheduleAsyncRepeatingTask() is deprecated because it was replaced with runTask() methods

#

runTaskTimerAsync() would be the replacement

nocturne crane
stoic shell
#

huh

#

k

#

it didn't work...

#
    public void SetupSoundtrack() {
        World cabinSpleefWorld = Bukkit.getWorld("cabin_spleef");
        Location cabinSpleefMusicLocation = new Location(cabinSpleefWorld, 0, 68, 115);
        Sound pigstepMusic = Sound.MUSIC_DISC_PIGSTEP;
        Bukkit.getServer().getScheduler().runTaskTimerAsynchronously(plugin, () -> {
            cabinSpleefWorld.playSound(cabinSpleefMusicLocation, pigstepMusic, SoundCategory.MUSIC, 1, 1);
        }, 0, 2960);
    }```
#

no sound heard

lone fog
#

That may not be something you can do async

stoic shell
#

wouldn't it give me an error?

lone fog
#

Possibly

#

Worth a try though

#

Itโ€™s not like thatโ€™s an intensive task anyway

#

And itโ€™s not very frequent

stoic shell
#

k

#

trying synchronously...

#

well that didn't work

#
[05:29:09 WARN]: [HyperCore] Task #168 for HyperCore v1.0.0 generated an exception
java.lang.NullPointerException: null
        at net.hypercubemc.hypercore.soundtracks.CabinSpleefSoundtrack.lambda$SetupSoundtrack$0(CabinSpleefSoundtrack.java:18) ~[?:?]
        at org.bukkit.craftbukkit.v1_16_R1.scheduler.CraftTask.run(CraftTask.java:99) ~[patched_1.16.1.jar:git-Tuinity-"699f5f2"]
        at org.bukkit.craftbukkit.v1_16_R1.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:468) ~[patched_1.16.1.jar:git-Tuinity-"699f5f2"]
        at net.minecraft.server.v1_16_R1.MinecraftServer.v(MinecraftServer.java:949) ~[patched_1.16.1.jar:git-Tuinity-"699f5f2"]
        at net.minecraft.server.v1_16_R1.MinecraftServer.lambda$a$0(MinecraftServer.java:177) ~[patched_1.16.1.jar:git-Tuinity-"699f5f2"]
        at java.lang.Thread.run(Thread.java:832) [?:?]```
lone fog
#

Something is null

stoic shell
#

well yes

#

and then... the server hard crashed

#

when I use getWorld, if that world isn't loaded, will it be loaded?

subtle blade
#

Well if you've able to call getWorld() somewhere, it's loaded ;P

#

but yeah that's definitely a thing you should be doing sync, not async

stoic shell
#

Yep, I just tested doing it sync, and that's what happened ^

#

Know why I'm getting an NPE?

subtle blade
#

First and foremost

#

patched_1.16.1.jar:git-Tuinity-"699f5f2"

stoic shell
#

.

#

That has nothing to do with it

subtle blade
#

I know that downstream forks make lots of changes to how worlds are loaded

#

It's quite possible that it is

quick arch
#

Choco shhh let him have fun with Tuinity

#

it's amazing ๐Ÿ”ซ

stoic shell
#

If they're breaking 5 lines of simple getWorld and playsound code, wouldn't you think they'd know that by now?

subtle blade
#

Not necessarily

#

when I use getWorld, if that world isn't loaded, will it be loaded?
This being notable

lone fog
#

I mean the stack trace says line 18

subtle blade
#

As far as Bukkit is concerned, the three main worlds are loaded into memory. I do not think that Bukkit#getWorld() will return a World instance if it's not been loaded using Bukkit#loadWorld() (or loaded through some other means - Multiverse for instance)

lone fog
#

So check whatโ€™s on line 18

subtle blade
#

Yeah, line 18 the only possible way an NPE would be thrown is if world is null

lone fog
#

Where can you see line 18

#

Did I miss a paste link

stoic shell
#

Oh...

#

I did not specify when the plugin should load, and it looked like it might be loading before multiverse...

#

Should I try specifying at what stage the plugin should load? (and what stage)

lone fog
#

You can add softdepend multiverse

subtle blade
#

I don't know if Multiverse loads them all into memory at once

#

Though yeah you can soft depend it if you'd like

lone fog
#

Also is bukkit.loadWorld even a thing

subtle blade
#

It is, yes

lone fog
#

I donโ€™t see it in the docs

subtle blade
#

wtf?

#

MORE methods I thought existed but don't?

lone fog
#

It would be createWorld I guess

#

Which creates or loads a world

wanton delta
#

Use createworld correct

#

I guess the world in question would be the object and not necessarily the physical world file haha

stoic shell
#

Hmm

#

Is there a way to listen for the world being loaded, then schedule the task?

lone fog
#

Yes

#

WorldLoadEvent

stoic shell
#

Ah okay.

#

So it wasn't tuinity ๐Ÿ˜›

frigid ember
#

need help

quick arch
#

Something's null at

PlaceholdersUtil line 39
Menu line 73
Help line 62
frigid ember
#

how to fix

quick arch
#

check if it's not null, then do stuff

spring coyote
quick arch
#

I don't do nms packets

spring coyote
#

oh why is that

quick arch
#

Don't plan on touching nms yet, and I understand ProtocolLib a lot more

spring coyote
#

ok

wet bronze
#

Guys

#

Is there a way to make it so whenver you die, you go to your home or last bed?

marsh hawk
#

yep

#

listen to the event

#

then tp to a location

wet bronze
#

Wdym listen to the event?

marsh hawk
#

Wait are you making your own plugin

wet bronze
#

No lol

#

Idk how to code.

marsh hawk
#

oh no clue then lol

wet bronze
#

Bru

spring coyote
#

wait but dont you automatically go to you last bed when you die

#

@wet bronze

wet bronze
#

Not if you haven't set one yet.

#

That's why I want it to tp you to your /home

marsh hawk
#

probably gonna have to get a plugin to do that for you

#

Anyone a good library for world compression

wheat mirage
#

What interact even does bottling dragon breath call? Ping me

frigid ember
#

how do i make a server on SpigotMC?

marsh hawk
#

Theres plenty of documentation for that

steady sail
#

Hello. I am having lag issues, is this a good place to discuss them in hopes that someone can help?

spring coyote
steady sail
#

Every time someone goes through a portal, even with no plugins loaded, the cpu goes nuts, and pretty much pegs for about 10 seconds. Also, randomly, the server will just start lagging like crazy - even though it ran perfectly before. I don't know how to track down what is doing it.

#

I've been disabling plugins to try to figure it out, but it's just blind - disable plugins, wait a day or 2, see if it gets better.

#

But, the nether portal lag - that's consistent.

#

I'm watching cpu performance, but it only breaks down to the server jar.

spring coyote
wheat mirage
#

What interact even does bottling dragon breath call? Ping me

lone fog
#

Have you checked?

frigid ember
#

thank u :)

lone fog
#

Itโ€™s probably interact with entity

wheat mirage
#

Can't boot up a server rn

#

Decompiling source

#

Since it's got a weird hitbox, i think it's not interact with entity

wheat mirage
#

There is no event other than interact

#

and even that it's impossible to 100% no error detect when someone fills a dragon breath bottle

chrome edge
#

I'm making frame picture things for my server. I'm thinking that should I pre-load image bytes and save it? If I do that, I don't need to load bytes from URL or path for each player.

#

As I know, one frames takes 16384 bytes(16 KB) so I don't think so saving bytes will make problem about memory.

#

What do you think guys?

daring oracle
#

Probably a weird place to ask, but does anyone know any good leaderboard plugins that support PAPI? I didn't find any... :/

next root
#

Hi everyone! I'm new here.
I'm coding a plugin for my Spigot server, but I ran into some trouble: I need to import MinecraftServer. I'm using Eclipse, and I've imported net.minecraft.server.* using the minecraft_server.1.16.1.jar found in the folder \work on my BuildTools folder. But when trying to call MinecraftServer.getServerInst() I only get some obfuscated functions like a(),b(),c(), etc.

I'm pretty new at this, how can I get around this? Thanks in advance! ^^

lone fog
#

You canโ€™t

#

Most nms functions are obfuscated

next root
#

So I definetly can't make a plugin that has access to MinecraftServer.getServerInst()?

What I did in the past was modifying the server's jar to have a built-in command instead of a plugin, and then re-building the jar, and it worked. But the problem with that is updating to newer versions, everytime I need to update I have to rewrite that little piece of code

naive goblet
#

Doesnโ€™t spigot contain the nms classes as well?

lone fog
#

Yes

#

But generally you donโ€™t need them

#

Especially for just a command

naive goblet
#

Well I mean, why use the minecraft_server.jar file then?

#

Just use the spigot jar ยฏ_(ใƒ„)_/ยฏ

next root
#

Doesnโ€™t spigot contain the nms classes as well?
@naive goblet

You mean, using org.spigotmc? I only get org.spigotmc.event and org.spigotmc.player, I'm not sure that those classes contain what I need

naive goblet
#

no

lone fog
#

Iโ€™m sure you can access MinecraftServer.getServerInst but itโ€™s probably not called that

naive goblet
#

not the API

lone fog
#

using net.minecraft.server.version.whatever

next root
#

Iโ€™m sure you can access MinecraftServer.getServerInst but itโ€™s probably not called that
@lone fog

Yeah, I thought of that. But I don't know where to read the actual code to know which of those obfuscated functions it actually is

naive goblet
#

the spigot.jar as it entirety

lone fog
#

Decompiler

naive goblet
#

If you have IntelliJ it do have a built-in decompiler where as idk if Eclipse has that.

lone fog
#

No but it has a plugin for it

next root
#

the spigot.jar as it entirety
@naive goblet

You mean the spigot-1.16.1.jar?

naive goblet
#

Yeah

lone fog
#

Yes

next root
#

If you have IntelliJ it do have a built-in decompiler where as idk if Eclipse has that.
@naive goblet

I don't think so. But I'll look around.
Still, if I decompile nms code, wouldn't I get obfuscated functions again?

naive goblet
#

Then you have API + nms in one dependency

lone fog
#

It contains all the same stuff as the minecraft server jar, but with the spigot API on top of it

#

Yes, but at least you can read the code

#

You have to analyze what it does yourself

#

Then again you shouldnโ€™t need to use nms much if you have the spigot API

naive goblet
#

Itโ€™s not that hard as the class names isnโ€™t obsfucated.

#

in nms

#

Perhaps they are in the vanilla jar

lone fog
#

Yeah just methods and fields

#

Names only

naive goblet
#

And since fields and functions exposes types shouldnโ€™t be too hard figuring out

next root
#

I added the spigot-1.16.1.jar into the Referenced Libraries and I got MinecraftServer.getServer(). Idk if it's the same. Can I read the source for this somewhere? Or should I look for a decompiler, decompile both and try to analyze the code?

lone fog
#

Get a decompiler

sage summit
lone fog
#

Only the spigot parts are available online

naive goblet
#

Decompile it, that will ensure you what the method does Raykza

lone fog
#

Everything else is just vanilla code with some kind of mappings

next root
#

Get a decompiler
@lone fog

Okay. I'll do that, then.

Thanks for the help, guys! ^^

naive goblet
#

@sage summit youโ€™re casting something wrong

#

RandomPattern -> Pattern

#

you should probably remove the that Pattern import as I guess that might be the wrong one

lone fog
#

function.pattern.x vs patterns.pattern

#

Likely the wrong one

sage summit
#

wait the pattern import or the randompattern?

naive goblet
#

That method seem to take a Pattern from the patterns.pattern package

steady sail
#

It seems that turning off linux swap file helped a ton :/. I thought I had that turned off, anyway. Still, switching from regular SSD to NVME wouldn't hurt, either.

sage summit
#

i did not make the code, someone helped me make it

vernal spruce
#

better way?

#
        String version = Bukkit.getServer().getClass().getPackage().getName().replace('.', ',').split(",")[3];
        System.out.println("Version: " + version);
        switch (version) {
            case "v1_14_R1":
                nbtModule = new NBTModule_1_14_R1();
                break;
            case "v1_15_R1":
                nbtModule = new NBTModule_1_15_R1();
                break;
            case "v1_16_R1":
                nbtModule = new NBTModule_1_16_R1();
                break;
            default: {
                getLogger().info("Unsupported version of Minecraft");
                Bukkit.getPluginManager().disablePlugin(this);
                return;
            }
        }
    }```
#

basically having multiple nms versions

#

..

rare prairie
#

or using reflections

grim halo
#

But pls... if you use reflections cache your damn references. Otherwise you will bring every server to his knees with it.

vernal spruce
#

Whats the upside/downside of using reflections rather than this?

rare prairie
grim halo
#

With reflections you can access private fields for example

vernal spruce
#

yes but why is it better rather than simply breaking up the name

#

its basically a fancier way to getting the version

rare prairie
#

it much better than making a lot of classes, and switch cases

grim halo
#

Nobody said it was better.

rare prairie
#

but its slow respoding

grim halo
#

Its slower before it gets into JIT1

frigid ember
grim halo
#

And also hard to work with.

#

@frigid ember I dont think so. Maybe if you got the mcdev plugin

#

I for my part would create a module based project where you have one module for each supported version that contains the files.
And then one abstraction layer in between.

vernal spruce
#

so far the test was working this way for me

grim halo
#

Pretty much what Stellrow wrote but module based so i dont run into runtime exceptions.

vernal spruce
#

still not sure why nbt is nms but i guess

grim halo
#

I mean there is a maintained NBT api

vernal spruce
#

but my inner dev gets triggered using apis

#

now i at least know how to make modular nms

sage summit
vernal spruce
#

does randompattern even extends pattern?

rare prairie
#

why you not asks the worldedit developer(s)?

vernal spruce
#

also yeah*

#

^

sage summit
#

they said 1.8 is not supported...

vernal spruce
#

then you are on ur own

rare prairie
#

use google for support

vernal spruce
#

also

#

its rather funny that the error doesnt match the code?

#

if you are asking for help include everything

#

rn the cast error shows at line editSession.flushQueue();

sage summit
#

oops, i forgot to include
package com.justdoom.prisonmines;

then the 1 line after it

#

so it would be here editSession.setBlocks(selection, (Pattern) pat);

vernal spruce
#

i have a better ideea

#

post everything related when asking for help

#

rather than ,add this here,and this here

sage summit
#

i just forgot

echo path
#

is this discord for bukkit also?

vernal spruce
#

i mean spigot kinda is bukkit

#

so ask and you might receive a answer

echo path
#

i need a plugin that is compatible with mcmmo towny and money

vernal spruce
#

and thats a plugin request rather than a coding issue

#

try google or here

#

?services

worldly heathBOT
echo path
#

oh sry i need a scorebaord plugin that shows mc mmo towny and money

vernal spruce
#

Im pretty sure

#

they have papi support

#

so you can simply create ur own scoreboard

echo path
#

yes but i could not find one with towny stats

#

any suggestions?

#

any?

vernal spruce
#

nope

#

keep googleing

echo path
#

i found one but not sure it works with towny

sage summit
#

am i casting something wrong?
errorhttps://hastebin.com/ubamisimik.bash
codehttps://hastebin.com/oxozedicic.java

vernal spruce
#

and once again

#

you did not give the full code

sage summit
#

there

vernal spruce
#

yeah the casting is wrong as shown by the error

#

you cant do (Pattern) pat you cant cast pattern to randompattern

sage summit
#

how would i get the code to work?

chrome lark
#

if you have to cast, you're using the wrong class

sage summit
#

yeah my brains not working today:/

vernal spruce
#

holy shit worldedit api is trash

#

strange

#

what api version you use

frigid ember
#
[10:58:01] [Server thread/WARN]: java.util.zip.ZipException: invalid LOC header (bad signature)
[10:58:01] [Server thread/WARN]:     at java.util.zip.ZipFile.read(Native Method)
[10:58:01] [Server thread/WARN]:     at java.util.zip.ZipFile.access$1400(ZipFile.java:60)
[10:58:01] [Server thread/WARN]:     at java.util.zip.ZipFile$ZipFileInputStream.read(ZipFile.java:734)
[10:58:01] [Server thread/WARN]:     at java.util.zip.ZipFile$ZipFileInflaterInputStream.fill(ZipFile.java:434)
[10:58:01] [Server thread/WARN]:     at java.util.zip.InflaterInputStream.read(InflaterInputStream.java:158)
[10:58:01] [Server thread/WARN]:     at java.io.FilterInputStream.read(FilterInputStream.java:133)
[10:58:01] [Server thread/WARN]:     at java.io.FilterInputStream.read(FilterInputStream.java:133)
[10:58:01] [Server thread/WARN]:     at java.io.PushbackInputStream.read(PushbackInputStream.java:186)
[10:58:01] [Server thread/WARN]:     at java.util.zip.ZipInputStream.readFully(ZipInputStream.java:403)
[10:58:01] [Server thread/WARN]:     at java.util.zip.ZipInputStream.readLOC(ZipInputStream.java:278)
[10:58:01] [Server thread/WARN]:     at java.util.zip.ZipInputStream.getNextEntry(ZipInputStream.java:122)
[10:58:01] [Server thread/WARN]:     at net.worldmanager.WorldLoader.copy(WorldLoader.java:23)
[10:58:01] [Server thread/WARN]:     at net.worldmanager.WorldLoader.registerPlayerWorld(WorldLoader.java:17)
[10:58:01] [Server thread/WARN]:     at org.winterstudio.FishHunter.onEnable(FishHunter.java:20)
sage summit
#

<version>6.0.0-SNAPSHOT</version>

vernal spruce
#

/paste

frigid ember
vernal spruce
#

use 6.1.9

#

and see how it goes

frigid ember
#

/paste

sage summit
#

i cant find the maven thing for it:/

vernal spruce
#

also why bother

frigid ember
#

what is the problem?

vernal spruce
#

with maven if ur only gonna ever use 1 version

frigid ember
#

java.util.zip.ZipException: invalid LOC header (bad signature)

vernal spruce
#

?paste

worldly heathBOT
sage summit
#

im trying to spawn a random pattern using worldedit, basically a prisons mine

vernal spruce
#

told you use 6.1.9

sage summit
#

whats the maven for it?

vernal spruce
#

thats up to you to find

sage summit
#

is 6.1.9 a snapshot version?

vernal spruce
#

not sure

#

also where did you even found that method

#

there is no setBlocks asking for a cuboidregion

sage summit
#

should take you to the right post

vernal spruce
#

and how you noticed something in that post

sage summit
#

?

vernal spruce
#

that hes literally poiting you

#

to version 6.1

#

like i told you

sage summit
#

yes and whats the maven for it?

vernal spruce
#

you have to find it if u like using maven you have to deal with these problems

sage summit
#

so is there a problem with the code for it if i use 6.1 then?

vernal spruce
#

i mean the method doesnt exist in 6.0

sage summit
#

oh ok

#

6.1.4 world worlk right?

vernal spruce
#

not sure

#

worldedit has source and api scattered everywhere

vernal spruce
#

dont think it matters

#

as randompattern implements pattern along the line

sage summit
#

wait think its this one import com.sk89q.worldedit.patterns.Pattern;
the other one gives an error

#

this one also is deprecated

vernal spruce
#

try with it

sage summit
#

k

#

still same error

nova badge
#

Is there a way to send plugin message between Spigot and Bungee without having any player online?

#

Rn it only receives message when at least one player is online

fleet crane
#

no, you need a standalone system (message queue) for that. Redis is a common choice

vagrant widget
#

Oh shit itโ€™s a md_5

marsh hawk
#

Use redis pubsub, its a good db

nova badge
#

Thank you

little dock
#

Anyone know how I can change my config from this:

helpcommandline2: "&2/basicinfo -&a Sends this message."
helpcommandline3: "&2/basicreload -&a Reloads the BasicInfo config."
helpcommandline4: "&2/website -&a Links you to the server's website."
helpcommandline5: "&2/forums -&a Links you to the server's forums."
helpcommandline6: "&2/discord -&a Links you to the server's Discord."
helpcommandline7: "&2/store -&a Links you to the server's store."
helpcommandline8: "&2/apply -&a Links you to the server's staff applications."
helpcommandline9: "&2/appeal -&a Links you to the server's punishment appeals."
helpcommandline10: "&9+-------------------------------------+"```

to something like this:
```helpcommand:
- "&9+--------------&b BasicInfo &9--------------+"
- "&2/basicinfo -&a Sends this message."
- "&2/basicreload -&a Reloads the BasicInfo config."
- "&2/website -&a Links you to the server's website."
- "&2/forums -&a Links you to the server's forums."
- "&2/discord -&a Links you to the server's Discord."
- "&2/store -&a Links you to the server's store."
- "&2/apply -&a Links you to the server's staff applications."
- "&2/appeal -&a Links you to the server's punishment appeals."
- "&9+-------------------------------------+"```
nova badge
#

Use StringList

little dock
#

k cool

#

Looks good

nova badge
#

List<String> list = getConfig().getStringList("helpcommand");

little dock
#

:o

#

Thanks for saving me time from looking at stackoverflow ๐Ÿคฃ

nova badge
#

Take a look at List though

little dock
#

Will do

nova badge
#

Very very important

little dock
#

๐Ÿ‘

unreal ivy
#

so Team#addEntry takes a string. i wanna add a player. is it the name, or the uuid as a string?

tiny dagger
#

there is offlineplayer

#

which is the same as a player for the scoreboard

unreal ivy
#

u mean the deprecated method addPlayer?

frigid ember
#

Anyone know

#

how to use playerheads in 1.12.2

#

??

rare prairie
#

so Team#addEntry takes a string. i wanna add a player. is it the name, or the uuid as a string?
you can use entries as player name

frigid ember
#

anyone?

rare prairie
#

GameProfile

frigid ember
#

how about Material.SKULL?

rare prairie
#

SkullMeta#setOwner because 1.12

frigid ember
#

Ah

#

No method

open ibex
#

Paper has builtin api for custom player head textures

#

The other option is to directly set the itemstack's nbt using unsafe values

fringe prism
#

I can't seem to init the API on Bungee since the example uses Bukkit. What's the Bungee equivalent of this?
https://hastebin.com/qiwedizoqo.cs
RegisteredServiceProvider<LuckPerms> provider = Bukkit.getServicesManager().getRegistration(LuckPerms.class);

echo path
#

i have a question about a scoreboard plugin it is a bukkit plugin can i ask it here?

nova badge
#

There's SkullMeta

#

You can set the owner or something and it will acquire the skin

sturdy oar
#

i have a question about a scoreboard plugin it is a bukkit plugin can i ask it here?
@echo path yes

#

Spigot own Bukkit

open ibex
#

Sometimes the owner doesn't have the same skin anymore though

echo path
#

like it shows the name of a players towny of the score board is it possible ?

sturdy oar
#

I don't really know, that plugin has very poor documentation and is abandoned

echo path
#

any suggestions for a scoreboard plugin by bukkit

#

1.16

steady sail
#

I'm guessing that NVME is pretty much necessary for a Spigotmc server? My SSDs are getting clobbered, and CPU_IOWAIT errors if I fly too fast.

open ibex
#

Flying too fast could also be a cpu issue

steady sail
#

Just put in a 9600K for the server, my machine is running a 9700f. Should be enough for 1 person on.

open ibex
#

That's true

steady sail
#

Well, should handle 10 people, but yeah.

#

Server has 30gb ram.

#

It's when I fly into new areas that it's the worst. Or restarting a server. It was worse, but I disabled the swap and freed up 16gb ram from somewhere else.

open ibex
#

New areas need to generate terrain so that will always be slower and probably not rely on the speed of the drive much

steady sail
#

Yeah, that's what's got me thinking it's the SSD is too slow. That and the IOWAIT errors.

open ibex
#

Hmm

steady sail
#

SATA SSD should be fast enough, I would thing, but it's not really seeming so.

open ibex
#

I don't know how fast a drive should be for a Minecraft server, but I would think the same thing

strong lantern
#

heyyyy help

open ibex
#

You could try paper, which has some performance improvements

strong lantern
#

how do I add a hyperlink to the chat

#

with bungeecord

#

I wanna die

#

HHELP

#

HELP

steady sail
#

Yeah, but they've gotten control freaky, and started blocking stuff we use without adding options to turn it back on.

open ibex
#

Use chatcomponents and clickevent

strong lantern
#

me

#

pls

steady sail
#

We were running Paper for a long time. Backed off to Spigot for those reasons.

open ibex
#

The dupes?

steady sail
#

Yeah. We had other problems, too, but I think I tracked them down to other causes.

#

I don't like dupes, but I want vanilla compatibility, either way.

open ibex
#

Makes sense

steady sail
#

I don't mind when they give you the option, but what also bugs me about paper is they don't default their settings to Vanilla, even when they give you the option. Don't like them on principle, if nothing else.

strong lantern
#

help

#

How do I make a clickable hyperlink in the chat

steady sail
#

I think Pepper answered you up there.

chrome lark
#

Go read the bungee chat API guide instead of spamming like a kid

strong lantern
#

lol

#

ok

#

where da link??

open ibex
#

Search engine time

frigid ember
#

...

strong lantern
#

๐Ÿ™„

strong lantern
#

thanks a lot

echo path
#

is there mcmmo for 1.16 (bukkit)

open ibex
#

Anyway back to your chunk loading issue, I don't think it's a drive issue, unless there's something wrong with the drive itself

steady sail
#

I'm also running Zulu, so it's using all cores pretty well. Thought it was CPU at first, but I don't think so, now :/. Grrr.

#

It's possible the drive is dying or something, haven't tested it.

open ibex
#

Don't know what's causing it

steady sail
#

I'll have to see if I can't find my sucky crucial nvme for now. I have it somewhere. It will hold me over, I guess, until I can get a decent one.

frigid ember
#

Any tips how to give head to armor stand inside mob spawner in spigot?

            Location loc = player.getLocation();
            World world = player.getWorld();

            Block block = world.getBlockAt(loc);
            BlockState state = block.getState();
            state.setType(Material.SPAWNER);
            state.update(true);
            CreatureSpawner data = (CreatureSpawner) block.getState();
            data.setRequiredPlayerRange(0);
            data.setSpawnRange(0);
            data.setSpawnCount(0);
            data.setSpawnedType(EntityType.ARMOR_STAND);
            data.update();
            block.setBlockData(data.getBlockData());
steady sail
#

Unless I try moving the server itself to a different SSD. :/. If you think SSD should be fast enough, I'll give that a shot.

open ibex
#

Any decent quality ssd should be enough

frigid ember
#

I use 120GB SSD that's like 5 years old and it runs fine

steady sail
#

How many players?

frigid ember
#

at max 50

#

Any tips how to do it?

open ibex
#

Seems like the api won't let you do that and you'll have to use unsafe values/nms

frigid ember
#

How may I do that?

steady sail
#

My world, alone, is 100gb

frigid ember
#

What version @steady sail?

coral mural
#

how do i stop it from saying this build is outdated when starting the server

steady sail
#

Scratch that. It's less

open ibex
#

For unsafe values you can use Bukkit.getUnsafeValues(), if I'm remembering correctly. Then that object might have methods to directly edit a tileentity's nbt

steady sail
#

1.16.1

sinful spire
#

how do i stop it from saying this build is outdated when starting the server
@coral mural update the build

coral mural
#

@sinful spire how

sinful spire
#

?bt

worldly heathBOT
frigid ember
#

@open ibex I'm kinda noob at spigot API, where shall I put those unsafe values?

coral mural
#

im on the web but like i have 1.16.1 craftbukkit downloaded

open ibex
#

Put them?

frigid ember
#

set*

#

idk

sinful spire
#

craftbukkit really

open ibex
#

They're just called unsafe values, it's actually just an object with some methods

sinful spire
#

build spigot 1.16.1 and it wont say build outdated

frigid ember
#

hi @sinful spire

coral mural
#

k lemme try

sinful spire
#

hey

frigid ember
#

@open ibex I still have no idea what to do :/

#

shall I getRawData()?

#

or what?

open ibex
#

Ok I looked at the api and unsafe values won't work for this

#

You'll have to use nms

coral mural
#

like do i download spigot version 1.16.1 @sinful spire

sinful spire
#

you need to build it with buildtools

rare prairie
#

you can't put player heads/itemstacks to spawner entity, because thats a floating Entity

frigid ember
#

no, you build it on your own @coral mural

coral mural
#

how

#

i dont know

sinful spire
#

?bt

worldly heathBOT
sinful spire
#

use this

coral mural
#

ok

echo path
#

cn anyone tell me if there is mcmmo for 1.16 (bukkit)??

rare prairie
#

on the main site

open ibex
#

To use nms the correct way, you need to include Minecraft's code in your project somehow, then import the classes you needed and use them in your code

frigid ember
#

@rare prairie you can actually

rare prairie
#

where you saw that

open ibex
#

The other way is to instead use reflection, but it's slower and takes more space

rare prairie
#

i never seen

sinful spire
frigid ember
#

Today I'll show you how to essentially add any new block you want to Minecraft without having to replace any pre-existing, vanilla blocks or textures!

โ–บSubscribe - http://bit.ly/Subscribe_Sarc
โ–บFollow Me On Twitter - http://bit.ly/SarcTweet

โ”€โ”€โ”€โ”€โ”€โ”€โ”€
Other info:
โ”€โ”€โ”€โ”€โ”€โ”€โ”€

Comma...

โ–ถ Play video
rare prairie
#

datapack

frigid ember
#

this. mob spawner with armor stand wearing a firework with custom nbt data which has a resource pack for that nbt data

sinful spire
#

this. mob spawner with armor stand wearing a firework with custom nbt data which has a resource pack for that nbt data
@frigid ember add NBT via this maybe? https://www.spigotmc.org/threads/1-8-x-1-16-x-v7-16-maven-single-class-nbt-editor-for-items-skulls-mobs-and-tile-entities.269621/

open ibex
#

Using nms you can set any entity for a spawner

#

It's a lot of explanation, so try to find a tutorial online

frigid ember
#

what nms stands for?

open ibex
#

net.minecraft.server

sinful spire
#

internal server code or smf like that

open ibex
#

Yes internal code

sage summit
#

How would I run some code that, for example, broadcasts a message every 10 minutes?

open ibex
#

Could use a timer task

echo path
#

yes @echo path
@sinful spire is it bukkit?

sage summit
#

ok thanks

frigid ember
#

        Bukkit.getScheduler().runTaskTimer(plugin, () -> {
            Bukkit.broadcastMessage("Welcome!");
        }, 1, 20*seconds);
open ibex
#

Yes, it's bukkit

echo path
#

ok

#

free?

sinful spire
#

why do people still use bukkit and not like spigot

#

no

#

15$

echo path
#

:/

open ibex
#

I think we should all just switch to fabric because of how powerful mixins are

steady sail
#

But, what you're saying is that a 9600K with a regular SSD should be able to handle 50 users?

open ibex
#

Don't know if a 9600K is enough for 50

steady sail
#

More than 5, though?

open ibex
#

Definitely

steady sail
#

Then something is definitely not right.

frigid ember
#

at max 50, it struggles a bit but works, the world border is not big

coral mural
#

@sinful spire thank you soooo much ive been looking for a tutorial for so long

sage summit
#

how do i check if there is nothing in the config file

#

?

steady sail
#

Oki, I moved the world to the other SSD and... Not 1 IOWAIT, and things seem to be running much smoother.

#

So, definitely need a new drive. Considering my dynmap mysql is on the old drive, I probably need to do some rethinking.

#

So, either the dynmap mysql stuff is making the drive slow, or the drive is dying.

coral mural
#

i need help with multiverse core ik its not spigot but if anyone knows how to make it so that everyone can mvtp even if they dont have op

steady sail
#

Either way, I should, probably, get 2 new NVME drives when I can. Put the OS and mysql on one, Minecraft on the other :/.

open ibex
#

Might help

#

For multiverse you can probably configure default permissions though LuckPerms or PermissionsEx

echo path
#

slimefun is no longer available on bukkit?

coral mural
#

lemme try @open ibex

abstract wraith
#

Is there a plugin with a finished economy (prices of articles) ?

sturdy oar
#

for god sake don't use slimefun

coral mural
#

doesnt work @open ibex

#

i need smtg that would let ppl mvtp without having op

open ibex
#

Well it was a guess really since I haven't used multiverse

sinful spire
#

uh

#

a permission plugin?

chrome lark
#

i want to run a server with an economy but I don't wanna run the economy

sinful spire
#

what

chrome lark
#

I mean, that's what that sounds like, and if you think that's gonna end well, gl

sinful spire
#

the

#

yeah, goodluck

chrome lark
#

and yea, use a permission plugin for MV, it'll even tell you the perms you're missing

#

the LuckPerms wiki has a "getting started with LP" guide

fading frost
#
{SkullOwner:{Id:[I;2019161647,1121272407,2323253714,1955724202],Properties:{textures:[{Value:"eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvNmZkMWE4NzhkOGU4NjNiOGZiYWRkN2MwMGMwYmYyNjY2OGUzYzBlN2NjMzFmNGNjYzlmMTg1YzZhYmZiNmMzIn19fQ=="}]}},present:"gold"}
```parsing this NBT compound using `MojangsonParser` yields this error, anyone know why?
`com.mojang.brigadier.exceptions.CommandSyntaxException: Can't insert TAG_String into TAG_Int_Array at position 41: ...121272407,<--[HERE]]`
coral mural
#

i added the plugin luckperms but now how do i make it so that everyone can mvtp @sinful spire @chrome lark

timber thorn
#

Is there a way to force open the chat window for a player?

sinful spire
#

/lp group default permission set multiverse.teleport.self.<world_name>

#

chat window is clientside i think

#

you would need mods

timber thorn
#

I know you can suggest commands but that works via clicking in the chat

#

so there has to be some way to type something in the chat for the client

sinful spire
#

oh

timber thorn
#

I have tried recreating the json message but it doesn't seem to work (anymore?)

coral mural
#

holy shit it worked thank you so much @sinful spire

tiny dagger
chrome lark
#

I'd keep stuff like tables consistent

frigid ember
#

no lambda ๐Ÿฅบ

wicked cape
#

Compiling with maven, i just double click package right?

marsh hawk
#

the fact you called a query a url annoys me

tiny dagger
#

just a name

#

which was due to lack for a better term

#

thanks for that ๐Ÿ‘Œ

runic bane
#

Hello guys,where i can find the lastest update for spigot server file? im behind with 56 version...

subtle blade
#

?bt

worldly heathBOT
grim halo
#

@runic bane You need to run the latest BuildTools

tiny dagger
#

btw, is there any way to copy in eclipse without the respective imports?

#

like a raw copy

subtle blade
#

Though there's no keybind to temporarily disable it, no

#

Can't do like Ctrl + Shift + V. Though that'd be nice

tiny dagger
#

oh rip

#

still good enough

fossil shoal
#

Is there any way to detect power change of a Block (meaning that the return value of Block#isBlockPowered changes)? I tried using BlockRedstoneEvent but it seems to only be called for redstone related blocks

stoic shell
#

My guess is some sort of BlockStateChangeEvent and checking if what changed was power

#

bruh...

#

alright, so my playsound loop isn't working (I thought I finished last night, but I hadn't tested)

#

no sound plays .-.

#

what the what...

#

oh lol, after a minute or two, it started playing, probably because the timer was too long

wheat mirage
#

is there any 100% accurate way to find out if a player has filled a dragon breath bottle? It doesn't seem to call playerinteractentity or anything else.

#

Only an interact event

fossil shoal
#

@stoic shell BlockStateChangeEvent is not a thing unfortunately

stoic shell
#

welp

#

@fossil shoal Try listening for the BlockPhysicsEvent.

#

@wheat mirage Try PlayerInteractEvent checking for dragon breath being bottled

fossil shoal
#

@stoic shell thanks, this actually works, only thing is that the event is called a lot of times but hopefully it doesn't cause performance issues since what I do inside the handler is pretty small

stoic shell
#

ah yes

wheat mirage
#

@stoic shell I literally already said that

#

It's not reliable

stoic shell
#

forgot to note, but check what you need as fast as possible and return as soon as you can if it doesn't match what you need

wheat mirage
#

As there's no way to truely detect if they bottled it.

stoic shell
#

huh

spring coyote
#

@wheat mirage If its not there, youd probably have to do everything manually. Check if the players in a dragon fight, check if the entity dragon breath (I believe it counts as an entity) is near the player, then check if the player right clicks>check if the bottle updates their inventory or check if the bottle falls onto the ground because of inventory overflow

stoic shell
#

I don't think there's something for that specifically in the bukkit api

spring coyote
#

It might not be perfect at first, but if you just keep testing I believe that you could get it to be exact

lone fog
#

You could check for the players inventory changing

spring coyote
#

yeah but dont forget about it possibly falling onto the floor

lone fog
#

Might be the most reliable but possibly least performant

stoic shell
#

alright...

spring coyote
#

Does listening for an event constantly that is common cause performance issues?

stoic shell
#

How does the client know the difference between music playing from a jukebox, and music playing through /playsound or playSound in a plugin?

wheat mirage
#

@lone fog How? Through a timer?

spring coyote
#

Well the only thing I can think of is that if its in a jukebox minecraft does some calculations to have the sound play slightly differently based off of what side your on and how far you on from the jukebox while /playsound plays at the player

stoic shell
#

(Ignore the playsound part, I really mean from a plugin)

#

oh huh

spring coyote
#

plugins probably do it the same way as /playsound would

stoic shell
#

yes

#

oh wait

#

I meant how does the client know if it comes from a jukebox or not?

spring coyote
#

I dont think that there would be any difference

#

what do you need to know if for?

#

@stoic shell

stoic shell
#

well, I was just thinking it would sound more natural if the client knew it was playing from a jukebox

#

where I'm playing the soundtrack is a jukebox, but currently I'm just playing it with playSound

spring coyote
#

oh

#

well idk I dont think that there really would be any difference

stoic shell
#

huh wait a sec

#

what's the difference between playSound and playEffect?

abstract wraith
#

Is there a plugin with a finished economy (prices of articles) ?

ember coral
#

@stoic shell not sure, but playEffect is deprecated & shouldn't be used

#

I think they're the same

stoic shell
#

ah ok

#

I saw it on a few old fourm threads so I was wondering

alpine yoke
#

Hello. I'm working on a bungeecord arena join plugin.
So, I have bungeecord servers with name "server". These are "server1", "server2", "server3" and so. I might add or remove more in bungee config, so their amount is dynamic, however all have server in name.
I would like to make command "/join" which:

  1. Gets only online servers
  2. Picks a not full (max 2 players, 2 means full) server.
  3. Prioritizes the ones with already player, so there wont be server1 with a player waiting for game and server2 with player waiting.
    How should I begin. I already have a code that gets servers with name "server".
    How should I do the priority thing?
    Or maybe there already is such as plugin on Spigot?
lone fog
#

Play effect is for entity effects

stoic shell
#

also

#

Any faster chunk generator than Chunky?

ember coral
#

@alpine yoke Why only 2 players per server? I'm guessing you want to do some sort of duel thing, but why not have multiple arenas on one server? That would be way more efficient

#

Apart from that, how I would do it is loop through all the servers and store the best option outside the loop

#

If the server has 0 players and there is no "best option" selected, set the best option to it

#

If the server has 1 player and there is no best option or the best option has 0 players, set the best option to that and break

#

If the server has 2 players continue

boreal brook
#

that's funny because i was about to ask the same question as @alpine yoke

#

i need a way to teleport players out of an "arena", by teleporting the player to the spawn, located on a different server, is there a way to do that from bukkit?

ember coral
#

I think you can send a plugin message to bungee instructing it to send the player to a different server

boreal brook
#

seems simple, thanks!

sinful spire
#

he wants to be like hypixel

#

one arena per server

frigid ember
#

@quick arch by any chance do you remember the library you used?

#

for changing spawner nbt data

quick arch
#

It was NBT something by BananaPuncher

#

It was also one class or something

abstract wraith
#

nobody help

#

Thanks for nothing i go to mcmarket bye

rare prairie
#

k

frigid ember
quick arch
#

yeah

frigid ember
#

@quick arch you basically made it give you itemstack of mob spawners with the nbt data to inventory?

#

it cannot modify already placed one?

quick arch
#

It modified the placed one

wheat mirage
#

How does getTo() in playerportalevent work if there's no portal been made yet?

celest bramble
#

can I have my own listener script unregister itself

half badge
#

Skript?

#

Or Java

celest bramble
#

Would I do like this? HandlerList.unregisterAll(Listener this); it gives me an error

#

Java

half badge
#

What's the error

celest bramble
#

expected ')', expected ';'

half badge
#

Because your calling the method theres no need for the Listener part

#

unregisterAll(this); Will do fine, as long as the class your working in does implement Listener

tough kraken
#

why am i getting this error? its right imported, in intellij it doesnt shows anything:

Caused by: java.lang.ClassNotFoundException: org.apache.commons.io.FileUtils

half badge
#

Is it declared in your maven dependencies?

tough kraken
#

yes

#
        <dependency>
            <groupId>org.spigotmc</groupId>
            <artifactId>spigot-api</artifactId>
            <version>1.16.1-R0.1-SNAPSHOT</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>commons-io</groupId>
            <artifactId>commons-io</artifactId>
            <version>2.6</version>
        </dependency>```
half badge
#

Not sure if its provided by the server or not

frigid ember
#

why everyone uses maven

half badge
#

Assuming not, add <scope>compile</scope>

tough kraken
#

because its obviously better lol

half badge
#

And add maven shade plugin

tough kraken
#

i dont know so much, do what? xd

subtle blade
#

Build systems are generally the more dependency-friendly approach

#

Instead of having a project relying on IDE classpaths where you have to search for the dependencies manually, open source would be a nightmare

#

If your project is open source, you should have a build system such as Maven or Gradle

tough kraken
#

seems like the new spigot 1.16.jar doesnt have it build-in

#

had it before i think

subtle blade
#

What is it you want?

#

Commons IO?

tough kraken
#

FileUtils

#

from commonsIO yeah

subtle blade
#

iirc there's a FileUtils or something similar provided by Guava?

tough kraken
#

idk

subtle blade
#

No, sorry, I'm thinking of ByteStreams

rare prairie
#

Apache commons?

subtle blade
#

Commons IO

#

Which isn't shaded into Bukkit. afaik it's a vanilla dependency

half badge
#

Yeah it's in the craftbukkit dependencies

subtle blade
tough kraken
#

that doesnt exists anymore
import org.bukkit.craftbukkit.libs.org.apache.commons.io.FileUtils;****

#

used that before

subtle blade
#
        <dependency>
            <groupId>org.spigotmc</groupId>
            <artifactId>spigot-api</artifactId>
            <version>1.16.1-R0.1-SNAPSHOT</version>
            <scope>provided</scope>
        </dependency>```
#

Not in the API it won't

#

It's not a Bukkit dependency. It's a vanilla dependency that CraftBukkit relocates

#

Depend on the server jar and it will be available. Though generally we advise against depending on internal dependencies

tough kraken
#

well as i used the 1.14.4 api before, it worked. now in 1.16.1 it doesnt exists? wtf

subtle blade
#

I see no mention of Commons IO in the Bukkit POM in any previous versions

#

Again, if you were to depend on spigot instead of spigot-api, it would be there

#

BUT,

generally we advise against depending on internal dependencies

tough kraken
#

i am using the normal spigot jar if you mean that

subtle blade
#

<artifactId>spigot-api</artifactId>

#

Your Maven pom.xml says otherwise

tough kraken
#

wtf

#

thanks. i change it

subtle blade
#

You are better off depending on Commons IO and shading it yourself. That way you can minimize it and not depend on an internal dependency

tough kraken
#

i tried it, but that was showing the error

subtle blade
#

Have you shaded it?

tough kraken
#

i dont even know what that means lol

subtle blade
#

So no ;P

tough kraken
#

started working with maven since about 2 weeks lol

subtle blade
#

Shade is a plugin provided by Maven to include dependency classes in your final built jar

tough kraken
#

ah

subtle blade
#

You should, however, also relocate said dependency to a subpackage (much like CraftBukkit does)

tough kraken
#

ehm

#

i was using it

subtle blade
#

Just an additional set of options in the configuration of Maven shade

tough kraken
#

i see

subtle blade
#

Yeah, so be sure your dependency is also set to compile scope

#
        <dependency>
            <groupId>commons-io</groupId>
            <artifactId>commons-io</artifactId>
            <version>2.6</version>
            <scope>compile</scope> <--- this bit here
        </dependency>```
#

That aside, include the extra configuration to relocate it to one of your packages to avoid classloading conflicts

spring coyote
#

Would it be possible to set a skin to an EntityPlayer npc that isnt connected to a mojang account? Basically a skin from a png file

grim halo
#

I was using a fork and switched to spigot for some testing.
Now my color codes dont get formatted anymore.
Is there something i should/nt do when using the Logger with color codes?

tough kraken
#

still have the error

subtle blade
#

Are you actually compiling with Maven?

tough kraken
#

idk

#

i think no

subtle blade
#

IDE?

tough kraken
#

huh?

subtle blade
#

What are you using?

tough kraken
#

intellij

subtle blade
#

Fuck. That's out of my scope lol

tough kraken
#

uff

grim halo
#

PS: Using Bukkit.getServer().getConsoleSender().sendMessage instead of Bukkit.getLogger() fixed my problem -.- still weird

subtle blade
#

(getServer() is redundant)

grim halo
#

Ah right both have a ConsoleCommandSender instance

#

forgot

#

thx

subtle blade
#

Bukkit just statically mirrors all methods in Server. Unless you're explicitly passing around an instance of Server (which shouldn't be necessary, it's a singleton), you can ignore getServer()

#

@tough kraken I don't know how to use Maven with IntelliJ, though in the mean time you can run it from your console if you have Maven installed

#

Open a console window in your project directory and run mvn clean package

#

Compiled binary will be under the target/ directory

tough kraken
#

i think i wasted my pom.xml

#

what was in the repositories? ๐Ÿ˜ฆ

#

got it

subtle blade
#

Ye, we have a wiki on it

tough kraken
#

yeah saw that

#

well the project directory is the workspace i think?

grim halo
#

@tough kraken if you are using intellij i can only recommend you the mcdev plugin.
It automatically builds a clean pom.xml when you create a spigot project.

tough kraken
#

using it

#

but i destroyed it on editing it lol

grim halo
#

XD

tough kraken
#

choco, the command doesnt work

grim halo
tough kraken
#

whats the spigot dependency? not the api

half badge
#

Anyone aware of any decent DI frameworks (excluding Spring, Guice) preferably under 1mb (tried pico container but it seems "dated")

formal nimbus
#

how do I get a copy of an object?

pastel condor
#

object.clone()

#

@formal nimbus

formal nimbus
#

thank

#

I just ran into another issue though ;-;

#

my plan was to create an inventory

#

and then clone it to every player who opens it

#

then problem is I want the inventory name to change each time

#

but I believe you can only set the inventory name on creation

#

so I'll just have to create a basically duplicate inventory every time