#help-development

1 messages · Page 325 of 1

kind hatch
#

Oh

compact haven
#

and use stmt.setString("mass")

kind hatch
#

I'm tired. It's 4AM

#

I misread

compact haven
#

not really rocket science, but perhaps the missing piece is that you use setString and getString for mysql enums in the JDBC

kind hatch
#

Yea, I thought you meant remove it from every query.

#

Clearly not what you meant. lol

compact haven
#

ah nah

wet breach
#

lol

compact haven
#

only for the self ofc

wet breach
#

or initial values

undone spindle
#

to much brain stuff going on whoaw

compact haven
#

frost can u write the DEFAULT for hugged_at if it's stored as a BIGINT

kind hatch
#

DEFAULT 0?

compact haven
#

no

#

that'll make it default to Jan 1970

#

and that's a very useless default

wet breach
#

well you could set the default as some other time of your choosing

#

just write the number that corresponds to it

compact haven
#

preferably the current time lol

wet breach
#

default (whatever number)

#

well you can't default it to the current time without creating some kind of function

compact haven
#

oh, that's

#

incredibly unfortunate

kind hatch
#

What if it's null?

compact haven
#

also a useless default

wet breach
#

typically you want to avoid null when possible

kind hatch
#

Couldn't you leverage that? Like, in your code, check if it's null and if it is, use it as an indication. Or use it to show None or smth.

torn shuttle
#

anyone happen to know if worldedit has an easy way to convert block data in a schematic file into something I can cache as blocks relatively easily?

compact haven
#

please dont use the code unless necessary

#

and no

torn shuttle
#

I want to read schematic formats but I want to do the pasting myself

compact haven
#

why would you ever want to have a null timestamp

#

or a timestamp that doesnt actually reflect insert time

#

for hugged it makes sense because there is a case when that should be null, when the type is "self" or "mass"

#

but for timestamp, it makes no sense

edgy goblet
#

null can be used to mean no value

#

if there's no set value then just make it null?

#

simple enough

wet breach
kind hatch
wet breach
#

the code for it is super easy

compact haven
#

or there would be no insert

#

don't know how the jdbc handles it

torn shuttle
#

you can't trick me like that

#

I've seen what that file format looks like

wet breach
#

its like 10 or so lines of code o.O

torn shuttle
kind hatch
wet breach
#

if it is marked as not null, and it has no value it would be null

kind hatch
#

Huh?

wet breach
#

its weird but this only happens for data that was present already and you marked it as not null with empty columns

kind hatch
#

We're talking about new data.

wet breach
#

for new data it would require a value

compact haven
#

frostalf we aren't talking abt if you ALTER TABLE lol

wet breach
compact haven
#

so I can try and write a function to make a DEFAULT for the timestamp column

#

or frostalf could if he's up to it, because frankly I dont know many functions in mysql at all

compact haven
#

no you said specifically you couldnt

wet breach
#

Yeah without creating some kind of function

compact haven
#

I mean u said you could, but u wouldnt need to create a function

#

u would need to use one of the built in ones

#

;C

wet breach
#

well

#

then use CURRENT_DATE function

#

but I think you would need to do some math however to turn it into an int

#

so you would need to do CAST(CURRENT_DATE) AS unsigned

compact haven
#

mm I searched

#

you can use UNIX_TIMESTAMP()

#

that'll give seconds since unix epoch

wet breach
#

ah right forgot about that one

#

UNIX_TIMESTAMP()

compact haven
#
CREATE TABLE `hugs` (
    `interaction_id`    INTEGER NOT NULL AUTOINCREMENT UNIQUE,
    `hugged_by`    VARCHAR(36) NOT NULL,
    `hugged`    VARCHAR(36),
    `type`    ENUM("normal", "self", "mass") DEFAULT "self",
    `hugged_at`    INT NOT NULL DEFAULT ( UNIX_TIMESTAMP() ),
    FOREIGN KEY(`hugged_by`) REFERENCES `player_data`(`uuid`),
    PRIMARY KEY(`interaction_id`),
    FOREIGN KEY(`hugged`) REFERENCES `player_data`(`uuid`)
);
#

we're not going to make it a BIGINT and * 1000 simply because that'd be pointless

#

and waste storage, given that the function gives only second precision

#

on the code side, simply Instant.ofEpochSecond(rs.getInt("hugged_at"))

#

@kind hatch xd

wet breach
#

for built in functions

compact haven
#

holy shit there are more than I expected

#

and now that there is a default

kind hatch
compact haven
#

no need to pass in hugged_at

#

no u wouldn't store System.currentTimeMillis()

#

the default gives second precision, so if you use the default just pass in unix seconds

#

(System.currentTimeMillis() / 1000)

#

but you won't need to pass it in anyways

kind hatch
#

??

wet breach
#

oh unrelated

#

but MySQL knows geometry

compact haven
#

now you just need to do INSERT INTO hugs (hugged) VALUES (?);

#

for a self hug

#

arent you happy

wet breach
#

yeah itzdlg found you a default for your column

compact haven
#

u should be through the roof

wet breach
#

🙂

compact haven
#

just so you know

#

this is the latest I've been up helping someone

wet breach
#

interesting

compact haven
#

its 4:36 am

wet breach
#

I didn't realize mysql had a to base64 function

#

I need to go through this list now

#

to see what other cool stuff has been added

kind hatch
compact haven
#

pass in a math expression?

#

there is no slightly longer query

#

mate what

#

the query is smaller

wet breach
#

it has a UUID() function lmao

kind hatch
#

That's Maria

compact haven
#

SELECT hugged_at FROM hugs WHERE hugged=?; for example

#

no theres a UUID in mysql

#

its not maria

wet breach
#

that is the list I am looking at

compact haven
#
PreparedStatement stmt = conn.prepareStatement("SELECT hugged_at FROM hugs WHERE hugged=?;");
ResultSet set = stmt.executeQuery();
set.first();

Instant huggedAt = Instant.ofEpochSecond(rs.getInt("hugged_at"));
wet breach
#

lol, you can compress strings in mysql

compact haven
#

like I should not need to give u all of this code, u need to read the things I've been giving u so far

wet breach
#

the manual typically tells you how as well

#

well I think most of the issues should be resolved

gray merlin
#

If I get an item and change its meta, then copy it to another slot, and programatically check if their meta is the same, will it return true?

wet breach
#

should play around with some of these built in functions

wet breach
kind hatch
gray merlin
#

Alright thanks

compact haven
#

there is no difference, the goal is to default whatever can be defaulted. otherwise, I'd hand you a create statement without foreign keys, no primary key, and just a name and type for the 5 columns

#

dropping millisecond precision, since you dont need it, will net you 4 bytes on every inserted row

#

not that that's a lot, but why not take the extra penny when you can?

#

not to mention it's saving you effort. there's nothing extra for you to do

#

merely renaming ofEpochMillisecond to ofEpochSecond if you want to use the Instant class throughout the code

