#help-archived

1 messages · Page 185 of 1

frigid ember
#

setDurability() is deprecated

ocean prism
#

but is Block#getDrops not BlockBreakEvent#getDrops

wraith thicket
frigid ember
#

sweet

#

ty

sturdy oar
#

I mean isn't the seeds drop on wheat just random from 0-3

vernal spruce
#

dont think

wraith thicket
#

I think seeds are, but not everything is

ocean prism
#

Yes, except that my plugin can handle any kind of plantation like carrots, nether warts etc x)

vernal spruce
#

i mean in 1.12 is as simple as checking if its Ageable

#

no need for individual crop

wraith thicket
#

But the amounts are still different for different crops if I recall

craggy lynx
#

How do i make a chat prefix?

lyric cypress
#
Class[] cArg = new Class[2];
cArg[0] = String.class;
cArg[1] = double.class;
Constructor constructor;
try {
    constructor = net.minecraft.server.v1_16_R1.AttributeBase.class.getDeclaredConstructor(cArg);
} catch (NoSuchMethodException e1) {
    e1.printStackTrace();
    return;
} catch (SecurityException e1) {
    e1.printStackTrace();
    return;
}
constructor.setAccessible(true);
AttributeBase base;
try {
    base = (AttributeBase) constructor.newInstance("minecraft:generic.attack_damage", 2.0D);
} catch (InstantiationException e) {
    e.printStackTrace();
    return;
} catch (IllegalAccessException e) {
    e.printStackTrace();
    return;
} catch (IllegalArgumentException e) {
    e.printStackTrace();
    return;
} catch (InvocationTargetException e) {
    e.printStackTrace();
    return;
}
DEFAULT_ATTRIBUTES.put(EntityTypes.CHICKEN, EntityInsentient.p().a(base).a());

This still gives java.lang.IllegalArgumentException: Can't find attribute minecraft:generic.attack_damage

ocean prism
craggy lynx
#

Thanky

wraith thicket
#

@placid kiln What the hell are you doing?

frigid ember
#

org.bukkit.entity.Damageable <- is this the damageable interface I want?

wraith thicket
#

No

lyric cypress
#

context:

public class CoolChicken extends EntityChicken {
    private static final Map<EntityTypes<?>, AttributeProvider> DEFAULT_ATTRIBUTES;
    static {
        try {
            final Field modifiers = Field.class.getDeclaredField("modifiers");
            modifiers.setAccessible(true);
            final Field field = AttributeDefaults.class.getDeclaredField("b");
            modifiers.setInt(field, modifiers.getInt(field) & ~Modifier.FINAL);
            field.setAccessible(true);
            DEFAULT_ATTRIBUTES = new HashMap((Map<EntityTypes<?>, AttributeProvider>) field.get(null));
            field.set(null, DEFAULT_ATTRIBUTES);
        } catch (Throwable reason) {
            throw new RuntimeException(reason);
        }
    }

    public CoolChicken(Location loc)

    {
        super(EntityTypes.CHICKEN, ((CraftWorld) loc.getWorld()).getHandle());

        //  my previous message because discord doesn't allow long messages

        this.setPosition(loc.getX(), loc.getY(), loc.getZ());
        this.goalSelector.a(0, new PathfinderGoalFloat(this));
        this.goalSelector.a(1, new PathfinderGoalMeleeAttack(this, 1.0D, false));

        this.targetSelector.a(2, new PathfinderGoalNearestAttackableTarget<EntityHuman>(this, EntityHuman.class, true));
    }
}
frigid ember
#

inventory damageable?

wraith thicket
#

The one you want is in the inventory.meta package

frigid ember
#

gotchya

wraith thicket
#

@placid kiln

#

?paste

worldly heathBOT
vernal spruce
#

Hes trying to give a damage value to the chicken

frigid ember
#

Hey here

#

Can anyone explain me if I'm totally stupid

#

Why don't work if gameStarted == false startGame() gameStarted = true

pastel nacelle
#

and you are trying to do what exactly

frigid ember
#

I'm on mobile

silent veldt
#

that means nothing with no context

frigid ember
#

Bruh

wraith thicket
#

If you want help with your code, then you're going to have to share your code...

frigid ember
#

I'm on mobile

lyric cypress
#

brackets

#

?

pastel nacelle
#

then wait until you are on a pc

silent veldt
#

Then post when you aren't?

#

We don't have a crystal ball

lyric cypress
#

also you don't need gameStarted == false

#

it's just (gameStarted)

frigid ember
#

Ik

lyric cypress
#

also semicolons

frigid ember
#

Ok wait

wraith thicket
#

He clearly didn't post the code he's actually used

silent veldt
#

All I can tell you is that that code will call the startGame method if gameStatred is false

wraith thicket
#

Which means what he posted is completely irrelevant

silent veldt
#

exactly

frigid ember
#

nice name btw

lyric cypress
#

can't you just put it in onEnable()?

wraith thicket
#

I think I need to post the 10 minute "Help me to help you" video again

frigid ember
#
   public static void CountDown(){
        new BukkitRunnable() {

            @Override
            public void run() {
                if (getCount() == 0) {
                    if (GameRunning == false) {
                        RunGame();
                        Bedwars.GameRunning = true;
                    }
                }else{
                    count--;
                    coutdown = "" + count;
                    if (getCount() == 10){
                        SelectWinMap.selectWinMap();
                        Bukkit.broadcastMessage("§8[§6Vote§8] §7Map §6" + Map + " §7has won! §3(" + MapW + " Votes)");
                        Bedwars.mapstring = Map;
                    }
                }

            }
        }.runTaskTimer(Bedwars.getMain(), 0, 20);
    }
}```
#

this shit

#

idk im totally stupid maybe

#

yack what is that

silent veldt
#

That code can't be complete. I mean, where is the count variable even defined?

pastel nacelle
#

please follow the code formatting and naming conventions

frigid ember
#

count is up

silent veldt
#

Yeah that PascalCase though

pastel nacelle
#

this is illegible

frigid ember
#

im pretty sure 25 is one second

#

just when getCount() is 0 it starts nothing

pastel nacelle
#

read, understand, and follow this

#

then rewrite your code to follow it

#

then, repost it

#

and we will help you

frigid ember
#

when i added if gamerunning == false it started to do nothing

pastel nacelle
#

do it. if you have no interest in helping yourself, what makes you think any of us have any interest to help you?

frigid ember
#

i dont see you cancelling the task anywhere

silent veldt
#

You're checking the count with getCount(), but then modifying it directly with count--

frigid ember
#

and yes gamerunning is false

silent veldt
#

If count is a copy of getCount(), then the actual counter won't be decremented

frigid ember
#

thants not the point

silent veldt
#

It is quite the point if count is never 0

frigid ember
#

the point is it started to do nothing

wraith thicket
#

You're also referring to GameRunning and Bedwars.GameRunning - are those two different variables or are you in the Bedwars class?

frigid ember
#

when i added if (GameRunning == false)

#

ok ill try to reformate that and run again

pastel nacelle
#

no

#

don't try

#

do

wraith thicket
#

Also, while you're at it, you should make use of OOP

pastel nacelle
#

basically; learn java and try again

frigid ember
#

BRUH

#

i recommend watching a bunch of tutorials to get it wrapped around your head

#

bukkit or java tutorials

#

See you in 3 years!

#

ur guys so funny -.-

neon matrix
#

You can learn java in 10 hours

wraith thicket
#

We're being realistic.

frigid ember
#

i understand java

silent veldt
#

We're actually trying to help you

wraith thicket
#

Clearly not well

silent veldt
#

I disagree with that statement

frigid ember
#

I learned java

#

if you think you know enough java then watch some bukkit tutorials

silent veldt
#

This isn't even Bukkit though really

#

We're just saying there are bigger issues than the code not working

wraith thicket
#

Ignorence is bliss. The less you know the more confident you are.

silent veldt
#

It's.. badly designed

#

And that's not trying to insult you, just being honest

frigid ember
#

based on how its implemented

#

i dont see you ever being able to cancel the task

#

because you are not saving a reference to the object

silent veldt
#

Well yeah he doesn't store the threadID or task object

frigid ember
#

BukkitRunnable is one way of implementing

#

you could also use TimerTask and Timer

#

many ways

tacit trellis
#

Can I use a bukkit event in Spigot-Server?

silent veldt
#

What event are you trying to use?

tacit trellis
#

AsyncPlayerPreLoginEvent

vernal spruce
#

bukkit is kinda spigot

#

what bukkit has spigot also has

silent veldt
#

That event is in the API

#

The spigot API

tacit trellis
wraith thicket
#

A Spigot server has everything that's within the Bukkit API

tacit trellis
#

yes

wraith thicket
tacit trellis
#

I know I was able to do it

#

but how do i register that event in spigot server?

vernal spruce
#

oh you want to make a custom event?

tacit trellis
#

not really

vernal spruce
#

wait why are you inside CraftPlayer

tacit trellis
wraith thicket
tacit trellis
#

I got told a million times that I shouldnt fork spigot for that but I want to

vernal spruce
#

wait are you the reinventing the wheel guy?

#

nvm lol

tacit trellis
#

no

#

not that guy

vernal spruce
#

yes you are

#

lol

tacit trellis
#

just want to add my methods to player

#

Okay what if I am that guy

#

how do I do it, I want to set level from mysql

vernal spruce
#

as everyone else told you make your own plugin to do that rather

#

than directly forking

tacit trellis
#

😦

#

why

vernal spruce
#

cause its easyer

tacit trellis
#

can nobody tell me

#

even if it is easier

silent veldt
#

I mean the API is there for a reason

wraith thicket
#

a) You clearly don't know how to make a fork
b) It's so much easier
c) The plugin system is designed for exactly this

tacit trellis
#

thank you

#

a) thats why I am asking
b) I know
c) I also know but still

wraith thicket
#

So instead of using an engine to move a car, you'd rather push it by hand?

#

That's what you're attempting to do here

tacit trellis
#

thats what I am saying I guess

silent veldt
#

I mean you won't be making a plugin at that point, it will be built into the server jar

vernal spruce
#

i guess go for the hard way,noone stops you

#

have fun breaking shit

tacit trellis
#

thanks

#

but

#

can I use events when doing this?

silent veldt
#

Unless you are doing some hardcore behind the scenes stuff, outside of the reach of the API, you get no benefit from doing this

vernal spruce
#

read there and find out

tacit trellis
#

I already read that

wraith thicket
#

If you got to ask, then you're clearly not ready to fork Spigot

#

But to each their own

tacit trellis
#

it doesnt really tell me?

silent veldt
#

What you are asking is not a simple thing, a bit too complex to explain via discord

pastel nacelle
#

what do you want

vernal spruce
#

he wants to fork spigot..

pastel nacelle
#

why though

silent veldt
#

And build his code into the server jar

wraith thicket
#

He wants to do things the hard way. To spend hours on something that would take a few minutes. And then to gain no advantages out of it.

pastel nacelle
#

he mentioned something about adding methods to a player

vernal spruce
#

to add somem methods to return coins in the Player class

silent veldt
#

reasons apparently

pastel nacelle
#

just write a wrapper or an util class to handle it

polar gust
#
ItemStack item = new ItemStack(Material.BONE);
            ItemMeta meta = item.getItemMeta();
            meta.setDisplayName(name());
            item.setItemMeta(meta);
```any reason for this to get null pointer exception?
vernal spruce
#

