#help-archived

1 messages ยท Page 19 of 1

modern sequoia
#

you are right

subtle blade
#

Not to mention you really have no reason to be calling the same method chain more than once anyways

frigid ember
keen compass
#

yes, you need to min and max your coords

frigid ember
#

?

subtle blade
#

Has no coordinates, just a start point, Frostalf

keen compass
#

yeah, didn't have a lot of time to look at it was in a game lol

subtle blade
#

That looks like it would work to me. What's not working?

frigid ember
#

maybe its my other part of my code

#

let me check

#

takes forever to load server up my great pc..

#

nvm it does work

#

my other code is broken

subtle blade
#

;P

frigid ember
#

idk why it would be..

#

wat i get air...

keen compass
#

probably need to go 1 block down

tiny dagger
#

how are you checking it?

#

playerinteract?

severe hemlock
#

anybody know of any plugins allowing you to make false walls (walls you can walk through?) Would be nice if you could config it so that only certain perms could walk through, but unneccesary.

tepid burrow
#

Can anybody recommend me a good and small JDBC wrapper or should I rather handle all that stuff myself?

uncut zealot
#

Can anybody recommend me a good and small JDBC wrapper or should I rather handle all that stuff myself?
@tepid burrow Have you tried HikariCP? ๐Ÿ™‚

tepid burrow
#

That stuff is about 180KB

#

And I do not want to nuke my final jar size

#

But I'll probably go with that if I can't find something suitable

keen compass
#

it handles connection pooling for you. and 180kb is nothing, not entirely sure why you are even worried about the size either. But if you want a wrapper mysql provides one and is shaded into spigot for you.

zenith siren
#

In my BungeeCord config I have set tab_list: GLOBAL_PING but when 2 people are on different servers they don't both show on the tab list

#

Wait, does a tablist plugin on a connected spigot server influence it?

keen compass
#

it could yes

uncut zealot
#

Do you know, what is cause of BungeeCord server having high CPU kernel usage? Is it because of network handling or is it sign of something bad happening there?

muted spindle
#

That doesn't make any sense?

#

CPU and Kernel are two very different things

uncut zealot
#

I mean cpu time spent in kernel.

keen compass
#

if your nic can't handle something it will get processed by the kernel. Generally a sign of outdated drivers or outdated server.

muted spindle
#

If you're talking about the proxy server gobbling up CPU utilisation then who knows, ask md_5

uncut zealot
#

Ok, and do you have any experience or knowledge, what is typical cpu usage of bungeecord with 100 users online?

muted spindle
#

I'd imagine the proxy server shouldn't be using much CPU at all. Its only purpose is to act as a bouncer pretty much

tiny dagger
#

maybe check your plugins?

muted spindle
#

^

keen compass
#

there isn't really a typical because it varies between hardware

muted spindle
#

Proxy plugin might be at fault

keen compass
#

however, there will be some cpu usage by the proxy because it has to process incoming packets and determine which server to send it to.

uncut zealot
#

Well, that is something I expect as well, but while profiling it, it takes really huge amount of CPU.

#

But most of the time spent in Netty IO threads

muted spindle
#

Does bungee on its own run fine?

#

Process of elimination to find the culprit

#

that will tell you something immediately

keen compass
#

pretty normal for it to spend most of its time in netty IO threads since it mainly deals with connections more then anything

muted spindle
#

^

uncut zealot
#

I can't test it without plugins, otherwise there won't be that high players count.

tiny dagger
#

but what do you use?

#

any chat plugin?

uncut zealot
#

Every plugin is custom, except RedisBungee

keen compass
#

another culprit could be bad clients sending too many packets too btw

#

would recommend other then a profiler a network sniffer

uncut zealot
#

You mean, that the CPU usage could be connected also with final servers?

muted spindle
#

If the proxy server is spending a lot more time than usual in netty IO it suggests you have a plugin which does a lot of plugin messaging or something in that regard which is amplified by the number of players on the server. Possibly due to some joining event

#

I'm betting my money your problem is a plugin problem

#

and not bungee itself

uncut zealot
#

Even if its not shown in CPU profiler?

muted spindle
#

A plugin might be making bungee calls

#

or methods in bungee

#

It's very likely you just have a proxy plugin that was never coded for the use case of a lot of players

#

You can start a process of elimination by removing and adding plugins to see which ones cause the cpu to spike

uncut zealot
#

The isn't any CPU spike, it's more of continuous usage.

muted spindle
#

oh

#

is that a bad thing?

uncut zealot
#

Well, If bungeecord should be mainly proxy, then the CPU usage is much higher than expected I would say.

#

Having 4 vCPUs just to handle 100 players seems a little bit too much.

keen compass
#

I recommend using a network sniffer to determine what is going on network wise. So you can see if its too many packets incoming or too many packets being generated by the proxy to the servers.

#

you can also increase the netty threads too, could have too few of threads to handle all of that traffic

#

and you said vCPU's? you are using a VPS?

muted spindle
#

I think he means virtual cores

uncut zealot
#

Where can I set netty threads? Is it configurable? In the CPU profiler I see 4

muted spindle
#

Bungee should not use a lot of CPU since it only needs to talk to a player when they join the server

#

it doesn't need to keep track of the player

#

or send anything to it

#

unless a plugin tells it to

keen compass
#

no, but it still has to process the packets to know which server to send them too

#

also using a VM can interfere with natives

muted spindle
#

Correct

#

which is nothing compared to generating/loading chunks

keen compass
#

true

#

but native transport might be the issue though

muted spindle
#

possibly yes

uncut zealot
#

Native transport?

keen compass
#

if bungee can't make use of native code then everything gets processed by the CPU

#

native code allows the nic to do the majority of the processing

uncut zealot
#

could be an issue

#

How can I verify it?

muted spindle
#

basically if its not native, cpu has to do more work to make it compatible

#

if it's native bungee can just use of native code

zenith siren
#

When using the ChatEvent in a BungeeCord plugin I can do event.getSender() but that doesn't return a ProxiedPlayer, it returns a Connection. Why is that, what else can chat that isn't a player?

uncut zealot
#

On my servers (spigot) the option "use-native-transport" is disabled. Is it connected?

keen compass
#

one of the things you would want to check is if your VPS uses virtio driver

#

in your config or you see that in the log @uncut zealot ?

#

if you see that in the config, enable it

#

if you see that in the console and its enabled in the config, then it means bungee isn't able to use native code for some reason.

uncut zealot
#

this "use-native-transport" is spigot option, not bungeecord

keen compass
#

enable it for the servers

uncut zealot
#

one of the things you would want to check is if your VPS uses virtio driver
@keen compass What do you mean by virtio driver?

keen compass
#

virtio driver is a driver that allows the VPS to better make use of its virtualized nic instead of using a generic driver that emulates a network card.

uncut zealot
#

in bungee log it shows:

Using mbed TLS based native cipher.
Using zlib based native compressor.
Not on Windows, attempting to use enhanced EpollEventLoop
Epoll is working, utilising it!

#

virtio driver is a driver that allows the VPS to better make use of its virtualized nic instead of using a generic driver that emulates a network card.
@keen compass Not sure, it is debian virtual installed on vmware without extra tooling

keen compass
#

can use that script to see if you have the virtio driver

#

but even if you do everything and still can't find the problem, it could be an issue between the VM and the real box though

#

which you won't be able to determine the issue there if that is the case, you would need your hosting provider to do it.

uncut zealot
#

I am the hosting provider, so I can basically everything.

keen compass
#

then why are you running bungee in a VM o.O

uncut zealot
#

There isn't anything called virtio driver. There is just vmxnet3 from vmware.

#

then why are you running bungee in a VM o.O
@keen compass In order to have better acces to the server and also, to not only host bungeecord there, but also other things.