kind hatch
#

I'm gonna have to re-evaluate this once I get some sleep. I'm pretty sure I'm gonna have to redo my entire interface to support this redesign of the database and that's gonna be a pain in the ass.

compact haven
#

how is your interface coded

#

are you literally passing around fucking longs????

#

for time????

kind hatch
#

Yes

compact haven
#

because if so, it should be redone

#

okay. It should be redone

#

no one passes fucking longs

#

you use Instant as the type in your data classes

quiet ice
#

I mean passing longs are okay

#

If you don't need to display anything to the user it actually makes sense

#

Otherwise, use LocalDateTime or somethin like that

compact haven
#

in the DataManager classes it's fine

#

in fact in my data managers everything is as close to the storage representation itself it can be

#

once it gets into some

#

Interaction class though

#

needs to be an Instant, not a long

#

anyways if you severely want a long

quiet ice
#

Instant is just strange in UX world

compact haven
#
PreparedStatement stmt = conn.prepareStatement("SELECT hugged_at FROM hugs WHERE hugged=?;");
ResultSet set = stmt.executeQuery();
set.first();

long huggedAt = (long) (rs.getInt("hugged_at") * 1000);
compact haven
quiet ice
compact haven
#

I've used it many times with an original Instant

#

I mean I mightve had to make it a Date first

#

but that's like a single method

kind hatch
compact haven
#

holy fucking shit shadow

quiet ice
#

I guess it works with date, but date is very imprecise

kind hatch
#

Did I miss something?

quiet ice
#

Only a few years until a rollover

compact haven
#
CREATE TABLE `hugs` (
    `interaction_id`    INTEGER NOT NULL AUTOINCREMENT UNIQUE,
    `hugged_by`    VARCHAR(36) NOT NULL,
    `hugged`    VARCHAR(36),
    `type`    ENUM("normal", "self", "mass") DEFAULT "self",
    `hugged_at`    INT NOT NULL DEFAULT ( UNIX_TIMESTAMP() ),
    FOREIGN KEY(`hugged_by`) REFERENCES `player_data`(`uuid`),
    PRIMARY KEY(`interaction_id`),
    FOREIGN KEY(`hugged`) REFERENCES `player_data`(`uuid`)
);
PreparedStatement stmt = conn.prepareStatement("SELECT hugged_at FROM hugs WHERE hugged=?;");
ResultSet set = stmt.executeQuery();
set.first();

long huggedAt = (long) (rs.getInt("hugged_at") * 1000);
PreparedStatement stmt = conn.prepareStatement("INSERT INTO hugs (hugged, hugged_by, type) VALUES (?, ?, ?);");

stmt.setString(1, hugged.getUniqueId().toString());
stmt.setString(2, huggedBy.getUniqueId().toString());
stmt.setString(3, "normal");

stmt.executeUpdate();

and if you, for whatever reason, want to add a time (which you dont need to!!!!!!!!)

PreparedStatement stmt = conn.prepareStatement("INSERT INTO hugs (hugged, hugged_by, type, hugged_at) VALUES (?, ?, ?, ?);");

stmt.setString(1, hugged.getUniqueId().toString());
stmt.setString(2, huggedBy.getUniqueId().toString());
stmt.setString(3, "normal");
stmt.setInt(4, (int) (System.currentTimeMillis() / 1000));

stmt.executeUpdate();
chrome beacon
compact haven
#

you missed the fact that nothing changed minus I added a DEFAULT to hugged_at which is the current time

compact haven
#

it's 5am and I'm pissed so Ill be frank

#

please dont comment if you havent read the past few hours of convo

quiet ice
#

An int suffices if you want to only store for the next 83 years, which should suffice

chrome beacon
#

Sounds like you should get some sleep

eternal oxide
#

He doesn't need the accuracy of a long, only down to seconds. So an Int is fine.

quiet ice
#

It sounds wrong, but I can't find the error in my maths so shrug

compact haven
#

int for seconds will break in year 2038

#

if he manages to keep this code for the next 14 years, and wants to continue working on this project, I will personally write the changes he needs to make

quiet ice
#

Nah, it breaks in the year 2106

compact haven
#

no, that's for milliseconds, as a long

kind hatch
compact haven
#

mm wait

#

sorry no

quiet ice
compact haven
#

2106 is unsigned int

#

we were both wrong

#

milliseconds as a long will break in over 292 million years

quiet ice
#

If we are using unsigned ones it breaks in the year 2038 - which sounds about right but might be a bit problematic now - it's just in 15 years

compact haven
#

yeah idk how we're going to fix that

#

since a change would require the systems written by banks when fortran was invented to be updated

#

and heaven forbid

quiet ice
#

Well can't complain - I'll get big money soon

compact haven
#

lmao

quiet ice
#

If anything else fails, just move the epoch time to 2038

compact haven
#

and make sure that any time before 2038 fails to work

quiet ice
#

Remember, signed integer

compact haven
#

technically the solution is to move it to 2038 since it's already expecting signed

#

yeah

#

but ehm

#

honestly solution is ot make epoch milliseconds, and then a signed 8 byte type

#

that'll solve the problem for as long as humans exist, probably

#

well shouldnt say that, idk if there'll be world wide destruction within 292 million years

quiet ice
#
quartz goblet
#

Integer.MaxValue on potion effects gives me this instead of the nice infinite looking thing. Any way have it display xx:xx instead of numbers or is it a 1.19 thing?

quartz goblet
#

Its gone? as of what ver

quiet ice
#

Recently

quartz goblet
#

damn that sucks

compact haven
#

wtf why has it been removed

quiet ice
#

1.19.X defo, I'd guess 1.19.3

compact haven
#

thats incredibly disappointing

kind hatch
# compact haven it's 5am and I'm pissed so Ill be frank

Look, I'm tired. I'm sure you're tired too. I apologize for aggravating you. It was not my intent. I do appreciate the help. I'll re-read the convo in the morning and I'm sure I'll catch what I missed. I'll re-evaluate and keep trucking on. Again, I appreciate the help and advice.
I'm going to bed. Gn

quartz goblet
#

looks ugly as shit

quiet ice
#

there are a few effects in vanilla which apply there

quartz goblet
#

like bad omen

compact haven
#

it has the sql, how ot insert with or without timestamp, and how to get the long from a query with hugged_at

#

gn mate

quartz goblet
#

never mind bad omen says 2 hours now

compact haven
#

and no need to apologize

#

honestly Integer.MAX_VALUE is pretty similar to forever

#

like I'd rather see an infinity symbol instead of that xd

quartz goblet
#

I calculated it its 3.4 years

white root
#

wow, I have lived ~6.5x "forevers"

compact haven
#

if I was still in the same world 3.4 years later and the potion effect magically disappeared

#

I would not be blaming the infinity symbol lol

quaint mantle
#

