#help-development

1 messages ยท Page 1480 of 1

keen kelp
#

just TIme

#

real life time

proper notch
#

Not timew

keen kelp
#

no?

proper notch
#

ScheduledExecutorService#schedule

keen kelp
#

this ignores lag?

#

and uses real time?

ornate heart
#

I see. Thank you

eternal oxide
#

System.currentTimeMillis() or as roller said, an Executor service as that runs on the system clock

proper notch
#

Yh a scheduled executor uses its own thread so is separate from the main thread of the server and yh ^^

#

based off ur system clock

keen kelp
#

coool

#

not useful for me now but Ill keep that in mind

proper notch
#

just make sure ur not making tons of different scheduledexecutors because you only need one and each one you make will create a thread. So just use one instance to schedule all your stuff.

keen kelp
#

ok

#

so if I want something to be ticker based I would want
scheduleSyncRepeatingTask
correct?

ornate heart
#

Why does it have to be sync

proper notch
#

idk specific spigot methods as i havent used spigot in like 4 months ngl lol

#

lemme check docs

#

Yh.

proper notch
ornate heart
#

Ah gotchu

#

Wait so what is the different between using that and ScheduledExecutorService#schedule

proper notch
#

A ScheduledExecutorService is based of real time and runs on its own thread

#

The bukkit scheduler uses ticks

keen kelp
#

I suppose one it on main thread and one is speret?

#

or however you spell it

#

seperate

quaint mantle
#

Found out that setChestLocation is not the issue because it can't even be called? Something must be wrong with the BlockBreak event class (arenaManager.setChestLocation(event.getPlayer(), event.getBlock().getLocation());)

proper notch
#

If you schedule using the bukkit scheduler and have 10 TPS it'll run later than with 20 TPS. That doesn't mean the bukkit scheduler is obsolete though. You should still be using it unless you need something to be based off real-world time

#

You'd use a scheduled executor service for things like daily quest resets, island top recalculations, etc.. things that people will be annoyed if they change time over a longer period

ornate heart
#

Gotchu

keen kelp
#

so what do I use if I want something to run based on ticks

proper notch
#

Bukkit.getScheduler().scheduleSyncDelayedTask(Plugin plugin, Runnable runnable, long tickDelay)

#

or a different method if you want it to be repeating

ornate heart
#

Couldnโ€™t you use runTaskTimer as well

proper notch
#

oh yh for that you do

quaint mantle
#

^^

hybrid spoke
#

which is just null

eternal oxide
#

Don;t destroy player entities

keen kelp
#

is there an event for a player getting put out of their fire?

stone sinew
keen kelp
#

nope :/

storm monolith
#

Does someone know how I can clear default's pathgoals of a mob using NMS?

paper viper
keen kelp
#

how do I reduce a player's invincibility time

#

like whenever they get hit

#

since EntityDamageEvent is before they get hit

stone sinew
keen kelp
#

how do I like change their damage tick instead

cloud berry
keen kelp
#

wat

cloud berry
#

wat r u trynna do?

keen kelp
#

reduce a player's NoDamageTIck

#

from 4 to 2

paper viper
#

dont think you can do that

#

not sure

#

hm

#

there is no built in api

#

at least for this

cloud berry
#

nodamagetick... sry i feel liek i should kno wat taht is but i dont :I

paper viper
#

hes talking about

#

when you hit someone

#

they become invicible for like

#

4 ticks

keen kelp
#

it they turn red

paper viper
#

then you can hit them again

cloud berry
#

o.o

paper viper
#

he wants to shorten that

cloud berry
#

oh

keen kelp
#

in that time they can't take damage again

cloud berry
#

ok i see xD

lunar schooner
#

Hey there, what would be the best way to detect if a block get's updated by redstone? E.g a trapdoor or door opening/closing. I looked at BlockRedstoneEvent, but that's not quite it it seems

cloud berry
#

sounds like u might need a server patch for taht :I

keen kelp
#

no I dont think so

#

a lot of plugins already do this

#

all the duels plugin with combo

#

they remove player's damage ticks

white maple
#

how do I find a biome in 1.8.9?

cloud berry
white maple
#

or how do I make a biome?

keen kelp
#

ik that much but on what event

cloud berry
white maple
#

"_

#

๐Ÿ™‚

lunar schooner
white maple
#

1.8.9

#

yes

lunar schooner
#

I know, but I asked if you're looking for similar behaviour

#

I happened to have worked that out recently

white maple
#

nice

lunar schooner
#

albeit for 1.16, but it should give you a good sense of what direction to look in

cloud berry
keen kelp
#

I give up

cloud berry
#

idk if it's a one time thing doe :I

keen kelp
#

Imma figure it out myself

cloud berry
#

@jade perch oi u posted it xD cn u halp us we r noob

spare glen
#

is there any method we can check if players inventory is full or not. I found getSize() Method but i think its a constant as per entity

jade perch
#

whut

spare glen
#

thnx

dusty herald
#

you do realize bukkit dev threads and spigot threads answer this question 100x over

cloud berry
#

u say entity.setNoDamageTicks(0); but guy dosent kno wher 2 put that

lunar schooner
jade perch
#

on the entity -.-

cloud berry
#

hmmmm

#

@keen kelp try putting it on th entity damage event .-.

#

if it dont work then put it inside a Runnable taht runs on th next tick

#

(is wat id try)

jade perch
#

It won't work if you do it in the event

#

the event tells you it's about to happen

cloud berry
#

ah :I rite ok yea next tick then

proud basin
#

Anyone know how I can force open a written book 1.8?

dire marsh
#

update to 1.16 and use the Player#openBook method

digital rain
#

maybe not a question here, but did the assets folder change when 1.16 released?

proud basin
opal juniper
#

well, 1.8 is unsupported here

proud basin
#

Oh ok, my bad

dense goblet
proud basin
#

pvp

dense goblet
#

surely you can just get a plugin that gives 1.8 pvp on 1.9+

proud basin
#

I could but why would I?

dense goblet
#

because then everything else becomes a lot easier

near crypt
#

does anyone have a nice plugin coding idea or ideas? Not too hard?

ivory sleet
#

yes

digital rain
ivory sleet
#

code a vault implementation plugin skullcrafthd

near crypt
#

k

#

but no

#

something different

ivory sleet
#

hologram plugin

near crypt
#

oh yes thx

#

this is made by armor stands with names right?

ivory sleet
#

ye I think so

wraith prawn
#

