#help-archived

1 messages · Page 164 of 1

neat oxide
#

The thing he was showing

fair abyss
#

json chat?

neat oxide
#

Yeag

#

Damned phone

fair abyss
#

i dont think he can code own plugin

neat oxide
#

True

normal zinc
#

i'm back

neat oxide
#

He should learn tho

fair abyss
#

then, what the fuck are you talking 😄

#

its too mcuh for this simple shit

#

you know, no body will code its own chat plugin for just want

#

and no one will learn from scratch for just this

#

meh its 2am here, 2 hours until sunrise
6 hours until my wakeup time sooo

#

gn everybody

normal zinc
#

king how do set project java version to 1.8....?

#

also can i pm you?

#

gn king

fair abyss
#

in intellij?

normal zinc
#

yes.

fair abyss
#

there should a lamp

#

click it

#

and you can google everyting about intellij

#

note: learn creating arfifacts for exporting jar

normal zinc
#

i'll look at that first then.

fair abyss
#

look Define an SDK

#

and Set up a project SDK

peak glade
#

how this left join ? plus or silm

fair abyss
#

wut?

#

talking about char which similar to "|" ?

#

or login leave message?

#

if first, google for that chars

peak glade
#

im speak arabic xd

fair abyss
#

if second download a login leave message plugin

#

use a translator

peak glade
fair abyss
#

google translator is good

peak glade
#

ok wait

fair abyss
#

gone to sleep se ya later

peak glade
#

ok cya

fringe cairn
#

how do I get the server name from a PlayerDisconnectEvent?

#

on bungeecord

quartz trench
#

do you mean message on join zaid

peak glade
#

yes please

#

i want

wheat mirage
#

Does anyone know if there's any way to use the PacketPlayOutEntityVelocity for only one component? Due to ping, setting the clients velocity periodically causes huge stutters and completely overrides their current velocity.

drowsy nova
#

is it allowed to ask for help here but not with spigot ?

subtle blade
#

No

#

You should ask for support in the appropriate server

drowsy nova
#

kk np

solemn axle
tender quarry
#