keen compass
#

I recommend installing Virtio drivers

#

vmxnet3 is emulated virtio isn't

#

which means even though bungee is using native code, the network card is being emulated which means its not making use of the real hardware that is on the box. In other words the CPU has to handle it which is probably why you are seeing the large cpu usage.

uncut zealot
#

Is it possible in vmware virtual machine?

keen compass
#

yes

uncut zealot
#

not sure I see how

opaque urchin
#

Is it possible to get the person using a command in commands.yml?
Trying to make an alias in commands.yml to spread the player around the map:

wild:
  - spreadplayers 3000 3000 500 false $1```
hollow drift
#

Sorry to re-ask, I'll only do this one more time then maybe I'll try spigot forums ...

Does anyone know if it's possible to make a one-off Spigot build but skip the remapping/versioning of NMS/CB packages? I'd really like to be able to set breakpoints in internal code when hunting for bugs.

keen compass
#

versioning of NMS is done during compile time remapping is done during the decompile process

hollow drift
#

Remapping may have been the wrong word

#

I just mean the renaming of packages

keen compass
#

that is also done during the decompile process

hollow drift
#

The code in the "working" dir has the real package names so I think it's the compile-time step I want to skip

#

Hm, is it?

keen compass
#

what do you mean real package names?

hollow drift
#

net.minecraft.server

#

org.bukkit.craftbukkit

#

no 1_15 suffix or whatever

#

basically I just want the code I have to match what ends up in the jar so I can set breakpoints and debug

keen compass
#

well the versioning is in the jar

hollow drift
#

Yes but it is not in the source

#

I may be X-Y'ing this question

#

I should really just ask- how can I run a Spigot build and set breakpoints in my debugger?

zenith siren
#

What's the difference between player.sendMessage( component ); and player.spigot().sendMessage( component ); in a Bungee plugin?

hollow drift
#

I am currently trying to figure out why the DropItem event gets triggered when I use the vanilla /give command

#

but it's very hard to track anything down when the debugger can't align source to the classes in the jar

keen compass
#

probably because it is easier to give items that way and not have to check where in the inventory to place it

hollow drift
#

I feel like this is new behavior as it causes some weird side-effects in my plugin but I'm really not sure

#

This has motivated me to figure out how to debug Spigot since I've never been able to do that.

#

I was reading through the code and it looks like drop() should only be called if the player's inventory is full

#

but mine was not- so here I am trying to figure it out, which would be 100% easier if I could step through the internal code.

frigid ember
#

๐ŸŒš

keen compass
#

its not new behavior, the other reason for triggering that event is if you give an item and there is no inventory space then what is left over will get dropped.

hollow drift
#

yah that's what the code looked like, but as I said my inventory was not full when I was testing

#

so I am confused about what's happening

old barn
#

How do I teleport a player to exact coords?

keen compass
#

did you search to see what uses that method?

#

that method can be called from elsewhere too

subtle blade
#

@zenith siren nothing. One is for BungeeCord, the other is for Spigot

hollow drift
#

Well I had a stack trace that was basically GiveCommand->...->drop()...->DropItemEvent kind of thing

subtle blade
#

Functionally they perform the same task

old barn
#

How do I teleport a player to exact coords?

hollow drift
#

@old barn what do you mean? I think teleport() just.. like works that way

#

Like just call Entity.teleport

frigid ember
#

hard, og name

#

ma g

old barn
#

World w = p.getWorld();
Location loc = Location(w, 5000, 90, 5000, 0.51, 0.51);
p.teleport(loc)

It's possible?

frigid ember
#

not verified

#

you bot

hollow drift
#

yeah Hard that's basically it, did you try it?

frigid ember
#

make 0.51 floats

#

F

hollow drift
#

I find it hard to believe that nobody who works on Spigot code uses a debugger ๐Ÿ˜ฆ

#

Gotta be some way to make that work, right?

narrow basin
#

i have a problem

frigid ember
#

windows crashed

#

i see in ur pfp

#

rip

narrow basin
#

HOW can i make a plugin for spigot 1.8 if the oldest version of spigot plugin in intellij is 1.12

hollow drift
#

smh people still coding for 1.8

frigid ember
#

change the pom.xml

#

from spigot 1.12 to 1.8

#

@hollow drift shytup and help him

#

we are not here to judge

uncut zealot
#

@keen compass What do you think about bungee compression threshold setting it from 256 -> 512 ?

subtle blade
#

BuildTools still distributes 1.8 though you should update

#

We only support 1.15.2

frigid ember
#

ยฏ_(ใƒ„)_/ยฏ

pale plaza
#

is there any plugin to pick up spawners

hollow drift
#

purplex, your spammy self should probably not be telling anyone to shut up. That said, I didn't know build tools supported 1.8 or that any of the API for 1.8 was available, so there you have it.

frigid ember
#

smh people still coding for 1.8

#

ok

hollow drift
#

I'm sorry, would it work better for you in meme format?

subtle blade
#

It's down to 1.8, yea. Bukkit was DMCA'd in 1.7.10 and its build process isn't useable

frigid ember
#

donโ€™t disrespect now

hollow drift
#

Roger, thought 1.9 was the farthest back we could go without using a secret stash of builds ๐Ÿคทโ€โ™‚๏ธ

#

Telling someone to shut up is disrespectful

subtle blade
#

I wish it were back to 1.9 PES_AngeryKid

frigid ember
#

ok

hollow drift
#

Being surprised that people still code for 10-year-old server versions is not really, it's just my truthful opinion. Sorry to have offended anyone.

subtle blade
#

5 years for 1.8.8 but you're right. As far as Spigot is concerned, 1.15.2 or you're out

frigid ember
#

fr?

#

bruh why so rude bout it

fossil jetty
#

choco

#

is the only one that does shit

subtle blade
#

Interestingly enough, CraftBukkit is also technically not supported by Spigot

fossil jetty
#

i use spigot

subtle blade
#

It's not even built by BuildTools anymore

fossil jetty
#

craftbukkit is ass

subtle blade
#

Yet it's the foundation of Bukkit and our work is based entirely on its platform. The majority of PRs go to Bukkit and CraftBukkit rather than Spigot

frigid ember
#

man whats up with yall spigot team, yall ttrippin

fossil jetty
#

who tryna hop on my server i made by hand

#

not done but

subtle blade
#

No, we're thinking about the longevity of the project because you will never get anywhere if you're still running software made 5 years ago

#

You're intentionally neglecting the bug fixes made in any subsequent version

#

It would be the equivalent of me still writing my plugins in Eclipse Mars, released in June of 2015

frigid ember
#

ok, but every sentence you promote the never version

#

i can alsos au move onto ij

#

its newer

#

stop usi ny 5 year old software

#

bla bla

#

cmon g

#

ingot the point you like 1.15

#

atleast respect some like lower

#

thats all

subtle blade
#

That's fine, just don't expect support here ๐Ÿ™‚

frigid ember
#

..

subtle blade
#

You're on your own

frigid ember
#

thats kind of rude but ok

hot fable
subtle blade
#

Welcome to the real world!

frigid ember
#

yall trippin for sure

subtle blade
#

How are you trying to get them, iTz?

frigid ember
#

ima head out with ma tings

#

pce

keen compass
#

@uncut zealot the compression threshold should be fine, but you can test it to see if it improves anything by increasing it

frigid ember
#

canadian

keen compass
#

just don't go below 64 or greater then 1500 @uncut zealot

subtle blade
#

(this also seems like a good opportunity to make use of WorldEdit and its API rather than re-inventing the wheel)

hot fable
#

In commandExecutor class:

Wand wand = new Wand(plugin);
Location loc1 = wand.getLoc1();
#

return null

subtle blade
#

Right, so you're creating a new instance every time. For every instance you create, those fields are going to be unique to that instance

#

They're members

#

When creating and registering your listener, you should save that instance in a field in your main class. Have a getter to fetch it

frigid ember
#

choco whats your youtube channel

subtle blade
#

Linked to my Discord

frigid ember
#

i just want to unsubscribe

subtle blade
#

That's fine

frigid ember
#

lol, you got yo first hater

#

you dealin with it quite well

#

๐Ÿ‘

hot fable
#

And how should I do that?

frigid ember
#

no fr i mean u donโ€™t post anyway

#

ยฏ_(ใƒ„)_/ยฏ

subtle blade
#

The thing is that you think I care. I will always get hate. Letting it bother you is the mistake

hot fable
#

In Hashmap?

hollow drift
#

Jeebus I thought you were leaving

frigid ember
#

OMG IT WAS a joke

#

didnu know

#

i was joking the whole time

#

haha

#

funny bro

#

nice tag btw

subtle blade
#
public class MyPlugin extends JavaPlugin {

    private Wand wandListener;

    @Override
    public void onEnable() {
        Bukkit.getPluginManager().registerListeners(wandListener = new Wand(this));
    }

    public Wand getWandListener() {
        return wandListener;
    }

}```
#