at least that guide on spigot tells us pretty straight forward

#

how to fork it

silent veldt
#

item isn't guaranteed to have meta

tacit trellis
#

okay I wont do it since you guys are really against it and you are probably right

vernal spruce
#

like you just rebuild it with maven

wraith thicket
#

Where are you getting an NPE exactly, David?

tacit trellis
#

but can I otherwise extend CraftPlayer?

polar gust
#

second

vernal spruce
#

most likely here

#

name()

wraith thicket
#

Craig, any item other than air will have #get non-null meta

silent veldt
#

you need to either check item.hasMeta()

polar gust
#

I got so confused, I commented the line and it still caused an exception

silent veldt
#

or if(meta != null)

vernal spruce
#

@silent veldt its a fresh created itemstack

#

it doesnt matter

#

that method name is most likely returning null

silent veldt
#

Oh, right

#

missed that

polar gust
#

its not, its from an annotation

vernal spruce
#

show the code for it

polar gust
#

there is no code though, its a attribute for an annotation

vernal spruce
#

show the null error

#

so we can point where it comes from

polar gust
#
        at com.david.specialwolves.Main.onEnable(Main.java:40) ~[?:?]
        at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:263) ~[spigot.jar:git-Spigot-800b93f-8160e29]
        at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:352) [spigot.jar:git-Spigot-800b93f-8160e29]
        at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:417) [spigot.jar:git-Spigot-800b93f-8160e29]
        at org.bukkit.craftbukkit.v1_15_R1.CraftServer.enablePlugin(CraftServer.java:462) [spigot.jar:git-Spigot-800b93f-8160e29]
        at org.bukkit.craftbukkit.v1_15_R1.CraftServer.enablePlugins(CraftServer.java:376) [spigot.jar:git-Spigot-800b93f-8160e29]
        at net.minecraft.server.v1_15_R1.MinecraftServer.a(MinecraftServer.java:457) [spigot.jar:git-Spigot-800b93f-8160e29]
        at net.minecraft.server.v1_15_R1.DedicatedServer.init(DedicatedServer.java:267) [spigot.jar:git-Spigot-800b93f-8160e29]
        at net.minecraft.server.v1_15_R1.MinecraftServer.run(MinecraftServer.java:784) [spigot.jar:git-Spigot-800b93f-8160e29]
        at java.lang.Thread.run(Thread.java:835) [?:?]```
silent veldt
#

the stack trace will tell you the line it's throwing on

polar gust
#

40 is the new itemmeta line

silent veldt
#

so which line is line 40?

#

new itemmeta?

polar gust
#

ItemMeta meta = item.getMeta

#

yeah

wraith thicket
#

You're running a different version on the server than the one you provided here

silent veldt
#

item is null then

wraith thicket
#

The item variable was created a line before

silent veldt
#

yeah but what else on that line would throw an NPE?

wraith thicket
#

Nothing

silent veldt
#

exactly

#

or the line number is wrong

wraith thicket
#

Hence I said he's running a different version

polar gust
#

thats why im condused

#

unless item doesnt have meta

silent veldt
#

wouldn't matter

wraith thicket
#

Even if it didn't have meta, you'd not get an NPE

silent veldt
#

it would just store null in the meta variable

#

wouldn't throw an NPE unitil you access it next line

wraith thicket
#

You're simply not running the code you've posted here or you've misaligned the lines

silent veldt
#

Yeah I've done that before

#

try rebuilding your plugin

polar gust
#

let me try again

grim halo
#

Problem: essentials x doesn't let me use @p on power tools. Does anyone know how to fix this?

wraith thicket
#

Make sure there's only 1 instance of the plugin in your plugins folder - it might be you're running an older version instead

bronze acorn
#

@silent veldt whats the server version vs the api version

wraith thicket
bronze acorn
#

idk if itd matter but if ur using an api below 1.13 on a 1.13 server

#

i heard there was a big update between 1.12 and 1.13 so like

silent veldt
#

yeah, the flattening

bronze acorn
#

yeah are you doin dat xd

vernal spruce
#

the godly material enum

silent veldt
#

anything that doesn't specify api-version will enable legacy materials

bronze acorn
#

oh

#

oh we were talkin to someone else about his plugin

#

not craig

#

oof

silent veldt
#

lol wondered why you tagged me

bronze acorn
#

xd mb

wraith thicket
#

Even if the problem above had to do with the compatibility layer, the line he said he had an NPE on could not have had an NPE

vernal spruce
#

basically yeah

grim halo
#

@wraith thicket well I am using a spawn kit and I was hoping that somehow I could tp whoever the user of the tool is to a set location

#

Is that possible somehow?

silent veldt
#

yeah, I don't think new ItemStack will ever return null with a valid Material

wraith thicket
#

If you create a new object, you cannot get null

bronze acorn
#

depending what the material is maybe

wraith thicket
#

You could throw exceptions

fossil shoal
#

a constructor can't return null

wraith thicket
#

But you won't get null

silent veldt
#

yeah that would stop the code

bronze acorn
#

oh

silent veldt
#

it must be a line number issue

bronze acorn
#

god discord is either dying again or its just me

polar gust
#

idek what happened, no exception anymore

bronze acorn
#

lol

#

it do be magic doe

stoic shell
#

Hey, would anyone know where EntityArgumentType is?

polar gust
#

I think I was just running an old jar over and over

silent veldt
#

sounds right

bronze acorn
#

u should always check the date modified of the jar

#

itll tell u what time it was last like created

wraith thicket
#

They probably had multiple jars for the same plugin and simply ignore the warning about it and ran the old version

bronze acorn
#

not always but if u think like smthns wrong and ur for sure its right

#

i hate that pterodactyl panel doesnt overwrite

#

thats the only bad thing i see when i compare it to multicraft

stoic shell
#

Wait a moment, the entire net.minecraft.command package is gone in spigot?

bronze acorn
#

huh

#

why does that package even matter xd

stoic shell
#

Cause EntityArgumentType would be under net.minecraft.command.arguments...

bronze acorn
#

idk what entityargumenttype is big oof

#

what are u trying to do

stoic shell
#

Well I just need EntityArgumentType, but I can't find it under spigot NMS...

bronze acorn
#

u have the other nms packages right

polar gust
#

is there a way to get EntityTypes with an id?

bronze acorn
#

wdym

polar gust
#

I dont see a method in EntityTypes or a way to iterate through all of them

stoic shell
#

u have the other nms packages right
Wdym?

bronze acorn
#

EntityType.values() ?

#

u have like other net.minecraft.server packages

#

right

polar gust
#

I'm looking for EntityTypes, not Type

#

the one with an "s" after

vernal spruce
#

wut?

#

be more specific

polar gust
#

net.minecraft.server.v1_15_R1.EntityTypes;

vernal spruce
#

should be literally same thing

polar gust
#

different from "EntityType"

vernal spruce
#

EntityTypes.values

stoic shell
#

I don't have any packages in net.minecraft.server

vernal spruce
#

its still a enum

polar gust
#

its not though

#

its a class I think

stoic shell
#

(well besides the version)

vernal spruce
#

also why you want to get a entity through nms

#

spawn it with api,cast it on livingentity and you have everything you couldv done with nms

#

also yeah there isnt a enum for it

#

each entity has it s own class

#

EntityZombie/EntitySkeleton

polar gust
#

EntityTypes is different though, I think they literally have an atrribute per type

vernal spruce
#

just say what you are trying to achieve

polar gust
#

I found a method to register enttites but it used EntityTypes while I recorded id only of all the custom entities im registering

vernal spruce
#

so just type it in

#

what you want to

polar gust
#
public static void register(String name, EntityTypes<? extends EntityLiving> entityType, EntityTypes<? super EntityLiving> parentType, EntityTypes.b<? extends EntityLiving> maker) throws IllegalStateException {
        MinecraftKey key = MinecraftKey.a(name.toLowerCase());
        Map<Object, Type<?>> dataTypes = (Map<Object, Type<?>>) DataConverterRegistry.a()
                .getSchema(DataFixUtils.makeKey(SharedConstants.getGameVersion().getWorldVersion()))
                .findChoiceType(DataConverterTypes.ENTITY_TREE).types();
        dataTypes.put(key.toString(), dataTypes.get(parentType.h().toString().replace("entity/", "")));
        EntityTypes.a<? extends EntityLiving> a = EntityTypes.a.a(maker, EnumCreatureType.CREATURE);
        entityType = a.a(key.getKey());
        IRegistry.a(IRegistry.ENTITY_TYPE, key.getKey(), entityType);
    }```I mean that's the method