I've looked on SpigotMC's Jira and have not seen this as a documented issue (net.md_5.bungee.api.ChatColor and using net.md_5.bungee.api.chat.TextComponent#fromLegacyText). Has this been seen by anyone other than me? - Version 1.16.1

crisp widget
#

You'll get the same with the new hex stuff, you have to reset inbetween

#

oh wait

#

I totally misread that lmao

tender quarry
#

Lol

crisp widget
#

Yeah uh

#

Have you tried &f instead?

tender quarry
#

Yes, that does not reset formatting

#

&r Doesn't reset (even though that's....what it's supposed to do), &f Converts to white, doesn't reset styling (bold, italics, etc...)

#

Afaik there's not a way to toggle off bold after parsing, which is...an issue

frigid ember
#

@crisp widget can u help

#

me

keen compass
#

I don't see the issue

frigid ember
#

im having an issue where every time i try to create using buildtool it always makes it to 1.15.2

keen compass
#

--rev 1.16.1 add to the end of the command

frigid ember
#

will it give me the latest 1.16.1 tho?

keen compass
#

why wouldn't it?

frigid ember
#

cause when i do latest it said it couldnt find it

keen compass
#

latest points to what is deemed as the latest stable build

#

which doesn't always coincidence with the most up to date version as far as commits go

subtle blade
#

afaik that reset issue was fixed in newer builds

#

(commit says italics, but it's all formatting)

#

Basically, update your server lol

keen compass
#

explains why I didn't see the issue

wheat mirage
#

Anyone got the mc client source handy?

#

Looking for how the client deals with PacketPlayOutEntityVelocity from the server

small bobcat
#

Is there a way to play videos in minecraft?

normal zinc
#

so i'm online and it says to do --bukkit.command.plugins
--bukkit.command.help

#

where and how do i do that?

frigid ember
#

can i ask here for plugin recommendation?

normal zinc
#

shure.

frigid ember
#

i'm searching for a motd plugin

normal zinc
#

do it in gen chat.

frigid ember
#

oh

normal zinc
#

wuups

frigid ember
#

xd

#

sorry

devout creek
#

Can I ask a question regarding spigot plugin development here?

#

Been stuck on a problem for a while

halcyon snow
#

yes

devout creek
#

I've been trying to add metadata onto mobs that have been hit by a player. I implemented that for melee weapons etc just by using an onEntityDamage event. However, I can't seem to get it to work for bows. Here's what I have:

#
 @EventHandler
    public void projectileHitEvent(ProjectileHitEvent e)
    {

        if (e.getEntity() instanceof Arrow)
        {
            Arrow arrow = (Arrow) e.getEntity();
            if (arrow.getShooter() instanceof Player)
                {
                    System.out.println("[pHE] Shooter is instance of player");
                    String bowmanUuid = ((Player) arrow.getShooter()).getUniqueId().toString();
                    e.getEntity().setMetadata(bowmanUuid, new FixedMetadataValue(this, "placeholder"));
                }
            else
            {
                System.out.println("[pHE] Shooter is NOT instance of player: " + arrow.getShooter());
            }
        }
    }

    @EventHandler
    public void projectileLaunchEvent(ProjectileLaunchEvent e)
    {
        System.out.println("Projectile launch event shooter: " + e.getEntity().getShooter());
    }

    @EventHandler
#
    public void onEntityDamage(EntityDamageByEntityEvent e)
    {

        if (e.getEntity().isCustomNameVisible() && e.getEntity().hasMetadata("id"))
        {
            if (e.getDamager() instanceof Player)
            {
                System.out.println("Added Metadata of player: " + e.getDamager().getUniqueId().toString());
                e.getEntity().setMetadata(e.getDamager().getUniqueId().toString(), new FixedMetadataValue(this, "placeholder"));
            }
            else
            {
                if (e.getDamager() instanceof Arrow)
                {
                    Arrow arrow = (Arrow) e.getDamager();
                    System.out.println("Damager is instance of arrow");
                    System.out.println("Arrow: " + arrow.getName());
                    System.out.println("Arrow Shooter: " + arrow.getShooter());
                    System.out.println("Arrow UUID: " + arrow.getUniqueId());
                    //System.out.println("Shooter Class: " + shooter.getClass());
                    if (arrow.getShooter() instanceof Player)
                    {
                        System.out.println("Shooter is instance of player");
                        String bowmanUuid = ((Player) arrow.getShooter()).getUniqueId().toString();
                        e.getEntity().setMetadata(bowmanUuid, new FixedMetadataValue(this, "placeholder"));
                    }
                    else
                    {
                        System.out.println("Shooter is not instance of player...?");
                        if (arrow.getShooter() == null)
                        {
                            System.out.println("Shooter is null??????????");
                        }
                    }

                }
            }
        }
#

After onEntityDamage .getShooter() kept returning null, I tried using projectileHitEvent, but getShooter() on that kept returning null too. Same for projectileLaunchEvent.

frigid ember
#

try updating spigot to latest version

#

there was a bug i reported where Projectile#getShooter() kept returning null

devout creek
#

Sorry, how do I do that? I'm new to spigot :/

frigid ember
#

run BuildTools

#

dw im new too

devout creek
#

I just installed it yesterday though

#

Unless a new one came out today

frigid ember
#

yeah 1.16.1 is still in developmental stages so updates are rolling out fast

devout creek
#

I see, thank you

frigid ember
#

just git bash again and do java -jar BuildTools.jar --rev 1.16.1

devout creek
#

I'll try that

frigid ember
#

assuming ur on 1.16.1

devout creek
#

Has the bug been fixed for you?

frigid ember
#

uh let me check

#

yeah it works

#

@devout creek

devout creek
#

Sweet it works, thank you 🙏

frigid ember
#

no problemo

#

does world decoration vary by environment now?

#

im currently having problems cuz i updated my plugin to 1.16

#

i had custom worlds generate with a set biome throughout the entire world, and it could pick between different environments (nether, overworld, or end). back in 1.15, an end and jungle combo would properly generate all the jungle trees and leaf bushes and stuff, but now it just generates the end pillars

#

Is it true that we can retexture damaged Minecraft items and make them look different based on durability?

#

you can even use CustomModelData now as of 1.14

#

so u dont have to use durability anymore

#

but yeah u can

subtle blade
#

Isn't the latest version great? lol

frigid ember
#

ye

#

anyway going back to my previous question is there any way to make biomes generate decorations like normal in different dimensions / environments?

dry mural
#

Hi, I haven't played minecraft in 9 years and I just came back. I used to use a bukkit server but saw that this was basically the replacement? I'm just wondering how to disable spiders xD

frigid ember
#

just spiders in specific?

red zenith
#

You could use WorldGuard and disable spawning of spiders

dry mural
#

Yeah

#

also, is spigot the new bukkit? I'm not familiar with anything right now

dark shuttle
#

kinda

red zenith
frigid ember
#

in a word, yes

#

it supports plugins like craftbukkit

#

for a longer technical answer that link probably goes into detail

dry mural
#

Thank you very much!

#

So Worldguard can disable spiders across the entire map?

red zenith
#

You can define smaller regions, or set flags for the entire world

#

which is the global region

#

so you can set a flag for which mobs can spawn, and include whatever mobs you don't want to spawn

dry mural
#

so Worldguard is a bukkit plugin, that can be used in spigot?

frigid ember
#

yes

red zenith
frigid ember
#

both craftbukkit and spigot use the bukkit api, meaning bukkit plugins can be used for both

dry mural
#

Okay I have WorldGuard and WorldEdit installed, but I cant find the command for disabling spiders haha

#

/rg flag global something?

normal zinc
#

how do i override the help, pl ,? , plugins commands and tab autocomplete.

red zenith
#

I think the region has underscores: __global__ ; you should be able to use a command to list all of the available regions - /rg list

wet bronze
#

If you're good with MCEdit please DM me ❤️

red zenith
#

Has someone updated MCEdit to work with the latest versions? been a while since I used it

frigid ember
#

MCEdit..... haven't heard that name in years....

wet bronze
#

I think it works with 1.15.2

frigid ember
#

Last time I used it was back in 1.5.2 lol

wet bronze
#

Because the map for my server got an update, and they edited a big part of the map that would be really messy to try to load in with worldedit

#

So the only thing that really comes to mind is MCEdit

#

Unless there's something else lol

red zenith
#

well, if you know the regions that the part of the map are in

wet bronze
#

I do.

red zenith
#

you could copy over the region files maybe and do a forceupgrade?

wet bronze
#

Huh?

red zenith
#

is it forceupgrade or update? I can never remember the flag

#

What mc version is the map that contains the regions?

wet bronze
#

Both are cross-version. I think they were made in 1.13 but I use them in 1.15.2

#

I can check

red zenith
#

are you expecting this map to be used on a 1.16 server/world?

wet bronze
#

No but I wouldn't mind updating if all my plugins are up to date.

#

Which they might be, I was able to successfully update one of my other servers.

red zenith
#

Well, what I did when I upgraded to 1.15, is figure out where each of the regions are in each world/dimension for areas that I wanted to keep, and then just copied those to the appropriate folder for a 1.15 server. Then I just used the --forceUpgrade flag when I started the jar, in my batch/startup script. Once the server updates all of the chunks, you can then comment out or remove the --forceUpgrade flag.
If you have a really large world, with a lot of chunks/regions, it might take some time.

wet bronze
#

Nonono

#

The map didn't update versions

red zenith
#

Alright, then I misunderstood

wet bronze
#

It's all on the same version, they just edited it the map lol

#

But it's just such a big portion that doing it with worldedit would be messy.

#

Not impossible but messy.

red zenith
#

I just made the assumption that you were trying to take part of an older map and use it in 1.16

wet bronze
#

Is there any better solution to this apart from MCEdit or WorldEdit?

red zenith
#

When you say "they edited the map" what exactly was changed? Player's placed blocks or built in the area?
You said the map is currently used in 1.15.2? I think you need to clarify exactly what you need to do.

wet bronze
#

Okay so the map is a map of a city, a really big city (not REALLY big in size, only about 20,000x10,000, it's just big in build density), and the creators of the map update it every few months. In this update, the entire northwestern part of the city was overhauled and redone, and I want to upgrade to it but if I do, all my progress on the map I already have will be lost. I don't care about the progress being lost in that northwestern part, but if I completely upgrade, the entire map's progress will be lost.

#

I need to find a way to some how copy and paste the part of the map they edited onto the map I have.

red zenith
#

so one option: make a copy/backup of your versions regions; create a new world using a copy of your map, figure out which regions you want to keep and which regions apply to the new northwestern part.
Copy over the regions for the northwestern part. You have to figure out if there's any overlap of a region into a part you want to keep

#

and maybe use world edit for those parts in areas with an overlap. Basically you're talking about merging sections of two maps

#

well overwriting one section, and keeping your changes for the rest

#

just find the corners of the northwestern part and use that coordinate tool to figure out which region files it falls into

buoyant path
languid jolt
#

What the fuck is that?

buoyant path
#

server called cosmicprisons with custom enchants, they store all of their enchant levels in NBT data

languid jolt
#

Just get a custom enchants plugin

buoyant path
#

Im a developer lol

#

Im making my own custom enchants

#

in fact i've already done so but I couldn't find out how to do the NBT quite like this

languid jolt
#

Do like most people do.. "Research" other peoples code and make it better

buoyant path
#

I've already got a good system but I couldn't find anything like this with NBT

languid jolt
#

Welp that's what they get for hiring an entire development firm

buoyant path
#

one guy pretty much solo'd that project, I've done it before but I wanted to improve my code structures

frigid ember
#

IronMan_59 maybe try looking into PersistentDataContainer

buoyant path
#

This is using 1.8 are you sure that works

frigid ember
#

ohhh

#

probably not

solemn axle
#

:v

#

ignored

frigid ember
#

?

halcyon snow
#

It's possible that they're using a modified jar that allows persistent nbt data storage on entities in 1.8.8

winged sparrow
#

Imagine using fossilized versions of the game instead of modernizing

#

^ That is most likely the case, and they probably paid quite a bit for it.

steady hemlock
#

Hello o/

#

that can be a dumb question but i'm using now spigot on 1.16 without any plugins and, is it normal than i get a full stack of dirt when i use a TNT ?

frigid ember
#

As of 1.14 TNT now has a 100% drop rate in vanilla MC

steady hemlock
#

Ah! Well, it's been a long time since I played, lol. Thank you @frigid ember

frigid ember
#

no problemo

buoyant path
#

@frigid ember any other ideas for how I can get NBT to look like that?

#

Im still searching for a solution

frigid ember
#

no idea

#

i know its possible with vanilla commands

#

ive done it with vanilla commands

#

but idk how to do it with spigot

buoyant path
#

Hmm I might have an Idea

ashen siren
#

https://hastebin.com/ebuhamonus.java
i'm getting an internal error
Caused by: java.lang.ArrayIndexOutOfBoundsException: Array index out of range: 0
at me.totalfreedom.smp.commands.BanishCommand.onCommand(BanishCommand.java:32) ~[?:?]
at org.bukkit.command.PluginCommand.execute(PluginCommand.java:45) ~[patched_1.16.1.jar:git-Paper-77]

vernal spruce
#

Hmm you are looping through a uninitialized array

#

Or an empty one

chrome lark
#

empty

#

That exception does not line up with the code

vernal spruce
#

You see

chrome lark
#

stop the server, rebuild

frosty cave
#

hi @ashen siren

#

i had the same issue the other day, i believe it is with Player player = getPlayer(args[0]);

ashen siren
#

yeah it is

frosty cave
#

you gotta put that after you check that args > 0

#
if (args.length == 0) {
                sender.sendMessage(ChatColor.RED + "Usage: /playerstats <username>");
            } else {
                Player player = Bukkit.getPlayer(args[0]);``` here's what i did
ashen siren
#

appreciate it

frosty cave
#

np

wraith thicket
#

The thing is - if you look at his code, he's returning early if args.length == 0. And thus, like electroniccat said, the stacktrace does not line up with the code

frosty cave
#

oh i didnt see that

tacit trellis
fossil shoal
buoyant path
#

Is it possible to run code after the plugin manager has run all listeners?

#

Like how exactly does spigot use cancellable

tacit trellis
#

nice robertlit thanks

dark shuttle
#

Is it possible to run code after the plugin manager has run all listeners?
@buoyant path use EventPriority

buoyant path
#

No I mean like in my custom event

wraith thicket
#

You call the event.
And after you check if it was cancelled.

buoyant path
#

oh

fossil shoal
#

Like how exactly does spigot use cancellable
All the handlers are run, all accessing the same instance of the event, then there is a check if the event is cancelled

buoyant path
#

I see

tacit trellis
#

@fossil shoal do I have to shade it into my plugin?

fossil shoal
#

Yes

tacit trellis
#

okay

frigid ember
#

Any paid gadgets plugin suggestions?

#

(just for gadgets)

#

not other cosemtics

#

(tag with reply pls)

tacit trellis
#

paid?

buoyant path
#
            AwardItemsExecutable awardItemsExecutable = (items, commandsExecuting) -> {
            RewardPlayerEvent rewardPlayerEvent = new RewardPlayerEvent(items, commandsExecuting);
            Bukkit.getPluginManager().callEvent(rewardPlayerEvent);
            if (rewardPlayerEvent.isCancelled()) return;
                for (AwardableItem rewardedItem : rewardPlayerEvent.getRewardedItems()) {
                    Player playerRewarding = rewardedItem.getPlayer();
                    ItemStack itemRewarded = rewardedItem.getItem();

                    if (playerRewarding.getInventory().firstEmpty() == -1) {
                        playerRewarding.getWorld().dropItem(playerRewarding.getLocation(), itemRewarded);
                        continue;
                    }
                    playerRewarding.getInventory().addItem(itemRewarded);
                }

                for (String command : rewardPlayerEvent.getCommandsToExecute()) {
                    Bukkit.getServer().dispatchCommand(Bukkit.getConsoleSender(), command);
                }
        };```
#

so theoretically this should work?

#

with checking it being cancelled

wraith thicket
#

Yes. If you want nothing to happen if the event is cancelled, this will work.

buoyant path
#

Ok thanks 🙂

harsh stone
#

hello, this has nothing to do with my own projects but i have found a bug. On our server, (which runs spigot 1.16.1) if you go trough an end gateway, the server crashes.

#

if anyone knows a fix, please @mention me

neat oxide
#

@harsh stone Do you have a crash log by any chance this is not the first time i had someone tell me this and id like to figure out why it crashes

harsh stone
frosty cave
#

@harsh stone is there like an error in console or something

#

oh oops

#

didnt see the last message for some reason

harsh stone
#

haha, check the link, there you can find a log

frosty cave
#

what plugins are you using

harsh stone
#

none right now, normally discordsrv

frosty cave
#

weird

#

i dont think ive ever experienced that

#

except i dont usually peral through

harsh stone
#

yeah, tomorrow we have the first enderdragon fight so we are thinking about switching to vanilla until this bug is fixed

#

oh yeah, i should try to crouch through!

#

ill try that when i get home thanks!

frosty cave
#

yeah just use trapdoors/pistons

#

or water

#

or i think you could even use boats

peak glade
frigid ember
#

whats a good tutorrial for a dumb guy

#

i wana make plugins

lone fog
#

@harsh stone update spigot

harsh stone
#

is it fixed in the latest version?

lone fog
#

It’s been fixed for a while

fossil shoal
#

Maybe player's name

opal heron
#

whats the placeholder for a player again?

#

%player% or {player}

tiny dagger
#

depends on whatever plugin you use

#

it should be %player%

#

because this seems to be the placeholder standard anyway

#

why do you substrACT?

harsh hill
#

Hello, I downloaded 1.12.2 map on 1.15.2 server, but when enter world client lags

#

Why it occures? --forceUgrade didnt help

grim halo
#

@harsh hill What do you mean by "client lags". If you upgraded all chunks you should be fine.

harsh hill
#

When I go to this world, client freezes for 5 seconds

#

With other worlds all OK

grim halo
#

@frigid ember You should get the maxHealth and use it as base value.

harsh hill
#

First, I installed map, and then --forceUpgrade, but it did not help me, it tooke 10 seconds

grim halo
#

set it to (currentHealth - maxHealth/4)

tiny dagger
#

getMaxHealth * 3/4

harsh hill
#

Oh, sorry, can it be because chunks not loaded on server?

tiny dagger
#

you still need to decrease the player health

harsh hill
#

Is it will be more effective if get health 1 time and store it?

lone fog
#

player.setHealth(player.getHealth * 0.75)

#

Or if you want a percentage of the max health, player.setHealth(player.getHealth - player.getAttribute(Attribute.GENERIC_MAX_HEALTH).getValue / 4)

peak glade
#

hello

normal flume
#

On my server, if I set spawn protection to like 10000, and set the gamemode to peaceful, will this prevent hunger and block breaking, or should I use a plugin?

opal heron
#

does any1 have a clean 1.8.9 decompiled minecraft coder pack?

#

mcp for it is not available (i think)

grim halo
#

Wait...

if (proj instanceof Arrow) {
if (p.getHealth() == 20) {
    p.setHealth(15);
} else if (p.getHealth() == 15) {
    p.setHealth(10);
} else if (p.getHealth() == 10) {
    p.setHealth(5);
} else if (p.getHealth() == 5) {
    p.setHealth(0);
}

@frigid ember Pls dont do that.

naive goblet
#

switch

grim halo
#

I wouldnt even use a switch.
Just reduce the health of the player by 25%

#

Show me your code

#

I meant 25% of the players max health ^^

#

so get the max health and then p.setHealth(p.getHealth() - (maxHealth * 0.75))

#

Did you remember to cancel the arrow damage?

#

Because if not it just gets added on top

#

event.setDamage(0)

#

cancel would also prevent knockback and enchantments etc

#

Try giving it a potion effect? If not you need to extend NMS Arrow and set it to invisible.

fossil shoal
#

You can only do it to living entities

undone narwhal
#
if (proj instanceof Arrow) {
if (p.getHealth() == 20) {
    p.setHealth(15);
} else if (p.getHealth() == 15) {
    p.setHealth(10);
} else if (p.getHealth() == 10) {
    p.setHealth(5);
} else if (p.getHealth() == 5) {
    p.setHealth(0);
}

@frigid ember p.setHealth(p.getHealth() - 5) 🤫

#

Cause imagine if your player regenerate to 18 for instance, then he won't take any damage

grim halo
#

I mean if a player has more than 20 max health then subtracting 5 wouldnt be 25% anymore

undone narwhal
#

You never know. A cheat client with FastRegen will fail your system ^^

fossil shoal
#

Can't you just use player.setHealth(player.getHealth() / 4) ?

undone narwhal
#

Imagine a graph @fossil shoal, it is not linear and it will never reach 0

peak glade
#

i want friend

undone narwhal
#

Not a graph but a suite

#

sequence

#

@peak glade Can you make a clear question please?

peak glade
#

why ?

undone narwhal
#

We don't understand

fossil shoal
#

Sorry, what I meant is setHealth(getHealth() * (3 / 4))

undone narwhal
#

Same

peak glade
#

you understand

undone narwhal
#

You never reach 0

#

This is close but not 0 ^^

#

Zaid are you meaning: What is the plugin they used to make a friend system?

peak glade
#

./friend help

#

i need this jar

undone narwhal
#

Compatible with Bungee? Velocity maybe?

#

With a specific database?

peak glade
#

ok sorry nothing

undone narwhal
tawdry venture
#

is it possible to make a plugin that can work both on spigot and bungee?

tiny dagger
#

yes

#

make a plugin.yml and a bungee.yml

tawdry venture
#

and separate main classes?

tiny dagger
#

well yeah

#

different main classes

#

you can have a shared core

#

where it doesn't contains code from either of the builds

tawdry venture
#

thanks

subtle blade
#

Compile against the 1.8.8 API and don't use any methods added after that version lol

#

To make your life easier, compile against latest and use what methods you need. If you don't use anything added after, say, 1.9, then boom you have 1.9 - 1.16 support

tawdry venture
#

version support sucks in general

subtle blade
#

Not if you use API 🙂 My VeinMiner plugin has supported 1.13+ for quite some time now

#

I use API exclusively. Don't even have to update

tawdry venture
#

nms...

#

xd

#

getters setters, dependency injection, global variables

#

choose one

tiny dagger
#

you extract it as a method

#

oh variable

#

extract it as a field

#

if you implemented the commandexecutor in main class

#

extract the variable outside

#

👌

#

yes

#

the variables inside the methods are local scoped

#

well

#

you did somthing wrong lol

lyric anvil
#

Anyone know where I can get a plugin that removes mutually exclusive enchants?

#

I can't program

#

I could try it but it would be a lot easier to just find one

#

I'm on 1.16.1

#

Yeah, the problem is that there isn't much support as it's new

#

I'll give it a go

#

I'm just running an SMP for me and a couple if friends so it's not essential it would just be nice to have

#

Ok cool thanks

#

If you ever do just message me, I can pay you a bit if you want me to

frigid ember
#
            userdata.getUserFile().set("data.amountEnchanted", enchantgilde.amountEnchanted.get(userdata.uuid));```
#

How would I do the same for a HashSet with an uuid

#

?

#

ohh srry

#

xD

lyric anvil
#

@frigid ember cool, just message me then

#

Yup

tulip orchid
#

can someone tell me a plugin that lets me play jukebox discs in a region

lyric anvil
#

@frigid ember the plugin worked but doesnt have the ability to remove the mutual exclusivity

cerulean musk
#

Guys i have a kit plugin. But when i do" /kit "chat says:
/Kit [player] its essentials Command how can i disable it ?

lyric anvil
#

so i can run it on the server but it doesnt let me have fire protection and blast protection on the same bit of armour

#

@cerulean musk pretty sure its the the essentials config.yaml

frigid ember
#

anyone got a way of hosting a server for free?

#

coz im poor

lyric anvil
#

aternos

frigid ember
#

i cant use citizens

lyric anvil
#

its really bad performance but it works

frigid ember
#

anything else

#

it kept crashing and i couldnt use it properly when i use to use it

lyric anvil
#

you wont get anything good for free, it will work for a couple friends but not for lots of players

#

either self host or pay

cerulean musk
#

@lyric anvil

lyric anvil
#

Yup

cerulean musk
#

İ didnt found settings

#

What should i disable ?

frigid ember
#

i self host rn but how do i get an ip cos its like x.x.x.x rn

lyric anvil
#

you have to pay for that

cerulean musk
#

You need domain

#

Bicxter

frigid ember
#

i have no money

cerulean musk
#

:(

lyric anvil
#

then you have no ip

frigid ember
#

:(

cerulean musk
#

Topjam

#

Guys i have a kit plugin. But when i do" /kit "chat says:
/Kit [player] its essentials Command how can i disable it ?

frigid ember
#

wot abt freenom someone said

#

anyway

#

can someone heklp me bekause my serve rkeeps breaking and how i make an external backup script

#

i found it on youtube

lyric anvil
#

yeah or just do it manually

frigid ember
#
            userdata.getUserFile().set("data.amountEnchanted", enchantgilde.amountEnchanted.get(userdata.uuid));```
How would I do the same for a HashSet with an uuid
#

:p

#

it cost money 😭

lyric anvil
#

theres free ones

#

or just do it manually

frigid ember
#

how i do it manulay

lyric anvil
#

you select the files

#

then copy them

frigid ember
#

but i want to use /backup

dawn trout
#

Where do I get the mysql connector jar?

frigid ember
lyric anvil
#

literally the first results, do some googling before you come to discords

frigid ember
#

ok

#

i did

#

and nothing came up it was talking about wordpress or smthing

lyric anvil
#

then add minecraft

frigid ember
#

:|

lyric anvil
#

not every result on the internet is about minecraft

frigid ember
#

im not dumb

lyric anvil
#

clearly

frigid ember
#

can someone change my nickname coz its not bicxter

spare tiger
#

yo no need to be so condescending

#

is that your spigot name

frigid ember
#

no its not

#

my psiogt name is negative

spare tiger
#

¯_(ツ)_/¯

frigid ember
#

¯_(ツ)_/¯

spare tiger
#

I think the bot would just change it back

frigid ember
#

?

spare tiger
#

like if they right clicked you and changed your username the bot might change your name back to bicxter

#

how do api plugins work

#

like the kind where you have to have the plugin installed on the server for other plugins to work

wheat mirage
#

Does anyone know if there's any way to use the PacketPlayOutEntityVelocity for only one component? Due to ping, setting the clients velocity periodically causes huge stutters and completely overrides their current velocity.

#

It would be nice to just override one component

subtle blade
#

how do api plugins work
like the kind where you have to have the plugin installed on the server for other plugins to work
Define "how do they work"? What all do you want to know?

#

The short is that they're loaded first so other plugins can just use 'em

wheat mirage
#

@subtle blade I think it would be good to have seperate channels for dev help and plugin help

subtle blade
#

Something you'd have to bring up to md. I can't make nor manage channels

spare tiger
#

sorry for the bad explanation

#

basically, I want to make a plugin that does some stuff, and I have like some methods that other plugins can call. How would I set it up so that other plugins can talk to my plugin

#

that's what I'm trying to figure out

#

does spigot load all of that stuff

subtle blade
#

As long as your methods are public and accessible through some means, you can use 'em

spare tiger
#

ok got it

subtle blade
#

Bukkit loads all plugins through the same classpath

spare tiger
#

that's the answer I was looking for

#

thanks

subtle blade
#

If you want to use another plugin's API, it has to load first though. depend: [plugin, otherplugin] or softdepend: [plugin, otherplugin] in the plugin.yml

#

soft meaning your plugin won't fail if it's not installed

#

Optional dependency, if you will

spare tiger
#

ok got it

#

yea thats in plugin.yml I know that much

#

ok this all makes sense thanks for the help

subtle blade
#

oki Then you're good to go

#

o/

frigid ember
#

userdata.getUserFile().set("data.woodGildeAccess", new HashSet<>());

#

how would I link this to my hashset

#

choco ur a god xd

#

tell me :p

tacit trellis
#

does task.isCancelled() also check if it completed?

frigid ember
#

Hey,
I'm trying to do something with PacketPlayOutPlayerInfo.PlayerInfoData, but I'm getting this fancy problem when compiling:
Error:(23,32) java: cannot access net.minecraft.server.v1_12_R1.PacketPlayOutPlayerInfo.PlayerInfoData

More:

[ERROR] COMPILATION ERROR : 
[INFO] -------------------------------------------------------------
[ERROR] /C:/IntelliJ/ServerSystem/src/main/java/me/Entity303/ServerSystem/Vanish/Packets/VanishPacket_v1_12_R1.java:[23,32] cannot access net.minecraft.server.v1_12_R1.PacketPlayOutPlayerInfo.PlayerInfoData
  bad class file: D:\sfsfsfsfsf\Spigot\Spigot-Server\target\spigot-1.12.2-R0.1-SNAPSHOT.jar(net/minecraft/server/v1_12_R1/PacketPlayOutPlayerInfo$PlayerInfoData.class)
    bad RuntimeInvisibleParameterAnnotations attribute: PlayerInfoData(com.mojang.authlib.GameProfile,int,net.minecraft.server.v1_12_R1.EnumGamemode,net.minecraft.server.v1_12_R1.IChatBaseComponent)
    Please remove or make sure it appears in the correct subdirectory of the classpath.
[INFO] 1 error
[INFO] -------------------------------------------------------------

Anyone knows how to fix that? It works with 1.8 to 1.11, but not 1.12+

tacit trellis
#

PlayerInfoData is broken

tacit trellis
#

well idk how to fix it maybe others know

frigid ember
#

PlayerInfoData is broken
So, I'm stuck with a 1.8 - 1.11 plugin 😐

tacit trellis
#

well there probably is a fix, I tried looking for it but never found it

frigid ember
#

well there probably is a fix, I tried looking for it but never found it
Yeah, protocollib does it too... So there IS a fix. But idk how either 😐

keen compass
#

are you using java 9 @frigid ember ?

#

or Java 10 b37?

frigid ember
#

No. Java 8, but was using Java 11 for a little time

keen compass
#

then I would check your settings for the version you are trying to compile for

sullen harness
#

ups

#

wrong chat

keen compass
#

lol

frigid ember
#

Yeah, protocollib does it too... So there IS a fix. But idk how either 😐
Ok, apparently the fix is very simple.
Just do some more reflection:

        Class<?> clazz = null;
        try {
            clazz = getClass().getClassLoader().loadClass("net.minecraft.server.v1_16_R1.PacketPlayOutPlayerInfo$PlayerInfoData");
        } catch (ClassNotFoundException e) {
            e.printStackTrace();
        }

Well, I only tested this in 1.16.1 so I don't know if this is gonna work in older versions

subtle blade
#

It won't

#

You're hard-coding the version. At that point, you might as well directly use NMS

peak glade
#

hey

grim halo
#

@frigid ember I didnt follow the conversation but this is not how you should use reflections.
If you get the whole class path you can as well just use plain NMS and be several hundret percent faster.

frigid ember
#

Well, the compiler won't let me use PacketPlayOutPlayerInfo.PlayerInfoData

#

So I have to do it like that to not use PacketPlayOutPlayerInfo.PlayerInfoData

#

You're hard-coding the version. At that point, you might as well directly use NMS
I know... Thanks for pointing out something I know...
I meant if it works if I replace the 16 with a 13, if it will work on a 1.13 server then...

Also: This is just a test, not the finished code. I will make it version independent

grim halo
#

You want an instanc of PacketPlayOutPlayerInfo.PlayerInfoData ?

frigid ember
#

Yeah

#

And at the moment I use PacketPlayOutPlayerInfo.PlayerInfoData, the compiler won't let me

grim halo
#

PlayerInfoData is not a static class.
That means you need an instance of the enclosing class (PacketPlayOutPlayerInfo) to get an instance of PlayerInfoData

frigid ember
#

PacketPlayOutPlayerInfo.PlayerInfoData data = playerInfo.new PlayerInfoData(null, 0, null, null);

My compiler won't even let me use this...

As I said:
As soon as I use PacketPlayOutPlayerInfo.PlayerInfoData, my compiler won't let me:
Error:(23,32) java: cannot access net.minecraft.server.v1_16_R1.PacketPlayOutPlayerInfo.PlayerInfoData

grim halo
#

Ah i see. Why would you need an instance from PlayerInfoData. Makes no sense now reading the class... its just used for internal purposes.

frigid ember
#

Yeah, but I want to manipulate the data that's in that class: The GameMode

grim halo
frigid ember
#

And how to set the gamemode? 🤨

As you can see, the gamemode is stored in that inner class and is automatically set

grim halo
frigid ember
#

Sure, but then the player is really in that gamemode and that's exactly what I DON'T want.

I want to send to other players a fake gamemode. So players see a specific player in spectator mode (as a head).

If I just set the gamemode of the player, I wouldn't need any packets at all.

But nevermind. It seems to work with my reflection code.

So there is no real need to discuss that anymore.

Don't worry, I will make it version independent and try to improve it

grim halo
#

Sure but at least cache your reflections

frigid ember
#

That's what I meant with "try to improve it"

distant silo
#

Why do certain redstone components not work in chunks loaded with chunkloaders but without players present?

#

Also with the /forceload command

tawny whale
#

Is anyone else having issues with Multiverse Core/Nether Portals and Spigot?

#

My server is struggling with having multiple worlds.

spare tiger
#

this isn't really a spigot question but

is it possible to read raw console input? like I don't want to get a string after the user has typed some thing in, I want to get a string as they are typing it in

#

(in java)

#

nvm nvm nvm

#

I figured out some stuff

#

I have to put the terminal in raw mode and its completely different across systems

weary cargo
#

Is it possible to message a player a variable (java plugin)? Like I want to message the player's inventory (getInventory()) but I cant figure it out, any idea?

spare tiger
#

message?

heavy venture
#
  • Guys How Can i Upload resources with price on SpigotMC.org ?! *
spare tiger
#

haha

wheat mirage
#

Is there a way to check if an entities bounding box is colliding with world voxels using spigot's bounding box stuff?

spare tiger
shy shard
#

that should be formated number

#

and this is second problem with color codes

#

this is config

heavy venture
#

@spare tiger Thanks ! ❤️

wheat mirage
#

@frigid ember I'm pretty sure protocollib can help with this

mellow wave
#

Change encode format to UTF-8 @shy shard

#

(in your text editor and resave the file)

weary cargo
#

Is it possible to message a player a variable (java plugin)? Like I want to message the player's inventory (getInventory()) but I cant figure it out, any idea?
Is this possible?

mellow wave
#

Yes

weary cargo
#

In that case, how?

shy shard
mellow wave
#

Yeah you're reading the file with UTF-8 but is the file saved with it

#

@weary cargo You can use Player#sendMessage, convert what you want in to a String and send it

shy shard
#

I thing it should be

frigid ember
#
> [17:05:56 WARN]: Skipping Entity with id 50073601
> [17:05:56 WARN]: Skipping Entity with id 50073601
> [17:05:56 WARN]: Skipping Entity with id 50073601
> [17:05:56 WARN]: Skipping Entity with id 50073601
#

how to fix this?

#

it spams 24/7

spare tiger
#

@shy shard are you using maven?

#

you can set the encoder in maven

shy shard
#

no regular compiler

#

from intellj

frigid ember
#

@frigid ember I'm pretty sure protocollib can help with this
@wheat mirage
Well, I didn't want to depend on protocollib just for that 😅

wheat mirage
#

Protocolllib is superior in every way

mellow wave
#

@shy shard That looks correctly set but look at what the text says now

wheat mirage
#

Use protocollib even if it's just for one thing @frigid ember

mellow wave
#

^ It's easier

sturdy oar
#
Bukkit.getWorlds().stream().mapToInt(World::getEntityCount).sum()

Would this return only entities in LOADED chunks in all worlds?

mellow wave
#

I asume so

frigid ember
#

Use protocollib even if it's just for one thing @frigid ember
Not everyone uses protocollib, shocking, but true.

I didn't want to lose functionality just because a user doesn't have protocollib, also it's just one thing, that's why I didn't want to depend on protocollib either@wheat mirage

wheat mirage
#

Shade it in

#

Do it stupidly if you want

sturdy oar
#

😈 shade NMS

frigid ember
#

Shading ProtocolLib in my plugin? 😅

sturdy oar
#

Doesn't ProtocolLib only function when installed as plugin?

#

I never tried it as shaded

mellow wave
#

You could probably shade it by why

frigid ember
#

Doesn't ProtocolLib only function as a plugin?
Yeah, that's what I thought. I don't know if it is really so. But I'm pretty sure

mellow wave
#

Most servers install it anyway because of other plugins

tiny dagger
#

it wouldn't work i think because it needs it's on enable functions or something like that

mellow wave
#

You call the methods yourself

frigid ember
#

@tiny dagger do you know fix?

#
> [17:05:56 WARN]: Skipping Entity with id 50073601
> [17:05:56 WARN]: Skipping Entity with id 50073601
> [17:05:56 WARN]: Skipping Entity with id 50073601
> [17:05:56 WARN]: Skipping Entity with id 50073601
#

spamming 24/7

#

You call the methods yourself
You can't get an instance of the main class because a PluginClassLoader has to get the instance

mellow wave
#

Looks like something is wrong with an entity not much more we can know from that

tiny dagger
#

is that map converted or something?

sturdy oar
#

how do i determine if one method from the Bukkit API is safe to call from another thread?

chrome lark
#

assume that it isn't and move on

tiny dagger
#

you can try it

#

wait

radiant pollen
#

just try it and see if it breaks 😈

sturdy oar
#

I guess

tiny dagger
#

you can't try the getter methods

hollow thorn
radiant pollen
#

?paste

worldly heathBOT
lone fog
#

It’s actually pretty easy to make packet listeners on your own

hollow thorn
#

?paste

worldly heathBOT
lone fog
#

But efficiency is always a concern

radiant pollen
#

@hollow thorn please use that link to share logs

hollow thorn
subtle blade
#

com.javaminecraft.StaffWeaponUse.onStaffWeaponUse(StaffWeaponUse.java:312)

radiant pollen
#

^

subtle blade
#

These two lines will always be your best friends in a stacktrace:

Caused by: java.lang.NullPointerException
    at com.javaminecraft.StaffWeaponUse.onStaffWeaponUse(StaffWeaponUse.java:312) ~[?:?]```
#

Tells you what the exception is and where it occurred

hollow thorn
#

the error only happens when i use an item which was coded in a different area

#

?paste

worldly heathBOT
hollow thorn
#

?ps

#

?paste

worldly heathBOT
hollow thorn
#

if(e.getItem().getItemMeta().getLocalizedName().contains("wand")) why this no work

sturdy oar
#

item is null?

radiant pollen
#

Because those methods can return null.

subtle blade
#

getItem(), getItemMeta() and getLocalizedName() can all be null

radiant pollen
#

Item is null

#

most likely

rare prairie
#

getItem(), getItemMeta() and getLocalizedName() can all be null
ItemMeta#getLocalizedName() never be null, there is @NotNull annotation

hollow thorn
#

oh i forgot to use the e.getItem != null in the if

subtle blade
#

Localized name isn't nullable? I was under the impression that it could be

rare prairie
#

np

subtle blade
#

well ItemMeta definitely is ;P

rare prairie
#

yep

radiant pollen
#

@hollow thorn Check if getItemMeta() is null, as well.

subtle blade
#

hasItemMeta() will suffice

steady hemlock
#

Hello, I would like everyone to have access to the whitelist command, should I program it in the permissions.yml file?

sturdy oar
#

no

#

you should install a permissions plugin

hollow hedge
#

The permissions.yml is not a permission manager, it is more used to create "custom" permission packages.

steady hemlock
#

hooo okay

frigid ember
#

is there an event for when you open your inventory with e

#

InventoryOpenEvent doesnt trigger on that

tender quarry
#

There's an issue with ChatColor.RESET not resetting formatting (Evidence below). It was documented and fixed here https://hub.spigotmc.org/stash/projects/SPIGOT/repos/craftbukkit/commits/1601ec31e3ef864f324369a315ec586bee4f8e33, but I am still experiencing it. Something else that is odd is that in '1.12.2' the issue still persists even though this is only a behavior in 1.16+. I checked my plugin jars and I am not compiling the API alongside the plugin...any ideas as to why this is happening?

This could be an issue in BungeeCord, since I am using that API in the plugin aswell.

hasty crag
#
import net.md_5.bungee.api.ChatColor;

String coolmsg = "RED cool cool cool!";
coolmsg = coolmsg.replace("RED",ChatColor.of("#ff0000").toString())
#

does this work?

bleak cipher
frigid ember
#

uh guys spruce and birch trees arent supposed to generate in the jungle right

sturdy oar
#

what if they wanted to

#

let em generate

hasty crag
#

@bleak cipher thx for the tip

#

very helpful indeed

cosmic oyster
hasty crag
#

wow, you guys are so nice

#

thanks so much for the help

#

without you i'd be nothing

#

key to pleasure unlocked

#

try it and see

#

thats wow

#

❤️

#

tbh those people should get admin

subtle blade
#

Not wrong though...

hasty crag
#

ikr

#

i was lazy to test

#

xd

subtle blade
#

Fuckin' try it lol. That's the easiest way to see if it works

hasty crag
#

i'm a lazy fluffy panda

sturdy oar
#

I wish unit testing for Minecraft existed

subtle blade
torn robin
#

@frigid ember the clients inventory status is never sent

#

So no it’s not possible to detect when they open their inventory

frigid ember
#

oh rip

#

yeah i looked more into it and you used to be able to by detecting the achievement for opening your inventory but they removed that one

stable roost
#

What if they use their crafting table and craft something? Will the server know that? My guess is it will.

torn robin
#

Intersections are sent, just not whether it’s opened/closed

bleak cipher
#

@sturdy oar you can use mockito to mock spigot api objects

#

and then proceed with unit testing whatever

#

or you can implement dummies for the tests you want to do

chrome lark
#

unit testing is realistically unviable

#

Like, you can test some aspects of a plugin, but, going any deeper into trying to test against how users act, etc, glhf

sinful cradle
#

I generated spigot with buildtools and ran it with the normal .bat procedure

chrome lark
#

the foler should be created unless you have some oddity

#

make sure that you ran it after accepting the eula

sinful cradle
#

I did

#

I deleted everything and reran it after accepting the eula

#

and still no plugins folder

lone fog
#

You sure you are running a spigot jar

#

You have no spigot.yml either

frigid ember
#

Is checking for 0 health on a Damage Event a good idea?

#

A Death event isn't really giving me a DeathCause

subtle blade
#

Not but LivingEntity has getLastDamageCause()

frigid ember
#

hm. Good idea

subtle blade
#

Returns you an EntityDamageEvent from which you can get causes, etc.

#

It's nullable, so just keep that in mind

frigid ember
#

Ok that is good

#

It's nullable, so just keep that in mind
ok

sinful cradle
#

You have no spigot.yml either
@lone fog

#

uhh i think so

#

according to the spigot wiki, what I followed, running "java -jar BuildTools.jar --rev 1.16.1" in git bash in a folder with buildtools should generate a spigot.jar, but i dont think it is because it generated something called "minecraft_server.jar"

#

So im not sure that I even have a spigot server on my hands

rare prairie
#

use --compile Spigot after the --rev arg

sinful cradle
#

"java -jar BuildTools.jar --rev --compile Spigot 1.16.1"

#

like that?

rare prairie
#

no

#

--rev 1.16.1 --compile SPIGOT

subtle blade
#

--compile spigot is redundant

#

That's default

#

Just --rev 1.16.1 is fine

#

It won't ever generate minecraft_server.jar. Let it do what it needs to do

sinful cradle
#

well it is doing that sooo

#

@rare prairie this worked thank you!

forest thorn
#

I wish unit testing for Minecraft existed
@sturdy oar
You can make it

#

make an assertion framework on top of some java bot API

#

and then just spin up a server

#

when(client.sendsCommand("/ping"))
.thenExpectChatResponse("Pong");

#

or something like that

fringe cairn
#

Howo to I copy a file from the jar to the config folder? What do I need to import for getResouceAsStream()?

frigid ember
#

how do i make it when i right click an npc it rtp's me to another world

#

i use citizens and betterrtp

wraith thicket
subtle marlin
#

Anyone know how to get rid of the square brackets around custom item names?

frigid ember
wraith thicket
cerulean musk
#

guys how can i disable /kit [players] {kit}

frigid ember
#

is it your own plugin?

cerulean musk
#

its essentials

frigid ember
#

Go to config.yml and create a permission for the kit under the kit section

#

how do i make a world that is void?

#

with mvc

cerulean musk
#

Do we want to give users anything on first join? Set to '' to disable

This kit will be given regardless of cost and permissions, and will not trigger the kit delay.

#kit: ''
kit: tools

#

this ?

frigid ember
#

u use perm essentials.kit.something i think

velvet jasper
#

Simple question here what do you experience has 1.16.1 server instability at this moment with your test / in generals

#

Sinply asking cause some are saying they got multiple instability

cerulean musk
#

bickxter where i add ? #kit: ''
kit: tools

#

#kit: 'essentials.kit' ?

frigid ember
#

how do i do make a hollow sphere with we

kind berry
#

so I made it so you can ride any mob by clicking on it, but idk how to make it so you control them, anyone know how to do that?

#

so you can contol what you ride?

smoky anvil
#

Non-OP'ed players can't use /sell or /w with Essentials.

frigid ember
#

then add a rank with luckperms or smth and put in perms essentials.sell

tiny pebble
#

How would I go about having some sort of nametag over a players head such as naming an animal?

would it be Entity#setCustomName()?

frigid ember
#

wdym

tiny pebble
#

When a player joins the server their name is displayed above their head indefinitely. I want some sort of thing like that, maybe above their nametag

graceful sentinel
#

guys, is there any way to control chunk loading? i feel like my players generate too many chunks (might be flyhack)... i already took care for entities and reduced view distance, yet with 50 players, i have 4400 chunk loaded and 2000-3000 entities. server runs on flags from aikar tutorial, java 11...

any way to control chunk loading?

cerulean musk
#

guys please help me how can i disable this console messages ?

#

/kit [kit]

high root
#

on your onCoomand, are you returninf true or false?

#

Depending on what you return that message will get sent or not

frigid ember
#

How to properly save a hashset to yml?

#

its a hashset saving an UUID

fringe cairn
#

How do I register a command with spigot?

frigid ember
#

wdym

#

in plugin.yml?

fringe cairn
#

from on enable event

#

like bungeecord getServer().getPluginManager().registerCommand?

willow tundra
#

Hi, I tried updating my spigot server and now I can't seem to start it... the spigot.jar seems to point to the old spigot-1.15.2.jar file. I do have the spigot.1.16.1.jar file in the build folder 🤔 but I deleted the old one

frigid ember
#

this.getServer().getPluginManager().registerEvents(xx, this); xx=classname
this.getServer().getPluginManager().registerEvents(this, this); in main

#

but you first have to register the classname above

#

private final Xx(realname) xx(subname) = new Xx(realname)(this);

#

@fringe cairn

#

How to properly save a hashset to yml?
its a hashet saving an UUID
any1?

tiny pebble
#

is there a way to set multiple names on an entity and show both?

fringe cairn
#

Thank you

#

Any way to set individual players to offline mode? With a bungeecord plugin I could use initalHandler.setoffline or whatever

kind berry
#

I made it so you can ride any mob by clicking on it, but idk how to make it so you control them, anyone know how I could do that?

frigid ember
#

@frigid ember you can iterate through it in a for loop, after all, it implements Iterable

#

wait

#

So I have this

#
    public static final HashSet<UUID> woodGildeAccess = new HashSet<>();```
People get added to this hashset when staff members performed a command, 

```java
        userdata.getUserFile().getBoolean("data.woodGildeAccess");```
Checks if the boolean of the player is true onJoin
#

so now I want to do something like:

            userdata.getUserFile().set("data.woodGildeAcces"), woodGildeAccess.get(userdata.uuid));```
but get won't work in a hashset
#

Of course get "won't work" in a hashset

#

It's a set

#

also how do i change the format of the skin so its 3 pixels on the arm

#

yes so I need something like the same as get

#

but for hashsets :/

#

What is it you want to "get"

#

data of the players uuid

#

ohh no wait

#

You already have the uuid

#

thats onJoin

#

But how would I save the data than?

#

onDisable

#

you might want to use a hashmap

#

ohh yea

#

and do it UUID + Boolean right

#

that'll do I think

#

If you're just going to store the data only if they have been "promoted", I would rather use a set in code and a list of strings in the yml

#

If the set contains the uuid, I add it to the list

halcyon snow
#

instead of using woodGlideAccess.get, you could just use woodGlideAccess.contains, I'd assume that would have the same effect.

frigid ember
#

Yes, because there is nothing to "get" from a set

#

It's a set lmfao

#

I mean, in the case of the hashset, the object itself is the index within the set

kind berry
#

so I have a custom bow but when it gets damaged it becomes a different item to the listeners

#

how would I fix that?

#

I still want it to be able to break

nimble stump
#

You have to check it in a way that ignores durability

kind berry
#

ok and how would I do that?

tiny pebble
#

how can i make a runnable run for only a certain amount of ticks?

#

@kind berry Pretty sure you can check for the localized name rather than it being the exact itemstack

kind berry
#

oh

#

but what if you named a item the same name then?

tiny pebble
#

localized name shouldn't be the same name as another item or else it can get messed up, display name can be the same tho

#

shrug

pastel arrow
#
int cutOff_Time = 5 // ticks
new BukkitRunnable() {
    int current = 0;
    public void run() {
        current++;
        if(cutOff_Time <= current) {
            cancel();
        }
    }
}.runTaskTimer(JavaPlugin, 0, 1);

Something like this @tiny pebble You take 2 values the current amount of ticks and the max ticks you want. Then run cancel() after you reached the ticks you want.

tiny pebble
#

ah thank you!

pastel arrow
#

Np

weary cargo
#

Uh so I just got warned for spam on this server? I barely posted 3 messages??

#

By automoderator

pastel arrow
#

Only 4 bots you sure its not a troll

weary cargo
#

Well I've had that bot send me messages before so

pastel arrow
#

Screen shot it then. Are you sure its for this server?

weary cargo
#

YAGPDb.xyz msged me with:

SpigotMC: You have been ⚠Warned
Reason: Automoderator:
Please do not spam.

pastel arrow
#

Don't know. Might have to wait for staff on that one.

subtle blade
#

You just sent the same message more than once

weary cargo
#

What?

#

Asking if the java thing was possible?

#

I just quoted my original message with is this possible bc nobody said anything

kind berry
#

@tiny pebble oh works perfectly thanks 😄

tiny pebble
#

👍

frigid ember
#

hi

#

any report of bug that the mobs is not moving ?

#

and i maby two day or more of minecraft is going normal

knotty citrus
#

I have so many questions regarding the plugins, it'd take alot of patience to probably put up with it, can someone help me out in DMs?

#

I just got a spigot server and Im trying to set up a nice world for me and a few friends

#

I've had issues with some plugins

#

and I have a few questiosn

shut estuary
#

i just bought a plugin, after paying thru paypall i can not download it.... can someone solve this?

woeful lark
#

Hey does the playerlist not support hex colours as well as chat in 1.16?

tiny pebble
#

@shut estuary You'll have to contact who ever the owner of the plugin is

#

Anyone know how I can make an entity invisible but have its name still show up?

frigid ember
#

Possible problem:```java
UserDataHandler userdata = new UserDataHandler(player.getUniqueId());
if (userdata.getUserFile().getBoolean("data.enchantGildeAccess")) {

HashMap:```java
    public static final HashMap<UUID, Boolean> enchantGildeAccess = new HashMap<>();```


doesnt give errors but doesnt work either :/
I want it to __check__ the boolean in the players file (im saving hashmaps per player) so it will execute something when its on true
UserDataHandler class -> https://paste.helpch.at/acikezitim.cpp
cinder basin
#

I payed for lite bans but didnt get the resource

frigid ember
#

contact author

tiny pebble
#

Anyone know how I can make an entity invisible but have its name still show?

pastel arrow
#

Anyone know how I can make an entity invisible but have its name still show?
Don't think thats possible... however you could have an invisible armorstand with the name riding the invisible entity.

tiny pebble
#

what could i do to make the armostand invisible and showing its name then? haven’t figured that one out either.. just potioneffect or..?

frigid ember
#

ArmorStand#setVisible(false)

tiny pebble
#

ah cast it to armorstand, alright

frigid ember
#

might also want to set Marker true too

tiny pebble
#

what does that do 🤔

frigid ember
#

basically makes it act more like a placeholder than a regular armorstand

#

is tehre a PrepareItemSmithEvent or something like that?

#

(for smithing table)

undone narwhal
#

Does the Player#getLocale work well?

frigid ember
#
Loading libraries, please wait...
[23:21:46] [main/INFO]: Environment: authHost='https://authserver.mojang.com', accountsHost='https://api.mojang.com', sessionHost='https://sessionserver.mojang.com', name='PROD'
[23:21:47] [main/FATAL]: Failed to start the minecraft server
net.minecraft.server.v1_16_R1.SessionLock$ExceptionWorldConflict: /home/pi/minecraft/./world/session.lock: already locked (possibly by other Minecraft instance?)
        at net.minecraft.server.v1_16_R1.SessionLock$ExceptionWorldConflict.a(SourceFile:98) ~[spigot-1.16.1.jar:git-Spigot-c3a49df-2a18108]
        at net.minecraft.server.v1_16_R1.SessionLock.a(SourceFile:44) ~[spigot-1.16.1.jar:git-Spigot-c3a49df-2f18108]
        at net.minecraft.server.v1_16_R1.Convertable$ConversionSession.<init>(Convertable.java:198) ~[spigot-1.16.1.jar:git-Spigot-c3a49df-2f13108]
        at net.minecraft.server.v1_16_R1.Convertable.c(Convertable.java:180) ~[spigot-1.16.1.jar:git-Spigot-c3a49af-2f18108]
        at net.minecraft.server.v1_16_R1.Main.main(Main.java:97) [spigot-1.16.1.jar:git-Spigot-c3a49df-2f18148]
        at org.bukkit.craftbukkit.Main.main(Main.java:202) [spigot-1.16.1.jar:git-Spigot-c3aa9df-2f38108]
#

any ideas whats causing this?

#

running debian 1.16.1

undone narwhal
#

2 options:

  • Another server is already running on the world file
  • The server doesn't have the permission to edit the world folder
frigid ember
#

Are there any resources you guys know of that discusses how to change weapon skins without forcing items to be that skin?

#

so i should run it as sudo ig?

#

@undone narwhal seems like it was running a second instance somehow

#

thanks

#

So if I wanted to add a new weapon skin to the game, and call it a Zombie Sword or something, how would I add it without making it a lime dye or something like that?

#

Is that even possible?

undone narwhal
#

Cool Variez

#

Maklegend this is possible this 1.9+

#

But I never checked how to do it

#

You can make the player auto download a resource pack

#

And create a new texture

#

And tell the player that the item use the new texture

frigid ember
#

I see

undone narwhal
#

But it has to be on an existing item

frigid ember
#

ah

#

it has to be on an existing item

#

I see

undone narwhal
#

But imagine for example:

#

You put the new texture on a diamond sword

frigid ember
#

Possible problem:```java
UserDataHandler userdata = new UserDataHandler(player.getUniqueId());
if (userdata.getUserFile().getBoolean("data.enchantGildeAccess")) {

HashMap:```java
    public static final HashMap<UUID, Boolean> enchantGildeAccess = new HashMap<>();```


doesnt give errors but doesnt work either :/
I want it to __check__ the boolean in the players file (im saving hashmaps per player) so it will execute something when its on true
UserDataHandler class -> https://paste.helpch.at/acikezitim.cpp

@frigid ember

undone narwhal
#

You'll still be able to get the normal diamond sword

#

Hmmm are you sure about the ""plugins"+File.separator+"KDGilde"+File.separator+"users"" ?

#

Try removing plugins folder

frigid ember
#

is there a way to kill the current running session as I described the issue above?

#

like can i can terminate the mc server?

flint vine
#

hey does bungee works for 1.16.1?

zealous lynx
#

@frigid ember look into CustomModelData

undone narwhal
#

@frigid ember First locate the running PID of the mc server and do "kill <PID>"

#

To see all running process: ps -aux

frigid ember
#

But that is not what caused it @undone narwhal :/

calm cloak
#

Anyone ever have an issue where someone buys their plugin but they're not on your plugins buyer list?

#

The paypal transaction checks out

#

But they're telling me that they don't have access to the plugin and they're not coming up on the buyer list

tiny pebble
#

If I have:

            if (player.getNearbyEntities(50,50,50) instanceof Player) {
                
            }

What would I put within the if statement to basically state that the entities that are players get sent a message? Would I just it to Player?

halcyon snow
#

getNearbyEntities returns a List<Entity>, you need to loop through that list and check if the loop entity is a player.

#

if so, send it a message.

winged sparrow
#

Does this still work, or do I have to do something to modernize this:
entity.getAttribute(Attribute.GENERIC_MAX_HEALTH).setBaseValue(health);

#

I heard 1.16 screwed with attributes

grim halo
#

@tiny pebble You need to iterate over every Entity.
player.getNearbyEntities(50,50,50) returns a List<Entity>

tiny pebble
#

ah okay, thank you. i'll see what i can do 😛

bright forge
#

Hi, i am using YamlConfiguration provider to load my yml files from the BungeeCord.jar, but when plugins load ymls named the same (for example messages.yml) they load the one on the bungeecord.jar instead of the one provided by the plugin.jar. What can i do?

#

I am trying a different path atm to see if it fixes it

#

nope.

#

Any easy way to create configuration files via java instead of saving a resource inside the bungeecord jar?

frigid ember
#

Quick question, so if I have ``` ArrayList<String> enabledMobs = new ArrayList<String>();

flint vine
#

hey does bungee works for 1.16.1?

sturdy oar
#

Quick question, so if I have ``` ArrayList<String> enabledMobs = new ArrayList<String>();

@frigid ember Collection#add does not create anything new

#

It just add an element

frigid ember
#

Alright thanks! I guess I gotta use a hashmap

sturdy oar
#

Idk what you're doing 🧙‍♂️

frigid ember
#

its complicated to long to explain xd

flint vine
#

||hey does bungee works for 1.16.1?||

jagged fulcrum
#

I'm running a bungeecord server with 1.16.1, so yes.

#

@flint vine

tiny pebble
#
for (Entity value : entityList) {
      if (value instanceof Player) {
          value.sendMessage(message);
      } else {
         return;
      }
}

shouldn't this work?
It loops through every entity and checks to see if it is a player, if it is it sends a message. no message is sent though

jagged fulcrum
#

Where do you get your entity list from?

tiny pebble
#

List<Entity> entityList = player.getNearbyEntities(50,50,50);

jagged fulcrum
#

Are you certain this piece of code is executed?

#

Oh wait

#

You are returning if it's not, so if the first entity is not a player, it will stop the loop.

#

Put a "continue;" instead.

tiny pebble
#

Thank you so much! Rookie mistake I guess haha, wasn't really thinking

frigid ember
#
        System.out.println("1");``` why isnt this event ever running? I registered it in main and its not erroring nor printing
jagged fulcrum
#

Me neither lol, late at night.

#

Are you missing the @Eventhandler annotation, @frigid ember ?

frigid ember
#

omg

#

bro thank you

#

lol

#

i always forget that holy

jagged fulcrum
#

Haha, you're not alone.

#

Don't forget to register it too.

frigid ember
#

yup works like a charm now

#

appriciate it

#

cant spell lol

jagged fulcrum
#

No worries.

subtle blade
#

Just, yeah. That is a thing you can do

jagged fulcrum
#

I'm definitely going to use this somewhere, oh my.

frigid ember
#
[01:03:58] [Worker-Main-4/INFO]: Loaded 7 recipes
[01:04:00] [Worker-Main-4/WARN]: Found validation problem in {minecraft:entities/shulker}.pools[2].entries[0]: Unknown loot table called minecraft:entities/reference/extra/shulker
[01:04:00] [Worker-Main-4/WARN]: Found validation problem in {minecraft:entities/ender_dragon}.pools[0].entries[0]: Unknown loot table called minecraft:entities/reference/extra/ender_dragon
#

none of the plugins ive got installed are creating custom crafting recipes

frigid ember
#

BungeeCord directions say to copy the file to the bungeecord directly, but the latest build has multiple files. Do I download all of the files into my bungeecord directory?

#

Anyone knows of good/rich resources on reflection? I might need to get into it but I want to be prepared beforehand lol

#

talking to you, choco xd

wary spoke
#

Does anyone know what is the new "RGB" of minecraft colors in chat?

keen compass
#

@wary spoke as in what is supported?

#

if that is what you are asking, the colors that are supported is the same as the range of hexadecimal

#

which is somewhere in the 4millions

frigid ember
#

STN-Studios to use them u have to use net.md_5.bungee.api.ChatColor.of(String string), and then put in ur hex code in as a string

#

to get hex code from colors u can literally just google rgb color picker and google has one for u

fringe cairn
#

How do I check if a human entity is sneaking?

frigid ember
#

cast to Player

#

and use Player#isSneaking()

fringe cairn
#

okay thanks

frigid ember
#

ye

#

in my plugin, i have certain abilities that a player can use, but im right now trying to put in a block that, when players are near it (within a certain range), they cant use these abilities.

right now my idea to do this is to have the block use PersistentData and everytime the player uses an ability, i have to test all blocks near the player, but i realize that testing so many blocks is probably gonna lag down the server. is there any more efficient way of doing this that doesnt require testing every single block in a radius?

#

NullPointerException: Caused by: java.lang.IndexOutOfBoundsException: Index: 1, Size: 1 at java.util.ArrayList.rangeCheck(Unknown Source) ~[?:1.8.0_251] at java.util.ArrayList.get(Unknown Source) ~[?:1.8.0_251] at com.benyji.core.mobs.SpawnerController.mobSpawned(SpawnerController.java:57) ~[?:?] SpawnerSpawnEvent gets a hashmap with the spawnrs location and stores a list of the mob enabled, why is this erroring out when a place a second spawner down? they seem to be interfering not sure why, this is line 57: List<String> entityList = enabledMobs.get(spawner.getLocation());
String entity = entityList.get(r.nextInt(enabledMobs.size()));

#

^ is line 57

keen compass
#

you are checking the array for something that doesn't exist

#

or you are assuming indexing starts at 1

#

which it doesn't it starts at 0

frigid ember
#

How would it not exist though?

subtle blade
#

That exception isn't thrown by a hash map

frigid ember
#

oh by the list? but how can that be null if I just initialized it the line before?

subtle blade
#

List isn't null either. You're pulling something from that list that doesn't exist

#

i.e. that list you have has only 1 element, but you're pulling index 1 (which is out of bounds)

frigid ember
#

Oh so your saying it is expecting 2 elements?

subtle blade
#

String entity = entityList.get(r.nextInt(enabledMobs.size()));

#

This is your error line, correct?

#

Look at what argument you're passing to nextInt()

frigid ember
#

yup

lone fog
#

You're trying to get an element beyond the end of the list

frigid ember
#

so it should be enabledMobs.size() - 1?

subtle blade
#

entityList.get(r.nextInt(enabledMobs.size()))

#

Two key vars here

frigid ember
#

oh shoot

#

lol

subtle blade
frigid ember
#

thanks guys

#

<33

subtle blade
frigid ember
#

in my plugin, i have certain abilities that a player can use, but im right now trying to put in a block that, when players are near it (within a certain range), they cant use these abilities.

right now my idea to do this is to have the block use PersistentData and everytime the player uses an ability, i have to test all blocks near the player, but i realize that testing so many blocks is probably gonna lag down the server. is there any more efficient way of doing this that doesnt require testing every single block in a radius?
@frigid ember also anyone have a better idea than this?

#

now im thinking i should add block to arraylist or something instead

subtle blade
#

(1) PersistentDataContainer isn't an option here. Only tile entities have NBT. Regular blocks do not
(2)

now im thinking i should add block to arraylist or something instead
Yes

frigid ember
#

thinking about using a Structure Block

#

they can hold Persistent Data right?

subtle blade
#

I believe so, yes

frigid ember
#

aight imma try that

tiny pebble
#

how do i get rid of the tab completion for a command?

frigid ember
#

the issue tho now

#

is if the server goes offline

#

then the list gets cleared

subtle blade
#

Of a command not provided by your plugin? TabCompleteEvent is your friend

frigid ember
#

i could try saving it to config maybe?

subtle blade
#

Yes, you'd have to write those positions to file, potato

frigid ember
#

thats gonna be one long ass file

lone fog
#

A database may be better

tiny pebble
#

how about of a command that is provided by my plugin 🤔
I just don't want it to auto-recommend the users names

frigid ember
#

never worked with one, how would i do that?

#

i know its something with MySQL

lone fog
#

Or you could loop all tile entities on chunk load and add it to the list then

#

Not perfect, but it doesn’t require any external storage

fringe cairn
#

is there anyway to live debug a server plugin?

#

through intellij

subtle blade
#

You can implement TabCompleter (or TabExecutor if you're also implementing command logic, just a utility class that combines the two) and return Collections.emptyList()

frigid ember
#
                    
                    blockState.update();``` is being run but isnt replacing the spawned mob, no errors either, should I be canceling the event 'SpawnerSpawnEvent'?