When you want to get your wand listener (to get the values of l1 or l2), you should fetch it from your main class

#

pluginInstance.getWandListener().getL1(); will be your first location, and the same applies to your second

hot fable
#

I have already registered the event

#

okaay

subtle blade
#

Yes I know, but note the difference I made in my snippet ๐Ÿ™‚

#

Or if you want the un-short-handed version of this,

public class MyPlugin extends JavaPlugin {

    private Wand wandListener;

    @Override
    public void onEnable() {
        this.wandListener = new Wand(this);
        Bukkit.getPluginManager().registerListeners(wandListener);
    }

    public Wand getWandListener() {
        return wandListener;
    }

}```
hollow drift
#

Maybe obvious, but keep in mind the locations will still be null until someone clicks

subtle blade
#

Correct

#

I still advise trying to work with WorldEdit though. It's familiar to players and might also help you learn integration with other plugins

hot fable
#

I will try it, thank you very much

subtle blade
#

o/

hollow drift
#

Whenever I see someone coding a "wand" I get magically excited, but then 90% of the time I realize they're just doing region selection and not casting spells ๐Ÿ˜‚

subtle blade
#

You've been treated so nicely working with Magic lol

tiny dagger
#

^ yup nathan

hollow drift
#

I got some haters, lol

frigid ember
#

yes

#

@hollow drift i can be your first ahter

#

pick me

#

pls

hollow drift
#

You'll have to get in line

frigid ember
#

๐Ÿ™ill be a good hater

#

ok

#

๐Ÿ˜ฆ

#

youre a cool dude

#

nice name

hollow drift
#

My first hater probably came around when you were in diapers XD

frigid ember
#

my bros named nathan

#

HEY

#

STFU

#

who u think u ar

#

jk

keen compass
#

probably even earlier then that @hollow drift

frigid ember
#

shut down your computer

hollow drift
#

An oldddddd-ass dude that's who lol

frigid ember
#

๐Ÿ˜‚

hollow drift
#

Really people shouldn't take offense at being called young

#

I mean I'm just assuming here of course

frigid ember
#

ikr

#

its lit

hollow drift
#

but I prolly got one foot in the grave compared to you

frigid ember
#

when someone says im young

hollow drift
#

live your best life my man

frigid ember
#

i say theyre old

#

theyll be a granny when im their age

#

you will feed your family off of thid blockgame

#

gay asf

#

u got 3 kids

#

your wife left you

keen compass
#

well at least you still have the other foot @hollow drift

frigid ember
#

i find it funny when my younger cousin says ill dir first

hollow drift
#

lol

frigid ember
#

lol

keen compass
#

if you want to live long just be a grumpy person

frigid ember
#

add me nath

#

ur a cool guy

#

me and him have 2 year diff

#

but still

#

lol

keen compass
#

grumpy people tend to live the longest XD

hollow drift
#

^ they don't let the BS get them down is why

frigid ember
#

grumpy me

hollow drift
#

already grumpy, can't make me grumpier

keen compass
#

well I wouldn't bet on that, never know till something comes around and makes it happen

hollow drift
#

yeah ngl global pandemic and quarantine did kinda get me down.

keen compass
#

pandemic is a bit of a killer, but the quarantine I can handle

#

I don't like people anyways XD

hollow drift
#

lol yeah true.

#

I work from home anyway so honestly not much has changed

hot lodge
#

can someone explain something to me

#

I built a house on a spigot server but dirt is growing back through the ceiling im very confused

keen compass
#

o.O

#

what did you do, make a dirt house?

pale plaza
#

When i do /wild it say not in this world what do i change in this

wanton delta
#

if i want to compile craftbukkit from my own source, how would i go about turning into spigot... if that makes sense

#

could i just drag and drop the contents of craftbukkit into the spigot jar

#

lol

#

wati

#

i think im misunderstanding something

hollow drift
#

What I normally do is run buildtools

#

then copy my changes over to its working folders

#

then manually run maven package in there

pale plaza
#

When i do /wild it say not in this world what do i change in this

hollow drift
#

but honestly I do not know if that's the "correct" way ๐Ÿ˜

wanton delta
#

yea lol i know what you mean

pale plaza
#

Do I Put The World Name HEre randomWorlds:
world: 1337
world_nether: 42

wanton delta
#

@hollow drift where do you run maven package? in the spigot folder?

hollow drift
#

oh well I just realized the give command will call drop() no matter what.. so now I'm really confused :|

                if (flag && itemstack.isEmpty()) {
                    itemstack.setCount(1);
                    entityitem = entityplayer.drop(itemstack, false);
                    if (entityitem != null) {
                        entityitem.s();
                    }

                    entityplayer.world.playSound((EntityHuman) null, entityplayer.locX(), entityplayer.locY(), entityplayer.locZ(), SoundEffects.ENTITY_ITEM_PICKUP, SoundCategory.PLAYERS, 0.2F, ((entityplayer.getRandom().nextFloat() - entityplayer.getRandom().nextFloat()) * 0.7F + 1.0F) * 2.0F);
                    entityplayer.defaultContainer.c();
                } else {
                    entityitem = entityplayer.drop(itemstack, false);
                    if (entityitem != null) {
                        entityitem.n();
                        entityitem.setOwner(entityplayer.getUniqueID());
                    }
                }
wanton delta
#

you could try to override it maybe

hollow drift
#

yeah @wanton delta in Build/Spigot I think?

fleet burrow
#

help please ๐Ÿ™ :P

keen compass
#

why not just modify your changes in the spigot source @wanton delta ?

hollow drift
#

I'm not sure that's gonna work, @fleet burrow but I could be wrong. What are you trying to customize about the workbench inventory?

fleet burrow
#

I made something to register custom recipes with an amount, beforehand it ignored amount with ExactChoice

#

So now my problem is that it shows the result when X of and item is placed

#

But when I take the result

#

It only takes 1

#

And I believe I can change that there

hollow drift
#

So for real the vanilla /give command drops an item on top of a player instead of putting it in their inventory? That seems so wasteful (temporary entity) and weird ... I've got to be missing something, right?

wanton delta
#

@keen compass spigot source only has the patches tho?

hollow drift
#

@fleet burrow I wouldn't think the inventory/container would handle that but I honestly don't know, sorry. I'm not going to be much help there.

fleet burrow
#

From what I've seen it does

#

Stupid Minecraft

hollow drift
#

Gotta say, my plugin is not expecting a player to drop an item they didn't actually have in their inventory ๐Ÿ˜ฆ

old barn
#

I created an arraylist in one class, I wanted to use that arraylist in another class, how can I do it?

wanton delta
#

your options are

  1. make it static (not recommended)
  2. pass the instance of that class to the target class and use it there
#

what class is the arraylist currently in?

old barn
#

"ScreenShare"

#
  1. how can I do that?
keen compass
#

if you ran buildtools those patches are applied @wanton delta

wanton delta
#
    public Arraylist myArrayList
    public void myMethod() {
        giveArraylistToSecondClass(this);
    }
}

public class SecondClass{
    public void giveArraylistToSecondClass(ScreenShare instance) {
        ArrayList list = instance.myArrayList;
    }
}```
#