Does someone know why this returns ServerLevel and not WorldServer: ((CraftWorld) player.getWorld()).getHandle(); and what method I should use to get WorldServer?

quiet ice
#

aren't those the same thing?

#

Level, Dimension and World are more or less synonyms if my mind doesn't fail me

compact haven
#

am pretty sure they are different classes though

quiet ice
#

mojang moment

compact haven
#

nvm it would seem, unless it’s changed since 1 7 10, WorldServer is the same

#

but uh

#

@quaint mantle where’d you get ServerLevel from

#

although I could’ve sworn that existed

quaint mantle
#

I'm trying to create NPC in 1.18.2

#

MinecraftServer server = ((CraftServer) Bukkit.getServer()).getServer();
WorldServer world = ((CraftWorld) player.getWorld()).getHandle();
GameProfile gameProfile = new GameProfile(UUID.randomUUID(), npcName);
EntityPlayer npc = new EntityPlayer(server, world, gameProfile);

compact haven
#

Does ServerLevel exist if u cast to it

quaint mantle
#

yes

compact haven
#

can you

quaint mantle
#

I've done it like this now: WorldServer world = ((WorldServer) player.getWorld());

#

but this shouldn't work right?

compact haven
#

no

quaint mantle
#

because I am not getting the NMS representation of the world

compact haven
#

that shouldn’t work xd

chrome beacon
#

It's ServerLevel in Mojmaps

compact haven
#

Ah that’s what it is

chrome beacon
#

If you're using unmapped you're in for a bad time

quaint mantle
#

I used BuildTools to remap

#

but its my first time with NMS

#

So I don't know if that was the right thing to do

chrome beacon
#

When you're working with nms you need to use already existing code as a reference

#

So you can look at Mojangs code to see how things work

compact haven
#

ah btw Olivo sorry for earlier

#

am going to sleep now

chrome beacon
#

No worries

quaint mantle
#

Ok thanks I will see what I find

chrome beacon
quaint mantle
#

I think I'm ok hahahahah

chrome beacon
#

You never know in this discord

quaint mantle
#

But I guess we'll see

chrome beacon
#

Some people are making plugins on their first day programming

#

Which usually ends quite bad

quaint mantle
#

I can imagine

#

I already found the solution

#

apparently this is the way to go (for future users):
CraftPlayer craftPlayer = (CraftPlayer) player;
ServerPlayer serverPlayer = craftPlayer.getHandle();
MinecraftServer server = serverPlayer.getServer();
ServerLevel level = serverPlayer.getLevel();

    GameProfile gameProfile = new GameProfile(UUID.randomUUID(), npcName);

    ServerPlayer npc = new ServerPlayer(server, level, gameProfile);
chrome beacon
#

I highly recommend using the Citizens API when working with NMS

#

It already takes care of everything you need

quaint mantle
#

ok thanks for the hint

chrome beacon
#
API

Citizens has an extensive API for working with NPCs. Make sure you always are using an up-to-date build of the CitizensAPI to ensure that your plugin works with the latest release of Citizens.

quaint mantle
#

on it

#

it looks very straight forward

#

I'm guessing skin changing is also included

chrome beacon
#

Yeah

#

and you can use different mob types

quaint mantle
#

ok nice

steady bane
#

@quaint mantle what plugin are you making?

quaint mantle
#

just playing around with NMS as I've never used it before

#

not creating anything interesting hahhaha

steady bane
#

okk

chrome beacon
wet breach
#

not quite the same as World

chrome beacon
#

hm? Why are you using nms for that

#

You can just port it to the api

#

I mean if you really need to use NMS use FallingBlockEntity.fall(Level world, BlockPos blockposition, BlockState iblockdata)

#

but I do recommend using the api, it should be able to everything you need it to

white root
#

throw on some metal music and make a speedrun of it

torn shuttle
#

I have unironically been listening to gothic playlists for the past few weeks while working

#

just hundreds of hours of gothic breakcore as my background work music

gleaming grove
#

worst part is when 10h playlist ends and you still have work to do

torn shuttle
#

that's why there's a queue of 50 hours behind it

wet breach
tardy delta
#

smh i got only 22 hours

orchid gazelle
#

Well, at least for 1.19.3, I can say that you can easily extend FallingBlockEntity and use the constructor for Level, x, y, z and BlockState

torn shuttle
#

I'm listening to something in the background >14h a day

#

also I just realized I forgot to eat

#

man

#

what a day this has been

quiet ice
#

I usually have a 5 - 15 minute long piece on loop for a few hours to days

#

No need for long playlists at that point

torn shuttle
#

I am just at the whim of youtube music recommendations

livid dove
#

where are vannila boss bars stored?

pseudo hazel
#

am I doing something wrong when deserializing my list of configserializable objects? it works fine with single objects but it cant seem to find a getList() even though I have stored it as a list

tender shard
#

wdym with "it cant find getList()"?

pseudo hazel
#

well I try to use config.getList(listname)

#

but it returns null

#

but when I try get(listname).toString() it does print some list type

#

namely teh list type of my object

#