Hello everyone. I want to confirm something about Skins on BungeeCord. I have a offline server and I'm trying to change player's skins. Investigating about it (it doesn't change my skin) I found that Bungeecord doesn't allow to change player skin. Is it correct?

opal sluice
#

You would need to use SkinRestorer

near crypt
#

cant you just do it with Spigot?

#

@wraith prawn

opal sluice
near crypt
#

oh yes okay true

opal sluice
#

The plugin basically apply the texture getting it by name on the mojang api and then modifying your server profile to update the skin

near crypt
#

how do i know with try catch error i need to use for what?

opal sluice
#

You should check the documentation of the methods you're using

dense goblet
#

depends what you have in your try

opal sluice
#

And the IDE will also give you an int

dense goblet
#

doing catch(Exception e) will work for any error

opal sluice
dense goblet
#

but generally its good practice to be as specific as you can

near crypt
dense goblet
#

you might have an error which is different than the one you're expecting to catch

opal sluice
dense goblet
#

and then you miss out on it

#

if you do have a catch(Exception e) I recommend doing e.printStackTrace

#

this is mostly for IO and such

#

if you expect catch to happen more often, either be more specific with the exception or try to avoid it in the first place

#

ideally the latter

opal sluice
#

If for example, you return a certain value from a certain exception and you catch all exceptions, if you run a method inside your other method, that could catch a runtime exception on the method you've called inside and totally bug your initial method

near crypt
#

so in the docs where do i have to look for the Exception?

opal sluice
#

Normally

dense goblet
#

what are you putting inside the try?

opal sluice
#

It always says "throws xxxException" in the doc

dense goblet
#

If you have a function which throws an error, intellij will tell you what it is when you hover over it

ivory sleet
near crypt
#

oh okay thx

opal sluice
dense goblet
#

if the method javadocs dont show up then click on the function call and press ctrl+q

dense goblet
ivory sleet
#

But hopefully all unchecked exceptions are documented

opal sluice
opal sluice
dense goblet
#

yea in that case you shouldn't be using a try/catch, instead check if the input is valid before sending it to the function

ivory sleet
#

I mean sometimes you have to try catch an unchecked exception

opal sluice
#

An unchecked exception, is an exception that should never happen but that you place here to be sure that doesn't get ignored if that happen

wraith prawn
opal sluice
wraith prawn
near crypt
#

this was old lol

wraith prawn
opal sluice
wraith prawn
opal sluice
#

By mojang website ?

wraith prawn
opal sluice
#

Your server needs to be in online mode

#

to allow the server to get the skin stored on the mojang server by the uuid

#

When you're in offline mode, the uuid changes

#

And so the skin doesn't exists in the mojang's database

#

Which returns an Alex/Steve skin

wraith prawn
opal sluice
#

What have you done by your way ? Be more precise pls ^^'

wraith prawn
opal sluice
#

Ok, so you got a custom plugin to change your skins

opal sluice
#

Then, you should update the player profile once you did get the new skin signature and texture

quaint mantle
#

Is the player "health scale" purely a Bukkit construct? I can't seem to find anything in nms and all i see is in CraftPlayer, changing the MAX_HEALTH attribute and sending packets

opal sluice
#

I would suggest looking at the SkinRestorer code on their github

cedar hamlet
#

simple question but for some reason i cant find online

#

how do i remove the item in the players hand

opal sluice
#

Set it to air

cedar hamlet
#

ah ok

#

ty

opal sluice
#

yw

storm monolith
#

Does someone know how I can clear default's pathgoals of a mob using NMS?

valid vigil
#

is someInventory.getContents().length always gonna equal someInventory.getSize()?

digital rain
#

any ideas how to edit generation loot tables instead of manually editing loot tables

#

or if its connected to an event maybe?

quaint mantle
#

lootgenerateevent?

worn tundra
#

Not sure, you can always experiment

valid vigil
worn tundra
#

Not sure

queen dragonBOT
grim sage
#

Hey guys, what is the best way you think to auto update a config file when there is a new plugin version with new config lines ?

sage swift
#

make them regenerate it if you're using default config api

grim sage
#

yes but if it regenerate it it will clean all settings ?

#

so I have to save the settings before

#

right ?

austere cove
#

set the config's (file) defaults (internal), then copy defaults (so all values set in internal but not in file are copied to the file), then save the config (file)

grim sage
#

Hum. Thanks but I'm not sure If I understand everything haha

#

all config file methods are pretty tricky xD

#

Ok I think I understand

#

I copy my file to default, I recreate my file and I copy default to my file

#

right ?

cedar hamlet
#
        p.getItemInHand().setType(Material.AIR);
        dur--;
        p.getInventory().addItem(Main.getItem(dur));
        p.updateInventory();

This is giving me the item I want, but not setting the main hand to air

#

how do i fix this?

bright kelp
#

it is just putting it in the first available spot

ivory sleet
#

p.getInventory().setItemInMainHand(null)

#

or was that what u wanted

cedar hamlet
#

null also does nothing

ivory sleet
#

thats not true

bright kelp
#

null is the same as deleting something

cedar hamlet
#

whats going on currently is as if nothing is happening at all

ivory sleet
#

p.getItemInHand().setType(Material.AIR);
this does nothing tho

bright kelp
#

yes

cedar hamlet
#

I tried null

#

i can try again

slim kernel
#

So I am spawning an fallingBlock and throwing it. most of the times it lands normal but sometimes it breaks. Can I somehow place a Block there where it breaks, so it looks like it didnt?

ivory sleet
#

because calling getItemInHand gives you a new ItemStack which isn't coupled to the one the player actually has in their inventory

bright kelp
#

you should do p.getInventory().setItemInMainHand()

cedar hamlet
#

what happens is that i still have the item in my hand and I get a new item in my inventory

#

ill try that

bright kelp
#

p.getInventory().setItemInMainHand(null);
p.getInventory().addItem(item you want to add);

#

and then update it

cedar hamlet
#

cool that works

#

tty

bright kelp
#

npnp

grim sage
#

I expose my problem once again haha : D

So, I'm using default config file for my plugin

When I update my plugin I add new config lines and I want my plugin to auto update my users config file with new lines. But the data my users already put in the config file have to not change !

If you can tell me how I can do it : D because I don't understand anything about the doc haha

ivory sleet
#

Well didnt phoenix tell you

grim sage
#

what methods I have to use

ivory sleet
#

Oh well I think you'd use
MemoryConfiguration#options#setDefault or smtng

tardy delta
#

how can i make a gui without the inventory part? i only want to show the encercled piece

ivory sleet
#

not possible

grim sage
#

Impossible I think you can just set the number of lines displayed

tardy delta
#

hmm

grim sage
#

but you can put glace panes in empty part for a more aesthetic rendering

slim kernel
#

So I am spawning an fallingBlock and throwing it. most of the times it lands normal but sometimes it breaks. Can I somehow place a Block there where it breaks, so it looks like it didnt? pls ping me if you answer thank you

cedar hamlet
#

is it possible to set a variable to an item? I have a "Teleport wand" with 100 durability, it works fine until you try to have another wand, then the durability links.

grim sage
keen kelp
#

is there a way to pass information from the attacker to the attackee

#

like when a player attacks a zombie

#

if the player is wearing a leather cap, the zombie doesn't get damaged

keen kelp
#

Listening to what

grim sage
#

EntityDamageEntityEvent

keen kelp
#

then?

grim sage
#

you check if damager is a player and have a leather cap

keen kelp
#

event.getAttacker?

#

instanceof PLayer

grim sage
#

and so you do event.setCanceled(true);

keen kelp
#

Player p = (Player) event.getAttacker

#

do the check thing

#

then event.setcanceled

near aurora
#

Might aswell write the plugin for him lol

grim sage
keen kelp
#

thx

eternal oxide
#

You also need to check if attacker is instanceof Projectile

keen kelp
#

why didn't I think of that smh

#

oh right.. projectiles

near aurora
#

You can check what entity it is aswell if needed.

keen kelp
#

the bane of my exisistence

eternal oxide
#

if Projectile get shooter

tardy delta
#

@eternal oxide for my lock command ๐Ÿ™„ should i store the lock on the pdc of the player or not?

#

so i cant get unloaded just like a chunk

near aurora
#

That's like who shoots an arrow the player or the skeleton.

cedar hamlet
#

@ me if you know anything for me

near aurora
eternal oxide
slim kernel
#

So I am spawning an fallingBlock and throwing it. most of the times it lands normal but sometimes it breaks. Can I somehow place a Block there where it breaks, so it looks like it didnt? pls ping me if you answer thank you

tardy delta
eternal oxide
#

it stays on the chunk PDC

#

If the chunk is unloaded it doesn;t matter whats in there

cedar hamlet
#

Say i have a stick with 27 durability left, i make a new one, i use it, the new one has 26 durability

#

as if i never made a new one

near aurora
#

Oh yeah you should able to just get the current value and add then new value on top.

cedar hamlet
#

wdym

tardy delta
# eternal oxide it stays on the chunk PDC

so what is this doing?

@EventHandler
    public void onChunkUnload(ChunkUnloadEvent event) {

        PersistentDataContainer container = event.getChunk().getPersistentDataContainer();
        BlockState blockState;

        for (NamespacedKey key : container.getKeys()) {
            if (key.getNamespace().equalsIgnoreCase(MagmaBuildNetwork.getPlugin().getName())) {

                String[] data = key.getKey().split("/");
                if (data.length != 3) continue;

                blockState = event.getChunk().getBlock(Integer.valueOf(data[0]), Integer.valueOf(data[1]), Integer.valueOf(data[2])).getState();

                if (!canLock(blockState)) {
                    MagmaBuildNetwork.getPlugin().getLogger().warning(String.format("Unknown Lock removed! %s.", key.getKey()));
                    container.remove(key);
                }
            }
        }
    }
#

hmm maybe paste was better

near aurora
#

Something like this ```java
p.getInventory().getItemInHand().setDurability((short) (p.getInventory().getItemInHand().getDurability() + 100));

eternal oxide
near aurora
#

@cedar hamlet

cedar hamlet
#

the problem is that its a stick

tardy delta
#

oh wauw

cedar hamlet
#

sticks dont have durability

keen kelp
#

what's the difference between raw slots and slots

eternal oxide
#

raw slots cover both inventories

cedar hamlet
#
public static ItemStack getItem(int usesLeft) {
    ItemStack tpStick = new ItemStack(Material.STICK);
    ItemMeta meta = tpStick.getItemMeta();
    meta.setDisplayName(ChatColor.LIGHT_PURPLE + "Teleport Wand");
    List<String> lore = new ArrayList<String>();
    lore.add(ChatColor.DARK_PURPLE + "===========================");
    lore.add(ChatColor.LIGHT_PURPLE + "Teleport Wand that allows");
    lore.add(ChatColor.LIGHT_PURPLE + "You to teleport in any direction!");
    lore.add(ChatColor.LIGHT_PURPLE + "Uses: "+usesLeft+"/100");
    lore.add(ChatColor.DARK_PURPLE + "===========================");
    meta.setLore(lore);
    tpStick.setItemMeta(meta);
    return tpStick;
    }
}
#

Stick

near aurora
eternal oxide
#

if rawSlot != slot then its Bottom Inventory (or top I forget)

cedar hamlet
#

I do, hence why one works

#

but when i introduce another item, it has the same durability

#

The problem is that im setting the durability value to the player

#

I'm wondering if i can set it to the item

keen kelp
near aurora
#

I guess you could use NBT data to create the custom item and add a custom value to it.

eternal oxide
keen kelp
#

so which do I use when looking into player's inventory

#

I suppose raw still?

near aurora
eternal oxide
#

GENERIC_MAX_HEALTH

cedar hamlet
#

ty

near aurora
quaint mantle
eternal oxide
vestal dome
#

so....... I want to import the Packets Module here.. to my API, how do I do this in the pom.xml?

#

I tried this, didn't work.

wet breach
#

@vestal dome you would make it a dependency instead

#

but if you really want it as a module, just make a copy of it directory wise and put it in the same projects directory I suppose

vestal dome
#

that didn't work either..

#

and discord is eating butt

keen kelp
#

so if I do p.getInventory().getItem(), I use normal slots?

eternal oxide
#

yes

keen kelp
eternal oxide
#

yes

keen kelp
#

thanks

vestal dome
#

uhh... any one knows how to do it?

keen kelp
#

java.lang.NullPointerException: Cannot invoke "org.bukkit.inventory.ItemStack.equals(Object)" because the return value of "org.bukkit.inventory.PlayerInventory.getItem(int)" is null

#

bruh

#

did I get the slot wrong?

chrome beacon
#

Slot is empty

#

So it returns null

keen kelp
#

oh

#

I thought it returns AIRx0

#

I sense a rant incoming for some reason

#

?paste

queen dragonBOT
keen kelp
granite stirrup
keen kelp
#

isn't it suppose to not damage the entity if Im wearing a leather cap?

vestal dome
#

MODULEEEEEEEEEEEEE NOT A DEPendency...

#

ok gota lil bit pissed sorry.

granite stirrup
vestal dome
#

:facepalming:

pastel coyote
#
    @EventHandler
    public void onJoinEvent(PlayerJoinEvent event) {
        if(event.getPlayer().hasPermission("ssmp.donator")) {
            event.setJoinMessage(ChatColor.translateAlternateColorCodes('&', "&a" + event.getPlayer().getDisplayName() + " " + this.getConfig().getString("join-message")));
        } else {
            event.setJoinMessage(ChatColor.translateAlternateColorCodes('&', "&a" + event.getPlayer().getDisplayName() + " " + this.getConfig().getString("join-message")));
        }
    }

    @EventHandler
    public void onQuitEvent(PlayerQuitEvent event) {
        if(event.getPlayer().hasPermission("ssmp.donator")) {
            event.setQuitMessage(ChatColor.translateAlternateColorCodes('&', "&a" + event.getPlayer().getDisplayName() + this.getConfig().getString("quit-message")));
        } else {
            event.setQuitMessage(ChatColor.translateAlternateColorCodes('&', "&7" + event.getPlayer().getDisplayName() + this.getConfig().getString("quit-message")));

        }

this will return in-game: "{username} null". any tips how to fix this? tried some cheap hacks but none work

granite stirrup
#

also modules only work if the folder with the files in it is with the pom.xml

vestal dome
#

are you kidding?

#

ya?

#

nice

granite stirrup
#

or the config is null

#

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

#

something is null tho

pastel coyote
#
join-message: |-
  &fhas joined.

quit-message: |-
  &fhas quit.
vestal dome
#

do it

granite stirrup
vestal dome
#

it is.. it is the main project

#

every other module is like

granite stirrup
vestal dome
#

../<module>

#

got it?

chrome beacon
#

If you need all of the modules in a jar use the maven shade plugin

vestal dome
#

no they are different modules...

#

one is for a spigot server..

#

one is for bungeecord ,etc.

#

but the packets one is in every single one of the others.

#

since I need it to communicate between them

quaint mantle
#

Hi, Anyone knows how can i make a tablist plugin?

keen kelp
#

So umm Im confused

#

I was trying to see how PlayerInventory.getHelmet works

#

so I looked into the source

granite stirrup
#

try this <dependency> <artifactId>artifactid</artifactId> <groupId>groupid</groupId> <scope>system</scope> <systemPath>c:/your/dependency/jar/file/full/path</systemPath> </dependency>

keen kelp
#

but in PlayerInventory.java, all they did is declare the method

quaint mantle
keen kelp
#

but the method doesn't contain anything?

#

Im confused as to how this works, can someone explain?

eternal oxide
#

You are looking at the API

keen kelp
#

how do I look into the source or whatever it is

eternal oxide
#

the folders BT created

eternal oxide
#

look at CraftBukkit

#

Bukkit is API, CraftBukkit is implementation

keen kelp
#

oh

#

damn

#

It's so modularized

granite stirrup
#

wtf

keen kelp
#

idk if that even is a work

#

but I hope one day my coding gets this good

granite stirrup
#

im pretty bad at coding myself lmao

#

tho why is spigot repos dont work

#

on github

icy nacelle
#

The good repo for Spigot is here

granite stirrup
#

wtf is a .patch file lol

icy nacelle
#

Normal, it does patch on Bukkit

#

if you want to see source code of Bukkit, just go on Bukkit repo

#

on the same link

wet breach
#

@vestal dome reason I suggested dependency is because it is the easiest way to let other projects have access to it. Build it in the appropriate project that does contain the module, only change for its pom is you are going to want to have the install goal for it so that it installs the jar into your maven repo. Once it is built and placed in the repo, all your other projects can use it as a dependency super easily.

pastel coyote
granite stirrup
#

but make sure in ur server the config files are in the plugins/plugindirectory/

keen kelp
#

oh quick question, is player receiving tiny amounts of downwards velocity from fire/poison/falldamage etc normal?

granite stirrup
#

is bukkit still alive anymore?

pastel coyote
#

Everything is formatted correct, so its the code right?

keen kelp
#

Im pretty sure it's a bug that was never fixed since iirc vanilla doesn't do that

granite stirrup
#

oh looks like its not XD

#

bukkit is dead

#

it says the last commit is in 2014

#

lol

wet breach
#

bukkit is only alive via spigot, otherwise no there is no more bukkit staff members that work on bukkit anymore. They all left

keen kelp
#

look into spigot if youre talking about the api

granite stirrup
#

what i dont get is how patching nms code is not illegal while using nms code in your projects is

eternal oxide
#

You can;t use Mojangs code in yoru own project, Nor can you distribute it

#

However Altering it on the PC is not

keen kelp
#

basically your code can't include mojang's code

#

but doing shit to it is fine

granite stirrup
#

that doesnt make sense

#

lmao

wet breach
#

because you are allowed to modify other people's code

#

you just can't copy their code into your project and then do nothing else to it

keen kelp
#

think the iPhone lighting to headphone jack addon

#

you can't produce your own iPhone with a home button

#

but you can add one to it

granite stirrup
#

shouldnt it be illegal both ways?

keen kelp
#

or like Gameboy, you can buy a gameboy and change it's screen and speaker

#

but you can't make your own gameboy

#

with pre-changed screen and speaker

granite stirrup
#

i dont even know why u cant i mean isnt the gameboy like real old now

keen kelp
#

it's an example damn it

#

the switch

granite stirrup
#

people already made nock off switches

#

lmao

compact haven
#

a patch file is just a list of changes to files

#

Spigot is not allowed to distribute mojang code because of the agreement

keen kelp
#

knockoff is not the same as producing it yourself

paper viper
wet breach
#

it is, but it is an example. During the time gameboy was popular it was patented. Meaning you can't just make your own gameboy and sell them. But you can sell modifications to them however or make modifications without repercussions

keen kelp
#

anyone can make a knockoff minecraft

granite stirrup
keen kelp
#

but not use original minecraft's code to do it

wet breach
#

exactly

granite stirrup
#

isnt the assets copyrighted to tho

wet breach
#

indeed

compact haven
#

they arent distributing assets

#

or code

keen kelp
#

basically, you can't touch minecraft's code

compact haven
#

they arent distributing anything except the changes

keen kelp
#

server.jar has to be in tact

compact haven
#

the changes themselves are stored as patch files, and the patch files dont have copyrighted or licensed code by mojang- only spigot code

wet breach
#

but voxel games are not patented or copyrighted. In other words a cube world on its own is not copyrightable. The elements and graphics you use on those cubes are

keen kelp
#

it's kinda like buying a PC

compact haven
#

when you run buildtools it applies the changes on your computer

keen kelp
#

you can plug whatever the f* you want into it

#

but if you open and modify it your warranty gone

#

and in mc's case if you open it and modify it

#

boom sued

compact haven
#

here look at this

#

this is a PaperMC patch for spigot

#

instead of forking spigot and adding changes directly, then redestributing spigot

granite stirrup
compact haven
#

they are distributing the CHANGES in their purest form

keen kelp
#

well in the case of minecraft you can't

compact haven
#

well they also distribute the jars but

keen kelp
#

since you know.. hashing is a thing

wet breach
#

now while although we are telling you what you are not allowed to do, quite honestly there is nothing any of us here can do in what you decide to do. Your biggest worry should be if whether or not mojang is going to come after you or not lol. We can only tell you what is against Mojang's EULA

floral schooner
#

if I wanted input from the chat what would I put as parameters for the new Scanner()

granite stirrup
#

has the mc server jar been decoded once?

wet breach
#

been decoded numerous times

eternal oxide
#

You don;t use a Scanner for reading Chat, Its not a console

paper viper
#

use an event

#

AsyncPlayerChatEvent

floral schooner
#

Okay and how do I grab the message?

wet breach
#

?jd

wet breach
#

search for the chat events using the search bat @floral schooner

granite stirrup
vestal dome
#

unrelated question to the discussion you guys are talking about, but is it possible to encrypt a Socket's data? like the data sent between the server and client?

floral schooner
wet breach
#

@vestal dome yes

vestal dome
#

how..

granite stirrup
#

idk look it up

#

on google

vestal dome
granite stirrup
#

use ur mind???

vestal dome
#

idk

#

how to use that

wet breach
#

you encrypt the data before it gets put into the packet

#

and the on the other end you need a mechanism to decrypt it

keen kelp
#

do we have ?google or ?g

#

?g test

wet breach
#

?lmgtfy how to encrypt data for sockets

keen kelp
#

?google test

wet breach
#

oh it got disabled ๐Ÿ˜ฆ

keen kelp
#

bruh not event

quaint mantle
#

How can i add nms to my project? (I'm using IntelliJ)

granite stirrup
wet breach
#

depend on the spigot server jar instead @quaint mantle

granite stirrup
#

but dont really use nms

quaint mantle
granite stirrup
#

it only really supports one version and if u want to make to support more its really hard to do that i mean reflection isnt that hard but it isnt worth it

granite stirrup
wet breach
#

@quaint mantle that doesn't change my answer

keen kelp
#

ofc

granite stirrup
#

just use the spigot api

keen kelp
#

actually is older minecraft versions supported

wet breach
#

they are not supported no, but you can still build against the old api's if you want

granite stirrup
#

if u using maven Add this to your pom.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.8.8-R0.1-SNAPSHOT</version>
           <scope>provided</scope>
    </dependency>
</dependencies>```
keen kelp
#

so it's only suppose to support the newest

granite stirrup
wet breach
#

what that means is you can make a plugin for 1.8 if you want to @keen kelp however don't expect to get much support here for any problems you encounter

keen kelp
#

I see

granite stirrup
#

actually its 1.8-1.16.5

#

i think

#

look at all those versions LMAO

wet breach
#

there is a spigot 1.7 but its not hosted in the repo's ๐Ÿ˜‰

keen kelp
#

why is VSC opening my discord link cringe

granite stirrup
#

but if he wants 1.8.8

#

its there

wet breach
#

yep that much is true

granite stirrup
#

its probs gonna be removed in future tho

wet breach
#

probably not

granite stirrup
#

maybe

quaint mantle
#

hopefully

granite stirrup
#

but it isnt really supported

#

anymore

#

so they could remove it

#

its kinda there choice

wet breach
#

build tools will most likely be updated to not build the old versions if anything ๐Ÿ˜‰

granite stirrup
#

to do it or not

quaint mantle
slim kernel
#
player.getWorld().spawnFallingBlock(spawnLoc, Material.GRAY_CONCRETE_POWDER.createBlockData()).setVelocity(vector);

Why cant I do .setDropItem(false) and the setVelocity ? Or how can I do it?

quaint mantle
#

setVelocity doesn't return an entity

#

store the returned entity from spawnFallingBlock in a variable, then call setVelocity on it

#

then go on with your life as usual

proud basin
#

Is player#spigot a thing?

chrome beacon
#

Yes

#

?jd

proud basin
#

any specific versions its not on?

quaint mantle
#

it's not on bukkit

#

besides that it's on every spigot api version

proud basin
#

so then its not on org.bukkit.entity.Player

quaint mantle
#

??

#

yes

#

org.bukkit.entity.Player#spigot()

proud basin
#

interesting then

quaint mantle
#

it's not part of the bukkit api, it's included in spigot api

proud basin
#

hm I see now

#

I gotchu

odd sentinel
#

so when InventoryClickEvent fires, I need to cancel clicks in both inventories a user has open (their inventory and the open inventory above it), but the click event only happens in one. how can I get the other

quaint mantle
#

wat

#

InventoryClickEvent is dispatched regardless of the inventory that was clicked

odd sentinel
#

so does getClickedInventory() vary and getInventory() always represents the players inv?

quaint mantle
#

getInventory will always give the top inventory afaik
getClickedInventory does what it's named after

odd sentinel
#

ok that should work for me, if getInv is always the top

waxen plinth
#

I think I figured out why and it's extremely dumb

#

In short: Hash collision

#

I was using o.hashCode() == hashCode() as my equals() override function

#

I know better now but at the time I wrote that code I didn't

#

๐Ÿคฆ

#

Anyways I'm gonna be pushing a fix for it today

paper viper
#

Or whatever they are called

#

You know

waxen plinth
#

???

waxen plinth
#

I know

#

I'm using a hashmap lol

paper viper
#

Ah nvm itโ€™s a different bug

#

Lmao

#

I thought you implemented your own hashing structure

proud basin
#

Does the spigot gradle api not include craftbukkit?

waxen plinth
#

It was my fault for implementing a bad equals function

quaint mantle
#

craftbukkit implements the bukkit api, spigot extends craftbukkit and also implements the spigot api (which extends the bukkit api)

proud basin
#

so how come its not included

quaint mantle
proud basin
#

Yes I can see that

quaint mantle
#

because it's illegal to distribute a modified minecraft binary

#

if you want to play around with the server internals you need to run buildtools

#

?bt

queen dragonBOT
quaint mantle
#

bt will install it in your maven local in your machine

severe folio
#

can anyone suggest a good resource for learning to apply mathematics to programming

lilac dagger
#

just make it

severe folio
#

i cant lol

lilac dagger
#

see the math formula

#

apply it in a graph or something

severe folio
#

i mean i can try

lilac dagger
#

you can make a 2d graph in swing

opal juniper
#

So

#

My .jar is 130 MB due to dependencies
Is there a way to have these downloaded automatically or something so that my jar isn't as bloated?

lilac dagger
#

yes

#

you can check if the dependency exists, if not download it

chrome beacon
opal juniper
#

only one

eternal oxide
#

What one?

opal juniper
#

well, its not a spigot api

#

i need to detect languages and i want to avoid api

#

so ๐Ÿคท

quaint mantle
opal juniper
#

saw this but i use maven

#

not gradle

quaint mantle
#

sucks to suck

opal juniper
#

life hits hard sometimes ๐Ÿ˜›

eternal oxide
#

You could always download it at server start and inject it into the ClassLoader

opal juniper
quaint mantle
opal juniper
eternal oxide
#

iConomy does it for the h2 library

quaint mantle
#

where does it do it

dense goblet
#

is block.getBlockData() a clone?

#

I want to change the facing direction of an existing block

opal juniper
#

i dont think so no

dense goblet
#

so this should be enough then?:

BlockData blockData = e.getBlockPlaced().getBlockData();
if(blockData instanceof Directional) {
    ((Directional) blockData).setFacing(facing);
}
opal juniper
eternal oxide
#

You could, its not complex

proud basin
#

You guys support built tools correct?

wraith rapids
#

if it doesn't have an update method, it's not a clone

#

update or set method or something to that extent

#

iirc you need to do Block::setBlockData to update it

quaint mantle
dense goblet
#

okay so this should be fine

BlockData blockData = e.getBlockPlaced().getBlockData();
if(blockData instanceof Directional) {
    ((Directional) blockData).setFacing(facing);
    e.getBlockPlaced().setBlockData(blockData);
}
quaint mantle
#

mhm

quaint mantle
#

it is

eternal oxide
#

It uses reflection and will likely break in 1.17

quaint mantle
#

"will likely break" my ass

#

it won't

#

Java 16 enforces strong encapsulation, you can't reflect to it anymore, that same hack was used by LuckPerms and that's the reason why Luck implemented the jar-in-jar system, also the reason why SlimJar was made

eternal oxide
#

your ass?

opal juniper
#

lmao

eternal oxide
opal juniper
#

thats what i thought

eternal oxide
#

I say it will likely break, you say my ass, then you say it will break

quaint mantle
#

It will*

#

It's not likely

#

It's a certainty

eternal oxide
#

I say its likely as I've not tested it on 16

quaint mantle
#

You don't have to be a mathematician to know that 2+2 is 4

opal juniper
#

i mean, lemme check that

#

They arent lying ๐Ÿ˜ณ

tired spoke
#

what is Load in the plugin.yml?

eternal oxide
#

Yep it blows up on 16

opal juniper
#

when the plugin should be loaded

tired spoke
#

like
Load: STARTUP

opal juniper
opal juniper
eternal oxide
#

However, it still downloaded the jar, just can;t inject it into the classloader. so it won;t work till a restart

quaint mantle
#

Wat

tired spoke
#

b4? was by?

eternal oxide
quaint mantle
#

Ngl it would be hella easier if the plugin classloader exposed addurls

eternal oxide
#

it would

quaint mantle
#

Like many other platforms

#

But it don't :^)

wraith rapids
#

"improper api design"

#

imagine exposing anything useful

quaint mantle
#

Hhhhhhhhhhh

opal juniper
eternal oxide
#

Line 35 of Downloader just schedule a task 1 tick later to call restart

wraith rapids
#

sounds ew

#

surely there is a better way

eternal oxide
#

Nope

opal juniper
#

idk ๐Ÿคท

eternal oxide
#

Java 16 you can;t get reflective access

opal juniper
#

i mean if not the user is gonna end up with an uber jar

wraith rapids
#

lots of plugins are able to load whole jars modularly

#

f.e placeholderapi and its extensions

opal juniper
eternal oxide
#

yes, somethign like Spigot.restart()

wraith rapids
#

there is but it doesn't work properly

quaint mantle
#

Why would a restart magically add it to the classpath tho

wraith rapids
#

and is generally ill advised

eternal oxide
#

All jars in the libs folder are loaded by Bukkit at startup

chrome beacon
wraith rapids
#

except when it doesn't

opal juniper
#

lmao

proud basin
#

Can you use BuildTool with gradle?

wraith rapids
#

i don't remember the exact issue but it spawns like a child process or something that fucks with console readers and the system environment or something

slim kernel
quaint mantle
#

void probably?

#

Idk

chrome beacon
opal juniper
eternal oxide
#

you delete it

opal juniper
#

kk

wraith rapids
#

let me look at what placeholderapi does

proud basin
chrome beacon
quaint mantle
proud basin
#

So I just add it to my library

quaint mantle
#

But worse

chrome beacon
quaint mantle
#

If you have a module-info.class it fucks up lmao

proud basin
chrome beacon
proud basin
#

How can I add it to build.gradle?

chrome beacon
#

But no not BuildTools

#

You add spigot

proud basin
#

I already have that

#

I have buildtools in a folder

chrome beacon
#

Run it

slim kernel
#
player.getWorld().spawnFallingBlock(spawnLoc, Material.GRAY_CONCRETE_POWDER.createBlockData()).setVelocity(vector);

Why cant I do .setDropItem(false) and the setVelocity ? Or how can I do it?

proud basin
#

Nothing happens

grand flint
#

Does anyone know how to setup a contabo vps?

chrome beacon
proud basin
#

Nothing

opal juniper
proud basin
#

I've already ran it before and have all the files

quaint mantle
eternal oxide
#

yep, just make sure you only do that when you download the jar, and not if it already exists

quaint mantle
#

If you're gonna ignore people's advise then don't bother asking

slim kernel
#

I did not understand it tho

wraith rapids
#

that is still disgusting

#

i'm convinced there is a better way

quaint mantle
#

Do you not know what a variable is?

chrome beacon
slim kernel
#

yes

wraith rapids
#

even if I don't know it off the top of my head

quaint mantle
#

Then?

#

What about my advise do you not understand?

opal juniper
eternal oxide
#

yep

opal juniper
#

ok, let me test it

proud basin
chrome beacon
slim kernel
quaint mantle
#

what?

opal juniper
# eternal oxide yep

do you reckon i should load on startup so it skips all the world stuff the first time

errant snow
#

Heyo, so I have an abstract method, onCommand(), that gets passed a CommandSender object.

abstract void onCommand(CommandSender sender);

The CommandSender paramenter is prechecked as to whether it's an instanceof Player or not. I'm wondering if there's a way that I can make it so I don't have to type cast the command sender in the onCommand method if they're a Player.

Basically I just want to have the option to either write:

public void onCommand(CommandSender sender { }

or

public void onCommand(Player sender) { }

based on predetermined typing. Is this possible?

wraith rapids
#

create a child class loader or something and load the module classes with that

grand flint
#

Does anyone know how to setup a contabo vps?

eternal oxide
slim kernel
# quaint mantle what?

if I do:

Entity entity = player.getWorld().spawnFallingBlock(spawnLoc, Material.GRAY_CONCRETE_POWDER.createBlockData());

it does not work so what do I need to put instead of Entity?

proud basin
quaint mantle
chrome beacon
quaint mantle
#

Your IDE should tell you somewhere

#

Unless you're using notepad or something

slim kernel
quaint mantle
#

Hover your cursor over the method I guess

grand flint
chrome beacon
#

General

grand flint
#

ok

chrome beacon
proud basin
#

Ido havei rt

#

I do have it*

quaint mantle
slim kernel
#

ahhh

#

okay

chrome beacon
proud basin
#

yea

chrome beacon
#

Send your build.gradle

wraith rapids
#

have you tried creating a new url classloader and setting it as a child of your plugin classloader and using it to load the classes of your module

ivory sleet
#

whats up

slim kernel
chrome beacon
ivory sleet
#

hi oliva

quaint mantle
#

Olivia Pierce ๐Ÿ‘€

ivory sleet
#

the Skripter

proud basin
#
repositories {
    mavenLocal()
    maven {
        url "https://hub.spigotmc.org/nexus/content/repositories/snapshots/"
    }
}

dependencies {
    compileOnly("org.spigotmc:spigot:1.8.8-R0.1-SNAPSHOT")
}
ivory sleet
#

u dont need that maven declaration there

#

just maven local

proud basin
#

Still doesn't fix it

wraith rapids
#

1.8 plebian detected

quaint mantle
#

:^)

chrome beacon
proud basin
#

yea

wispy fossil
#

*beep* beep* 1.8 detected

#

lmao

opal juniper
#

hahaha

wraith rapids
#

my catalogue of 1.8 users to ping at random expands

chrome beacon
#

Well then good luck

main dew
#

How get skull with custom texture? (no texturepack only optifine)

wraith rapids
#

education edition

opal juniper
#

do i have to do something to load the lib folder

#

its just i keep getting ClassNotFoundExceptions

wraith rapids
#

create a child class loader and use it to load the jar

main dew
wraith rapids
#

yea well then create an account and upload paintings

opal juniper
#

tbh

wraith rapids
#

the answer that doesn't have a million comments screeching about java 9+ reflection

opal juniper
#

ok, so what is myJar, a file path?

wraith rapids
#

presumably a File as it has a toURI method

opal juniper
#

ok

#

so then idrk about these:
com.MyClass
and myMethod

what are they placeholders for?

wraith rapids
#

they are reflection shit

#

com.Myclass is the full name of the class you want to load

#

mymethod is the name of a method, but I don't think there is any need to get a method out of it

#

just loading the class is enough

#

and instantiating it

opal juniper
#

can i point it to the main class and have it handle all the subclasses

#

i am really out of my depth

wraith rapids
#

you need to point it at some class that is in the external jar

#

i'm not 100% on how that's going to work with dependencies rather than modules

#

what are you doing exactly

opal juniper
#

i need to load a .jar that i use inside of my plugin, however it is like >130 mb so i cant shade it really

#

so i am downloading it with a method ElgarL showed me

wraith rapids
#

how do you interact with the classes of that jar

opal juniper
#

what, like this?
com.github.pemistahl.lingua.api.LanguageDetectorBuilder.fromAllSpokenLanguages().build();
?

#

i just use it like any other maven depend atm

wraith rapids
#

i don't quite remember how classloading semantics work exactly

opal juniper
#

idk if they are modules or dependencies - im not familiar with terminology

#

ohk

wraith rapids
#

a module would be something that is a component of your project

opal juniper
#

ah oj

#
            Class classToLoad = Class.forName("com.github.pemistahl.lingua.api.LanguageDetectorBuilder", true, child);
            Object instance = classToLoad.newInstance();

should i just try this and see

wraith rapids
#

that will load the class with the child class loader

#

but i'm not sure which classloaders then have access to that already loaded class

#

fuck around with it some I suppose and see what works

opal juniper
#

it may have worked but i just realised it is written in kotlin

#

and now it is having a hissy fit about that

proud basin
#

why is it doing this for built tool

wraith rapids
#

link the image, not the webpage

opal juniper
#

it is an image

wraith rapids
#

it's not

#

it's a webpage with an image on it

proud basin
#

yes it is

opal juniper
#

whatever lmao

#

its kinda the same thing

wraith rapids
#

literally not an image

proud basin
#

dude who cares

wraith rapids
#

it's a webpage with a million trackers and cookies and laggy shit

#

here's the image

opal juniper
#

actually thats fair enough

wraith rapids
#

i don't need to nor do i want to see a feed of "newest most viral" images

#

fuck you and your cancerous webpage

proud basin
#

the link I put in chat is was it gave me

opal juniper
#

yeah

#

lets move on

proud basin
#

so any ideas?

quaint mantle
#

what are you even running

proud basin
#

buildtools

quaint mantle
#

that ain't bt

#

that looks like wget or curl

opal juniper
#

^^

wraith rapids
#

that's not how you spell buildtools either

quaint mantle
#

how are you running whatever you're running

proud basin
#

in a bat file

#
@echo off
IF NOT EXIST BuildTools (
    mkdir BuildTools
)
cd BuildTools
curl -z BuildTools.jar -o BuildTools.jar https://hub.spigotmc.org/jenkins/job/BuildTools/lastSuccessfulBuild/artifact/target/BuildTools.jar
set /p Input=Enter the version: || set Input=latest
java -jar BuildTools.jar --rev %Input%
pause
opal juniper
#

why tho

#

why not just run it normally

proud basin
#

what if I want a specific version

opal juniper
#

?bt

queen dragonBOT
quaint mantle
#

^

wraith rapids
#

then run buildtools and tell it to build a specific version

quaint mantle
#

reading the documentation helps

proud basin
#

ih

#

oh

wraith rapids
#

java -jar BuildTools.jar --rev %Input%

#

surely you don't need a bat file to put your input here for you

proud basin
#

wait no

#

its fine

#

doesn't matter realy

opal juniper
#

ok

proud basin
#

really*

#

so any ideas?

wraith rapids
#

run it normally

proud basin
#

its the same thing

wraith rapids
#

surely not

opal juniper
#

show

quaint mantle
#

just so you know, we can't read your screen

proud basin
wraith rapids
#

again with the cancer webpage

opal juniper
#

well, ik why it isn't working. mvn shade includes all the kotlin stuff

proud basin
#

where's that

opal juniper
#

not for you

#

where did you get build tools from

proud basin
#

the page

opal juniper
#

huuuuh

#

idk then

#

do you have internet?

wraith rapids
#

gee

#

does he

proud basin
#

hm I think so

quaint mantle
#

lmfao

opal juniper
#

just checkin

proud basin
#

now that you say that im not too sure

quaint mantle
#

is the buildtools jar in that w directory?

proud basin
#

wait there is a jar?

wraith rapids
#

lmao

opal juniper
#

omg

proud basin
#

oh wait

#

yes

wraith rapids
#

read the docs

proud basin
#

hold up

wraith rapids
#

come back in a few hours

opal juniper
#

it would tell him the file wasn't found if not

proud basin
#

why did java uninstall it self

opal juniper
proud basin
#

well I don't have jdk 11 anymore

#

it looks like

wraith rapids
#

if you don't have java installed it'd say java is an invalid command

opal juniper
#

^^

wraith rapids
#

i can't see shit in your screenshot because you've fucking sketched all over it but I'm not seeing any response message from the command

proud basin
#

I forgot I delete jdk 11 folder

#

that may be why

opal juniper
#

dont delete folders

#

uninstall it

proud basin
#

wasn't too sure how to

#

so I deleted folder

opal juniper
#

add or remove Programs

#

in the search bar

proud basin
#

its there?

#

OMG

#

why do people not tell me these things

opal juniper
#

common sense

proud basin
#

well

#

I should prob start doing this more often

opal juniper
#

hmmmmmmmmm

#

idk how to get this kotlin jar to work ><

wraith rapids
#

of course the 100mb dependency would be written in kotlin

#

i don't know what i fucking expected

opal juniper
#

its fucking annoying

#

thats what it is

#

hmm

#

it auto-downloads and everything

wraith rapids
#

what does it say exactly

opal juniper
#

ill get it

#

one sec

#
java.lang.NoClassDefFoundError: kotlin/jvm/internal/DefaultConstructorMarker
    at java.lang.Class.getDeclaredConstructors0(Native Method) ~[?:?]
    at java.lang.Class.privateGetDeclaredConstructors(Class.java:3137) ~[?:?]
    at java.lang.Class.getConstructor0(Class.java:3342) ~[?:?]
    at java.lang.Class.newInstance(Class.java:556) ~[?:?]
    at com.oli.xlang.XLang.onEnable(XLang.java:56) ~[?:?]
    at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:263) ~[spigot-1.16.5.jar:3059-Spigot-4225eac-7ea8b96]
    at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:351) ~[spigot-1.16.5.jar:3059-Spigot-4225eac-7ea8b96]
    at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:480) ~[spigot-1.16.5.jar:3059-Spigot-4225eac-7ea8b96]
    at org.bukkit.craftbukkit.v1_16_R3.CraftServer.enablePlugin(CraftServer.java:493) ~[spigot-1.16.5.jar:3059-Spigot-4225eac-7ea8b96]
    at org.bukkit.craftbukkit.v1_16_R3.CraftServer.enablePlugins(CraftServer.java:407) ~[spigot-1.16.5.jar:3059-Spigot-4225eac-7ea8b96]
    at net.minecraft.server.v1_16_R3.MinecraftServer.loadWorld(MinecraftServer.java:555) ~[spigot-1.16.5.jar:3059-Spigot-4225eac-7ea8b96]
    at net.minecraft.server.v1_16_R3.DedicatedServer.init(DedicatedServer.java:257) ~[spigot-1.16.5.jar:3059-Spigot-4225eac-7ea8b96]
    at net.minecraft.server.v1_16_R3.MinecraftServer.w(MinecraftServer.java:928) ~[spigot-1.16.5.jar:3059-Spigot-4225eac-7ea8b96]
    at net.minecraft.server.v1_16_R3.MinecraftServer.lambda$0(MinecraftServer.java:273) ~[spigot-1.16.5.jar:3059-Spigot-4225eac-7ea8b96]
    at java.lang.Thread.run(Thread.java:834) [?:?]