vernal spruce
#

so just do

#

what entity you want

#

EntityTypes.Entity

stoic shell
#

Huh... I'm using spgiot as the maven dependency, not spigot-api, and I have ran build tools. How come there is only a limited selection of NMS classes available?

vernal spruce
#

it shows as a enum for me

#

even in the good ol eclpse

polar gust
#

it just looks like an enum

#

there is no values()

#

its just static attributes that are all caps

vernal spruce
#

so the problem is....

#

you register what entity you need

polar gust
#

I'm trying to not do every entity seperatly

wind mica
#

list them?

polar gust
#

so I'm using reflections to retrieve values from annotations

#

I stored int ids for all of the entities, and trying to make it so that whatever I annotate gets registered

#

but I cant convert id to EntityTypes

#

because it doesnt have values() or a way to compare with everything

vernal spruce
#

well time for you to do it for each

#

nms isnt covering everything as its not supposed to be used i guess

polar gust
#

is there a way to change pathfinders without NMS?

vernal spruce
#

i think in new versions we have an api

polar gust
#

oh wait what

#

whats it called?

vernal spruce
#

nvm

#

paper has it

stoic shell
#

Huh... I'm using spigot as a maven dependency, not spigot-api, and I have ran build tools. How come there is only a limited selection of NMS classes available?

vernal spruce
#

its most likely how you get the dependencies

#

i simply add the library to my project so i have all the methds including nms

stoic shell
#

huh

#

Wdym how I get the dependencies?

#

I'm using compileOnly 'org.spigotmc:spigot:1.16.1-R0.1-SNAPSHOT'

vernal spruce
bold anchor
#

There is not a limited amount of nms classes

#

If you build it correctly it will be in that library

vernal spruce
#

maven is a bit picky about it though

stoic shell
#

I've read this:

bold anchor
#

No?

vernal spruce
#

you have to also include craftbukkit to allow acces to nms

bold anchor
#

It’s gradle just mavenLocal() and then link to the server implementations you ran buildtools with.

stoic shell
#

MiniDigger
Buildtool will only include classes spigot actually patches. If you want to add new classes, take a look at the import mcdev scripts

ShaneBee
The rest of the classes which are not patched by craftbukkit/spigot can be found in the work folder

#

It’s gradle just mavenLocal() and then link to the server implementations you ran buildtools with.
But that's what I'm doing already...?

vernal spruce
#

idk im simply slapping the jar in and im good

stoic shell
#

It seems the rest of the classes that spigot doesn't change aren't included when I compileOnly 'org.spigotmc:spigot:1.16.1-R0.1-SNAPSHOT', is that right?

#

Basically, I just need to use the class net.minecraft.command.arguments.EntityArgumentType (this is yarn mapped) in my spigot plugin.

naive goblet
#

Well that class probably have other classes inform of fields in it so that’s why ya need the entire dependency

#

Kinda

stoic shell
#

And I get the entire dependency by...

you have to also include craftbukkit to allow access to nms
or
i simply add the library to my project so i have all the methds including nms (and how?)
?

naive goblet
#

What?

#

If you need only the api (Bukkit interfaces) then use spigot-api

#

If you need CraftBukkit and Nms go for spigot

stoic shell
#

...

#

I am already using spigot

#

And I cannot find EntityArgumentType in NMS...

naive goblet
#

Maybe it got deleted?

balmy sentinel
#

PlayerLoginEvent not working now ._. I have a statement to check if a player is banned in the database and the code within it runs (tested with a println statement), however, event.disallow() and player.kickPlayer() don't work any ideas why?

stoic shell
#

what

#

Maybe it got deleted?
?

pastel nacelle
#

use async prelogin

#

don't block the main thread with your silly db requests

naive goblet
#

I mean snoopy have you looked carefully?

stoic shell
#

I mean, it's probably named differently, but yes I have looked and I simply can't find it...

balmy sentinel
#

@pastel nacelle that's what I was using before and I had the same issue... Someone in here told me like a week ago to use PlayerLoginEvent instead because that's when the server actually knows the UUID or something like that.

naive goblet
#

Hmm yeah haven’t looked into 1.16.1 yet very much

balmy sentinel
#

I'll try again with async right now

stoic shell
#

I can find it easily with yarn mappings at net.minecraft.command.arguments.EntityArgumentType, but on spigot I can't find it anywhere.

naive goblet
#

That’s unfortunate

stoic shell
#

.-.

fathom coral
#

Does anyone know a good nick plugin that can change prefix to nick as another rank?

balmy sentinel
#

@pastel nacelle yup still doesn't work

polar gust
#

What is really the difference between paper and spigot? I literally replaced the jar and nothing really has changed

fathom coral
#

paper has better performance

pastel nacelle
#

paper is kinda spigot, but better

#

more expansive api, better performance, and more inbuilt features

polar gust
#

Is there a better way to create custom entities or is it the same?

supple crow
#

throwing shade at spigot in its own discord server

pastel nacelle
#

there is the mob goal api if you mean that

naive goblet
#

I mean spigot works fine but afaik people use paper since it patches some dupes & exploits etc

pastel nacelle
#

not really

#