Caused by: java.lang.ClassCastException: class [Lio.github.steaf23.bingoreloaded.item.tasks.BingoTask; cannot be cast to class java.util.List ([Lio.github.steaf23.bingoreloaded.item.tasks.BingoTask; is in unnamed module of loader 'BingoReloaded-1.0-SNAPSHOT.jar' @1cec6052; java.util.List is in module java.base of loader 'bootstrap')

tender shard
#

hm can you show an example of how your config looks like?

pseudo hazel
#
- ==: io.github.steaf23.bingoreloaded.item.tasks.BingoTask
  data:
    ==: io.github.steaf23.bingoreloaded.item.tasks.ItemTaskRec
    item: BEACON
    count: 2
  type: ITEM
- ==: io.github.steaf23.bingoreloaded.item.tasks.BingoTask
  data:
    ==: io.github.steaf23.bingoreloaded.item.tasks.ItemTaskRec
    item: DIAMOND_HOE
    count: 1
  type: ITEM
tender shard
#

hm that looks good

pseudo hazel
#

yeah and like I said it works fine when saving a single item

tardy delta
#

@SerializableAs 🥲

pseudo hazel
tardy delta
#

oh no

#

replaces that long name behind ==:

tender shard
#

usually getList() and casting it would work fien

List<MySerializableObject> myList = (List<MySerializableObject>) getConfig().getList("my-list");

In your error messag,e it looks like there's actually only one object and not a list

pseudo hazel
tender shard
#

are you sure you're actually reading the config that you just sent? try to use getAsString() on your config object and see whether it actually prints the correct file contents

pseudo hazel
#

yes its the correct file

restive elm
#

(1.19) Hello, I hope you're doing well.
(Using NMS) I want to change skeleton's shotting speed and I found some threads, but that didn't work in code. anyone have an idea?

tender shard
pseudo hazel
#

okay

echo basalt
#

since it's tracked by a cooldown field in one of its pathfinder goals

pseudo hazel
#

?paste

undone axleBOT
echo basalt
#

I've done that before by using reflections

pseudo hazel
echo basalt
#

or you can just override the goal with your own

tender shard
#

what's TaskListsData line 32?

restive elm
pseudo hazel
#

Message.log(((List<BingoTask>) data.getConfig().get(listName)).toString());

echo basalt
#

set it to 1 instead of 0

pseudo hazel
#

using getList makes it fail at actually getting the list

echo basalt
#

also setAccessible

tender shard
pseudo hazel
#

I assume you mean List of maps and not a map of lists?

tender shard
#

erm yes

#

sorry I directly typed it into discord

#

i typed Map<List because the method is called getMapList lol

pseudo hazel
#

I think im supposed to say its a a map of string.object somewhere

rotund ravine
#

that's not a maplist

#

what

pseudo hazel
#

🤷‍♀️

tender shard
#

ofc it's a list of maps

tender shard
#

the first entry is a map [data: ..., type: "ITEM"] for example

rotund ravine
#

huh???

#

it's a serialized bingotask

tender shard
#

data itself is a map

rotund ravine
#

what u on about

pseudo hazel
#

I mean I would expect it to be a lis of serializable yeah

#

since both bingotask and the data are configserializable

tender shard
#

yes but somehow it doesnt do that for lists, as it seems, idk

rotund ravine
#

It should

tender shard
#

anyway, anything in yaml that's "key <> value" is a map

rotund ravine
#

true

pseudo hazel
#

well in any case... Inconvertible types; cannot cast 'java.util.List<java.util.Map<?,?>>' to 'java.util.List<java.util.Map<java.lang.String,java.lang.Object>>'

tender shard
#

try this alternatively

#

i stopped using ConfigurationSeriazable completely and instead always just write my own methods using ConfigurationSections since idk it always caused troubles somehow for me

pseudo hazel
#

yeah

#

even though this should be pretty straight forward

tender shard
#

yeah it should lol

pseudo hazel
#

I mean now it says the map is empty

tender shard
#

please actually do System.out.println(myConfig.saveToString())

#

it can't be that it's empty when it's not

#

something must be wrong with the path or the file in general or anything

pseudo hazel
#

no thats fine

#
    {
        Message.log(data.getConfig().saveToString());
        List<BingoTask> tasks = data.getConfig().getMapList(listName)
                .stream()
                .map(map -> BingoTask.deserialize((Map<String,Object>) map))
                .collect(Collectors.toList());
        return tasks;
    }```
quaint mantle
#

java.lang.IllegalAccessException: class xyz.sodiumdev.pocket.event.PacketManager cannot access a member of class xyz.sodiumdev.pocket.Pocket$1 with modifiers "public"

#

I'm not trying to access any members of xyz.sodiumdev.pocket.Pocket. What's happening here?

ocean hollow
#

Hi guys, can I give to player permission for 1 second?

#

like player.setPermission(); player.unsetPermission();

tender shard
#

yes, you need a custom permission attachment

#

1 sec

#
        PermissionAttachment attachment = player.addAttachment(this, "myplugin.mypermission", true);
        Bukkit.getScheduler().runTaskLater(this, () -> player.removeAttachment(attachment), 20L);
#

oh wait

#

there's also addAttachment(Plugin, String, boolean int)

#

where int is the amount of ticks

#

so you don't even need to remove it yourself

#
player.addAttachment(myPlugin, "my.permission", true, 20);
```for one second ^
tender shard
# pseudo hazel

hm I see that you're now calling it CHEESE, earlier you sent a config where it was called LIST

#

and not CHEESE

pseudo hazel
#

dw, I changed it

tender shard
#

kk then no clue

#

I just tried it, and for me your config indeed returns a MapList

pseudo hazel
#

my actual list name is CHEESE because I recreate it right before getting it just to test my serialization

pseudo hazel
#

well yeah I can make it return a map list but its empty for me

pseudo hazel
#

anyways thanks for the help

tender shard
#

very weird

#

what happens if you loop over yourCOnfig.getKeys(true) ?

quiet ice
#

But yeah, show full stacktrace

tardy delta
#

hottest onDisable ever made

#

sorry just wanted to post that

quaint mantle
tardy delta
#

dont dare

quiet ice
#

Also, it might be possible that it is not possible to make static package-private method public

#

Or well accessible through reflection

zealous osprey
#

Ah yes, more regex fun... Here's my current string:
Items[0].tag.StoredEnchantments[0].lvl[0].id
And I want that last 0 to be replaced with ..
I'm trying smth with positive lookahead like this:
0(?=]) which does give me only the 0, but all of them and not just the last one. Might someone have some insight or tips?

pseudo hazel
# tender shard very weird

fyi i fixed it by cheating a bit, I now store it as a map of hashcodes and tasks, meaning I get get then values without using a dumb list

#

and its useful since I can use the codes as checking for duplicates which I dont want anyways

quaint mantle
quiet ice
#

And always use e.printStacktrace

#

not System.out.println(e) or similar

quaint mantle
#

Yeah I know

zealous osprey
quaint mantle
#

Here's the full stacktrace

quiet ice
#

Did you ever make that method accessible?

quaint mantle
#

Wdym?

quiet ice
#

okay then you did not

quaint mantle
#

🤦‍♂️

#

Stupid me

#

Now it works, lol

tardy delta
#

does anyone knows if theres a method in the File class to return the name without extension? ig i can just replace it myself

tender shard
#

i mean, what do you consider an extension?

#

myarchive.tar.gz

#

should that now return myarchive or myarchive.tar?

#

what about .files

#

like .ssh

#

i doubt there's a builtin way to get rid of "extensions" since the extension is basically just part of the name

quiet ice
#

The extension is generally everything past the first dot

tardy delta
#

in the case of lang.yml i was thinking of the .yml

#

ig i can use some regex to replace everything past the dot

tender shard
tardy delta
#

replaceLast("\\.*", "")?

quiet ice
#

if only replaceLast was to exist

#

x.substring(0, x.lastIndexOf('.'))

tender shard
tardy delta
#

ugh

#

not much better than storing the name without the extension as im currently doing XD

quiet ice
#

Actually it's x.substring(0, x.lastIndexOf('.') == -1 ? x.length() : x.lastIndexOf('.'))

tender shard
#

parsnip

quiet ice
#

Alternatively, just strip the last 4 chars

#

Though for that you'd need to make sure that the user uses FAT-12 or similar

tender shard
#

lol

tardy delta
#

ig JavaPlugin#getResource also works with the extension

#

just refactoring some old code

quiet ice
#

Unless you seriously want to sell that java's URLClassloader is seriously broken

gray merlin
#

Should I use PotionEffect.apply(entity) or entity.addPotionEffect(PotionEffect)?

tardy delta
#

lemme guess the first one is deprecated?

tender shard
#

its the same

tender shard
#

it's exactly the same

gray merlin
#

It's exactly the same

#

But both exist, and one must be better than the other, right?

#

Either that or it's just a convenience for use cases

tardy delta
#

just choose one

quaint mantle
#

How can I listen for player input without any visual lag?

#

I'm thinking of seating the player on top of a vehicle and then listening to some packets to get the input

tardy delta
#

player input? you mean like playermove event?

quaint mantle
#

Yes, but listening to playermove event and canceling it creates visual lag

tardy delta
#

understandable

#

isnt that packet sent every time that event fires tho?

river oracle
#

Can you even do that?

#

Because the client tries moving the server gets the move packet and says no essentialy

quaint mantle
#

Okay so there is the ServerboundPlayerInputPacket

#

Which basically gets player input from a player in a vehicle

gleaming grove
#

It is send for all kind of vechicles or just boats?

quaint mantle
#

All kind of vehicles

gleaming grove
#

even when player sit on zombie?

quaint mantle
#

I think so

tardy delta
#

sitting on a zombie 🤔

river oracle
#

Is there a way to exclude certain packages from a dependency with maven

gleaming grove
tardy delta
#

oh

river oracle
#

/ride

tardy delta
#

acf crazy

tender shard
#

dont use bukkit command managwer

#

always use the paper one

tardy delta
#

even when running spigot 💀

tender shard
#

yes

tardy delta
#

doesnt it use paper specific stuff?

tender shard
tardy delta
#

im using paper anyways so ig i can change it

harsh badge
quaint mantle
#
public class MainListener implements PacketListener {
    @PacketHandler
    public void onSteerVehicle(Player p, ServerboundPlayerInputPacket e) {
        float sideways = e.getXxa();
        float forward = e.getZza();
        boolean isJumping = e.isJumping();

        p.sendTitle("", String.format("Sideways: %s ; Forward: %s ; Jumping: %b", sideways, forward, isJumping), 10, 15, 10);
    }
}
``` What do y'all think about this packet listening thing I made?
quaint mantle
#

Is using base 64 to serialize and deserialize itemstacks bad especially for player vaults

sterile token
#

It's okay

quaint mantle
#

even if im storing it all in a db?

sterile token
#

Yes is okay

#

Atleast most people use it like that for item serializatiom/serializatiom

tardy delta
#

?ask

undone axleBOT
#

If you have a question, please just ask it. Don't look for staff or topic experts. Don't ask to ask or ask if people are awake or available. Just ask the question to the channel straight out, and wait patiently for a reply. Make sure you use the right channel regarding the topic of your question. Create a thread in case the channel is already in use!

atomic swift
#

[16:36:08 WARN]: [Skills] Task #566822 for Skills vSkills generated an exception java.lang.NullPointerException: null
how can i figure out where and why this is happening

tardy delta
#

?paste the whole stacktrace

undone axleBOT
atomic swift
#

thats why im asking how to show it

tardy delta
#

there must be more than that

atomic swift
#

thats it

#

and if i add a try-catch for a NullPointerException i just get java.lang.NullPointerException

tardy delta
#

that skills plugins is yours right

atomic swift
#

yes

tardy delta
#

and //paste is worldedit?

#

or is that your command

atomic swift
#

thats nothing with my plugin that caused it

tardy delta
#

is it just throwing even if you arent doing a command?

atomic swift
#

yes

#

have a bukkitrunnable

tardy delta
#

ah where are you doing runnables

#

paste code

atomic swift
#
public static void run() {
        final JavaPlugin plugin = Main.getInstance();
        
        
        Bukkit.getScheduler().scheduleSyncRepeatingTask(plugin, new Runnable() {
            @Override
            public void run() {
                try (ResultSet rs = Main.database.query("SELECT * FROM auctionitems;")) {
                    while (rs.next()) {
                        try {
                        long time = rs.getLong("time");
                        String winnerid = rs.getString("winner");
                        if (System.currentTimeMillis()>=time && winnerid == null) {
                            
                            String ownerid = rs.getString("ownerid");
                            
                            int id = rs.getInt("id");
                            
                            String bidderid = rs.getString("bidder");
                            int bidprice = rs.getInt("bidprice");
                            
                            
                            OfflinePlayer bidder = Bukkit.getOfflinePlayer(UUID.fromString(bidderid));
                            OfflinePlayer owner = Bukkit.getOfflinePlayer(UUID.fromString(ownerid));
                            
                            if (bidder != null) {
                                Economy.addBalanace(owner, bidprice);
                                updateId(id,"winner",bidderid);
                            } else {
                                updateId(id,"winner",ownerid);
                            }
                        }
                        } catch (NullPointerException ex) {
                            ex.printStackTrace();
                        }
                    }
                } catch (SQLException ex) {

                }

                
                
            }
        }, 0L, 20L); //0 Tick initial delay, 20 Tick (1 Second) between repeats
    }
tardy delta
#

a lot can be null lol

atomic swift
#

time= NOT NULL
winner = NULLABLE
ownerid = NOT NULL
id = NOT NULL
bidprice = NULLABLE

#

thats the table columns

tardy delta
#

dunno what ResultSet#getInt returns when there is no such data

#

0 ig

atomic swift
tardy delta
#

docs say 0

atomic swift
#

hmm

tardy delta
atomic swift
#

well that shouldnt matter though

#

because time and id will NEVER be null

#

and bidprice will be 0 if bidder is null

tardy delta
#

bidderid or ownerid null?

atomic swift
#

ownerid will never be null

lime crater
#

i'd say put a few breakpoints and let the debugger find the null

tardy delta
#

put a few sysouts

lime crater
#

it could always be a simple mistake like a mistake while typing.
like how you have the add balanace, if that happened in the database, it might have issues finding a column and have default null and by that also causing your error

atomic swift
# tardy delta put a few sysouts
[16:51:17 WARN]: java.lang.NullPointerException
[16:51:18 INFO]: [Skills] [STDOUT] time: 1674404828116
time: 1674404828116
bidprice: 0
id: 1
ownerid: 5ba49baf-a49e-4130-aea2-002bea5ed8e8
winnerid: null
tardy delta
#

uhh idk what is null now

#

remove that catch nullptr

#

why are you doing that sync too

atomic swift
#

AuctionHouse

#

heres my table reference

Main.database.update("CREATE TABLE IF NOT EXISTS auctionitems (id NUMERIC NOT NULL, "
    + "itemstring BLOB NOT NULL, "
    + "ownerid TEXT NOT NULL, "
    + "orginalprice NUMERIC NOT NULL, "
    + "winner TEXT, "
    + "time NUMERIC NOT NULL, "
    + "bidder TEXT, "
    + "bidprice NUMERIC"
    + ");");
glossy venture
#

idk if thats the problem

atomic swift
#

String winnerid = rs.getString("winner");

glossy venture
#

ok

#

nvm then

quaint mantle
#

are itemstring or original price null?

atomic swift
quaint mantle
#

also why are you selecting that every second lol

atomic swift
#

why not lol

#

ill change it to 2 seconds

quaint mantle
#

db is something you load from once and store to when needed

echo basalt
#

y'all are missing the obvious part that he's running it on the main thread

quaint mantle
#

preferably async as well

#

yeah

upbeat hornet
#

how do I create a new location?
Currently, I'm stuck on getting the world.

new Location(World world,32.0, 167.0, 85.0))

How do I set the world?

atomic swift
#

Bukkit#getWorld()

tender shard
#

get the world from an existing player / entity etc, or through Bukkit.getWorld

glossy venture
#

you get the world using Bukkit.getWorld

#

or from an event, entity, block, etc

upbeat hornet
#

ty

tardy delta
quaint mantle
#

hahahahahaha

tardy delta
#

who i found here

sterile token
#

You all said that because You havent seen one of My client which was calling me bot all time whenever he dm me

civic prairie
subtle folio
remote swallow
#

actually its called a Map<Map<Map<Map, Map>, Map>, Map>

atomic swift
#

why is this taking name not UUID OfflinePlayer bidder = Bukkit.getOfflinePlayer(UUID)

remote swallow
#

what version

atomic swift
#

1.18.2

#

like my ide shows UUID but when using it it gives a NPE saying name is null

remote swallow
#

where are you trying to get name

atomic swift
#

exactly

remote swallow
#

because getOfflinePlayer(UUID) exists

atomic swift
#

ik

remote swallow
#

whats line 117 of ah.java

atomic swift
#

OfflinePlayer owner = Bukkit.getOfflinePlayer(UUID.fromString(ownerid));

remote swallow
#

whats ownerId

atomic swift
#

String ownerid = rs.getString("ownerid");

#

NEVER NULL string

remote swallow
#

what is in the db?

atomic swift
#

uuid

#

mine

remote swallow
#

well yeah, sysout the uuid before doing UUID.fromString

atomic swift
remote swallow
#

and?

atomic swift
#
time: 1674404828116
bidprice: 0
id: 1
ownerid: 5ba49baf-a49e-4130-aea2-002bea5ed8e8
winnerid: null
remote swallow
#

how your managing to npe on a valid uuid is confusing

atomic swift
#

i agree

humble tulip
#

Print everything

atomic swift
#

i did

#

any ideas?

humble tulip
#

Which line is null?

atomic swift
#

117

humble tulip
#

I just saw ur issue

#

Can u reply to ur code

#

So i can see where you posted ot

humble tulip
#

What's line 117

humble tulip
#

I cant tell what's line 117 frm that

#

You have to tell me from your ide

#

Also

atomic swift
#

that is the line

humble tulip
#

Ah ok

#

It's saying ownerId is null

atomic swift
#

ye

humble tulip
#

Print owner id

atomic swift
#

i did

humble tulip
#

And did it error when you did?

atomic swift
#

no after on line 117

humble tulip
#

So you printed it, it printed a uuid and then it still errored?

atomic swift
#

ye

humble tulip
#

Based off what you told me

#

It sounds like java isn't working

#

Which I very much doubt

atomic swift
#

sometimes i just get [18:17:56 WARN]: [Skills] Task #45756 for Skills vSkills generated an exception java.lang.NullPointerException: null

remote swallow
#

version Skills be like

atomic swift
#

yep and the jar is Skills-0.0.1-SNAPSHOT and i have 3 classes with the same name

#

so gg

humble tulip
#

Oh btw the reason it says name is null is that UUID.fromString takes a String called name

#

And that is null

atomic swift
#

and still makes no sense

humble tulip
#

Reboot your system lmao

#

Lemme see how you insert ownerid

atomic swift
#
    public static void addItem(ItemStack item, Player player, int price,long time, OfflinePlayer winner) {
        System.out.println("\n"+(getItemCount()+1)+"\n"+ItemStackSerializer.toComplexString(item)
        +"\n"+player.getUniqueId()+"\n"+(winner!=null ? winner.getUniqueId() : null)+"\n"+time+"\n"+null+"\n"+null);
        
        
        Main.database.update("INSERT INTO auctionitems VALUES (?,?,?,?,?,?,?,?)", 
                (getItemCount()+1),
                ItemStackSerializer.toComplexString(item),
                player.getUniqueId(),
                price, 
                (winner!=null ? winner.getUniqueId() : null),
                time,
                null,
                null);
    }
remote swallow
#

why

atomic swift
#

in my command info.sokobot.skills.ah.Ah.addItem(player.getEquipment().getItemInMainHand(), player, Integer.valueOf(args[1]),duration.plusHours(time).toMillis(), null);

atomic swift
remote swallow
#

it looks like you dont know how to code

atomic swift
#

i do

humble tulip
#

What does update do?

#

Prepare a statement and insert?

atomic swift
#

update?

#

you mean updateId?

remote swallow
#

Main.database.update

#

?di

undone axleBOT
atomic swift
#
    public void update(String sql, Object... preparedParameters) {
        try (PreparedStatement ps = con.prepareStatement(sql)) {
            int id = 1;
            for (Object preparedParameter : preparedParameters) {
                ps.setObject(id, preparedParameter);
                id++;
            }
            ps.executeUpdate();
        } catch (SQLException ex) {
            ex.printStackTrace();
        }
    }
gray merlin
#

Hey there! I'm doing this...

String effects = itemEffects.get(PluginConstants.EFFECTS_KEY, PersistentDataType.STRING);
if (effects == null) effects = "";

// Adds the new effect to the string, and sets the item's pdc.
effects += effect.getType().getName() + ":" + effect.getAmplifier() + ":" + applierType.name()
itemEffects.set(PluginConstants.EFFECTS_KEY, PersistentDataType.STRING, effects);

And for some reason my item's PDC isn't getting updated. Thoughts?

atomic swift
humble tulip
#

@atomic swift ur passing a uuid object

#

Pass uuid.toString

gray merlin
humble tulip
#

And then see if it works

atomic swift
#

well let me change me ah to 1 min

humble tulip
#

Idk if uuid is inserted as a string if you use setObject

atomic swift
#

it should im uploading rn

humble tulip
atomic swift
# humble tulip And then see if it works
[18:34:06 WARN]: [Skills] Task #110618 for Skills vSkills generated an exception
java.lang.NullPointerException: null
[18:34:07 INFO]: [Skills] [STDOUT] time: 1674412409819
time: 1674412409819
bidprice: 0
id: 1
ownerid: 5ba49baf-a49e-4130-aea2-002bea5ed8e8
winnerid: null
humble tulip
#

Bruh

#

The bidder is tje problem

#

I just looked at ur ckde

untold jewel
#

Any good scoreboard apis for 1.19+?

humble tulip
#

You didn't debug properly

atomic swift
humble tulip
#

So much for printing everything

atomic swift
#

lol

humble tulip
#

You even showed the wrong line

atomic swift
#

i didnt

humble tulip
#

You did

atomic swift
#

i did lol

#

i added a line

#

better?

                            OfflinePlayer owner = Bukkit.getOfflinePlayer(UUID.fromString(ownerid));
                            if (bidderid != null) {
                                OfflinePlayer bidder = Bukkit.getOfflinePlayer(UUID.fromString(bidderid));
                                Economy.addBalanace(owner, bidprice);
                                updateId(id,"winner",bidderid);
                            } else {
                                updateId(id,"winner",ownerid);
                            }
humble tulip
#

Learn to read stacktraces

sterile token
humble tulip
#

This should've been easy to solve but you showed us the wrong line

sterile token
#

You mustnt be coding without knowing to read stracktraces

atomic swift
humble tulip
#

Tbf

humble tulip
#

Lmao

atomic swift
#

i got nothing the first time

sterile token
#

LMAO

atomic swift
#

and every time i did it i got no stacktrace

humble tulip
#

When you add a line before the error ofc the old stacktrace is no longer valid

atomic swift
#

time to fix db issues

sterile token
#

To conclude please don't code of You won't learn basic Java

#

😂😂

#

That is My final recoemdnatiom

atomic swift
#

ngl kinda funny almost every time i ask here someone says something like "do you know java"

quaint mantle
#

Is this minecraft or is something cuasing the items to be added to my invenventory and is there a way to prevent it?https://imgur.com/a/8ognN38

sterile token
winged anvil
#

i said the same thing when i was first learning and they were right

atomic swift
humble tulip
#

So it adds the dropped items to your inv

sterile token
quaint mantle
#

Thats not what the code does unfortunely

humble tulip
#

??

humble tulip
humble tulip
quaint mantle
#
            event.getPlayer().sendMessage(ChatColor.RED + "You're unable to drop items whilst in the kit editor...");
            event.setCancelled(true);
sterile token
#

Send full event causinf issue

#

No only one piece

humble tulip
#

PlayerDropItemEvent?

quaint mantle
#
    @EventHandler(ignoreCancelled = true)
    public void onDrop(PlayerDropItemEvent event) {
        if (kitEditing.containsKey(event.getPlayer().getUniqueId())) {
            event.getPlayer().sendMessage(ChatColor.RED + "You're unable to drop items whilst in the kit editor...");
            event.setCancelled(true);
        }
    }
humble tulip
#

Listen to the inventory clicl event

#

Of they click outside the inv

#

Cancel it

winged anvil
#

but definitely frustrating when people ask for help and dont know the basics i agree

quaint mantle
humble tulip
#

If they click outside, clicked inventory is null

sterile token
#

Yeah also not because we are sshole, it's because devs Will explain You really technnical things which id You don't know them You won't understand

humble tulip
#

Check if clicked slot is < 0

winged anvil
quaint mantle
#
    @EventHandler(ignoreCancelled = true)
    public void onMenuDrop(InventoryClickEvent event) {
        if (event.getClickedInventory() == null && kitEditing.containsKey(event.getWhoClicked().getUniqueId())) {
            ((Player) event.getWhoClicked()).sendMessage(ChatColor.RED + "You're unable to drop items whilst in the kit editor...");
            event.setCancelled(true);
        }
    }

That good?

#

this is 1.8 ()

#

Shush

#

im aware

gray merlin
sterile token
undone axleBOT
gray merlin
#

?1.9

#

pain

#

?1.7.10

#

i will stab this bot

sterile token
#

If You are om legacy versioms You cannot expect yo get support please move to 1.19

#

Maybe some.ppl help but it's really oddy to code on legacy versioms

quaint mantle
sterile token
quaint mantle
winged anvil
#

?paste

undone axleBOT
winged anvil
#

is there a way to unregister listeners or would i just have to use a boolean flag with an early return inside each event i use

rotund ravine
#

?jd-s

undone axleBOT
charred blaze
#

is there any event for when snowball moving on top of water (when soulsand is on the bottom)

quaint mantle
#

doesnt hypixel use 1.6

#

still

#

No clue but minecadia and mineman club are 2 big servers that come to mind straight away for 1.8

charred blaze
humble tulip
charred blaze
#

because

winged anvil
#

kisses

humble tulip
#

Or u can unregister specific events by getting the handlerlist

quaint mantle
#

but yeah

charred blaze
#

/glow command is not available in 1.6 its impossible

quaint mantle
#

ong

#

not the beaners tho

quaint mantle
#

they still play a shit ton

charred blaze
#

lmao

rotund ravine
#

There's ProjectileLaunchEvent

charred blaze
rotund ravine
#

You can track them after launch

charred blaze
quaint mantle
charred blaze
#

and check if its water?

quaint mantle
#

Yup

charred blaze
#

hmm

#

ill try that

rotund ravine
#

Like you'd usually do. Save them somewhere or similar and then check every once in a while if it is in water or whatever.

charred blaze
#

wouldnt that be a bit laggy?

#

to check every snowball's loc

rotund ravine
#

Well, just split it up in batches

humble tulip
#

What happens when snowballs are in water with spuld sand under?

quaint mantle
#

^

charred blaze
#

and lagging the server

#

tps was 9 last time i checked

humble tulip
#

Wdym "moving on top"

quaint mantle
#

Use that event, check if snowball, then check location of snowball and get the block below it or where it lands if its water check if soul sand below and then cancel

charred blaze
#

wouldnt it give me a thrower's location?

quaint mantle
#

Ive done this same method but for sugarcane so you cant break bottom sugarcane

charred blaze
#

if im doing it on projectile event?

quaint mantle
#

No

charred blaze
#

why

quaint mantle
#

Projectile is the snowball

charred blaze
#

how does that work

humble tulip
#

Or give snowballs a "lifetime"

charred blaze
humble tulip
#

When a snowball is spawed add to a map snowball, long

quaint mantle
#

Yh thats a good idea

charred blaze
humble tulip
#

Then check every5-10 seconds

#

Can do that too

charred blaze
#

ok ill use it

gray merlin
#

Hey there! I'm doing this to remove specific effects from a player... java effects.forEach(x -> event.getPlayer().removePotionEffect(x.getType()));

humble tulip
#

Cme?

gray merlin
#

However it doesn't seem to work. The effect doesn't disappear.

#

I should mention that it's an infinite effect in duration

humble tulip
#

Is there an error?

gray merlin
#

nope

humble tulip
#

Sure?

gray merlin
#

it just doesn't get removed

gray merlin
humble tulip
#

Gotta send a captcha

gray merlin
#

oop

#

Anyhow, /effect clear works correctly.

humble tulip
#

What is effects btw?

gray merlin
#

Haste

humble tulip
#

No i mean

gray merlin
#

oh

#

Potion Effects

humble tulip
#

What is effects that you're doing foreach om

gray merlin
#

oh

humble tulip
#

From where?

gray merlin
#

It's from a list with objects called EffectAmplifierMap. Each then returns the type with .getType, which calls meta.getCustomEffects().get(0).getType();

#

it's all in order, and everything should work, but it just does not

humble tulip
#

so this is a Set<PotionEffect>?

#

or something?

gray merlin
#

Proof that getType returns correctly

gray merlin
humble tulip
#

weird

#

that should work

gray merlin
#

And here's it getting called with no errors

gray merlin
humble tulip
#

player.getActivePotionEffects and the effects list you're iterating

gray merlin
#

ah wait

#

it was my mistake

#

on the custom events

#

pain

#

my bad xD

#

yeah works now

#

I made an OnItemHeld and OnItemUnheld, and sometime ago I rewrote them and copypasted the stuff from held to unheld, since they're similar

#

but forgot to modify them

#

i only modified the remove/add effect part

#

not the checks for items actually being held or unheld

#

so it was doing held logic on unheld

final monolith
#

how to compile a system scoped dependency with maven?

rotund ravine
#

like normal?

final monolith
final monolith
remote swallow
#

system scope bad

#

mvn install good

final monolith
#

how i can add a jar into maven with a normal scope?

tender shard
#

system scope within the project path is deprecated and will be removed in maven 4

tender shard
tender shard
quiet ice
#

Or use file://-repos

tender shard
#

but then you also need all the pom files and stuff

quiet ice
#

Although I never used that hack in maven yet

quiet ice
tender shard
#

hm anyway, mvn install is the only proper way

quiet ice
#

I'd argue that file:// repos are the proper way, but you do you

#

(although both are equally cursed solutions)

tender shard
#

how is mvn install cursed?

quiet ice
#

It isn't present in a maven repository that is (easily) accessible to 3rd party crawlers

remote swallow
#

heh?

#

why would you care about mvn installing something to your maven local

#

if its not gonna have anyone else see it

tender shard
quiet ice
tender shard
#

what's easier than mvn install though

quiet ice
final monolith
#

Its possible to create a maven repository on a web hosting? or i need a vps or something?

quiet ice
quiet ice
spring pike
#

hello, I want to instantly respawn when dying. This method works, but there's still the respawn button screen thing, even though I respawned. I can press it and it just closes the death screen since I already respawned, how remove?

tender shard
tender shard
#

i think we are talking about different things

quiet ice
tender shard
#

the situation for which I recommended mvn install was that someone had some .jar, e.g. spartin-api.jar that they now ant to use in their pom.xml

gleaming grove
tender shard
humble tulip
#

Yoi can't cancel pde

rotund ravine
spring pike
humble tulip
#

You can respawn 1 tick later OR

#

Listen to entity damage event

tender shard
quiet ice
spring pike
#

even procrastinating in minecraft

humble tulip
#

And if they're dead, tp, reset health etc

rotund ravine
#

meh

#

seems like he needs to think there

tender shard
#

also you'd have to manually drop their items

#

drop their XP and calculate the amount they would dro

#

sounds like way too much pain. rather I'd just stop the "you are dead" packet from reaching that player

#

or just live with the fact that the button is visible for 1/20th second

tender shard
#

yeah but it'll still be visible for one tick

#

but as said, who cares

spring pike
#

funny, I change worlds when I respawn, before I implemented the auto respawn it would take 2 seconds to load, now it's instant

#

is there a way to do that when changing worlds without dying?

quiet ice
#

i.e. something like that works great

sterile token
#

Lmao i'm exausted my IDE it's telling me that cannot access to an interface

quiet ice
#

what are you doing again

sterile token
#

But everythimg is okay, the modules are loaded by maven, the paxkage is okay

tender shard
#

new List<>();

quiet ice
#

if it's that I'm jumping ship

quiet ice
#

Although I think it's new Zombie() or similar

#

Alternatively, attempting to implement a package-private interface in another package

sterile token
#

I have a core module which contains an interface called CommandHandler, then another module called Spigot which implements the interface i having issues. Finally when requering spigot module from a

CommandAPI command = new CommandAPI(plugin);

command.register();

#

So in that case i cannot access to any method and the IDE just tell cannot access to CommandHandler

#

It doesnt make sense what happening, because if the modules dependencies are okay, the package id is correct, imports, etc

sterile token
sterile token
quiet ice
#

Does that CommandAPI class implement register?

sterile token
#

And i checked the imports, mainly everything that may be causing that

quiet ice
#

Okay, and is the CommandHandler class on the build classpath?

sterile token
quiet ice
#

then make sure that you depend on the right modules

sterile token
quiet ice
#

And make EXTRA sure that you don't end up with recursive dependencies

#

i.e. core depends on api and spigot depends on core.

sterile token
quiet ice
#

But api does not depend on core while core depends on api. That will be very nasty

#

And core's pom.xml?

livid dove
#

As a sanity check, assuming 60 players and 24 gb is this patern of ram usage normal?

sterile token
#

Core module

livid dove
#

Got one plugin im a bit suspicious of and might need to do some recoding

remote swallow
#

?flags mgiht also help

undone axleBOT
livid dove
remote swallow
#

they boost server performance

#

their startup flags

sterile token
quiet ice
quiet ice
regal scaffold
#

Hey

livid dove
#

also im getting null point exceptions from structure growth events with pwns plnt growth plug

quiet ice
#

What does it think the classpath is?

regal scaffold
#

How can I make my plugin load before everything

#

Could not set generator for default world 'lobby': Plugin 'BorderRealm v1.0-SNAPSHOT' is not enabled yet (is it load:STARTUP?)

#

I need to use it as a default world generator

sterile token
quiet ice
sterile token
quiet ice
#

Your IDE should tell you what jars are available. I want that list

remote swallow
sterile token
regal scaffold
#

What do you mean

remote swallow
#

in plugin.yml

regal scaffold
#

Ohhhhh

#

Can I load my entire plugin or that would break things right?

quiet ice
sterile token
remote swallow
sterile token
#

Because its tell you only the global dependencies, not the modules one

quiet ice
#

IJ moment

sterile token
quiet ice
#

I'll tell you that much: I wouldn't be seeing that type of issues on eclipse

quiet ice
sterile token
#

Wait

#

Now when i compiled atleast i get an error, which i wasnt getting yesterday

#

Okay im really confuse, worked with more than 1y with multi modules

#

And now i have this shity issues 😡 😡 😡

rotund ravine
twin venture
#

small questions Class.forName("com.mysql.cj.jdbc.Driver") this is not working for some users that use my plugin it say classNotFound etc etc

#

i tried to add the mysql to pom , but the plugin size will increase .

#

how i can fix it?

twin venture
civic prairie
#

how can i solve this?

rotund ravine
#

Why are you afraid of plugin size increase

civic prairie
twin venture
#

not normal haha

remote swallow
rotund ravine
#

?paste

undone axleBOT
remote swallow
#

what is that artifact id