#help-development

1 messages · Page 449 of 1

lost matrix
#

The expensive part is the loading of the world because spigot does some IO on the main thread

wary mauve
#

Is that during server start?

lost matrix
#

And this traditionally lags every server that dynamically wants to load any world...

wary mauve
lost matrix
#

Sure, if its onEnable then no problem. I thought you wanted to have per-player worlds

sage patio
#

any idea for naming this variables better?

wary mauve
worldly ingot
# sage patio

Names are totally preference but these seem fine tbh

sage patio
lost matrix
# sage patio

Names are fine.
Implementation is not.
Static -> no state. you are having stateful statics. Dont do that.

sage patio
tawny remnant
#

Can anyone give me a link for code for a simple NPC please?

sage patio
icy beacon
#

can a message be sent asynchronously to a player or is that also forbidden?

lost matrix
pseudo hazel
#

what code did you write?

worldly ingot
#

You can send a message asynchronously, yes

sage patio
worldly ingot
sage patio
worldly ingot
#
Foo fooInstance = new Foo();
fooInstance.bar(); // non-static. Requires an instance of Foo

Foo.baz(); // static. Does not require the 'fooInstance'```
icy beacon
#

sometimes static is fine

#

you just need to be careful

#

for example utils' classes are mostly fine with being static

worldly ingot
#

Think of it this way. Player.getName() being static would make no sense. Which player?

icy beacon
#

there's a thin line between using static and engaging in static abuse

pseudo hazel
#

thats not the code you wrote

remote swallow
#

is a set config serializable

pseudo hazel
#

probably not

#

doesnt look like it

#

a set is just a list anyways

#

the set here is probably being saved as a map

worldly ingot
#

No you can't insert a Set into a YAML config

pseudo hazel
#

no its just that the default config system is stupid

ivory sleet
pseudo hazel
#

there are probably just some helper functions you can find to save and load those containers

#

since you would save a set identical to a list in yaml

ivory sleet
#

Yes but problem is

#

Set has no inherent notion of order

#

SortedSet does have that

#

But just Set does not ensure it

#

yea

worldly ingot
ivory sleet
#

Believe there was a proposal of a sequenced set also

worldly ingot
#

It's included in that JEP, yes

ivory sleet
worldly ingot
#

SequencedCollection, SequencedSet, and SequencedMap

ivory sleet
#

Music to my ears

young knoll
#

Seeing preview features hurts

#

Because you still have like 4 years to wait for them to be full release :p

worldly ingot
#

It won't be a preview. That's a targeted release

#

21

ivory sleet
#

Yea

remote swallow
#

have we got pattern matching switches yet

worldly ingot
#

Should be a lot of releases and graduations in 21

young knoll
#

Oh it is

ivory sleet
#

Since its presumably much less work than implementing something like that structured concurrency api

worldly ingot
#

Pattern matched switches included

young knoll
#

What happened to everything having 13245345 previews

remote swallow
#

YOOO

#

MOJANG GET ON UPDATING

worldly ingot
#

Yes, it would have to be a list of strings. UUIDs aren't serializable either

young knoll
#

21 is LTS right

worldly ingot
#

It is

ivory sleet
#

Yup

worldly ingot
#

There should be a lot more features in 21 than most others

young knoll
#

Hows that foreign memory api

worldly ingot
#

That was added in 20, no?

#

Oh, preview. Will probably come out with 21

ivory sleet
#

Yea

remote swallow
#

why is the open jdk website stuck in 2009

worldly ingot
ivory sleet
#

I mean when I tested it seemed quite stable

#

So hopefully

young knoll
#

I haven't actually read much about it

pseudo hazel
young knoll
#

It's like a "safe" way of accessing raw memory isn't it

worldly ingot
#

As "safe" as you can be, yeah

ivory sleet
young knoll
#

Safe is better than unsafe

ivory sleet
#

Yea

young knoll
#

Specifically sun.misc.Unsafe

ivory sleet
#

Well iirc its gonna be more or equally performant to unsafe

#

Whilst providing high usability and robust design

young knoll
#

It's a shame plugins sometimes need to use Unsafe in the first place

#

But I guess you can only do so much when mojang likes static final fields

ivory sleet
#

Lol yea

#

Well, from a mod perspective mixins gets the job done

young knoll
#

Plus ATs

#

But we don't get either

ivory sleet
#

Very true

#

Very sad

worldly ingot
#

I mean ideally claims just aren't stored in a configuration format but rather a database (even flatfile like SQLite)

ivory sleet
#

Loopy loop

sage patio
#

does intellij scan the variables too? lol

ivory sleet
#

to some extent yes

#

But I have that inspection set to hint

#

Instead of weak warning or whatever

remote swallow
#

you just reminded me i have to do my mysql storage handler

young knoll
#

Do you have a MySQL server

remote swallow
#

i can get one

worldly ingot
#

btw, I use this a lot when designing databases and testing queries, figured I might as well share http://sqlfiddle.com. It's awesome

ivory sleet
#

Morice they have what’s called a sequence

young knoll
#

DROP DATABASE testing;

ivory sleet
#

list or array is not rly a thing

young knoll
#

Am I doing this right

ivory sleet
#

by specification you have yaml maps, yaml sequences and yaml scalars

#

then its up to the parser how this will be implemented regarding sourcing and sinking

worldly ingot
# young knoll DROP DATABASE testing;

Fiddle lets you setup your own schema. Left side (schema panel) allows table and insert operations, then you can build the schema, then the right side allows for non-table-altering queries

#

YAML is just a superset of JSON

#

Json only has objects, arrays, and key-value pairs as well

ivory sleet
#

That too is true

tawdry echo
#

why i dont have acess?

worldly ingot
#

Not a fork. Superset 😛

remote swallow
#

whats jason a fork of

worldly ingot
#

YAML can be converted to JSON and vice versa

worldly ingot
ivory sleet
#

But otherwise yea

#

I guess anchors also

#

but who cares, its still super cool :)

worldly ingot
#

Yes, you would lose comments. Unless the converter does what JSON tends to standardize and uses a "comment" key-value pair

ivory sleet
#

🥲

tawdry echo
young knoll
#

Gson has an option that allows comments

white root
#

Can someone help me with working with reflections?
I use a technique almost identical to this with my discord bot, and it works fine, but for some reason it doesn't want to work with my spigot plugin.

Originally I had this code: https://nekobin.com/sopivaduto.kt
Kinda ugly, and I didnt like having to put every new command here every time I make a new one

So I replaced it with this code: https://nekobin.com/kawitaneyi.kt
Much better imo, and like I said before, This code is almost perfectly copy/pasted from code that I used for my discord bot.