in fact as of recent, paper has gotten a lot of complaints because it fixes some dupes and exploits

naive goblet
#

Afaik it does?

pastel nacelle
#

people are migrating over to paper largely because of the performance

#

and because big plugins like worldedit recommend it, and work better on it

sinful spire
#

fawe

naive goblet
#

I personally don’t feel a performance boost but ig

balmy sentinel
#

nvm I figured out what was wrong I'm dumb

naive goblet
#

KM127PL +1

pastel nacelle
#

like, I would rip to shit immediately without paper's async chunks

#

and no-tick view distance

naive goblet
#

Though there was a book exploit which I for sure know paper patched

pastel nacelle
#

i think that has been pulled in upstream now, not sure if it's 1:1 the same impl though

naive goblet
#

Ah yeah presumably

polar gust
#

so is making custom entities basically the same? I'm so confused, do I still want to extend by Entity___ using paper?

sinful spire
#

paper == spigot but with a few things changed

#

it probably works the same

pastel nacelle
#

unless paper has some tools for it that spigot doesn't, you do what you'd do on spigot

naive goblet
#

Every spigot plugin should work on paper but not the other way around ?

pastel nacelle
#

basically

naive goblet
#

Afaik paper doesn’t change anything in the existing api

polar gust
#

I just want to register my entities

#

and I still dont know how

pastel nacelle
#

there are a few cases where existing api is modified but everything should still work mostly the same to the user calling the api

naive goblet
#

Yh

#

Fair enough

stiff wedge
sinful spire
#

wdym not working?

pastel condor
#

lol people don’t control that

#

Contact the site owner

sinful spire
#

^ maybe thats a query problem

stoic shell
#

omg

#

it was ArgumentEntity in spigot the entire time

stiff wedge
#

thx

stoic shell
#

...

#

spigot doesn't have mappings for most stuff in nms besides class names I see

#

This is why I have my fabric mod open to yarn mappings 😄

fathom coral
#

Is there a good nick plugin where you can change your name as well as your prefix to nick as another rank?

wraith thicket
#

EssentialsX has that

#

If all you mean is a nickname + a prefix showing that it is indeed a nickname

grim halo
#

does anyone know a plugin that allows a lobby like hypixel?

wraith thicket
#

"like hypixel"

#

Not everyone's played on that specific server

pastel nacelle
#

use bungee

grim halo
#

to be fair its the most popular server

pastel nacelle
#

and then use one of the 1000 million server selector plugins

wraith thicket
#

To be fair, I don't care

grim halo
#

i just asked a question jeez

wraith thicket
#

Most popular still doesn't mean everyone's been there

grim halo
#

but it means most people have so its the most fitting server to ask about

balmy sentinel
#

why would you want to copy another server tho? Make it custom players enjoy that better

wraith thicket
#

Most popular doesn't even necessarily mean "most people have"

pastel nacelle
#

ford has always manufactured sloppy engines

sleek ivy
#

so it looks like if a user used hex colors in their essentialsx nickname, and I use getDisplayName in ComponentBuilder, the colors get all mangled.

grim halo
#

i just want to know a good loby plugin

wraith thicket
#

Look for a lobby plugin. Look at different ones. Look through features. Look through reviews.

#

It's impossible for someone else to know your preferences. All someone else can tell you is which one they prefer

quick arch
grim halo
#

thanks

polar gust
#

Is there any tutorial on registering entities? I've given up on finding a method so I might as well learn how to do it myself. What do you do to register a NMS entity?

wraith thicket
#

I'm fairly certain you'll find plenty of examples on the forums if you search for them

balmy sentinel
#

@grim halo tbh just hire someone to code it for you so you get what you want

polar gust
#

I've tried the forums but the only one I found basically tried to get a field from null

#

which makes no sense

pastel nacelle
#

le wut

tough kraken
#

how can i show ALL players connected to my server in the tablist?
so i have a bungeecord, and i want a tablist, that shows all players, doesnt matter on which server they are

pastel nacelle
#

i don't remember if bungee supports that built in, if not, use a tab plugin

tough kraken
#

well i dont really want to use a plugin thats not from myself, i never liked using others plugins. Have to stick about what they build in.

#

actually want to make an own plugin

pastel nacelle
#

most of the time using others plugins is probably the better choice

#

there is physically no way you can spend as much time and effort on refining every one of the plugins you need as the people who have already been refining them for years have

tough kraken
#

its just a small thing, to show them. i think. but i am looking at the wiki for scoreboards atm

pastel nacelle
#

not to mention that many people probably have more experience than you have, if not with bukkit/java generally, then with the subject matter of the plugin

tough kraken
#

and that means? i cant make own plugins? i got so much plugins that just destroyed my whole server, with fake reviews etc, i will never ever do that again

high root
#

Does it cost anything to verify?

pastel nacelle
#

you can make plugins

#

what you shouldn't do, though, is "never use other peoples' plugins"

tough kraken
#

nap its free

balmy sentinel
tough kraken
#

thats seems like its for spigot

balmy sentinel
#

This is the spigot discord?

pastel nacelle
#

my point is that there is no point of reinventing every wheel there is

tough kraken
#

yeah but i asked for bungecord

pastel nacelle
#

feel free to reinvent any given wheel you want to reinvent

#

but there is no sense in restricting yourself to only selfmade wheels

tough kraken
#

yeah i know, but maybe my thougts are different

pastel nacelle
#

that will only end up in pain

#

and everything will take forever

balmy sentinel
#

I haven't messed with bungeecord, but I'm pretty sure it'll be almost the same if not the same.

tough kraken
#

yeah, thanks. i will look at it

sleek ivy
#

any ideas why spigot's chat api is mangling the rgb colors used in an essentialsx nick? I'm using getDisplayName inside a ComponentBuilder and it works for mc colors, but come out all wrong for rgb

inland oxide
#

its an API it doesn't mangle anything, you are probably doing it wrong

balmy sentinel
#

If you truly want to learn how to code and make your own plugins that should be way more than enough to build an animated scoreboard. All you need to do @tough kraken is find out how to animate it a scheduler and there are plenty of tutorials on how to do that

tough kraken
#

the only question i literally had is, if its large different from spigot.

balmy sentinel
#

I can't answer that I've never made a scoreboard on bungee before. My advice is to read that tutorial and code your scoreboard if it works you figured out your answer. If not, you'll have to search for another that works on bungee

tough kraken
#

thank you

inland oxide
#

Scope is probably more relevant to BungeeCord, although BungeeCord is different in coding than Spigot since it's a different API.

sleek ivy
#

I'm not doing anything, it's essentialsx and spigot

#

it worked fine in 1.15

#

getDisplayName is literally a bukkit thing

#

player.spigot().sendMessage(new ComponentBuilder(player.getDisplayName()).create());

#

mangles the rgb display name

inland oxide
#

As is always the case, it worked fine in previous version is irrlevant since RGB is a new API for 1.16.x. My thought is it has nothing to do with Spigot API since you are testing with 1.16.x based plugins and not testing directly the RGB functionality in the API. So, woudn't assume its Spigot's fault, more than likely the Plugins purported to work with the Spigot API on 1.16.x are not correct or not updated to latest API since the API is not final.

unborn jewel
#

what do you guys think of thenewboston tutorials?

sleek ivy
#

well the colors work fine in essentials/vault

inland oxide
#

getDisplayName() gets the displayname, so what is being stored in the displayname and by what plugins under what assumptions.

sleek ivy
#

so you're 100% sure it's their fault?

inland oxide
#

eliminate getDisplayName() and test again, hardcode the RGB, then check again. Try to narrow it down, eliminate the plugins if you are that sure.

sleek ivy
#

cause I'm telling them that then, because this isn't on me to fix and I have no idea who is

wind dock
#

Erm so im getting the error where they can't connect to a default or fallback server. I'm like 80% sure I setup bungeecord right.

#

What do i do?

bold anchor
#

TextComponent.fromLegacyColors(displayname)

#

Might be fromLegacy

inland oxide
#

What version of Spigot/Paper, what version of EssentialsX and is this through BungeeCord/Waterfall if so what version of those?

placid kiln
#

@wraith thicket why did you ping me?

wraith thicket
#

Oh - must have been an accidental tab-complete meant for Sticky Man or something like that

stoic shell
#

oh cmon...

#

why isn't my autocomplete working...

worn mango
#