@keen compass i dont need to add any parameters? just run buildtools as is and itll apply the changes ive made?

frigid ember
#

I need some help

#

I am running this:

 try {
            query = connection.prepareStatement("SELECT balance FROM tokens WHERE uuid = '" + id + "';");
            Bukkit.broadcastMessage("SELECT balance FROM tokens WHERE uuid = '" + id + "';");
            ResultSet results = query.executeQuery();
            if (results.first()) {
                amount = results.getInt("balance");
            }
        } catch (SQLException e) {
            e.printStackTrace();
            return amount;
        }
#

but the ResultSet comes out as empty but when I do the same command on the panel it gives a non-empty resultset

wanton delta
#

did you strip the uuid

frigid ember
#

no

wanton delta
#

ok

frigid ember
#
public void setTokens(UUID uuid, int tokens) {
        Bukkit.getScheduler().runTaskAsynchronously(Tokens.get(), () -> {
            Connection connection = Tokens.get().getDB().getConnection();
            try {
                PreparedStatement set = connection.prepareStatement("REPLACE INTO " +
                        "tokens(uuid, balance, prestige) VALUES (?, ?, ?)");
                set.setString(1, "'" + uuid.toString() + "'");
                set.setInt(2, tokens);
                set.setInt(3, 0);
                set.executeUpdate();
                set.close();
            } catch (SQLException e) {
                e.printStackTrace();
            }
        });
    }