Here is the only command that I have implements the Command interface: https://nekobin.com/jonedozovo.kt
Here is the Command interface: https://nekobin.com/niwivekena.kt

And here is the error that it is outputting: https://nekobin.com/kicugefita.py

EDIT:
Needed to do this: https://nekobin.com/hekibowafi.kt
because kotlin is a special little snowflake

ivory sleet
#

Yes setting leniency to true right

young knoll
#

yes

ivory sleet
#

Veru nice

young knoll
#

Although gson is apparently old and smelly now

ivory sleet
#

The design is nice for micro projects

#

But jackson is better for enterprise and then u got moshi

young knoll
#

Moshi

#

That's the one

#

I never remember that damn name for some reason

ivory sleet
#

Lmao ye

#

I feel like moshi is nice, but gson works just fine and since its shipped why not use it yk (:

tardy delta
#

does moshi have an object mapper?

fallow violet
#

can someone eggsplain me this error? Its worked fine until the last build, but i changed nothing?

java.lang.NoClassDefFoundError: org/bukkit/craftbukkit/v1_17_R1/entity/CraftPlayer

pom.xml (part of it)

    <dependencies>
        <dependency>
            <groupId>org.spigotmc</groupId>
            <artifactId>spigot</artifactId>
            <version>1.17.1-R0.1-SNAPSHOT</version>
            <scope>provided</scope>
        </dependency>
    </dependencies>
tardy delta
#

did you change some version?

fallow violet
#

no

ivory sleet
tardy delta
#

i always believe those are slow

ivory sleet
#

What it doesn’t ship is stuff like JsonArray, JsonElement etc

tardy delta
#

and thereby dont use them

young knoll
#

I mean

#

Don't you do most of it at startup anyway

ivory sleet
#

Well

#

Moshi is faster than gson

#

Anyway fourteen to blow ur mind

#

iirc jackson with annots is incredibly fast

#

And reflection is faster depending on java version yk

tardy delta
#

idk i looked at jackson and i found the syntax weird

ivory sleet
#

18+ means method handles implementation behind reflection

#

Yea

#

They have weird conventions

nocturne steppe
#

helo is there a way to get a world's height map?

white root
#

Are there any good item gui libraries that anyone recommends?

nocturne steppe
#

be a true man and code it yourself

white root
#

No need to reinvent the wheel if someone's already made a good one

grave lagoon
#
    public void PlayerDies(PlayerDeathEvent event) {
        Player player = event.getEntity();
        String playerUUID = player.getUniqueId().toString();

        playersInCombat.remove(playerUUID);

        if (player.getKiller() != null) {
          
        }
    }```

this detects respawn anchors for some reason
#

i want it to detect just players

#

and player.getKiller returns a player

#

so it shouldnt detect respawn anchors

young knoll
#

What

#

How is a respawn anchor killing someone

remote swallow
#

overworld

#

explosions

chrome beacon
#

They explode

young knoll
#

Ah

#

You'd have to check the cause of the last damage event

#

Iirc there is a method for that

#

getLastDamageCause I think

worldly ingot
#

Yep

#

Returns the most recent EntityDamageEvent

tawdry echo
#

how can override command executon on te server?

chrome beacon
#

Probably killed itself after you froze the game with a while loop

#

Why wouldn't it

#

It's going to block the thread that you're on

sterile axle
#

doesn't matter if it's in a public void method, it depends what thread you called it from - and if you don't know the answer to that, you called it from the main thread. it looks like that while loop never finishes (NoFallToggled, is not ever set back to false). So it runs forever. On the main thread.

= 💀

#

Yeah but the bottom section won't ever be reached, because in the top section a never-ending loop is declared

#

Pretend you're the computer and walk through that logic

#

You'll find yourself never reaching the bottom

vivid skiff
chrome beacon
#

?notworking

undone axleBOT
#

"Does not working" is a useless statement. Please describe what exactly is not working, what you expect it to do, and what actually happens. If you get any console errors, also ?paste the entire stacktrace.

chrome beacon
#

;/

vivid skiff
#

It is not loading the SQLite driver

glass mauve
#

an item frame with a filled map is 1/16th of a block wide, correct?

crystal bay
#

is it possible to like... say if at x0 y50 z0 u place a diamondblock is possible to code it so that it also places a second block on x1 y50 z0?

crystal bay
#

Interesting I'm confused on how to go about it lol

glass mauve
#

check the BlockPlaceEvent

crystal bay
#

Right

echo basalt
#

I'd say it's 1/128th

#

but at work we just use 0.1

terse ore
#

at work?

remote swallow
#

his company

glass mauve
remote swallow
#

you can hide the frame so make it disappear

glass mauve
remote swallow
#

that looks like 1px to me

lost matrix
chrome beacon
#

Could depend on the resource pack

#

So keep that in mind

crystal swift
#

Hey Guys, I Just wrote an empty Class with the Command Executor thing. How can I now use org.bukkit.player to define a player?

remote swallow
#

you check if the sener is instance of Player

lost matrix
crystal bay
echo basalt
lost matrix
echo basalt
#

I was talking about invisible frames

crystal bay
lost matrix
crystal swift
#

Got it done with the Player! How can I now add items to the Inventory of the player?

echo basalt
#

Basically a location represents... a location of a block

#

Changing the location just changes where it points to

crystal bay
#

soo i cant do like if a block is at x0 y50 z0 say diamondblock for instance... i cant make it so a stone block appears beside it aswell?

#

when its placed

echo basalt
#

Locations don't store block data, that's part of the Block implementation

crystal bay
#

;-;

lost matrix
echo basalt
#

You can get the block at a location by calling Location#getBlock

#

and check its type

#

then getting another block at another location and changing it

crystal bay
#

interesting

echo basalt
#

I should probably make like a github repo that's just a sample of how to use individual features

#

like a folder that has a sample on how to use inventories, and a sample project that'd use them

crystal bay
#

that'd be interesting

echo basalt
#

I just can't bother writing documentation for 8 hours straight to avoid answering questions for 10 minutes per day

crystal bay
#

i was just wondering if u can set a block at a location if a block is placed lol

echo basalt
#

if a block is placed

terse socket
#
a.getClickedInventory().```
'getTitle()' and 'getView()' were both removed from the method (?) above. How can I get the title of the current inventory open?
echo basalt
#

There's not quite such a thing, a block is just a representation of a block at a given location, and its data

#

You can check if the block is empty (air)

crystal bay
#

Oh...

#

Yah

lost matrix
chrome beacon
crystal bay
echo basalt
terse socket
echo basalt
#

but, InventoryClickEvent#getView -> InventoryView#getTitle should still work

granite owl
#

why does this ```xml
<repositories>
<!-- This adds the Spigot Maven repository to the build -->
<repository>
<id>spigot-repo</id>
<url>https://hub.spigotmc.org/nexus/content/repositories/snapshots/</url>
</repository>
</repositories>

<dependencies>
    <!--This adds the Spigot API artifact to the build -->
    <dependency>
        <groupId>org.spigotmc</groupId>
        <artifactId>spigot-api</artifactId>
        <version>1.19.4-R0.1-SNAPSHOT</version>
        <scope>provided</scope>
    </dependency>
</dependencies>
#
DESERIALIZATION OF UNTRUSTED DATA IN ORG.YAML:SNAKEYAML

OUT-OF-BOUNDS WRITE IN ORG.YAML:SNAKEYAML
chrome beacon
young knoll
#

Or the InventoryView instance

lost matrix
#

I would use a collection to throw your opened inventories in and then check with contains()

echo basalt
#

who's that handsome fella

lost matrix
tardy flame
#

💀

chrome beacon
granite owl
chrome beacon
#

You could probably make a PR

granite owl
echo basalt
#

pull request

#

no need to be extra paranoid with such things

#

this isn't 2b2t

chrome beacon
#

?contribute

granite owl
#

ah xD

terse socket
granite owl
#

also im using a locally by the BuildTools generated maven repository of spigot right?

granite owl
#

or is it requesting the api from the spigot server

echo basalt
lost matrix
granite owl
#

nvm i just managed to pull a 1.19.2 api version which i never created locally

paper viper
#

Is there any persistant data container which is always there?

echo basalt
chrome beacon
young knoll
echo basalt
#

mongodb skullWazowski

chrome beacon
paper viper
#

how do i get the default world without nowing the name?

echo basalt
#

getWorlds.get(0)

remote swallow
#

how do you feel about nms

lost matrix
#

Bukkit.getWorlds().get(0)

remote swallow
#

damn

echo basalt
#

I think I got sunburnt so I'm not gonna type mouthfulls

young knoll
#

You could also pull the name from server.properties and use that

granite owl
remote swallow
#
public String getDefaultWorldName() {
        return ((CraftServer) Bukkit.getServer()).getServer().getProperties().levelName;
    }
outer anvil
#

I have the same issue at other versions

chrome beacon
undone axleBOT
echo basalt
#

probably your maven folder is messed up

outer anvil
young knoll
#

Bukkit is currently using SnakeYaml 1.13

granite owl
#

aight thanks guys for the quick replies i really aint that versed with maven xD

outer anvil
young knoll
#

The next version is 2.0 which may have some breaking changes

chrome beacon
outer anvil
weak meteor
#

How should i correctly import from main to class the config.yml file?

#

And how i import another file, like messages.yml?

chrome beacon
#

?configs

undone axleBOT
weak meteor
terse ore
#

any plugins for begginers I could make?

undone axleBOT
weak meteor
#

Thanks

sage patio
#

can i figure out that PlayerMoveEvent is caused by what? teleport or the player it self

outer anvil
sage patio
chrome beacon
#

Yea

sage patio
#

ok then

chrome beacon
#

The reason why could change the approach

final monolith
#
InventoryView open = player.getOpenInventory();
for (int row = 0; row < open.countSlots(); row++) {
    ItemStack item = open.getItem(row);
}

java.lang.IndexOutOfBoundsException: Index: 63, Size: 63

This is supposed to happen?xD

tardy delta
#

count slots is the count ig

#

not index

#

wait

final monolith
#

🤔

sage patio
# chrome beacon Yea

I'm creating a BattleRoyale plugin for my server events (not a public one)
when the match starts the players get teleported to the behind of a airplane, and they cannot move by canceling move event, i'm setting they're velocity for moving smoothly behind the airplane, but it seems setVelocity triggers the event too, i want the event to cancel it if the move is caused by the player

tardy delta
#

ive never seen that method either

final monolith
chrome beacon
sage patio
#

uh yea, thanks

#

sometimes things are too easy, but you want to do the hard way

weak meteor
#

I have a messages.yml file in resources directory, how should i access it?

weak meteor
remote swallow
#

keep a yamlconfiguration var in your main class

chrome beacon
undone axleBOT
sage patio
final monolith
sage patio
#

so update on the question, can 100 armorstand be in one place

chrome beacon
sage patio
#

they're invisible, does that matter?

final monolith
#

no

sage patio
#

the players too

#

till they jump of the airplane

chrome beacon
#

Might look a bit weird

sage patio
#

even when both of them are invisible, huh why

chrome beacon
#

Go with armor stands per player or mess with packets

sage patio
#

so what i can do about it

chrome beacon
terse socket
sage patio
chrome beacon
young knoll
#

A single entity can have multiple passengers in modern versions of mc

final monolith
#

seems to be a spigot bug

#

(Version: 1.9 R1)

young knoll
#

But I have no idea how that works with entities that only have 1 passenger point

sage patio
chrome beacon
undone axleBOT
chrome beacon
#

It has existed for a long time

sage patio
terse socket
lost matrix
terse socket
#

I do know map and set

#

But I learned it in javascript

#

Is it different

chrome beacon
#

Yes

terse socket
#

oh well

chrome beacon
#

Java != JavaScript

terse socket
#

Yeah, I know that, I just checked if it was any different, but I'll just check the documentation, thanks

chrome beacon
#

As for your question you can get the inventory from the inventory click event

terse ore
#

Can someone suggest me a plugin to replicate ( a simple one )

delicate lynx
#

mcmmo

young knoll
#

Hypixel Skyblock

chrome beacon
terse ore
#

:v

young knoll
#

😄

chrome beacon
#

Yes I learned Java and Spigot at the same time 💀

terse ore
#

anyone?

lost matrix
chrome beacon
#

You could actually go for mcmmo

remote swallow
#

essentials x

terse ore
regal scaffold
#

If I want to add flags to the global region from worldedit

#

Which is called GLOBAL

#

Can I treat it as another region?

regal scaffold
#

Even if there is no file for it

#

Sorry, yes, WG

chrome beacon
regal scaffold
#

👍 Ty

chrome beacon
#

But why do you need to mess with the global region?

regal scaffold
#

I want to do some flag work

#

On a world that I create

#

And they need to be global

chrome beacon
#

Ah

regal scaffold
#

Today I lost respect for all Private Mine plugin makers

sage patio
chrome beacon
#

I'm generally a fast learner so it went pretty well

river oracle
chrome beacon
#

I never posted for help more than like twice

river oracle
#

most of my posts were me not being proficient enough at google yet tbh

regal scaffold
#

Wasn't possible

#

Says global is null

#

Ummmm

#

How to set global flags then

lost matrix
#

Wasnt it _GLOBAL_ or something with underscores

regal scaffold
#

__GLOBAL__

sage patio
terse socket
#

Or it shows that a human being can forget something 🤯

lost matrix
quaint mantle
#

Yeah, WG isn'tthat necessary

lost matrix
#

For 99% of servers it is

tardy delta
#

always fun figuring out nullpointers in an interpreter

#

turns out java internally calls Objects.requireNotNull on a switch param

wary mauve
#

@lost matrix My server freezes when it tries to load up the world right after generating and switching generators. Do you know why that is? Heres the code

river oracle
#

also to add there is no Async World Creator

regal scaffold
#

Hey I have a question about WG if anyone knows

wary mauve
#

No it crashes. I expect the generating to pause things, but the server crashes

#

After its done generating

echo basalt
#

worldguard is just decent at what it does

river oracle
#

stack trace?

regal scaffold
#

If there's an existing region with a specific name, and I try to create another region with the same name

#

Does it override

echo basalt
#

I kinda hate its internals but it's whatever

regal scaffold
#

Or error

undone axleBOT
river oracle
#

give stacktrace

echo basalt
#

I don't use it for protection, more like for defining abstract shapes for stuff like minigames

#

where I can just tell my teams to make a region for each door

#

and have 2 regions overlap at that door

river oracle
echo basalt
#

and write code that automatically associates that door as a connection between both regions

river oracle
#

with my game engine I just used bounding boxes lol

chrome beacon
regal scaffold
#

I shall

echo basalt
#

my cod zombies minigame just uses regions to scan the entire map and automatically know what spawnpoints are enabled

#

based on where regions overlap

wary mauve
chrome beacon
#

Looks like it took a very long time to generate the worlds

wary mauve
#

It's a custom generator that takes a while.

chrome beacon
#

I'd space out the loading a bit and not create multiple worlds during the same tick

wary mauve
#

It's only one world file, if that's what youre talking about

chrome beacon
#

Or if it's a private plugin you should be able to increase the watchdog timeout in the spigot.yml

wary mauve
chrome beacon
wary mauve
chrome beacon
wary mauve
chrome beacon
wary mauve
#

what do I do to delay it?

chrome beacon
#

?scheduling

undone axleBOT
quaint mantle
#

hey guys, is there some sort of discord i can join for 1.8.8 support since i know this discord hates questions regarding old versions lol

sage patio
#

How can i get a Vector from where player is looking (i want to move something in player look direction)

sage patio
#

but you still can ask your questions

river oracle
#

true you always have yourself

#

that will never go away

#

how poetic

quaint mantle
#

see right, every time anyone asks, they are absolutely berated with facts about why newer versions > older versions

sage patio
quaint mantle
chrome beacon
river oracle
#

yeah we are the kindest around here in SpigotMC discord

#

you won't get banned

quaint mantle
#

well aight, is there any documentation for just 1.8.8 stuff or is all documentation only new versions?

chrome beacon
chrome beacon
#

Or you can generate them yourself

quaint mantle
#

not doing that for sure

#

i havent setup 1.8,8 yet, is there anything different in the ways of setup or na

sage patio
chrome beacon
#

Ah right

chrome beacon
quaint mantle
#

okay good to know, ill set that stuff up in a lil bit. also i heard something about pdc being different in older versions, what was that abt?

chrome beacon
#

But knowing 1.8 users you're probably going to use some fork of a fork of a fork of a fork... that breaks Minecrafts copyright by distributing their code

chrome beacon
#

You will need to implement that on your own using nms

quaint mantle
#

thats awesome!

#

love it, is there not any other similar alternative?

wary mauve
#

@chrome beaconIt didn't work. it still froze at the same spot

young knoll
#

There's uhh

#

NBTApi

chrome beacon
#

NBTAPI

#

Yeah

sage patio
#

it seems ArmorStand#setVisible(false); does not work if you mount something on it

#

any idea?

chrome beacon
#

Hm is that why people usually use arrows?

sage patio
#

or buttons?

chrome beacon
#

No idea can't really check

sage patio
#

ah 1 thing

#

i'm mounting a player on armorstand in somewhere else too

#

its invisible and fine

sage patio
#

its smaller

#

nobody can see them

chrome beacon
#

Haven't seen anyone do that

sage patio
#

i did one a long time ago

chrome beacon
sage patio
#

1 sec

#

(deleted code)

#

yes, seems my brain is not working anymore, i'm not even setting is not visible

chrome beacon
#

Use the spawn method that takes a consumer

#

That will ensure the entity is modified before it's spawned so you avoid flickering and such

sage patio
#

i don't know which one you are talking about

#

can you send an example

chrome beacon
#

World#spawn(ArmorStand.class, (armorStand) -> { do stuff }, location)

#

No idea if that's correct going off memory

#

And writing on phone

young knoll
#

Did that exist in 1.8

chrome beacon
#

Do stuff would be set invis

chrome beacon
young knoll
#

o

sage patio
#

yea thanks, i'll change all of my armor stands to that

wary mauve
#

I missed when my coding problems were small bugs in my plugin

#

I cant figure this out @chrome beacon

#

my server crashes every time now. In the past it would only happen like 50% of the time

chrome beacon
#

Worldgen is a pain you can easily kill the server if it's too slow

wary mauve
#

I really dont think its the speed. It loads once, generates what I tell it to, and is all fine. Then it does something that it doesnt tell me for about a minute, and then it tries to load the world again and it stops on Preparing to start region for dimension

#

I've made it generate more than what I currently make it do and it worked sometimes before

sage patio
#

@chrome beacon @young knoll after doing a lot of thing and put them together (its still not smooth)

chrome beacon
#

Won't check that. I have limited internet atm

sage patio
#

its just 5mb ig

#

5.06mb

wary mauve
chrome beacon
#

Looks neat

wary mauve
#

it just not working the ways I need it to

grave lagoon
#

the 2nd and third one i personally dislike

#

but

#

my opinion doesnt matter

#

since i couldnt do better than that

wary mauve
#

One of the problems is that it generates other chunks that I dont want it to

granite owl
#

what are the names of the vanilla commands permission nodes?

chrome beacon
#

The bukkit wiki should have them

granite owl
#

apparently this is deprecated and i dont find a new documentation

granite owl
#

however

#
PluginManager pluginManager = Bukkit.getPluginManager();
        Permission opPermission = pluginManager.getPermission("minecraft.command.op");

        if (opPermission != null)
        {
            opPermission.setDefault(PermissionDefault.FALSE);
        }
        else
        {
            Bukkit.broadcastMessage("Failed to remove op permission");
        }
```returns null
chrome beacon
#

?? What are you trying to do

#

Why remove that

#

💀

#

Don't give op to people you don't trust

granite owl
#

and replace it with my own

#

im rewriting my old permission plugin to be compatible with permission nodes

chrome beacon
#

Bad idea

granite owl
#

and i tried to print the permission node

#

and its null for /op

#

apparently the op command has no permission node

sullen marlin
#

Normally you would add a permission attachment, not change defaults

sullen marlin
#

It will be null onEnable

#

Default commands are added last so they can be replaced by plugins

granite owl
chrome beacon
#

Not that part

#

Trying to modify the defaults

granite owl
chrome beacon
#

Though I'd just use LuckPerms since it has everything one could ever need

granite owl
chrome beacon
#

LuckPerms is open source

young knoll
#

It also offers like 234 backend options

chrome beacon
#

And has good code

#

Unlike some other options

fossil coral
#

hi

#

im facing this error for the first time when trying to build my plugin: Error:Cannot determine path to 'tools.jar' library for 17 (C:/Program Files/Eclipse Adoptium/jdk-17.0.6.10-hotspot)

#

it was working for some reason this time it wont

sullen marlin
#

How are you building your plugin

fossil coral
#

ctrl+f9

sullen marlin
#

Is it an eclipse project?

#

Did you try googling the error

fossil coral
fossil coral
sullen marlin
#

Are you using intellij?

fossil coral
sullen marlin
#

Make sure it is up to date

#

It seems like your version doesn't support java 17

fossil coral
sullen marlin
#

Well that's rubbish, spigot API doesn't depend on your ide version

fossil coral
sullen marlin
#

Well install the latest version and come.back

fossil coral
#

mk

#

it did

fossil coral
sullen marlin
#

Ok now what is the issue with the newer one

fossil coral
#

it didnt register it as a spigot plugin at first it wouldnt let me import stuff from bukkit.org

young knoll
#

That's an issue with the build path, not the IDE itself

sullen marlin
#

?intellij

#

There's probably a wiki on it

next plume
#

The NoCheatPlus people say that 1.19.4 doesn't fire player move events for players riding in minecarts. Instead, a single event is fired when the player exits the minecart, covering the entire distance the player traveled (which freaks out the anti-cheat).
Is this an intentional change?

granite owl
#

do i see it correct that a permission attachement invalidates upon logout?

young knoll
#

I doubt that was an intentional change

next plume
#

Judging from the log and the first-hand testing, the player seemingly tries to cover with a single player move event the distance traveled with the minecart (from the mounting location to dismounting location).
Was not able to reproduce this with other vehicles (horses, boats ...).

Now, because this does not happen on 1.19.3, either Mojang or Spigot changed something regarding player/vehicle move when updating to 1.19.4... Will need some further checking.

young knoll
#

MD is around, maybe he knows more

sullen marlin
#

PlayerMoveEvent never fired in vehicles, VehicleMoveEvent did

young knoll
#

I think it may be more about the one big move event firing when you exit?

#

idk

next plume
#

I'm just going by what the NCP people were saying.
Maybe the player move event firing for the entire distance ridden is new?

sullen marlin
#

No idea

granite owl
sullen marlin
#

Yes they invalidate; they do automatically update though

granite owl
#

that they can use the command*

#

i do not see the "added" command in the command list although i can use it

eternal oxide
#

adding an attachment/permission does not update the command map that is sent to the client unless you call an update

sullen marlin
#

You're adding the perms after join in which case you need to .resyncCommands or whatever the method is

eternal oxide
#

updateCommands() I believe

granite owl
granite owl
# sullen marlin Yes they invalidate; they do automatically update though

sorry to bother again but since i got the master here xD, when exactly does a permission given like this invalidate? ```java
Player player = (Player)sender;

            PermissionAttachment attachment = player.addAttachment(this);
            attachment.setPermission("ranks.commands.rank", true);

            Bukkit.broadcastMessage("player has been given rank permission");

            player.updateCommands();
sullen marlin
#

Wdym

eternal oxide
#

on log out

terse ore
#

btw @tardy delta @eternal oxide I made it work at the end

#

14 years without anyone opening it

#

the psu sounded like a helicopter

granite owl
# sullen marlin Wdym

like if a player is given permission to use a command this way, when does the permission attachment invalidate

granite owl
granite owl
eternal oxide
#

no

tardy delta
#

huh

eternal oxide
#

you have to re-apply it on join

sullen marlin
#

yes, its called a permissions plugin

eternal oxide
#

as it's always a fresh Player object

tardy delta
#

oh that pc

terse ore
granite owl
#

i dont complain that it doesnt work, just trying to understand the scope im working with

young knoll
#

Yeah you'll need to handle saving and loading them yourself

granite owl
granite owl
#

if so thats not a problem ill serialize/deserialize everything

young knoll
#

👍

granite owl
#

and then apply/remove it to from players as required

fossil coral
#

I need help my commad wont work it says unknown command

young knoll
#

?nocode

undone axleBOT
#

It’s hard to answer a programming question without code
Oh no! You ran into a problem. But no worries, people are willing to help, but first they need to see your code. This is because otherwise, they would be providing help based on guesses instead of concrete knowledge. Whether it be a compile error, runtime error, or an unexpected output, I'm sure that if you were to provide code, you'd receive a quick solution.

fossil coral
young knoll
#

Is it in your plugin.yml

fossil coral
compact haven
#

did you register the command with that

#

or did you like use the annotation

#

send the code & what lib

chrome beacon
#

They probably didn't register the command

#

Which is why it says unknown command

pure raven
#

Can I change the spawner to type item?

chrome beacon
#

Yes

fossil coral
compact haven
#

send the code because you're doing something wrong

#

and what library are you using...?

young knoll
#

You can set it to an item

#

But I don't think you can change what item with just the API

chrome beacon
#

I find the spawners api lacking

young knoll
#

Sadly it is

#

I think this brings us back to virtual entities again :p

pure raven
#

I couldn't find a way to set it as an item.

young knoll
#

setSpawnedType

#

The type is DROPPED_ITEM

chrome beacon
#

Won't you need nms to specify what item is dropped

young knoll
#

Yes

pure raven
young knoll
#

I imagine it will default to stone

young knoll
pure raven
#

Can you give an example source? I will read

wary mauve
#

@chrome beacon you're still here!

#

Could you maybe see if you could help me with the world gen stuff? Im really struggling

fossil coral
# compact haven send the code because you're doing something wrong

Main.java :
package me.balls;

import me.balls.utils.commands.Ruby;
import org.bukkit.plugin.java.JavaPlugin;

public class Balls extends JavaPlugin {
private static Balls instance;

public void onEnable() {
    instance = this;

    new Ruby();
}

public void onDisable() {}

public static Balls getInstance() {
    return instance;
}

}

Msg.java:
package me.balls.utils;

import org.bukkit.ChatColor;
import org.bukkit.command.CommandSender;

public class Msg {
public static void send(CommandSender sender, String message) {
send(sender, message, "&");
}

public static void send(CommandSender sender, String message, String prefix) {
    sender.sendMessage(ChatColor.translateAlternateColorCodes('&', prefix + message));
}

}

#

CommandBase.java:
private List<String> delayedPlayers = null;
private int delay = 0;
private final int minArguments;
private int maxArguments;
private final boolean playerOnly;

public CommandBase(String command) {
    this(command, 0);
}

public CommandBase(String command, boolean playerOnly) {
    this(command, 0, playerOnly);
}

public CommandBase(String command, int requiredArguments) {
    this(command, requiredArguments, requiredArguments);
}

public CommandBase(String command, int minArguments, int maxArguments) {
    this(command, minArguments, maxArguments, false);
}

public CommandBase(String command, int requiredArguments, boolean playerOnly) {
    this(command, requiredArguments, requiredArguments, playerOnly);
}

public CommandBase(String command, int minArguments, int maxArguments, boolean playerOnly) {
    super(command);

    this.minArguments = minArguments;
    this.maxArguments = maxArguments;
    this.playerOnly = playerOnly;

    CommandMap commandMap = getCommandMap();
    if (commandMap != null) {
        commandMap.register(command, this);
    }
}

public CommandMap getCommandMap() {
    try{
        if (Bukkit.getPluginManager() instanceof SimplePluginManager) {
            Field field = SimplePluginManager.class.getDeclaredField("commandMap");
            field.setAccessible(true);

            return (CommandMap) field.get(Bukkit.getPluginManager());
        }
    }catch (NoSuchFieldException | IllegalAccessException e) {
        e.printStackTrace();
    }

    return null;
}

public CommandBase enableDelay(int delay) {
    this.delay = delay;
    this.delayedPlayers = new ArrayList<>();
    return this;
}

public void removePlay(Player player) {
    this.delayedPlayers.remove(player.getName());
}

public void sendUsage(CommandSender sender) {
    Msg.send(sender, getUsage());
}

public boolean execute(CommandSender sender, String aliase, String [] arguments) {
    if (arguments.length < minArguments || (arguments.length > maxArguments && maxArguments != -1)) {
        sendUsage(sender);
        return true;
    }

    if (playerOnly && !(sender instanceof Player)) {
        Msg.send(sender, "&cOnly players can use this command,");
        return true;
    }

    String permission = getPermission();
    if (permission != null && !sender.hasPermission(permission)) {
        Msg.send(sender, "&cYou do not have permission!!");
        return true;
    }

    if (delayedPlayers != null && sender instanceof Player) {
        Player player = (Player) sender;
        if (delayedPlayers.contains(player.getName())) {
            Msg.send(player, "&cPlease wait before using this command again!");
            return true;
        }

        delayedPlayers.add(player.getName());
        Bukkit.getScheduler().scheduleSyncDelayedTask(Balls.getInstance(), () -> {
            delayedPlayers.remove(player.getName());
        }, 20L * delay);
    }

    if (!onCommand(sender, arguments)) {
        sendUsage(sender);
    }

    return true;
}

public boolean onCommand(CommandSender sender, Command command, String alias, String [] arguments) {
    this.onCommand(sender, arguments);
    return true;
}

public abstract boolean onCommand(CommandSender sender, String [] arguments);

public abstract String getUsage();
#

command: package me.balls.utils.commands;

import me.balls.utils.CommandBase;
import org.bukkit.Material;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.meta.ItemMeta;

import java.util.ArrayList;
import java.util.List;

public class Ruby {
public Ruby() {
new CommandBase("ruby", true) {
@Override
public boolean onCommand(CommandSender sender, String [] arguments) {
Player player = (Player) sender;

            ItemStack item = new ItemStack(Material.DIAMOND);
            ItemMeta meta = item.getItemMeta();
            if (meta != null) {
                meta.setDisplayName("§4Ruby");

                List<String> lore = new ArrayList<>();
                lore.add("§bUse this at your own risk,");
                lore.add("§bAnd §4Be Careful");

                meta.setLore(lore);
                item.setItemMeta(meta);
            }

            player.getInventory().addItem(item);
            return true;
        }

        @Override
        public String getUsage() {
            return "/ruby";
        }
    };
}

}

young knoll
#

Woah boy

#

?paste

undone axleBOT
fossil coral
#

i wasnt able to send the file so i copy pasted it

fossil coral
compact haven
#

me.balls is your package?

#

also is your plugin on /pl

fossil coral
chrome beacon
#

You didn't register the command executor

compact haven
#

no he does lol

#

it's when he gets the command map using CommandBase

chrome beacon
#

Hm did I miss it while scrolling

compact haven
#

though that is definitely not how they want you to use CommandBase

#

you're meant to extend it and call super

#

not what whatever the fuck

#

but it's okay

#

should sitll work

compact haven
#

then if it is, getCommandMap() is null

chrome beacon
#

Ah modifying the command map 💀

compact haven
#
        CommandMap commandMap = getCommandMap();
        if (commandMap != null) {
            commandMap.register(command, this);
        }
#

but like, this is so scuffed

#

use a library, please

#

search "Lamp spigot", "ACF spigot" or "CLOUD spigot"

fossil coral
compact haven
#

mate is there your plugin

#

are you a troll?

#

send the output of /pl please as a screenshot

fossil coral
compact haven
#

its a command 😭

#

bro

#

on the fucking server

fossil coral
compact haven
#

this is why I dont enter this channel Olivo

chrome beacon
#

Yeah I've spent too much time here

eternal oxide
#

you need more patience

#

I tend to just stop replying if it gets too annoying

fossil coral
chrome beacon
#

?img

undone axleBOT
eternal oxide
#

?img

undone axleBOT
compact haven
fossil coral
compact haven
#

are any of those your plugins

fossil coral
fossil coral
#

mine wont show

compact haven
#

well that's why is says unknown command

#

do you have a plugin.yml

fossil coral
#

ye

#

name: balls
version: 1.0.0
main: me.balls.Balls
api-version: 1.19.4
authors: [FiryDev]
depend:
description: Balls!!

compact haven
#

send a screenshot of the file explorer on the side of the IDE

#

why the empty depend line? delete that

next plume
#

api-version: 1.19.4
Should be 1.19, not 1.19.4

compact haven
#

ah yeah that too

compact haven
#

if the plugin.yml is in the right place, the jar is in your plugins folder, then there's something in your console log about this plugin called "balls"

compact haven
#

thats not the screenshot

fossil coral
#

oh wrong one

#

sry

compact haven
#

plugin.yml in wrong spot

#

there isn't even a src/main or src/resources folder

#

._.

fossil coral
#

lemme try it

compact haven
#

no dont just randomly add folders

#

let me make a video real quick

fossil coral
#

ok

chrome beacon
#

Did you ChatGPT the plugin or smth

fossil coral
chrome beacon
#

Just copy pasting code then?

fossil coral
#

nop

chrome beacon
#

I have no idea how you figured out how to access the command map without knowing how to setup a java project

compact haven
#

no ive seen that clas sbefore, he copied it online

chrome beacon
#

Ah so they're just lying then

compact haven
#

video processing, give me a minute

chrome beacon
#

Great

#

goes to sleep

compact haven
#

follow the necessary steps, some are erroneous because I didnt have a spigot plugin improperly configured on hand

#

and of course I haven't manually re-configured source and resource roots in a long time

#

idk how the hell u setup that project but sheesh

#

and make sure the main in the plugin.yml isn't as I typed, I put me.balls.Main because that's your package and my default class name from when I just made the project, but it should be me.balls.Balls for you

compact haven
#

no you clearly don't, but alright

fossil coral
compact haven
#

CommandBase was definitely copy-pasted

fossil coral
fossil coral
compact haven
#

because I doubt someone who can figure out how to reflectively access the CommandMap and use constructor overloading can't also realize you don't make it an anonymous class or that you require a plugin.yml in the resources root of your project

#

🤷 that's what he was asking when he said "Just copy pasting code then?"

#

welcome to the spigot discord btw, sorry I'm being an ass just no patience atm

fossil coral
#

it did register it now

#

ty

compact haven
#

np

#

gl

fossil coral
#

this is my first time making a spigot plugin so im sry

#

i make bedrock addons usually

#

its not my first time coding anythin tho

fossil coral
#

oh ye dont ask why the plugin is named balls cus idk i asked one of my friends what should i name it she said balls

sullen marlin
#

fair

regal scaffold
#
Region: 08341680-0904-4271-af2e-24cc49b12952-mine (type=cuboid, priority=0)
Flags: entry -g NON_OWNERS: DENY
Owners: TSans_*
Members: (none)
Bounds: (-11, 23, 122) -> (141, 167, 284)
#

Why would I be getting, not allowed to enter flag

#

If i'm added as the owner

regal scaffold
#

I'm coding

#

But that's just the summary

#

Sure ig

terse ore
#

what could cause this error

worldly ingot
#

Line 17, this.getCommand("test").setExecutor(new FloodgateTest());

#

You can't instantiate your plugin class

terse ore
#

yeah I just realised

#

mb

worldly ingot
#

That line entirely is useless because the plugin class is automatically assigned to handle commands, so you can remove it all together and it should still work 🙂

terse ore
#

ty choco

worldly ingot
#

o/

terse ore
#

now I get another error

#

lol

weak meteor
#

how to make a player invincible?

#

i know there's a method

#

but i dont remember it

#

ive tried with setInvincible

flint coyote
#

Player#setInvulnerable()

weak meteor
#

thanks

flint coyote
#

Your IDE should tell you tho

weak meteor
#

and isInvulnerable?

#

it exists too?

flint coyote
#

Aren't you using an IDE to code?

#

But yes it does exist

young knoll
#

What's wrong with ConfigurationSerializable

flint coyote
#
 final ConfigurationSection elperSection = permissionSection.getConfigurationSection(elperId);

elper

#

Actually you can cast a map from yaml

#

even a list of maps

#

It will be an unsave cast though. I got plenty of those

#

I have this List<Map<String, Double>>

#

Well a set is a list (just without an order)

#

you can do new HashSet<>(yourList) if you really want a set

#

Yeah I'm not using a single ConfigurationSerializable as of now. That will be cleanup/optimization at a later point

#

The function does look horrible though

#

yes

#

I can show you xD

#

?paste

undone axleBOT
flint coyote
#

xD

#

Kinda

#

Not for claims

#

It's more of a regional event plugin

raw crow
#

what is the current name of PacketPlayOutUpdateSign at 1.19.3?

flint coyote
#

So basically you can code your own events (or use mine) and set them up for certain regions, customize them, combine them etc

#

It will be open source anyway. It's already functional but I wanna do some quality of life and then some optimizations at the end

#

To be fair: With all those checks it might not even be possible to make the code I sent much prettier 😅

#

Yeah that would work. I'm more concerned about all those type casts

#

List<Map<String, Double>> enabledTimedEvents = (List<Map<String, Double>>) map.get("enabledTimedEvents");
like this

#

There's a reason why I wanna make all that configurable with commands/GUIs. Writing all that configuration by hand is pain

#

Well not really possible if you need a bunch of strings

#

I mean you could always close it and tell them to type it in the chat and then reopen but that's tedious aswell

#

Yeah for version 1 I'll probably still require the events to be configured in the yml directly. Only the regions can then be modified entirely ingame

#

sleep well :)

#

thx

wet breach
flint coyote
#

I'm aware of that but the config is quite complex since you can have CompositeEvents that basically consist of multiple other events. And obviously a CompositeEvent can hold another CompositeEvent etc

#

I was thinking about a webeditor tbh.

#

The only problem is that I don't know if (especially rented) servers are fine with running an application on another port.

wet breach
#

Well maybe for your advance users you could still allow manual configuration. But if you do provide this i would recommend a command to reset configs lol. And basically put a warning that manual configuration you will not provide support for. But this really just depends on your audience.

#

That is if you have plenty who like this to make it worth it to do

flint coyote
#

The default event config is empty. Resetting won't be hard ^^

wet breach
flint coyote
#

A web editor would be pretty neat for complex configurations. And doing something like serverport+30000 = webeditor port would probably work for most servers

wet breach
#

You could host the web editor

flint coyote
#

I could but I'm really not that comfortable with putting my real address on a website (and german law requires that for any public website)

wet breach
#

But yeah you could implement a mini webserver to allow editing from a browser

wet breach
flint coyote
#

I thought about it but I haven't seen any other plugin do it so I wasn't sure if that's common practice

#

If he's fine with it I could do that lol

wet breach
#

Itd rarely done. There is some plugins that do it just rare

young knoll
#

LuckPerms does it

wet breach
young knoll
#

So does ExcellentEnchants

flint coyote
#

But they all host it on their own domains, no?

wet breach
#

No

flint coyote
#

Oh so they actually run a webserver on the mc server?

#

In that case I can do that, too. Also ensures that it's always accessible

wet breach
#

Yes, easy to implement a small webserver in java. Doesnt take much. Just use the apache lib

flint coyote
#

spark?

wet breach
#

Apache provides a websever lib

flint coyote
#

Oh I thought you meant apache spark

#

maybe there's another

wet breach
#

It has methods and utilitied to implement a small web server easily without you needing to code a whole lot yourself

#

Just make sure to run the webserver in a daemon thread

flint coyote
#

I'll surely not do that on the main thread lol

#

And I will not keep it up either. I'll just start it on demand, generate a unique token and put that in a link that gets send in the chat

wet breach
#

Nice

flint coyote
weak meteor
flint coyote
#

What spigot version are you on?

weak meteor
#

1.8.8

flint coyote
#

Yeah then it's not there

weak meteor
#

damn

worldly ingot
#

mfw that API is 7 and a half years old

flint coyote
#

xD

weak meteor
#

i just wanna make it compatible from 1.8 -> 1.19

#

(I tried, it works)

flint coyote
#

You can use the EntityDamageEvent

#

But I'd not support 1.8 (ever)

#

As Choco said - this is waaay to old and outdated

young knoll
weak meteor
#

But i have this command /god ye

#

so the original plan was to use setInvunerable

#

but, well it doesnt exist

flint coyote
weak meteor
#

how i make the listener know that the player is invunerable?

#

how to make a note to the player

#

lets say

flint coyote
#

Store the players/uuids in a list/set and check if they are inside that list/set inside the listener

weak meteor
#

hmm

#

okay

wet breach
#

Apache has smaller slpit up libs for their webserver stuff

wary mauve
#

Is there any way to make it so one tick goes by every time generateChunkSquare(), but that the server waits for it to finish before doing something else?

young knoll
#

Use a repeating task instead of a loop

#

And keep track of i manually

wary mauve
#

dont variables in bukkit tasks have to be final?

wet breach
#

If you declare it in the task. But you would use a method outside the task to get and set i

weak meteor
#

Hey @flint coyote look at this

#
    @EventHandler
    public void entityDamageEvent(EntityDamageEvent event){
        if (event.getEntity() instanceof Player){
            Player player = (Player) event.getEntity();
            UUID playerUUID = player.getUniqueId();

            if (GodCommand.godPlayers.contains(playerUUID)){
                event.setCancelled(true);
            } 
        }
    }
#

i made this

wary mauve
#

how do I insert code into discord?

rough ibex
#

```lang
code
```

wet breach
#

If its long use the paste site instead

#

?paste

undone axleBOT
flint coyote
#

Would it be possible to use books for GUI? When I need a list of strings the chat would be annoying but a book would be fine

young knoll
#

Yeah you can do that

#

Signs and anvil GUIs are also an option

young knoll
#

Conversation API is nice but chat is a bit annoying to use for text input

wary mauve
#

anvil guis?

young knoll
#

The player has to press an extra button to open it :p

wet breach
#

Its designed for text input lol

young knoll
#

But the extra button press!

wet breach
#

Lol no different then clicking

flint coyote
#

I prefer to hop from an Inventory into a book and back. But I will take a look at the conversation api aswell. Although if it's chat based I can probably do it myself

young knoll
#

I don’t think it requires a click for a book or sign gui

#

Anvil one might

flint coyote
#

Don't you have to click "sign" on books?

young knoll
#

True

wet breach
#

Conversation api uses the chat but nice thing is you can put the player in a separate channel and then when done move them back to global and they wont have their chat cleared for that

young knoll
#

And signs only allow like 10 characters per line

worldly ingot
#

Wish more people knew about the conversation API

#

It's great

#

A bit dated, but great

flint coyote
wary mountain
#

does anybody know the inventory slot ids for armor slots

wet breach
#

Its ironic for how old it is and many dont know about it

wary mountain
#

i searched online and everything was either 100s or less than 5, and 100s crashes my game

young knoll
#

I guess no one really thinks there is an api for that until someone tells them

wet breach
#

Its been there since like mc 1.2

hybrid spoke
worldly ingot
#

ChatPaginator too is often overlooked

flint coyote
# wet breach Conversation api uses the chat but nice thing is you can put the player in a sep...

Hmm it doesn't sound that bad at first glance. However I don't want one entry of the list to be unchangeable after it was entered. Lets say you have to specify a list of valid entities. Then you would type SHEEP enter WOLF enter COW enter and then you notice you don't want the sheep. Feel like a book where you can continously type whatever you like and then "commit" it at once is better for that

wet breach
worldly ingot
#

Yeah it's just a tad old

#

And unmaintained

young knoll
#

Wtf is ChatPaginator

hybrid spoke
#

i meant like

#

the other dating

worldly ingot
#

Just a quick utility class to help with word wrapping

wet breach
#

Let me get you a link for an example

young knoll
#

Well I’ll be danged

#

Doesn’t the client handle that itself though

worldly ingot
#

For some things lol

flint coyote
#

I will definitely compare both variants but the question is: How complex is a book GUI? Do I need nms or packets or is it easy to make?

wet breach
young knoll
#

Oh wait you could use this for stuff like lore so it doesn’t go way off the edge of the screen

wet breach
#

Less to check for and manage

young knoll
#

Guess I should browse the API more

worldly ingot
#

lol

weak meteor
#

NPE when calling config (Isnt done that way?):

Configuration config;

    @Override
    public void onEnable() {
        saveDefaultConfig();
        config = getConfig();

        Bukkit.getServer().getPluginManager().registerEvents(new PlayerListener(), this);

        //Commands
        getCommand("gamemode").setExecutor(new GamemodeCommand());
        getCommand("god").setExecutor(new GodCommand(config));
        getCommand("fly").setExecutor(new FlyCommand());
        getCommand("vote").setExecutor(new VoteCommand());

        //Listener
        getServer().getPluginManager().registerEvents(new PlayerListener(), this);
        enableMessage();
    }
#

I know, i initialize the variable, then assign the config, no?

wet breach
#

Need to nake sure config file actually exists if not create it

weak meteor
#

it exists

worldly ingot
#

saveDefaultConfig() is there

#

That code LGTM

weak meteor
#

lemme re build

#

im gonna delete old config from sv

#

maybe is that?

young knoll
#

Are you building with maven/gradle

weak meteor
#

maven