Hey! I've got a problem, I'm trying to make it look like we're wearing diamond boots. Except with my code, when I put the boots on, the effect doesn't wear off but it does when I take them off. Here's my code:

public class FullArmor implements Listener {

    @EventHandler
    public void InventoryClose (InventoryClickEvent e) {
        
        Player p = (Player) e.getWhoClicked();
        
        p.sendMessage("we have reached this code");

        PotionEffect speed = new PotionEffect(PotionEffectType.SPEED, Integer.MAX_VALUE, 2);
        p.addPotionEffect(speed);
        p.sendMessage("we add the potion effect");
        if (e.getSlotType() == SlotType.ARMOR && e.getCurrentItem().getType() == Material.DIAMOND_BOOTS) {
            e.getWhoClicked().addPotionEffect(speed);
        } else {
            if(p.hasPotionEffect(PotionEffectType.SPEED)) {
                p.removePotionEffect(PotionEffectType.SPEED);
            }
        }
    }
}```

I'd like an explanation as to why it doesn't work and whether the event you're using is the right one.
stoic shell
#

and it won't run in console either .-.

hazy nimbus
#

hey im having a problem with the nether, hostile mobs wont spawn there

#

no blazes

#

and piglins wont attack me

stoic shell
#

Check your difficulty :p

hazy nimbus
#

its normal

#

and only in the nether

stoic shell
#

Check your mob spawning caps and gamerules

civic totem
#

Gamerule doMonSpawning true?

hazy nimbus
#

mob spawning is true

#

where do i check mob caps

tough kraken
tough kraken
#

is it showing an error?

worn mango
#

no

stoic shell
#

sorta unsure what you're trying to do though

tough kraken
#

try more sysout's to figure out where exactly it stops running

hazy nimbus
#

sooo how do i check mob spawn caps?

tough kraken
#

wtf whats wrong with the scoreboard? should work, but its throwing this when setting the scoreboard:

here is my code part:
https://hastebin.com/yixaqafoya.cs
@tough kraken anyone please 😦

polar gust
#

in NMS, which methods add pathfinders? I found initPathfinder(), but there is definetly another method that does movement pathfinders

stoic shell
#

Finally... I fixed the console problem, but I have another problem I needed to ask about...

#

Autocomplete isn't working

worn mango
#

try more sysout's to figure out where exactly it stops running
@tough kraken so i replace p.sendMessage by System.out.println("We reached the code")

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
        );
    }```
Why isn't this working?
tough kraken
#

you can use sendMessage as well, but in my opinion sysout is better

pastel nacelle
#

or like

#

use a debugger

stoic shell
#

anyone?

#

Oh yeah, I'm also using setTabComplete too, just for basic player names, but that's not working either.

wraith thicket
#

You could try only using one at a time? If I were to guess, you can't use them at the same time

stoic shell
#

Trying...

fossil thorn
#

How can i replace EnumParticle in this line?

subtle blade
#

Particle

#

Wait, what? new Particle?

#

🤦 What version are you using?

fossil thorn
#

1.15

subtle blade
#

So what's wrong with World#spawnParticle()? Because you can't create a new instance of Particle. It's an enum

stoic shell
#

Same result...

#

It's the commodore completions that aren't working when I want it to autocomplete entity selectors with ArgumentEntity...

solar heart
#

Do you know when paper spigot 1.16.1 will be stable?

pastel nacelle
#

what

#

go ask the "paper spigot" discord maybe

solar heart
#

when Am find a invite

pastel nacelle
#

idk google it

stoic shell
#

I'll show more code I guess...

subtle blade
#

Going to guess it will be the same way you found Spigot's Discord invite link, only... on their platform...

#

That being said, they won't be stable until Spigot is stable

solar heart
#

And you know how long the spigot will be unstable

stoic shell
#

plugin.yml in commands section:

  explode:
    description: The explode command, used to send a fake explosion to a player.
    usage: /explode <player>
    permission: hypercore.explode
pastel nacelle
#

forever

subtle blade
#

You're probably fine to use it. The build delay was extended to 3 weeks

#

I'd consider it stable at this point

stoic shell
#

My Commodore completions registration method for the command:

    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
        );
    }```
#

And registering the command and completions:

        PluginCommand explodeCommand = getCommand("explode");
        explodeCommand.setExecutor(new ExplodeCommand(this));
        explodeCommand.setTabCompleter(new ExplodeCommand.TabCompleter());

        // Check if brigadier is supported
        if (CommodoreProvider.isSupported()) {
            // Get a commodore instance
            Commodore commodore = CommodoreProvider.getCommodore(this);

            // Register commodore completions for the commands
            ExplodeCommand.registerCommodoreCompletions(commodore, explodeCommand);
        }
wraith thicket
#

I can assure you that the tab completion within the API works just fine

#

And again, I'm going to guess that the two should not be used together.

sinful spire
#

whats the power of a normal creeper? 5?

wraith thicket
#

You can always add a debug message to see if/when the onTabComplete method gets called and what it returns

stoic shell
#

No, they work together fine.

#

In my setTabCompletions, I just stopped it from doing anything to test by returning an empty array, same result

subtle blade
#

Presumably they can't be used together. As far as I'm aware, Commodore has its own command dispatcher and does not use vanilla's

#

That being said, it's likely not working because you've registered a Bukkit command and it's taking precedence

#

Should those not be in an else block in the case that Brigadier is not supported?

stoic shell
#

uh

#

my other command works fine

#

Which I did with commodore and a bukkit command

stuck quartz
#

does ItemMetas needs some kind of update() whenever i change the PersistentDataContainer of it?

humble olive
#

Does anyone else has this problem with Reloading ResourceManager taking waaay too long in 1.15.2?

stoic shell
#

The problem is the Entity selector argument which isn't working for some reason...

humble olive
#

about 30 seconds

wraith thicket
#

@stuck quartz The meta will be updated immediately. You'll obviously need to use ItemStack#setItemMeta. Also, in certain situations you may need to set the item in the inventory.

stuck quartz
#

ok, thanks

stoic shell
#

I think I may be using the ArgumentEntity class wrong... could someone look at it and see if that's why?

polar gust
#

where is the pathfindergoal MoveTowardsTarget added? its not in any of the initPathfinder()s

wraith thicket
#

@stoic shell Commodore has its own discord, you'd be more likely to get support on it there

humble olive
#

I worked with 1.8.8 for a couple of years and now I upgraded to 1.15.2, but the server startup takes enormous amount of time in comparison to 1.8.8 . I even made custom timing to see if it's really that ResourceManager and it takes 30 seconds just to start. What does ResourceManager even do? Can I patch paper and remove it or will it break the entire engine?

pastel nacelle
#

everything takes an enermous amount of time in 1.15

humble olive
#

I noticed that with loading chunks too

pastel nacelle
#

yes, 1.13 fucked chunk loading and everything related to it

stoic shell
#

Yeah I asked hours ago and got no response...

humble olive
#

That's something that I would have to benchmark because I need to load arenas for minigames and in 1.8 you would just load a world and no biggie - it works, but idk if in 1.15 it wouldn't be faster just to paste a schematic with something like fawe.

stoic shell
#

I don't think it's commodore though, I think I'm using the ArgumentEntity class wrong...

pastel nacelle
#

imagine using fawe on prod

humble olive
#

is it bad?

#

i know about lightning bugs

#

but other than that

#

i had good experience

#

I'm just trying to avoid writing custom block placer

pastel nacelle
#

there is a reason behind why it's called fast async world exception

humble olive
#

oh

pastel nacelle
#

it's supposedly more stable these days but i would still steer clear of it

humble olive
#

If that's the case then either world loading (if it's fast enough) or custom schematic pasting

stoic shell
#

oh wow

#

I saw this 1.13 CommandAPI plugin api, and it looks like it makes all this a ton easier and does exactly what I want, lemme look at that...

subtle blade
#

Can I patch paper and remove it or will it break the entire engine?
You're in the wrong server

pastel nacelle
#

just use ACF

subtle blade
#

You're asking how to use fork-exclusive tooling in the upstream Discord

#

I just don't understand anymore

humble olive
#

I am not asking how to use it

#

I am asking if I was to remove ResourceManager loading will the spigot break

#

To my knowledge the only reliable way to modify vanilla server is through patching.

subtle blade
#

While working with server software that may very well break due to changes they've made

#

If you're using a fork, you should be asking these questions there... not here

craggy jolt
#

when I try to build 1.16.1 with the BuildTools.jar I get the following error

Rebuilding Forked projects....
applyPatches.sh: line 6: $'\r': command not found
applyPatches.sh: line 7: syntax error near unexpected token `$'{\r''
applyPatches.sh: line 7: `applyPatch() {
'
Error compiling Spigot. Please check the wiki for FAQs.
If this does not resolve your issue then please pastebin the entire BuildTools.log.txt file when seeking support.
java.lang.RuntimeException: Error running command, return status !=0: [sh, applyPatches.sh]
        at org.spigotmc.builder.Builder.runProcess0(Builder.java:818)
        at org.spigotmc.builder.Builder.runProcess(Builder.java:755)
        at org.spigotmc.builder.Builder.main(Builder.java:617)
        at org.spigotmc.builder.Bootstrap.main(Bootstrap.java:34)```