``` thats the code I use to insert a players data in, default value is 0
#

the setTokens works fine but getTokens does not

pale plaza
#

Any Good Wild Plugins Plz

frigid ember
#

Fbasics?

pale plaza
#

What That

#

XD

frigid ember
#

its a plugin

#

it has /wild

pale plaza
#

OK

#

But Is it factions

wanton delta
#

@keen compass do i need to run buildtools in my working directory? not sure if i understand that bit

pale plaza
#

How Do i Config It

#

Or No Need

#

@frigid ember How Do i Config It

frigid ember
#

idk

#

ill make a thread on spigot :/

rapid yacht
#

Hey so when it comes to essentials warp signs, I want my players to only access warps through signs, and not commands, is this possible?

fleet burrow
#

After how long can I bump a post on the forums

frigid ember
#

1day

#

@rapid yacht remove the permission from them

viscid creek
#

is there a plugin / way to prevent mass player join?

like lets say "You have to wait 5s to join the server"

fleet burrow
#

Shouldn't have posted during such an inactive time

#

Meh

frigid ember
#

@viscid creek look up for queue plugins

viscid creek
#

@frigid ember i mean like non bungee only for 1 server

frigid ember
#

yeah look for non bungee ones

#

someone look at that ๐Ÿ‘‰ ๐Ÿ‘ˆ

pale plaza
#

who know any Wild Plugins

elfin scroll
#

How do we get 255 reverse (cannon) stackers to work? Or do we need a fork off spigot?, cos atm the tnt isnt firing up past the trapdoors and reversing.

silver pewter
#

Hello the item won't add any help thanks ```java
if(event.getAction() == Action.RIGHT_CLICK_AIR || event.getAction() == Action.RIGHT_CLICK_BLOCK)
{
if(player.getInventory().getItemInHand().getType().equals(item.getType()))
{

           if(player.getInventory().getItemInHand().getItemMeta().getDisplayName().contains(Utils.colorize(plugin.getSettings().getConfig().getString("Item.display-name"))))
           {
               SelectorGUI selectorGUI = new SelectorGUI(plugin, player);
               if(Utils.getCheckItems().contains(item.getType()))
               {
                   event.setCancelled(true);
                   player.openInventory(selectorGUI.getGui());
                   player.getInventory().setItem(plugin.getSettings().getConfig().getInt("Item.slot"), Utils.getSelector(plugin, item));
               } else {
                   player.openInventory(selectorGUI.getGui());
               }


           }

       }
   }``` It only adds inside a for loop but it crashes lol
pale plaza
#

Who Can Set My World Spawn Up Cus It Wotn Work For Me PLZ

keen compass
#

@wanton delta ok when you run build tools, it pulls in the source code of craftbukkit and bukkit api. It applies patches to craftbukkit and once that is done, it clones those directories into the spigot directory, renames them to spigot-api and spigot. Then more patches get applied to the api and craftbukkit. then all the changes get commited and then it builds.

#

so, if you copy the spigot directory into a working directory, you have the full source with most recent patches applied

#

now, if you are making a PR, you need to do this, but what you do is you create a patch of your changes which then you can put into the patches directory of spigot-server which is called NMS patches.

wanton delta
#

so if i put the spigot directory into my working craftbukkit directory.... what would i do?

keen compass
#

what do you mean working craftbukkit directory?

#

just open the spigot source as a maven project from in the spigot directory, I recommend copying that directory though and opening where ever you copy it to so that you don't mess with buildtools directory since buildtools has the tendency to overwrite.

#

it will make the patch for you

lilac wing
#

someone with FAWE experience?

kindred vector
#

A bit

#

like a few years

lilac wing
#

I can't get region protection to work, I'm trying to edit a large area but only modify the blocks that are not clamed by some faction
support on FAWE discord is bad
and sorry for my english

naive goblet
#

Isnโ€™t that wg?

kindred vector
#

U want to protect s region use worldguard

#

Xd

#

Was just typing that

lilac wing
#

I think you don't understand what I'm trying to achieve

naive goblet
#

Probably not

#

Well try rephrase?

lilac wing
#

I want to modify a large area, within this area there are chunks claimed by factions, I want to modify that large area (precisely do a // restore), and that it only affects the blocks that are not claimed

naive goblet
#

Tbh idk if fawe supports any faction plugin

lilac wing
#

fawe has a region-restriction feature

naive goblet
#

I donโ€™t think thatโ€™s for factions

lilac wing
naive goblet
#

I mean if it works for factions?

lilac wing
#

i only wanna regenerate the chunks that are not claimed by a faction

#

but regenerate from a backup world, it's a premade world

#

I don't want it to regenerate by a random new chunk

#

that's why I wanted to use the world edit snapshot function

#

but world edit modifies everything, and I don't want to touch the chunks or regions claimed by players

#

and I saw that fawe had this option, that in theory was going to allow me to do what I want

keen compass
#

you are most likely going to need to create a custom plugin. I assume the factions plugin you are using uses worldguard for the region protection, therefore just need to use worldguard api to get the claimed areas, then just restore the areas you are wanting without touching those regions.

wanton delta
#

That message was deleted I wanted to read it ๐Ÿ˜ก๐Ÿ˜ก๐Ÿ˜ก

keen compass
#

o.O

naive goblet
#

It was probably not something interesting anyways

frigid ember
#

Hey guys, I'm making a queue plugin, would using mysql be faster and reduce lag as compared to storing the players uuid in a list? This is what someone else told me but I would imagine the performance impact would be negligible if any

#

why are you storing anything?

#

no need to store?

#

Just use some kind of Map, there would be consequence of a restart and a loss of queue order

red bolt
#

he can just save data into a file

frigid ember
#

for saving using sql is good practice

#

I mean I'm not saving anything after restart or anything, but the players are in a list for order which they can join after joining queue. I figured it would take more time of storing and removing them from MySQL database than just a list
private ArrayList<Queue> playerList;

coarse shoal
#
disconnected with: DecoderException : java.lang.IndexOutOfBoundsException: readerIndex(0) + length(1) exceeds writerIndex(0): UnpooledSlicedByteBuf(ridx: 0, widx: 0, cap: 0/0, unwrapped: PooledUnsafeDirectByteBuf(ridx: 2, widx: 2, cap: 4096)) @ io.netty.handler.codec.MessageToMessageDecoder:98

What does this mean? Error I was getting with WorldEdit/Guard commands when using an argument after something like //set x) on BungeeCord (1487). Moved to Waterfall and the issue isn't present anymore?

keen compass
#

don't use MySQL for that, if anything if you want to use something that will give you some speed use redis @frigid ember

#

but, storing in memory as a list is generally easy and sufficient

#

and faster then MySQL

harsh anvil
#

I mean I'm not saving anything after restart or anything,

#

keep it in memory then?

keen compass
#

yes

#

unless its a huge list

#

then I definitely recommend redis for it

harsh anvil
#

i think you can keep million of entries for a few mb

#

depending on what you store ofc

keen compass
#

yes, but iterating over it takes time

harsh anvil
#

maps are constant

red bolt
#

can spigot handle a big amount of players ?

#

with a good dedicated of course

harsh anvil
#

depends what you're doing

red bolt
#

factions ?

harsh anvil
#

i guess

#

hardware is more important tbh

red bolt
#

could you possibly help me out on picking a dedicated ?

harsh anvil
#

uh not that great with all that stuff

red bolt
#

same ;/

harsh anvil
#

just start small and upgrade as you need it

red bolt
#

thats a good piece of advice i guess ๐Ÿ˜ฎ

harsh anvil
#

no point in buy a $100/m server if you only got 3 players

red bolt
#

i got like 600 members on discord

#

so im guessing ill have 60+

#

on release

harsh anvil
#

do a beta release and do a stress test

#

see how much shit breaks

red bolt
#

thats a good idea actually

#

a 3 day map

frigid ember
#

@red bolt doubt

red bolt
#

?

frigid ember
#

majority will just be lurkers

#

and will leave when you do an @everyone

red bolt
#

is anybody using lombrok ?

#

or whatever its called

#

lambrok ?

#

idek

keen compass
#

whats your budget like?

red bolt
#

ehh i already got art and server is ready

#

i got about $700 left

#

mostly for ads and ftop

harsh anvil
#

lombok

red bolt
#

is that even useful ?

harsh anvil
#

idk

#

never used it

#

isnt that annotations and stuff

red bolt
#

i think so

harsh anvil
#

what was your initial budget?

red bolt
#

$1400

harsh anvil
#

damn

red bolt
#

2 months of work

#

2 salaries

red bolt
#

is it better to use ddr4 ?

keen compass
#

decent prices for some dedicated servers to start with. If you get one of the servers with 64GB of ram, you would be good for about 2-3 servers maybe 4 depending what you have running on them

frigid ember
#

well with ddr3 you'll be limited to old CPUs

red bolt
#

yee i was gonna say that

keen compass
#

nothing wrong with DDR3 or some of the old CPU's

#

just because its old doesn't mean it doesn't perform

red bolt
#

would a xeon even do the job ?

keen compass
#

yes

frigid ember
#

factions servers kinda hungry

red bolt
#

yes

#

mass amounts of tnt

#

and entities in general

keen compass
#

I have an Xeon quad core server 3.7 Ghz

frigid ember
#

@red bolt latest xeons have some of the best single thread performance

keen compass
#

and its not even latest

frigid ember
#

xeon e series

#

but an older CPU should be fine for you

red bolt
#

i did a mistake and bought a spigot from mcmarket

frigid ember
#

you're not expecting a crazy amount of players

red bolt
#

idk if its gonna do anything

frigid ember
#

woo you bought snake oil

red bolt
#

$300 ๐Ÿ˜ฆ

keen compass
#

even if you do get a decent amount any Xeon processor from the last 2-3 years will still perform decently

#

the only time you should even be worrying about latest hardware is if you are super large network with income coming in that you can just afford to get such things

frigid ember
#

why spend $300 on something you don't know you need

keen compass
#

XD

red bolt
#

its advertised as a cannoning jar

#

idk

keen compass
#

I would have made you a custom plugin for about $200 depending on what it was you needed ๐Ÿ˜›

#

or maybe cheaper if it was more simple

frigid ember
#

they're generally snake oil but if later down the line you face exact issues that this jar claims to solve

#

then maybe

#

only then

#

only then

red bolt
#

i can make plugins but im far from reading spigot source code and optimizing it

frigid ember
#

would you consider buying it

keen compass
#

if you can afford to buy plugins off a website, then I highly recommend that instead you just hire a dev to make you plugin

frigid ember
#

you're only expecting 60 players, you don't need crazy optimisations

#

stock spigot will probably be fine

#

not even paper

red bolt
#

yeah but people been saying that some cannons didnt work

#

idk

#

just nvm

wraith dew
#

how do you create a new inventory view

#

?

frigid ember
#

what are you trying to do @wraith dew

keen compass
#

?jd

worldly heathBOT
frigid ember
#

ive never needed to create an InventoryView

wraith dew
#

basically create a chest view but only the hotbar is displayed in the bottom inventory

frigid ember
#

client won't let you do that

wraith dew
#

really?

frigid ember
#

nop

keen compass
#

inventory views are tied to an inventory

#

so just create a new inventory if you want a new view

wraith dew
#

thats what im doing

frigid ember
#

he wants to hide the players inventory @keen compass

wraith dew
#

i create a new bottom inventory and copy the hotbar items

frigid ember
#

but

#

have the hotbar visible

#

unless you just blank out the main inventory (as in have no items)

keen compass
#

its not possible to hide the player inventory

#

you could instead not display what is in the players inventory and it be some other inventory on the bottom

wanton delta
#

you could prevent players from selecting items from a players regular inventory

#

but honestly idk why you would want to

#

or just temporarily remove them

keen compass
#

or just set the bottom inventory as a different inventory

wraith dew
#

thats what im doing @keen compass

#

the top inventory and bottom inventory are new

keen compass
#

ok, so what is the issue?

wraith dew
#

i get a null pointer

frigid ember
#

show code and line where it occurs

keen compass
#

alright, should have started with that first

wanton delta
#

ive noticed that is a common theme

wraith dew
#

e.getPlayer().openInventory(inventoryView);

keen compass
#

we can help with that ๐Ÿ™‚

#

no, please show your code in how you are doing it

#

not the api method you are using

wanton delta
#

one line isnt gonna cut it :p

frigid ember
#

your inventoryView is null then

wraith dew
#

its not because i instantiate it on the line above

keen compass
#

how are we suppose to know that

frigid ember
#

show the entire stack trace

#

and code

keen compass
#

we need some code to look at to the better determine the problem

wraith dew
#

InventoryView enchanterView = new InventoryView() {

                @Override
                public InventoryType getType() {
                    return InventoryType.CHEST;
                }
                
                @Override
                public Inventory getTopInventory() {
                    Inventory inventory = Bukkit.createInventory(e.getPlayer(), 54, "[insert funny phrase here]");
                    updateInventory(inventory, (Player) e.getPlayer());
                    return inventory;
                }
                
                @Override
                public String getTitle() {
                    return "[insert funny phrase here]";
                }
                
                @Override
                public HumanEntity getPlayer() {
                    return e.getPlayer();
                }
                
                @Override
                public Inventory getBottomInventory() {
                    Inventory temp = Bukkit.createInventory(e.getPlayer(), 9, "Hotbar");
                    for(int i = 0; i < 9; i++)
                        temp.setItem(i, e.getPlayer().getInventory().getItem(i));
                    return null;
                }
            };
            //Inventory inventory = Bukkit.createInventory(e.getPlayer(), 54, "[insert funny phrase here]");
            //updateInventory(inventory, (Player) e.getPlayer());
            e.getPlayer().openInventory(enchanterView);
            views.put(e.getPlayer(), enchanterView);
keen compass
#

?paste

worldly heathBOT
wanton delta
#

next time surround with `