Caused by: java.lang.ClassNotFoundException: kotlin.jvm.internal.DefaultConstructorMarker
    at java.net.URLClassLoader.findClass(URLClassLoader.java:471) ~[?:?]
    at java.lang.ClassLoader.loadClass(ClassLoader.java:588) ~[?:?]
    at java.lang.ClassLoader.loadClass(ClassLoader.java:521) ~[?:?]
    ... 15 more
wraith rapids
#

where is the relevant kotlin class

#

is it in the downloaded jar

opal juniper
#

wdym, the one i am loading?

wraith rapids
#

yes

opal juniper
#

yeah

#

it is

wraith rapids
#

that's strange

#

by my understanding of how classloaders work it should have that classloader try load the kotlin class first

#

try loading that kotlin class directly and see if it says something different

opal juniper
#

i dont know how to do that - sorry

wraith rapids
#

kotlin/jvm/internal/DefaultConstructorMarker

#

load this instead of the class you're loading now

opal juniper
#

ah ok

#

ClassNotFound

#
[23:03:56] [Server thread/WARN]: java.lang.ClassNotFoundException: kotlin.jvm.internal.DefaultConstructorMarker
[23:03:56] [Server thread/WARN]:     at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:471)
[23:03:56] [Server thread/WARN]:     at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:588)
[23:03:56] [Server thread/WARN]:     at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
[23:03:56] [Server thread/WARN]:     at java.base/java.lang.Class.forName0(Native Method)
[23:03:56] [Server thread/WARN]:     at java.base/java.lang.Class.forName(Class.java:398)
[23:03:56] [Server thread/WARN]:     at com.oli.xlang.XLang.onEnable(XLang.java:54)
wraith rapids
#

are you sure it's in the jar

#

and with that exact path and name

opal juniper
#

kotlin isn't - no

#

i thought this was the issue?

wraith rapids
#

i asked you a while ago whether the relevant kotlin class is in the jar you download

#

and you said yes

opal juniper
#

oohhhh sorry i misunderstood

#

i thought you meant the class that had been written in kotlin

#

im so sorry ><

wraith rapids
#

try using the plugin classloader

#

this.getClass().getClassloader

opal juniper
#

this.getClass().getClassLoader().loadClass("com.github.pemistahl.lingua.api.LanguageDetectorBuilder"); gives a classnotfound which is weird

wraith rapids
#

that is to be expected