frigid ember
#

how to buy plugin bedwars andrei1058?

vernal spruce
#

oh boy

humble olive
#

Yeah, my bad. But still if anyone knows how does ResourceManager work and what does it do I would be thankful for the clarification. As I've said before I worked most of the time with 1.8 and I didn't see such magic then.

pastel nacelle
#

you will probably get a faster response on the paper discord tbh

frigid ember
#

can anyone help? :P

sinful spire
#

what plugin lol

frigid ember
#

Premium BedWars1058 - The most modern bedwars plugin. [bungee/multiarena/shared]- GET IT FOR FREE ON 1ST...

vernal spruce
#

ahh yes

#

another premium bedwars plugin

#

one of the 100 or more already existing ones

frigid ember
#

how to buy?

vernal spruce
#

you dont

#

you look for other ones wich are free

#

wich are most likely better than it

sinful spire
#

its for 13(Euro)

#

looks like a copy of hy pixel

stuck quartz
#

the changes that im making to PersistentDataContainer is not saving

craggy jolt
#

where can I get support when I encounter an error when Building Spigot with the buildtools?

frigid ember
#

most of Polish servers use it.

wraith thicket
#

?ask

worldly heathBOT
#

If you have a question, please just ask it. Don't look for staff or topic experts. Don't ask to ask or ask if people are awake or available. Just ask the question to the channel straight out, and wait patiently for a reply.

frigid ember
#

I can't write in english lolz

vernal spruce
#

then i dont suggest making a minecraft server

#

as every configuration file isi n english

craggy jolt
#