#

```

frigid ember
#

get bottom inventory returns null

#

also your inventory title may be too long?

wraith dew
#

no it fits in i checked

keen compass
#

why do you update the inventory when you get the inventory?

#

o.O

frigid ember
#

ok well you're still returning null

#

for getbottominventory

wraith dew
#

updateinventory is a method that adds all the itemstacks

wanton delta
#

If I remember correctly, isnt there an inventory ID and a ContainerAccess method that should be used?

#
                    public Inventory getBottomInventory() {
                        Inventory temp = Bukkit.createInventory(e.getPlayer(), 9, "Hotbar");
                        for(int i = 0; i < 9; i++)
                            temp.setItem(i, e.getPlayer().getInventory().getItem(i));
                        return null;
                    }``` this returns null
wraith dew
#

idk this is the first time ive used inventoryview

keen compass
#

inventories have titles, which is generally used when you have custom inventories so you know which is yours since there may be other plugins that create inventories

wraith dew
#

when null is returned by getItem, does setItem throw a null pointer?

wanton delta
#

yes

wraith dew
#

oh i thought it accepts null

wanton delta
#

Validate.nonNull(Inventory#getItem)

keen compass
#

return null means just that, return a null

#

not that it accepts a null

wraith dew
#

yes but does the setItem method throw a null pointer if null is passed

#

?

wanton delta
#

yes

wraith dew
#

ok ill try and validate

keen compass
#

yes

#

most of the api methods do not accept null values

wanton delta
#

dont use my validate thing i think i am using it improperly

wraith dew
#

im just doint if(getItem != null) add it

wanton delta
#

sure

wraith dew
#

no it still throws a null pointer

wanton delta
#

why are you returning null at getBottomInventory

#

that is what i was pointing to

#

show the stack trace and use ```

wraith dew
#

omfg

#

i want to kms

#

i didnt see that

south cedar
#

Alrighty I've got an entity issue.
I'm spawning an entity and putting it in a variable.
When a player interacts with the entity I'm checking if it's in the variable to make sure it's the correct entity.
Once the chunk which the entity is in (In this case a villager) the entity gets removed from the variable therefore my interaction event isn't working correctly.
Is there any way to keep the chunk loaded until the entity is removed, or keep it in the variable?

I'm storing it in a List<Entity> as I have more than 1 of them

wanton delta
#

LMAO yea thats the first think i saw

#

i was confused

keen compass
#

first, entities have UUID's and they are all unique

#

should use that since the API supports getting entities by UUID

#

second, listen for the chunkUnloadEvent and cancel it if your entity is in said chunk

wraith dew
#

cheers @wanton delta

#

but now i have another exception

keen compass
#

good that is progress

wanton delta
#

@south cedar you can use World#getChunkAt to temporarily load a chunk

wraith dew
#

which is the original one i got before i gave up the night before

#

its a classcastexception

wanton delta
#

show us code/stacktrace

#

and use the

keen compass
#

you are casting to something you shouldn't be

south cedar
#

@keen compass
Will an entitie's UUID change if a chunk unloads and reloads?

wanton delta
#

``` your code here ```

#

no

#

Univerial Unique Id or something like that i forget

#

point is

#

its constant

keen compass
#

@south cedar no it won't

south cedar
#

Lovely! Thank you so much @keen compass and @wanton delta

keen compass
#

the only time an entities UUID changes is because it died

#

which means the server removes it

#

and then when a new entity of same type spawns

#

it will have a new UUID

wanton delta
#

i forget if uuids are recycled or have a chance of being used again

keen compass
#

or may use the old one by chance since its not used anymore lol

wanton delta
#

probably super low chance

keen compass
#

its a low chance

wraith dew
#

wait why did i get a message from clyde?

wanton delta
#

idk

wraith dew
#

can you see the code?

wanton delta
#

clyde is discord bot thing idk

#

he has nothing to do with spigot

wraith dew
#

can you see the code i posted?

keen compass
#

no

#

that is probably why you got a message from clyde

#

?paste

worldly heathBOT
wraith dew
#

it says i dont share a server with the recipient

wanton delta
#

you were trying to DM someone

wraith dew
#

no i was sending it to this channel

wanton delta
#

weird

#

try again

#

lol

keen compass
#

were you trying to use

#

?

wraith dew
#

yes

keen compass
#

weird, maybe it was too long?

#

either way, just use the paste site

wanton delta
#

no it would be a different error

wraith dew
#
            @Override
            public void run() {
                InventoryView enchanterView = new InventoryView() {
                    
                    @Override
                    public InventoryType getType() {
                        return InventoryType.CHEST;
                    }
                    
                    @Override
                    public Inventory getTopInventory() {
                        Inventory inventory = Bukkit.createInventory(e.getPlayer(), 54, "[example]");
                        updateInventory(inventory, (Player) e.getPlayer());
                        return inventory;
                    }
                    
                    @Override
                    public String getTitle() {
                        return "[example]";
                    }
                    
                    @Override
                    public HumanEntity getPlayer() {
                        return e.getPlayer();
                    }
                    
                    @Override
                    public Inventory getBottomInventory() {
                        Inventory temp = Bukkit.createInventory(e.getPlayer(), 9, "Hotbar");
                        for(int i = 0; i < 9; i++)
                            if(e.getPlayer().getInventory().getItem(i) != null)
                                temp.setItem(i, e.getPlayer().getInventory().getItem(i));
                        return temp;
                    }
                };
                //Inventory inventory = Bukkit.createInventory(e.getPlayer(), 54, "[insert funny phrase here]");
                //updateInventory(inventory, (Player) e.getPlayer());
                e.getPlayer().openInventory(enchanterView);
                views.put(e.getPlayer(), enchanterView);
                //views.put(e.getPlayer(), e.getPlayer().openInventory(inventory));
            }
        });```
#

ah finally

wanton delta
#

where is it erroring

#

show stacktrace but us

#

?paste

worldly heathBOT
wanton delta
#

for stacktraces

keen compass
#

I would prefer paste site used for code too, so I can see it without having to scroll XD

wanton delta
#

true this is mainly meant for small bits

wraith dew
wanton delta
#

so do you understand what it is saying

#

you cant cast MinecraftInventory to PlayerInventory

wraith dew
#

i see that but i have no clue on how to fix it

#

how do you specify an inventory datatype

wanton delta
#

im jsut making sure u know what the issue is :p

#

so u can learn

keen compass
#

I believe the order of casting is MinecraftInventory -> CraftInventory -> Inventory -> PlayerInventory

#

can't skip due to how its coded

wanton delta
#

what line is the issue

wraith dew
#

ill try creating minecraftInventory instead of inventory variables

wanton delta
#

e.getPlayer().openInventory(enchanterView); ?

wraith dew
#

that throws the error

wanton delta
#

ok

#

so

wraith dew
#

it cant find craftInventoryCustom

#

class does not exist

wanton delta
#

im not entirely sure how to convert an InventoryView to Inventory

wraith dew
#

ill try casting to craftingInventory

#

also @keen compass are you sure inventory extends craftinginventory?

#

is it not the other way round?

keen compass
#

well the sets are in two different areas

#

so two of them are on the implementation side

#

and the other two are on the API side

wanton delta
#

its not craftinginventory

#

CraftInventory

#

very different!

wraith dew
#

which package is craftInventoryCustom in?

keen compass
#

but, I just recommend creating custom inventory instead of custom view

wraith dew
#

thatll probably be easier

#

tbh i dont think anyone has explicitly instantiated a new InventoryView

#

i tried searching it up and found nothing

#

oh well

keen compass
#

CraftInventoryCustom is NMS

#

well not NMS but its in the server jar

#

not the API

wraith dew
#

but arent the server packages in spigot.jar?

keen compass
#

yes, but when you are compiling against the spigot-api jar, you don't get all the code that is in the server

#

ClassCastException: org.bukkit.craftbukkit.v1_15_R1.inventory.CraftInventoryCustom$MinecraftInventory

wraith dew
#

oh ye

#

i thought i was using the spigot server

#

jar

#

ill try importing the spigot server jar rather than dev kit

#

and see what happens

south cedar
#

Is there a way to get entity by uuid?

#

other than running through all entities and checking

keen compass
#

I think your problem is that you are creating the inventory from the inventory view, when it should be the other way around

#

should already have the inventory before you create a view

wraith dew
#

i did

#

?paste

worldly heathBOT
wraith dew
wraith dew
#

in getTopInventory and getBottomInventory ive created 2 new inventory objects

keen compass
#

inside the InventoryView object

wraith dew
#

yes

#

i think you have to do an anonymous inner class

#

extending inventoryview

keen compass
#

you don't, what I am saying is you need an inventory Object that exists outside of the inventoryview object

wraith dew
#

should it matter?

keen compass
#

the way you have it done, those methods would interact on a different inventory object every single time

#

because the inventory gets destroyed once the inventoryView object goes away

wraith dew
#

but inventoryview should only be instantiated once

#

so those inventories only instantiate once

#

right?

keen compass
#

yes, but not in the way you think though

#

they only exist inside the method you created it in

wraith dew
#

but those methods should only run once (when the player opens the view)

#

right?

#

i want it to create a new inventory each time

#

because its player specific

keen compass
#

thats alright, still need to create the inventory object outside of the inventoryview object, because the inventory view object needs an inventory to reference, can't be created inside the object on the fly

#

you also need to set some things with your inventories to keep them unique like setting the title, otherwise you have no way of checking if the inventory you are interacting with is indeed the correct one

wraith dew
#

the whole method is in an event handler anyway so it creates new Inventories on the fly

#

i use the object hashcodes

#

they are always unique to java

keen compass
#

Ok, InventoryView and Inventory are two separate objects. Can't create an inventory inside the inventoryview object, as that is out of the order of things. You create the InventoryObject first, and then you pass it into the InventoryView object.

#

InventoryView is a view of an Inventory, can't create the view first if you haven't created the inventory

wraith dew
#

its an anonymous inner class. The Inventories are instantiated and stored in the view

#

right?

naive goblet
#

What are you trying to make ?

wraith dew
#

i thought it creates those objects on instantiation

#

a view where only the hotbar is displayed in the bottom inventory and a chest in the top

naive goblet
#

Custom menu?

wraith dew
#

can you give me an code example?

naive goblet
#

Hm yes

keen compass
#

you can do custom menu without messing with inventory view

red bolt
#

does spigot take advantage of multiple threads ?

wraith dew
#

just use the java ones

#

Thead t = new THread();

#

or the bukkit scheduler

red bolt
#

can i run whatever i want async ?

wraith dew
#

yes but be careful

red bolt
#

of what

keen compass
#

most of the API is not thread safe

wraith dew
#

^

naive goblet
wraith dew
#

its useful for things like SQL interfacing

keen compass
#

so, you are going to have to do your own custom code to make API calls thread safe

naive goblet
#

But if events is in same class

wraith dew
#

so your server doesnt freeze every 2 secs

naive goblet
#

Use static {}

#

So it only register once

#

And you can do an instanceof check

wraith dew
#

or you could create temporary threads using Thread t = new Thread(new Runnable(){/code to run/}).start();

#

they instantly die after the code is run

red bolt
#

ah rip

long crane
#

Hello, I'm trying to work with the commands.yml, I have DeluxeMenus and it lets me make my own commands to open the gui, but it comes up red, so is it posable to add the command in commands.yml? Please @ me if you have the answer. BTW Yes I have read the wiki on the .yml

wanton delta
#

however most of the api doesnt need to be run async anyway

#

so its not really a concern

wraith dew
#

well anyway thanks for trying to help me guys

#

ill try the custom menu

naive goblet
#

@long crane the open commands of dm isnโ€™t real commands

keen compass
#

eventually you will learn how objects work in the JVM

naive goblet
#

If you were to make a custom commands for it you would have a command that would dispatch another command

long crane
#

Can they become real commands?

naive goblet
#

Nope

keen compass
#

and how they can and cannot be accessed and how much they are exposed when you create them in different ways

wanton delta
#

not without altering the commandmap

naive goblet
#

Itโ€™s just listening a chat event I think

long crane
#

Oh ok, Thanks

naive goblet
#

Donโ€™t access the commandmap use premade PluginCommand and the plugin.yml for commands unless you want to make some advanced sub commands with abstraction and so on

keen compass
#

commands.yml is for aliasing commands

#

handy if you have two commands that have the same name but do different things

naive goblet
#

It doesnโ€™t work like that? Does it?

#

It would override one or another

keen compass
#

it does work like that

#

you can have multiple commands from different plugins with the same name

naive goblet
#

Thatโ€™s false

keen compass
#

that isn't false

naive goblet
#

There will only exist one /command

wanton delta
#

/plugin1:command

naive goblet
#

But it can be maybe /someplugin:command /otherplugin:command

keen compass
#

just because it doesn't get listed doesn't mean its not there

wanton delta
#

and /plugin2:command

naive goblet
#

Itโ€™s not the same thing though

keen compass
#

what I am talking about is, 2 plugins with the same name for a command

naive goblet
#

A HashMap canโ€™t have 2 of the same keys

keen compass
#

not 1 plugin with 2 commands with the same name

naive goblet
#

Well only command by itโ€™s name. But it can be more with a given fallbackprefix.

keen compass
#

so plugin1:give and plugin2:give both commands are the same name

naive goblet
#

The command name is still not the same

keen compass
#

so what commands.yml resolves if you want access to both without using both at the same time

naive goblet
#

What are you on about?

keen compass
#

what commands.yml is for

#

its for aliasing commands

#

or creating shortcut commands

wraith dew
#

what does implementing inventoryHolder do?

naive goblet
#

No lol

#

Itโ€™s for registration of commands

keen compass
naive goblet
#

Oh youโ€™re talking about that? Well itโ€™s not wel integrated with the API anyways

#

Donโ€™t use it

keen compass
#

is there another commands.yml that is being referred to? o.O

naive goblet
#

Well there ir something called making a plugin for it

#

@wraith dew well an InventoryHolder is the holder of an inventory. In most cases when we create guis going to be the double chest iirc

#

Read about it in docs

#

Itโ€™s way better than comparing titles though

wraith dew
#

i just used hashcodes

naive goblet
#

And trying to access version dependent stuff

keen compass
#

also, when creating the inventory if you want everyone to have access to it, set the owner as null otherwise set the owner as the player if you want only the player to have access to it etc.

wraith dew
#

does implementing inventoryHolder make it so the normal vanilla inventory does not appear?

naive goblet
#

From what I know Player#openInventory overrides whether the holder is a the player or not

#

What

#

โ€œNormal vanilla inventoryโ€

wraith dew
#

as in the bottom inventory when you open a chest for example

#

the player inventory

naive goblet
#

This ?

wraith dew
#

yes

naive goblet
#

Yes

wanton delta
#

wow thats a great pic im gonna dl

wraith dew
#

does it remove 27 to 62?

naive goblet
#

First google entry

#

getBottomInventory and getTopInventory @wraith dew

wraith dew
#

oh

naive goblet
#

Read docs

wraith dew
#

according to @subtle blade its soon to be depricated

subtle blade
#

What is?

wraith dew
#

InventoryHolder

subtle blade
#

No. It wonโ€™t. Itโ€™s still useable API, it should just not be implemented

#

Nor should most of the Bukkit API

wraith dew
#

oh

#

so should you not do this?

#

in the onclickevent

subtle blade
#

No, you should not. Thatโ€™s unintended functionality and against Bukkitโ€™s scope

wraith dew
#

ok

subtle blade
#

See the package description for org.bukkit on the Javadocs

wraith dew
#

ok

#

cheers

red bolt
#

is there any way to center text ?

#

in configs and code ?

subtle blade
#

You can try and centre it for one client but resource packs make that impossible

#

Font size varies and is not sent to the server

red bolt
#

ill do it for the vanilla pack then

subtle blade
#

Additionally, client-sided chat width settings

red bolt
#

do i just add lots of spaces ?

keen compass
#

not only font size varies so does the characters depending on language

subtle blade
#

Right

#

Lots of client-sided factors that make it impossible to do accurately

keen compass
#

and if I remember right, minecraft uses its own fonts for the characters

#

well assuming a resource pack doesn't change it I guess lol

wanton delta
#

only text that can be centered reliably is the text you send, really

#

and you see a lot of servers do stuff like <-------text here------>

#

to give the illusion its centered

wraith dew
#

can the client change the width of the chat (i.e. the number of characters per row)?

wanton delta
#

yes and no

#

its a client setting

wraith dew
#

where does the no come in?

wanton delta
#

yes the amount of pixels

#

no the amount of characters

wraith dew
#

does it just change the character size?

#

to make it fit

wanton delta
#

mno

wraith dew
#

oh

#

so it does change the amount of characters

wanton delta
#

yes

#

i thought you were asking can the client specify that

wraith dew
#

no

wanton delta
#

does anyone know the spefic method that is called to make a player appear as a sillouette

storm tulip
#

so I used a classloader to load classes from an external jar from my plugin, however, its not playing well with gson
I keep getting a stackoverflow when I try to gson.toJson() the classloaded instance.

wanton delta
#

is this external jar running at the same time as the plugin?

#

if not, i recommend just compiling the jar with the plugin

storm tulip
#

Itโ€™s not @wanton delta

frigid ember
#

stack overflow wouldn't occur just because it's being dynamically loaded

storm tulip
#

Itโ€™s like a plugin for my plugin

wanton delta
#

thats not why i was asking

#

because you could just compile the jar into the plugin

storm tulip
#

Yeah see I tried removing all properties from the class and it wouldโ€™ve given me a {} and it still overflows

frigid ember
#

are you really sure it's not some kind of linkage error

storm tulip
#

Well I want to be able to edit the jar standalone

frigid ember
#

what if you run the code in your actual plugin

storm tulip
#

I did and it seems to work as I call the same method to serialize other stuff

#

I do have to pass down my data folder instance and logger instance

frigid ember
#

are you sure you're not doing any kind of infinite recursion

storm tulip
#

Iโ€™m gonna try it again in my plugin

frigid ember
#

stack overflow wouldn't occur because of how it's being loaded

storm tulip
#

Yes Iโ€™m pretty sure Iโ€™m not doing any infinite recursion since it used to be a plugin

#

And then Iโ€™m trying to covert this code to an addon

#

The rest works

#

I guess Iโ€™ll try once more

storm tulip
#

@wanton delta it runs just fine in my main plugin ๐Ÿค”

wraith dew
#

Stackoverflow usually occurs in a recursive method that never terminates. Do you know what that method is?

storm tulip
#

it was gson

#

it didnt like different classloaders

#

it works when I initialized it in the main

#

and then got that gson instance and then did it

wraith dew
#

I could see thst as being a problem for gson

#

Thats why i only use sql now

storm tulip
#

line 27 is a brace bruh

subtle blade
#

Kotlin

storm tulip
#

this is java

#

Success

wanton delta
#

๐Ÿคฏ๐Ÿคฏ๐Ÿคฏ๐Ÿคฏ

#

I dislike when players disappear

gray trout
#

I'm trying to summon no AI mobs using commands generated from a website. In the most simple form, the commands look something like this-
/summon pig ~0 ~1 ~0 {NoAI:1}

However everything I try returns the error "Unable to summon entity". Does anyone know why?

keen compass
#

you are not using the correct name

#

of the entity

fierce wraith
#

#help-archived Hello ๐Ÿ™‚ I am new to the minehut server and i can't figure out how to get the plugins to work, i installed them by clicking the button and restarted the server but nothing is happening

gray trout
#

I've tried "pig" and "minecraft:pig"

keen compass
#

/summon minecraft:pig 0 0 0 {NoAI:1b}

gray trout
#

That worked. So no relative coords?

keen compass
#

for some reason discord doesn't like the tilde character

#

I assumed using 0's you would know you could use relative

gray trout
#

Oh I see I just had to add the 0's in front of the tildes

#

Thanks

keen compass
#

you were also missing the b at the end of the 1 too

gray trout
#

Ah, I see

keen compass
#

have fun ๐Ÿ™‚

gray trout
#

Thanks again

spring nexus
#

@golden vault what's the ETA for resources emails?

golden vault
#

I am not exactly sure what you are referring to. But I would assume you would get it when you are gotten to?

spring nexus
#

Not sure if you remember me, but I'm still waiting for a reply from that day you told me I can send an email. Which means 3 days, and I'm starting to think you guys didn't even receive the email.

golden vault
#

Oh that idk I don't have access to it.

spring nexus
#

Aren't you a resource staff lol? Then who's responsible forums staff?

golden vault
#

admin

#

and possibly mods idk resource staff handles reports and approvals if the approval is appealed it needs to be escalated otherwise the resource staff could just reject it as well

spring nexus
#

Well, I'll wait another day if nothing happens I'll just contact md_5. Thanks

golden vault
#

mhm

buoyant lodge
#

Hey guys, i'm playing minecraft with my own server. last night we were playing minecraft together smoothly, suddenly i and 2 of my friend got lag together (high ping). we got the same internet provider, but my other friend that using diffrent provider can play minecraft in my server smoothly without lag (low ping). Can anyone help me how to fix this, please?
cuz we are getting lags in the server until now

frigid ember
#

Thatโ€™s obviously an issue with your service provider. If one friend doesnโ€™t lag and all of the other friends who use the same service that is different then the no lag friends service provider, itโ€™s obviously your service provider.

rapid yacht
#

Guys is there any way I can get a new spigot account?

#

I want to delete my old one and create a new one

lone belfry
#

You can't delete your old account but nothing is stopping you from creating a new one?

rapid yacht
#

There is

#

I saw a spigot post about how u cant have more than 1 spigot account

#

really stupid but yeah :/

#

actually can someone confirm that that's true?

wanton pivot
#

Correct, you're only suppose to have one account unless you get permission from staff iirc

rapid yacht
#

Damn

#

How would I get permission?

#

Email?

#

Wait wtf funnycube Ik u from somewhere

#

Are you in another big discord?

#

Oh ur in helpchat lmao

subtle blade
#

emails are managed by Cindy and md

#

No mods, no resource staff, just those two