then what should I do if I encounter applyPatches.sh: line 2: $'\r': command not found Rebuilding Forked projects.... applyPatches.sh: line 6: $'\r': command not found applyPatches.sh: line 7: syntax error near unexpected token `$'{\r'' applyPatches.sh: line 7: `applyPatch() { ' Error compiling Spigot. Please check the wiki for FAQs. If this does not resolve your issue then please pastebin the entire BuildTools.log.txt file when seeking support. java.lang.RuntimeException: Error running command, return status !=0: [sh, applyPatches.sh] at org.spigotmc.builder.Builder.runProcess0(Builder.java:818) at org.spigotmc.builder.Builder.runProcess(Builder.java:755) at org.spigotmc.builder.Builder.main(Builder.java:617) at org.spigotmc.builder.Bootstrap.main(Bootstrap.java:34) when trying to build 1.16.1

sinful spire
#

you can make a polish minecraft server then

#

most of configuration files these days are pretty easy even with google translate lol

vernal spruce
#

yeah its definetly gonna be a nice experience

subtle blade
#

@craggy jolt delete the CraftBukkit (and Spigot) directory and re-run

vernal spruce
#

googel translating every single word

subtle blade
#

You should be fine to keep the Bukkit directory

sinful spire
#

dont think you can buy it

frigid ember
#

why?

craggy jolt
#

@subtle blade same error still appears

wraith thicket
sinful spire
#

transkacje przez paypala są wyłączone pewnie coś popsute (paypal transactions are disabled, probably somethings is broken)

subtle blade
#

Really? You've deleted CraftBukkit and Spigot directories and re-run already?

#

I seriously doubt that considering it takes a few minutes to build

sinful spire
#

maybe he is running on a NASA Computer, you dont know 😄

frigid ember
#

ok/

#

so I have no chance to get the plugin?

vernal spruce
#

your better off not bothering

#

and go for a free one

craggy jolt
sinful spire
#

yeah, you 'll probably need to wait a bit until the paypal system is on again

mossy current
#

Hi, how to use RGB colors in TextComponent object?

subtle blade
#

Let me see if md made a commit recently that may have broke BuildTools

#

because that's a syntax error in the script somewhere

frigid ember
#

Will anyone recommend a free bedwars plugin?

sinful spire
#

i built it like today for testing purposes, it worked

vernal spruce
#

i recently used buildtools

#

and it was fine for me

sinful spire
#

md obviously broke it

subtle blade
#

applyPatches hasn't been touched for a year and a half now, so it's not that

sinful spire
#

wow, thats old

#

i'll try building it

craggy jolt
#

so, what should I do then?

subtle blade
#

You've not edited Spigot/applyPatches.sh have you?

craggy jolt
#

no

sinful spire
subtle blade
#

Hugo, copy and paste that exactly into Spigot/applyPatches.sh

#

(i.e. replace the current contents of the file)

stuck quartz
#

what should i do if PersistentDataContainer is not saving the changed data

sinful spire
#

"Success, everything compiled correctly!"

subtle blade
#

Are you re-setting the modified ItemMeta?

#

Additionally, are you re-setting the item? (Assuming you've pulled it from the inventory)

stuck quartz
#

its not the ItemMeta, its a sign now

#

the ItemMeta is ok

subtle blade
#

are you re-setting the item? (Assuming you've pulled it from the inventory)

stuck quartz
#

yes

craggy jolt
#

its still not working :/

subtle blade
#

What OS are you running Hugo?

craggy jolt
#

windows 10

subtle blade
#

Well now I'm just confused lol

wraith thicket
#

@stuck quartz Did you make sure to #update the state?

stuck quartz
#

yes

#

2 times

#

and one of them is forced

fathom coral
#

How do I come up with good rank names. I would like 3-5 names please.

wraith thicket
#

You could look up old games nobody plays anymore and look at the different "classes" or "types"

fathom coral
#

ok

wraith thicket
#

@stuck quartz I've never had a problem with persistent data. Did you make sure the bit that sets the persistent data is actually run?
Another problem could be when something else grabs the state before you and updates after

daring swift
#

Anybody got a world management plugin that works for 1.16?

stuck quartz
#

ive added some debugs, and all they print out correctly

#

Another problem could be when something else grabs the state before you and updates after
@wraith thicket im not sure, but i can check here

sinful spire
wraith thicket
#

Do you have a question/issue? @sinful spire

sinful spire
#

a question why it doesnt work

#

because it seems like it would

wraith thicket
#

Did you annotate @EventHandler?
Did you register the listener?

sinful spire
#

yeah, both of these

prisma falcon
#

i cant get votifier and galistener to work

sinful spire
#

wait nvm it didnt save

#

Eclipse is messing with me today

craggy jolt
#

@subtle blade I deleted everything an rerun the buildtools and the error still pops up :/

stoic shell
#

ugh

#

And I am stuck back at Commodore and NMS again

pastel nacelle
#

why not use ACF

stoic shell
#

I can't use 1.13 CommandAPI because of the dreaded java.lang.NoSuchFieldException: modifiers problem cause they're trying to make something non-final with reflection. I posted a solution on a github issue it was discussed on a few days ago... I use Java 14, so until that's fixed, I can't use CommandAPI.

pastel nacelle
#

i'm not talking about commandapi

stoic shell
#

ACF?

pastel nacelle
#

aikar's command framework

stoic shell
#

just looked it up, but it looks like it's just gonna add more complexity

stuck quartz
#

Another problem could be when something else grabs the state before you and updates after
@wraith thicket nop

#

im going to check another time

#

i dont trust myself

frigid ember
#

How would I get if the player is in a boat

#
            Entity boats = event.getEntity().getVehicle();
            if(!event.getEntity().equals(boats)) {
                return;```
#

So this’ll get the vehicle the entity is in :/

sturdy oar
#

Entity#isInsideVehicle

#

Or if you want to check specifically for a boat

#

You need to do get vehicle and check the type of the vehicle

frigid ember
#

Just need to get wether the placed entity is a boat

#

Or vehicle

#

There are no other vehicles :p

sturdy oar
#

There are

#

You know... Minecart

frigid ember
#

I’m in 1.12

#

Ohh yea

sturdy oar
#

Mobs

#

Etc..

frigid ember
#

Mobs will be entities

#

Not vehicles

sturdy oar
#

Vehicle are entities

#

Fyi

#

if you do getVehicle it will return Entity

frigid ember
#

Wdym

sturdy oar
#

what I just said. getVehicle returns an entity

#

You can simply check Entity type

subtle blade
#

A Vehicle is a subtype of Entity

keen compass
#

if the boat is being placed, it throws VehicleCreateEvent as well as EntitySpawnEvent

stuck quartz
#

@wraith thicket nop
@stuck quartz nothing else is grabbing the state
heres the code for it

LockUI LUI = Checurity.PublicLockManager.get(inv);

BlockState signState = sign.getState();
PersistentDataContainer container = ((Sign) signState).getPersistentDataContainer();
PersistentDataContainer item_container = clickedMeta.getPersistentDataContainer();
String playerName = item_container.get(Utils.key_item_player, PersistentDataType.STRING);

PersistentDataContainer permissions = container.get(Utils.key_permissions, PersistentDataType.TAG_CONTAINER);
NamespacedKey namespaced = new NamespacedKey(ChestSec.plugin, playerName);
Boolean hasPermission = permissions.has(namespaced, PersistentDataType.BYTE);

if (hasPermission) {
    System.out.println("banana");
    permissions.remove(namespaced);
} else {
    System.out.println("apple");
    permissions.set(namespaced, PersistentDataType.BYTE, new Byte("0"));
}

signState.update();
signState.update(true);

inv.setItem(e.getSlot(), Utils.newPermGlass(playerName, permissions.has(namespaced, PersistentDataType.BYTE))); // This is creating a ItemStack with given arguments, and its not the problem at all, i checked it

its printing out "banana" and isnt saving the data on the sign

keen compass
#

why do you cast signState back to Sign? o.O

sturdy oar
#

Sout best debugging

frigid ember
#

but theviper

#

I cant just do event.getVehicle()?

sturdy oar
#

Yes?

stuck quartz
#

Sout best debugging
@sturdy oar i had to remove some debugs, and theyre printing out all right

frigid ember
#

its a wg event

#

SpawnEntityEvent so like EntitySpawnEvent

#

but with things added

#

'worldguard'

marble ingot
#

This isn't particularly a coding question more of a any idea what the issue is kinda thing. I have these plugins installed and for some reason the perms don't work at all. Any ideas:

sturdy oar
#

remember that getVehicle is nullable

keen compass
#

configure your perms @marble ingot

sinful spire
#

you got spigot/paper/bukkit/other_unknown?

#

Dave

marble ingot
#

I have the latest spigot

#

and have configured them in luckperms

sinful spire
#

why luckperms_bukkit then

marble ingot
#

they were working until someone moved dimension

frigid ember
#

so if ('event.getVehicle()' != null) {

marble ingot
#

Because that's the version you use for Spigot...

frigid ember
#

but I would still have to get what the spawned entity is

sinful spire
#

i had luckperms-spigot a few weeks ago

frigid ember
#

wether it's a boat

marble ingot
#

that like isnt a thing

frigid ember
#

@sturdy oar

sinful spire
#

why was it named luckperms something spigot then

#

no idea

torn robin
#

what're we talking bout

marble ingot
#

idk but perms still arent workingg 😄

#

its when they travel to a different dimension

#

all perms just break

torn robin
#

you probably have per-world perms setup

frigid ember
#

^^

marble ingot
#

no cause when they go back to the original world all perms dont work again

frigid ember
#

no errors?

torn robin
#

delete all your perm files

#

reinstall

#

then re-assign perms

marble ingot
#

Ok so

torn robin
#

make sure you're typing the command right

frigid ember
#

MSWS

marble ingot
#

if i op them they dont have perms unless they have the role

wraith thicket
#

@stuck quartz I see you've got an entire container saved on the sign. Have you tried (re)setting the permission container to the sign? Perhaps uploading data within the inner container isn't updating the outer one? In all fairness, it should, but worth a shot

frigid ember
#

im tryna get if the placed entity is a vehicle

torn robin
#

dont op

marble ingot
#

its only friends on my server

stuck quartz
#

@stuck quartz I see you've got an entire container saved on the sign. Have you tried (re)setting the permission container to the sign? Perhaps uploading data within the inner container isn't updating the outer one? In all fairness, it should, but worth a shot
@wraith thicket like, overwriting the permission container with a new updated one?

frigid ember
#

@torn robin ?

wraith thicket
#

Just container.set(Utils.key_permissions, PersistentDataType.TAG_CONTAINER, permission)

torn robin
#

if entity instanceof Vehicle

stuck quartz
#

ok, ill try that

ashen schooner
#

hey can i gte help with chestcommands

#

when u click the chestw ith the red circle, it sends u to another chestcommand menu

torn robin
ashen schooner
#

ty

frigid ember
#

Entity entities = event.getEntity();
if (!entities instanceof Vehicle)

wraith thicket
#

(!(entity instanceof Vehicle)) **

frigid ember
#

oof ty

stuck quartz
#

@wraith thicket oh my fucking god that actually worked

wraith thicket
#

To be honest, I'm not sure if that could be considered a bug

pastel nacelle
#

entity is not a boolean, you can't invert it

#

unary operators have the highest precedence so they will be processed before instanceof

wraith thicket
#

Literally on the next line I already corrected them lol

pastel nacelle
#

yes but this is the reason why what he posted doesn't work

wraith thicket
#

But it's not really an issue, any half decent IDE will be able to tell you there's an issue.

pastel nacelle
#

myes

stoic shell
#

...

#

Where are vanilla commands in spigot?

wraith thicket
#

Vanilla commands are in... the vanilla server

stoic shell
#

But where's their code in spigot? (the spigot jar in project libraries)

bold anchor
#

It will be in the net.minecraft.server

sturdy oar
#

The mojang code is inside NMS

stoic shell
#

Well I've been looking for 15 minutes, and I haven't found a single command class in that jumble of classes.

#

Oh wait nvm...

#

Their names are reversed.

#

Figures

pastel nacelle
#

ctrl-f is your friend

keen compass
#

reversed?

#

o.O

#

or do you mean reserved?

stoic shell
#

No I mean it's, for example, CommandTell instead of TellCommand.

wraith thicket
#
$ ls CraftBukkit/src/main/java/net/minecraft/server/Command*
[--]/CommandBlockListenerAbstract.java  [--]/CommandGamemode.java         [--]/CommandReload.java         [--]/CommandTime.java
[--]/CommandDispatcher.java             [--]/CommandGamerule.java         [--]/CommandSpreadPlayers.java
[--]/CommandEffect.java                 [--]/CommandListenerWrapper.java  [--]/CommandTeleport.java
stoic shell
#

Yeah I was scrolling through with my IDE.

#

Why in the world are the classes not mapped to packages?

wraith thicket
#

It's NMS

#

It's mojang's code

#

It's obfuscated

keen compass
#

that is because there is a certain convention in Java that is used to help identify classes

stoic shell
#

Well yarn does it...

keen compass
#

this isn't yarn

#

obviously

subtle blade
#

Vanilla does use proper packages. CraftBukkit shifts all of NMS's into a single net.minecraft.server package

stoic shell
#

why?

subtle blade
#

Easier to patch

stoic shell
#

🤦‍♂️

keen holly
#

Does anyone know how to use chown?

#

I'm on CentOS 7 and I'm trying to solve a multicraft error that makes files that I upload via FileZilla not work with the server

sage sedge
#

@stoic shell hey,

stoic shell
#

Hi.

sturdy oar
#
$ ls CraftBukkit/src/main/java/net/minecraft/server/Command*
[--]/CommandBlockListenerAbstract.java  [--]/CommandGamemode.java         [--]/CommandReload.java         [--]/CommandTime.java
[--]/CommandDispatcher.java             [--]/CommandGamerule.java         [--]/CommandSpreadPlayers.java
[--]/CommandEffect.java                 [--]/CommandListenerWrapper.java  [--]/CommandTeleport.java

@wraith thicket you could've used grep right there

#

Would have been a much greater Linux flex

wraith thicket
#

I could have - it looked nice on my screen but then pretty bad here so I just edited out some of it 🙂

stoic shell
#

Oh my issue comment on CommandAPI got a reply from the dev.

#

Currently opening my IDE on my fabric mod just so I can look at the fabric-mapped version of classes, so I don't go insane.

pastel condor
#

I'm really confused, I though nms was obfuscated? How does the craft bukkit folder that you get when you compile spigot de-obfuscate it?

stoic shell
#

Spigot has their own mappings IIRC.

pastel condor
#

mappings?

#

I swear this violates spigots obfuscation guidelines lmao public boolean isTicking(IBlockData iblockdata) { return this.av; }

#

wtf are these method names public boolean a(Block block) { return this == block; }

wraith thicket
#

That's obfuscated NMS code

#

Mojang's code

pastel condor
#

oh

#

how can I de-obfuscate it to learn nms?

keen compass
#

use mojangs mappings

pastel condor
#

where can I find them?

keen compass
#

same place you can download the client and server jars

pastel condor
#

and what do I do with them when I get them?

wraith thicket
pastel condor
#

thanks

keen compass
#

once you get the mappings, you need a program or create your own program to apply the mappings

wraith thicket
#

What I posted is the mappings viewer

keen compass
#

the mappings are in proguard format just fyi

stoic shell
#

Or if you just want to view sane deobfuscated code, you could use Enigma

frigid ember
#
    @EventHandler(priority = EventPriority.LOWEST, ignoreCancelled = false)
    public void onBlockPlaceEvent(PlaceBlockEvent event) {
        Object cause = event.getCause().getRootCause();
        if (cause instanceof Player) {
            if(!event.getEffectiveMaterial().equals(Material.WATER)) {
                return;
            }

            Player player = (Player) cause;

            for(Block block: event.getBlocks()) {
                //System.out.println(block.getType());
                if (waterFlagEnabled(block, player)) {
                    event.setResult(Event.Result.ALLOW);
                }
            }
        }
    }```
keen compass
#

under the assumption that unobfuscated code is more confusing then obfuscated o.O

frigid ember
#

So I did this in order to let people be able to place water in regions

#

it works

#

but

keen compass
#

you do realize there is an item use flag

stoic shell
#

*deobfuscated

frigid ember
#

I'm now doing the same for vehicles

#
    @EventHandler(priority = EventPriority.LOWEST, ignoreCancelled = false)
    public void onSpawnEntity(SpawnEntityEvent event) {

        Object cause = event.getCause().getRootCause();
        if (cause instanceof Player) {
            Entity entities = event.getEntity();
            if (!(entities instanceof Vehicle)) {
                return;
            }
        }

        Player player = (Player) cause;
        for (Entity entity : event.get) {
            if (boatFlagEnabled(entity, player)) {
                event.setResult(Event.Result.ALLOW);
            }
        }
    }```
#

but im totally stuck at the for-each loop :/

wraith thicket
#

There is no SpawnEntityEvent in the API

frigid ember
#

no

wraith thicket
#

So I'm not sure what you're using

frigid ember
#

worldguard event

keen compass
#

they are using WG @wraith thicket

wraith thicket
#

Well, that'd be something worth pointing out then

frigid ember
#

but its like the same as EntitySpawnEvent

#

but with an addition of things

stoic shell
#

How hard would it be to make spigot use yarn mappings?

pastel condor
#

yarn?

stoic shell
#

...

#

Yarn is a set of open, unencumbered Minecraft mappings, free for everyone to use under the Creative Commons Zero license. The intention is to let everyone mod Minecraft freely and openly, while also being able to innovate and process the mappings as they see fit.

subtle blade
#

You don't

#

Stop trying to use other mappings

#

If you want to use other mappings, you create a fork

pastel condor
#

oh instead of that, someone could probably make a system where you code using a de-obfuscated mojang code then run it though some system and convert it to the mojang obfuscated junk

frigid ember
#

any1 got a clue? ^ 😐

subtle blade
#

You're making your life a hell of a lot more difficult for absolutely 0 benefit if you want to translate your code between mappings

#

Learn CraftBukkit's mappings

pastel condor
#

but they are like a b c d e f g

pastel condor
#

who remembers that

subtle blade
#

They're not

#

CraftBukkit maps what it needs

#

If they're still obfuscated, it's because CraftBukkit need not obfuscate them. NMS isn't supported

pastel condor
#

but what if you need something like pathfinding?

subtle blade
#

If you're using it, you should be capable of reverse engineering it to figure out what it does

frigid ember
#

Choco, do you know things about the WorldGuard API or nah?

stoic shell
#

They have a discord with an api channel I think.

frigid ember
#

ikr

#

but they say 'this is more like another api question'

stoic shell
#

lol

frigid ember
#

not specifically spigot btw

#

'another'

#

while im using their api :/

#

@mental field

sturdy oar
#

Bro stop pinging

#

What do you even need

frigid ember
#

isnt this my first ping?

pastel condor
#

the we/wg guys hate my guts

frigid ember
#

Viper

#

above

sturdy oar
#

Man idk

frigid ember
#

ohh but thanks for thinking :p

sturdy oar
#

All I can help is spigot api

#

I've never used WG

frigid ember
#

I understand

#

well ima head towards their dc again :/

pastel nacelle
#

gl with wg/we api

frigid ember
#

thanks 😐

sturdy oar
#

Tbh I tried World edit API

#

It's just my opinion but I found it horrible

pastel nacelle
#

the documentation for that shit is more scarce and outdated than the evidence for the lizard men being behind 911

#

everything is from like 5 years and 2 major rewrites ago

pastel condor
#

and the scary part, is in their discord server they except you to understand everything.

frigid ember
#

Please dont say this isnt really a wg api question
wizjany vandaag om(today at) 00:29
it really isn't

sturdy oar
#

wizjany 😂

pastel nacelle
#

yeah it definitely doesn't help that the main guy behind the umbrella is the fucking wizjany

#

like not to shit on the guy i'm sure he's nice irl and all but definitely not the most resounding help desk service vibes i've gotten from him

stoic shell
#

lol

#

wizjany

pastel condor
#

he has kicked me from paper discord far too many times

sturdy oar
#

y'all know he's in this discord right

pastel condor
#

he left

sturdy oar
#

oh

#

he has kicked me from paper discord far too many times
@pastel condor I got banned fair enough

vernal spruce
#

Where is our FAWE boy

pastel condor
#

lmao

pastel nacelle
#

he kind of crawled under a stone after getting doxxed to shit

pastel condor
#

Where is our FAWE boy
He left too

pastel nacelle
#

not that i don't understand

pastel condor
#

he kind of crawled under a stone after getting doxxed to shit
Who?

pastel nacelle
#

wiz

pastel condor
#

wait what

pastel nacelle
#

oh

vernal spruce
#

Well there is a reason i dont put my real name on anything

pastel nacelle
#

maybe i shouldn't have said that? i assumed it was common knowledge lol

stoic shell
#

Oh, and it seems I am still banned from the paper discord by wizjany for presumably "being annoying".

vernal spruce
#

A nice and well thought ban reason i see

sturdy oar
#

Can we not talk about paper ban in discord spigot help channel

pastel condor
#

we should probably move to #general

pastel nacelle
#

general doesn't exist

stoic shell
#

yeah moving

cursive umbra
#

how to make everyone telelport

bold anchor
#

You loop

cursive umbra
#

like be able to teleport

sturdy oar
#

Player#teleport(Location) ??

cursive umbra
#

@sturdy oar no like

#

/lp perms default teleport

#

or something

sturdy oar
#

/lp group <group> permission set essentials.fly

lone fog
#

depends on the plugin you have for teleporting

cursive umbra
#

luckperms

#

nad essental

#

FLY?

sturdy oar
#

Lookup EssentialsX permission

lone fog
sturdy oar
#

I don't remember them by mind

cursive umbra
#

ok

#

if i wanted everyone to be able to do /back whenever where would i type this

#

essentials.back

#

and what would i type

lone fog
#

/lp group <group> permission set

cursive umbra
#

what is the name

#

of the group

#

default?

lone fog
#

Unless you made a custom group, yes

cursive umbra
#

so /lp group default permission set

#

in console or game

lone fog
#

Doesn't matter

cursive umbra
#

then what

#

it says this

cursive umbra
#

what is command for my friend (not op) default group to open chest and other stuff @ me

pastel nacelle
#

@cursive umbra figure it out

cursive umbra
#

@pastel nacelle fuck u too ❤️

#

help channel