#help-development

1 messages ยท Page 100 of 1

civic apex
#

then load it back

#

and it works

#

but then when i do that a second time

#

it doesnt work/the server crashes

quiet ice
#

You can't exactly delete it

#

At least not while the server is open

civic apex
#

unloading/loading twice crashes

#

(i only load when unload returns true)

fiery prairie
#

lmao im compiling a gradle plugin right now cause i have the source code. ive never used gradle before so what configuration should i add here?

hasty prawn
upper vale
#

Gradle

quiet ice
hasty prawn
#

I've deleted worlds while the server was running before.

fiery prairie
civic apex
hasty prawn
#

Windows allows applications to delete files that are in use.

upper vale
fiery prairie
hasty prawn
#

For example, my IntelliJ automatically copies my build jars into the plugins folder, even if the server is running.

quiet ice
upper vale
#

either shadowJar or build as command

civic apex
tardy delta
#

i'm wondering why i can still query to my sqlite database while the file is deleted?

hasty prawn
#

Yeah, users can't really manually do it afaik, but software definitely can.

civic apex
#

it allows me to delete the whole server while its running

#

skip what?

twilit roost
#

how tf does Component work in 1.19 NMS Remapped?

tender shard
civic apex
#

yes thats what i thought

tender shard
civic apex
twilit roost
#

well NMS ArmorStand requires Component for its name
but there isnt any TextComponent/BaseComponent

tender shard
#

you usually use a MutableComponent, e.g. Component.literal("my name is jeff")

fiery prairie
upper vale
civic apex
#

what results? the stacktrace?

fiery prairie
hasty prawn
tender shard
thorn crypt
#

Hi, I have a problem with my code. I want to cancel event when a player doesn't have the permission I want but it doesn't work here's my code

(I don't get any message in my chat since I have to get one and the debug message)

civic apex
#

no need to catch then

#

it just throws

tender shard
hasty prawn
#

acf bug maybe?

tender shard
#

and 0.5.1-SNAPSHOT is the latest ACF version

#

I thought that using acf-paper should work fine on paper lol

hasty prawn
#

It kinda looks like it's Nagging itself lol

tardy delta
tender shard
#

yeah

#

kinda weird

#

since it's the latest acf-paper verison

#

lol

thorn crypt
civic apex
#

oh

#

well here's the stacktrace

thorn crypt
civic apex
#

wdym

#

where

gray merlin
#

Well then I've ran buildtools and taken -api out of the artifact ID

#

It still doesn't work.

civic apex
#

its an api method

#

Server#createWorld()

onyx fjord
#

Instantiation of utility class 'DataHolder'

#

why ij having a problemo

gray merlin
tender shard
civic apex
#
WorldCreator worldCreator = new WorldCreator(worldName);
getServer().createWorld(worldCreator);```
tender shard
#

doesn't look like you built the correct version

tender shard
gray merlin
#

pain

#

i'll redo it

onyx fjord
tender shard
#

btw think about using "mojang mappings"

onyx fjord
#

class would have to be static right?

tender shard
tender shard
worldly ingot
#

mfw package in package Kappa

tender shard
onyx fjord
#

work

#

dum intellisense

twilit roost
tender shard
undone axleBOT
twilit roost
tender shard
#

yeah see

#

you use 1.18.1 mappings for 1.19

twilit roost
#

ooh I forgot to change that build thiiing

tender shard
#

in lines 36, 38, 51 and 52 use 1.19 instead of 1.18.1

twilit roost
#

I just copy pasted it from my other project

tender shard
#

btw you manually changed the outputDirectory in line 53

#

that's not a good idea

#

you should use the maven-jar-plugin to change the final output .jar

twilit roost
#

aaand why isnt that good?

tender shard
#

like this:

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <version>3.2.2</version>
                <configuration>
                    <outputDirectory>C:\mctest\plugins</outputDirectory>
                </configuration>
            </plugin>
tender shard
#

only the maven-jar-plugin should be reponsible for moving your final .jar

twilit roost
#

right thx.. changed it

tender shard
#

perfect :3

civic apex
#

??

#

i want to load the world

#

the file does exist

#

i never deleted it

twilit roost
#

put ! before this

civic apex
#

how?

#

Bukkit.getWorld(name) == null?

tender shard
#

your world folder has a "session.lock" file

#

try shutting down the server, remove that file, then see if it now works

civic apex
#

im trying to do this without shutting down the server

tender shard
#

yeah so where does it come from if the world isnt already loaded?

civic apex
#

k so

#

after a server restart everything works fine

#

i unload world

#

i load world

#

(it works)

#

i unload again

#

load again and Exception

#

after unloading/loading once i can restart server and it works once more

#

but the second time it always fails

tender shard
#

that's weird

civic apex
#
[20:20:38 INFO]: unloaded
[20:20:43 INFO]: Preparing start region for dimension minecraft:map
[20:20:43 INFO]: Preparing spawn area: 0%
[20:20:43 INFO]: Time elapsed: 93 ms
[20:20:43 INFO]: loaded
[20:20:47 INFO]: [Multiverse-Core] World 'map' was unloaded from Multiverse.
[20:20:47 INFO]: unloaded
[20:20:52 WARN]: [Plugin] Task #10147 for Plugin v1.0-SNAPSHOT generated an exception
java.nio.channels.OverlappingFileLockException: null```
gray merlin
#

what's the difference between spigot-api and spigot?

tender shard
#

the api only contains the api

#

the other one contains the whole server source code

#

including the implementations of the API (CraftPlayer, etc) and the NMS classes (ServerPlayer, ...)

tardy delta
#

hmm wondering, in a deque or any doubly linked list, is the head the tail if theres only one elem?

young knoll
#

I would assume so

gray merlin
young knoll
#

mhm

gray merlin
#

i see ty

tender shard
#

basically the spigot API are only "interfaces", no implementations whatsoever

civic apex
#

okay so deleting session.lock just before loading fixed the issue

#

i still have no idea why it was even an issue in the first place

#

wait nvm

gray merlin
#

What does running BuildTools actually do?

chrome beacon
#

It builds the Spigot jar

#

and installs it to your local maven repo

tall dragon
#

yea pretty sure it only exists because spigot is not allowed to give you a direct download link to it

#

due to legal issues iirc

chrome beacon
#

Yeah you're not allowed to distribute Mojangs code

heady spruce
#

Does anybody know how I can do something to every class that extends a specific kit?
What I want to do is to put every Class that extends the class Kit in a list. Does anybody know?

chrome beacon
#

Sounds like bad design

#

Add a register method or smth

#

Then call that

opal juniper
#

its not impossible to do, but yeah, to avoid reflectively getting them, add some registration

tall dragon
#

isnt reflection for registering stuff acceptable?

#

since it only happens once on startup

opal juniper
#

its just gross

#

you shouldn't need to reflectively get all extending classes for a kit plugin, when its likely all in their project anyways

opal juniper
#

NOOOO

tender shard
#
  1. Class.forName them
  2. check if those class extends your other class
chrome beacon
#

Don't do it

opal juniper
#

make them just use a registry

tender shard
#
  1. Rethink your life choices and dont do it
gray merlin
young knoll
#

?paste

undone axleBOT
tender shard
#

in spigot, yes

#

in spigot-api, no

young knoll
chrome beacon
tender shard
#

yeah but they asked for spigot ๐Ÿ˜›

#

the nms class is called net.minecraft.world.entity.ai.goal.Goal

tender shard
young knoll
#

No

tender shard
#

well

tall dragon
#

yeaa i once had a plugin where i had to register like 80 classes too. i used annotations there

tender shard
#

the question is weird

#

of course spigot allows to you use NMS

tall dragon
#

and just found all annotated classes

tender shard
#

and if you have NMS questions, people here will answer it

#

but there are no javadocs or anything for NMS

#

you can do that if you use spigot, of course

#

which one I sent you isnt a class

#

the GOal thing?

#

as I said, spigot-api does not include any NMS

young knoll
#

It's not in the api

tender shard
#

you have to use spigot instead of spigot-api

#

no

#

unless you're on an extremely old version

#

what version are you using?

tall dragon
#

run buildtools

tender shard
#

no

#

the blog post wouldnt have 100 lines of text if that'd be all you need

tall dragon
#

time to use maven then

tender shard
#

Gradle?

chrome beacon
#

Gradle?

#

ANT ๐Ÿ’€

tender shard
#

Then you have to run the specialsource plugin manually

heady spruce
#

why?

tender shard
#

Or learn how to make ant run arbitraty jar files over your build

tender shard
#

Okay then you gotta translate the specialsource plugin part into some kind of โ€žexecโ€œ thing that runs it manually

#

Its explained in the 1.17 announcements how to run it manually

#

You can also use the obfuscated names if you prefer that

#

But then your code will break on every update

#

And methods woll be called โ€žaโ€œ, โ€žbโ€œ, etc

tall dragon
#

still dont rlly understand why mojang obfuscates at all

tender shard
tall dragon
#

only to release a map

chrome beacon
#

Size

tall dragon
#

does it rlly make that much of a difference?

tender shard
#

Even if it did, who cares

#

Its not like we use floppies anymore

tall dragon
#

yea

#

thats what i mean

#

whos gonna care abt a few more mb

tender shard
#

Or zip discs for those who were old enough to still remeber those lol

tall dragon
#

most ppl got terrabytes of storage

young knoll
#

It may also be a legal thing to help protect copyright?

young knoll
#

idk

tender shard
#

You should rather use the one from your maven repo

#

1 sec

#

the .jar you should use is

~/.m2/repository/org/spigotmc/spigot/1.19.2-R0.1-SNAPSHOT/spigot-1.19.2-R0.1-SNAPSHOT-remapped-mojang.jar
#

or 1.19 or whatever

#

don't forget that you still must remap it manually after you compiled your .jar

#

second post, headline "NMS"

#

and then run this (with 1.17 adjusted to your actual version) on your .jar after you compiled it:

java -cp $HOME/.m2/repository/net/md-5/SpecialSource/1.10.0/SpecialSource-1.10.0-shaded.jar:$HOME/.m2/repository/org/spigotmc/spigot/1.17-R0.1-SNAPSHOT/spigot-1.17-R0.1-SNAPSHOT-remapped-mojang.jar net.md_5.specialsource.SpecialSource --live -i $PLUGIN.jar -o $PLUGIN-obf.jar -m $HOME/.m2/repository/org/spigotmc/minecraft-server/1.17-R0.1-SNAPSHOT/minecraft-server-1.17-R0.1-SNAPSHOT-maps-mojang.txt --reverse
java -cp $HOME/.m2/repository/net/md-5/SpecialSource/1.10.0/SpecialSource-1.10.0-shaded.jar:$HOME/.m2/repository/org/spigotmc/spigot/1.17-R0.1-SNAPSHOT/spigot-1.17-R0.1-SNAPSHOT-remapped-obf.jar net.md_5.specialsource.SpecialSource --live -i $PLUGIN-obf.jar -o $PLUGIN.jar -m $HOME/.m2/repository/org/spigotmc/minecraft-server/1.17-R0.1-SNAPSHOT/minecraft-server-1.17-R0.1-SNAPSHOT-maps-spigot.csrg
#

or switch to maven and let it to all those things automatically for you

#

but as said, you can also put this in your ant script somehow, I sent you a link above

#

$PLUGIN.jar is obviously your plugin's jar name

tender shard
#

~ is your home folder

#

the .m2 folder might be hidden

young knoll
#

(It is)

tender shard
#

C:\Users\YourName

tardy delta
#

show hidden files hehe

tender shard
#

it's also not hidden for me

#

i wonder why md_5 didnt upload the newest specialsource to central

#

yes

young knoll
#

no?

vocal cloud
#

Husbandry involves breeding?

tender shard
#

you should now see the Goal class if you properly added the remapped .jar to ant

#

well just a tiny example, this will make all freshly spawned zombies move to 0, 64, 0

public class Test extends JavaPlugin implements Listener {
    
    private static class MyGoal extends Goal {
        
        private final Mob myMob;
        
        public MyGoal(Mob myMob) {
            this.myMob = myMob;
        }

        @Override
        public boolean canUse() {
            return true;
        }
        
        @Override
        public void tick() {
            myMob.moveTo(0,64,0);
        }
    }
    
    @EventHandler
    public void onSpawn(EntitySpawnEvent event) {
        if(event.getEntity() instanceof Zombie) {
            ((CraftZombie)event.getEntity()).getHandle().goalSelector.addGoal(0, new MyGoal(((CraftZombie)event.getEntity()).getHandle()));
        }
    }
gray merlin
#

I swear, it's like they're targetting me specifically lol, the NMS stuff that I use, although obscure, is changed like every other update

#

it's crazy

#

I always need to change the methods that i'm reflecting

tender shard
#

that's why you should use remapped-mojang instead

young knoll
#

everything in data will be json

tender shard
#

in 99% of cases, just adjust the version in the mappings, and done

young knoll
#

It's all datapack stuff

tender shard
#

tick() is what actually does anything

#

canUse() is there to actually start your custom goal

#

canUse is necessary

#

without canUse, it wouldnt even compile

#

tick() isn't neccessary, but it's the method that gets called every tick while your custom goal is active

#

you should normally use start() and stop() instead for pathfinding

gray merlin
#

But isn't NMS included in the server?

tender shard
#

ofc it is

young knoll
#

Yes

tender shard
#

yes, because canUse is abstract in Goal

gray merlin
#

Then wouldn't the server need the mappings too?

young knoll
#

That is how an abstract class works

tender shard
#

it adds the goal to the entity if it's a zombie?

#

kinda, yes

#

i dont know if it works if it's too far away from 0,64,0

#

just go to 10,64,10, spawn a zombie there and it should work

gray merlin
#

Well then, how can I get the mojmaps?

tender shard
#

you mean, how you can use it in your plugin?

grim ice
#

um

tender shard
#

or do you mean "how do I know the new mapping names?" If so:

#

?switchmappings

grim ice
#

if ur depending on project A thas has a dependency on project B, but doesnt shade it, can u use project B in ur project?

young knoll
#

Not using maven

tender shard
young knoll
#

Sadge

grim ice
#

then

#

why dont we have nms in spigot api

gray merlin
#

Are mojmaps available for all versions?

#

1.7.10-1.19

young knoll
#

No

gray merlin
#

Or just x-1.19?

young knoll
#

1.17+

gray merlin
#

Ah I see

#

In that case i'll finish everything up with the normal mappings, push it, and make a new commit with mojmaps

#

thanks

young knoll
tender shard
#

1.17 is the first

quiet ice
tender shard
#

IIRC the mappings are available since 1.15 or so, but there's no remapped version for spigot until 1.17+

quiet ice
#

Spigot API is (L-)GPL, and everyone knows what happens if you mix LGPL and ARR code

young knoll
#

I still don't know how to use SpecialSource with gradle tbf

tender shard
#

using maven is by far the easiest for this since spigot itself uses maven, so md made a remapping plugin for maven

tender shard
#

or use paperweight

quiet ice
#

Although really converting it to gradle should be a piece of cake

young knoll
#

?

#

I said gradle

quiet ice
#

...

#

Yeah, those are two entirely different things

#

Oh hell nah

gray merlin
#

Oh, the method I was using, that caused the mojmaps conversation, seems to have been doing the exact same thing as a ctor that existed, and I happened to have a reflection for that ctor. I was under the impression they they did different things, but no.

#

pain.

quiet ice
#

Gradle is groovy

young knoll
#

(Or kotlin)

quiet ice
young knoll
#

I tried to use the kotlin version for a bit

quiet ice
#

Although I never used kotlin myself, so it could actually be kotlin

young knoll
#

It is so hard to find any documentation on it

quiet ice
#

It's hard to find any documentation on anything concerning gradle

young knoll
#

Kotlin is still 100x harder than Groovy in that regard

#

The best way to learn is to just dig through it

hasty prawn
#

Once you have Mojang Maps and if you know Java pretty well you can figure out the NMS stuff pretty easily

young knoll
#

In a perfect world the spigot api would expose all you need

hasty prawn
#

Even without there being docs

young knoll
#

But we do not live in said world

hasty prawn
#

Okay well then it might take more time for you to figure out what Mojang is doing in some cases, but you can do it catyes

reef lagoon
#

I love unboxing pdc

ivory sleet
#

yeah the ternary operator

tender shard
#

i just call it question mark thing

young knoll
#

Donโ€™t worry I donโ€™t know the names for half the things I use :p

tender shard
#

although it's not really very useful for true and false lol

young knoll
#

IE wtf is (X instanceof Object instance) referred to as

ivory sleet
#

pattern matching

#

I think?

hasty prawn
#

I thought it was just pattern variable

ivory sleet
#

oh the variable part is presumably called that ye

young knoll
#

Either way, best new feature imo :p

hasty prawn
#

Agreed ^

ivory sleet
#

agree apart from structured concurrency

young knoll
#

Structured who what

tender shard
#

it's quite easy. You can just define a name for it to aumatically cast

    public boolean isEglibleEntity(Entity entity) {
        if (!(entity instanceof Slime slime)) {
            return false;
        }
        return slime.getSize() <= config.getMaxSize();
    }
#

no need to do Slime slime = (Slime) entity

#

basically it only allows you to write one line less

ivory sleet
#

basically a paradigm that tries to address the developer's control over concurrent running code, like error handling

young knoll
#

People are always talking about fancy new/upcoming features like foreign memory api

#

And my smooth brain is just here like โ€œRecords coolโ€

hasty prawn
#

mfw I only use records when IntelliJ tells me to

young knoll
#

Listeners arenโ€™t really a part of java itself

#

They are a spigot api thing, but other apis also use them

worldly ingot
#

Java makes use of the concept of listeners, yes. Though there's no "listener api"

#

They're generally referred to as callbacks

young knoll
#

Ah right

worldly ingot
#

Bukkit's event API, yes, is Bukkit-driven

#

Done through the PluginManager iirc

young knoll
#

Basically the server just invokes your listener method when certain things happen

#

Via evil reflection

ivory sleet
#

well, java does use observer/subscriber based callback patterns internally and somewhat externally also in the jdk

worldly ingot
ivory sleet
#

nah

worldly ingot
#

Curious what the performance benefits would be of that

ivory sleet
#

reflection is going to get reimplemented with method handles

young knoll
#

Heh Runtime code generation

hasty prawn
#

Let Paper figure that out peepoCute

ivory sleet
#

if that didnt happen already

#

and not all method handles are faster than reflective invocations

#

only if you do it correctly with the right method handle and strategy like iirc lambda meta factory

worldly ingot
#

What I do like however is that those docs make use of the snippet tag

#

Which is neat :) First time I'm seeing them in action

ivory sleet
#

yeah

young knoll
#

Nothing wrong with a niche api

ivory sleet
#

well, apparently people have been complaining about unstructured concurrency

worldly ingot
#

Not at all. I just can't see myself using it

#

Actually, no, I can think of a case or two

ivory sleet
#

I think one nice usecase is when u want a thread per user (websocket or sth), subsequently not having to rely on sth like netty to make an application scalable

worldly ingot
#

Netty will hopefully make good use of these

ivory sleet
#

yeah Prayge

fluid finch
#

I can't seem to manage to add a poison effect to an entity

#

the wither effect works perfectly fine

young knoll
#

What entity

fluid finch
#

nvm I'm just stupid

#

zombies can't be affected by poison

tender shard
#

yeah for undead things, you'd need healing instead

young knoll
#

Nah

#

Undead just canโ€™t be poisoned

round finch
#

zombie will be healed by poison

tender shard
#

yeah it's the other way around for them

#

healing potion makes damage on undead and poison makes them "healthy"

young knoll
#

Pretty sure thatโ€™s only for instant damage and instant health

#

Whereas they are just immune to poison

fluid finch
#

nah regen works as poison on em

young knoll
#

Huh

#

Didnโ€™t know that

tender shard
#

but they ar eindeed unaffected by poison

#

the wiki says

fluid finch
#

ah nvm

#

regen doesn't seem to work as poison

gray merlin
#

Can we do worldgen with spigot?

young knoll
#

Undead

Zombies are undead mobs, harmed by the status effect Healing, healed by the status effect Instant Damage and are unaffected by Regeneration and Poison. The wither does not attack zombies. Zombies are affected by the Smite enchantment.

#

According to the wiki

#

Side note I miss pre fandom wiki

gray merlin
#

and are unaffected by Regeneration and Poison
WHAT

fluid finch
#

yup

#

anyway wither works just fine

young knoll
#

The api for worldgen is somewhat basic, but you can also use NMS

#

Look at some amazing projects like Iris or Terra

gray merlin
#

I have been playing this game for 11 years

#

i did know know that they were unaffected by poison

#

or regen

fluid finch
#

I remember reading that from one of those minecraft hadnbooks

jovial grove
#

Hi all. In general, I have a small problem. I'm writing a plugin that has a few commands exclusively for admins. But players can see them in the tab completion menu. See only, don't use. Tell me, please, maybe I need to insert something into the code or the plugin.yml file?

gray merlin
young knoll
#

Set permission: xyz in plugin.yml

gray merlin
#

Oh, I misread. Apologies.

young knoll
#

If a command has a permission set it wonโ€™t appear for players without said permission

jovial grove
#

I understood you

#

I will try

#

I noticed that this is a problem with many plugins that I have installed.

young knoll
#

Yeah sadly a lot of plugins neglect to do that

jovial grove
#

For example, the AdvancedBans plugin. Players do not have access to the /ban command, but they still see it in tab completion

#

Alternatively, you can try to open each plugin through the archiver and manually configure the plugin yml

#

Maybe

smoky oak
young knoll
#

Not sure

#

They shouldnโ€™t

fleet comet
#

Hey guys, I'm trying to make a plugin that messes up a ton of things on a client, using Player#remove
But I cannot because of the safety issues, so I need an alternative. I've tried using NMS & A player's netty connection. But no further progress. Any ideas?

smoky oak
#

gonna need more context than that

fluid finch
fleet comet
#

What do you need to know

smoky oak
#

mostly

#

why

fleet comet
smoky oak
#

no i meant

#

why do you need to call player.remove, or mess with their connection

wary topaz
#

?*

dim bronze
#

you haven't declared the target variable before you've tried to set it

fluid finch
#

ignore the dependency

dim bronze
#

?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!

smoky oak
#

no

#

youre saying a random word

undone axleBOT
smoky oak
#

you didnt say what it is supposed to be

#

you probably want Player target = `

wary topaz
#

Ohhh

vocal cloud
#

Wait it's the 3h learned java guy

wary topaz
#

Thank you

#

Ah, fixed.

fleet comet
tender shard
#

you imported the bukkit Mob

young knoll
#

You have imported the Bukkit mob

tender shard
#

you want to use the NMS Mob

young knoll
#

Itโ€™s like spigot and Damagable :p

smoky oak
#

yea that probs needs nms. however, disconnecting someone removes them from the server, and you need to keep them there to make them think theyre still online.
the only idea i have is to do some network bullshit to 'remove' them from the view of other players and simulate the server around them

#

so that anything they do gets done to a simulated copy

fleet comet
smoky oak
#

not possible

fleet comet
#

dont know how

smoky oak
#

client is separate from client-server

#

a client that joined a dedicated server isnt using that internal server

wary topaz
#

Is there a way to force load chunks?

fleet comet
smoky oak
#

it might be possible, but I'm guessing the world would freeze

#

which would give it away

wary topaz
#

Well what about slowly

smoky oak
#

honestly this is a bit out of my expertiese

#

but i dont think tis possible

wary topaz
#

Alright

fleet comet
wary topaz
#

oo ty

tender shard
#

you don't need to put the specialsource thing into the same folder. just run it from the maven repo path, just like in the announcement

#

so?

#

you have it in your maven repo anyway

fleet comet
tender shard
#

since you ran buildtools

#

I mean you even copied it from your .m2 directory

fleet comet
vocal cloud
#

Packets

tender shard
agile anvil
fleet comet
smoky oak
#

look up what packet get sent to a client which sees a entity thats teleported away out of render distance

#

send that packet to the client

torpid sapphire
#

is there a way to reduce the mining speed of a pickaxe? and/or the protection of armor?
doesnt have to be specific, just need a pickaxe to work as if it was broken, so same mining speed as a hand

smoky oak
#

its possible but dont ask me what the code was

#

something something attribute

torpid sapphire
#

ill try to find something under that name then

#

thanks

young knoll
#

There is an attribute for armor strength

#

As for mining speed, mining fatigue effect I guess

wary topaz
#

p.sendMessage(ChatColor.DARK_RED + "" + ChatColor.BOLD + "Usage:" + ChatColor.YELLOW + ChatColor.BOLD + """");
Yoyo is it possible to add quotes to a

#

Reply*

young knoll
#

If you want quotes in a string escape them with \

agile anvil
tender shard
#

yeah anyway, if you have it in the same folder as your jar, and your jar is called YOUR_PLUGIN.jar, then just do these two commands

java -cp SpecialSource-1.10.0-shaded.jar:$HOME/.m2/repository/org/spigotmc/spigot/1.19.2-R0.1-SNAPSHOT/spigot-1.19.2-R0.1-SNAPSHOT-remapped-mojang.jar net.md_5.specialsource.SpecialSource --live -i YOUR_PLUGIN.jar -o YOUR_PLUGIN-obf.jar -m $HOME/.m2/repository/org/spigotmc/minecraft-server/1.19.2-R0.1-SNAPSHOT/minecraft-server-1.19.2-R0.1-SNAPSHOT-maps-mojang.txt --reverse


java -cp SpecialSource-1.10.0-shaded.jar:$HOME/.m2/repository/org/spigotmc/spigot/1.19.2-R0.1-SNAPSHOT/spigot-1.19.2-R0.1-SNAPSHOT-remapped-obf.jar net.md_5.specialsource.SpecialSource --live -i YOUR_PLUGIN-obf.jar -o YOUR_PLUGIN.jar -m $HOME/.m2/repository/org/spigotmc/minecraft-server/1.19.2-R0.1-SNAPSHOT/minecraft-server-1.19.2-R0.1-SNAPSHOT-maps-spigot.csrg
young knoll
#

\โ€

torpid sapphire
chrome beacon
#

Oh discord removed my \

wary topaz
#

Thanks mate

chrome beacon
#

๐Ÿ˜ฆ

charred blaze
#

how can i make player not see chat messages?

young knoll
#

Lol discord also supports escaping stuff

fleet comet
agile anvil
young knoll
#

Or

smoky oak
young knoll
#

AsyncPlayerChatEvent, remove them from getRecipients

fleet comet
charred blaze
young knoll
#

Iirc there is no mining speed attribute

agile anvil
young knoll
#

Sadly

charred blaze
#

does Recipients mean players who is receiving it?

torpid sapphire
#

the attributes are on itemMeta i assume?

agile anvil
charred blaze
young knoll
#

Ah yeah

agile anvil
young knoll
#

Youโ€™ll need a packet listener then

torpid sapphire
agile anvil
#

Or any other packet listener

torpid sapphire
wary topaz
#

p.sendMessage(ChatColor.DARK_RED + "" + ChatColor.BOLD + "Usage:" + ChatColor.YELLOW + ChatColor.BOLD + "\"" + ChatColor.WHITE + ChatColor.BOLD + "/message <player> [text]" + ChatColor.YELLOW + ChatColor.BOLD + "\"" + ChatColor.RED + ChatColor.BOLD + ".");
Any way to make this more compact?

smoky oak
#

i couldve sworn you could get tools a mining speed

#

huh

fleet comet
smoky oak
wary topaz
#

ooo

#

alr

young knoll
#

Yes but itโ€™s kinda janky to have that character in your source

wary topaz
#

ehh well thsi makes it easier because you can read

#

the color

young knoll
#

^

#

Ideally the enum should be used, but yes it does get a bit ugly

wary topaz
#

Does this look ugly?

#

Maybe I dont need the quotes, I fixed the period

smoky oak
#

just replace it with a space

#

its kinda standardised llike that

young knoll
#

Donโ€™t the [] imply optional arguments

#

I mean

#

I guess you can /msg someone nothing

smoky oak
#

well the [] is usually meant for 'argument' and () for optional i think

wary topaz
smoky oak
#

remove the dot

hasty prawn
#

[] is optional and <> is required

wary topaz
young knoll
#

Ah I thought <> was required and [] opt- yeah

wary topaz
#

If you do /message <player> you stay on there message so you can continue the chat with /r

reef lagoon
#

any way to make a horse have a saddle

wary topaz
#

Or you can do both.

wary topaz
smoky oak
young knoll
#

Iirc itโ€™s a method on Horse

#

Maybe

wary topaz
#

Dont you need to nbt it?

reef lagoon
#

I don't think so, I can get the horse's inv tho

wary topaz
reef lagoon
hasty prawn
#

oh you

#

nvm

reef lagoon
#

ty tho

young knoll
#

I was close

wary topaz
#

p.sendMessage(ChatColor.YELLOW + "" + ChatColor.BOLD + "You are now chatting with" + ChatColor.AQUA + ChatColor.BOLD + target.getName() + ChatColor.YELLOW + ChatColor.BOLD + ".");
Any way to make this more compact?

#

Like mergers

dim bronze
#

If you are happy with it being less readable you could use the legacy ยง codes

young knoll
#

You can .toString the first ChatColor and remove + โ€œโ€

wary topaz
#

oo

young knoll
#

Also Iโ€™d use & and translateAlternateColorCodes over the legacy symbol

dim bronze
#

that too

#

option number 3) learn kotlin

reef lagoon
#
public static String c(String string) {
        return ChatColor.translateAlternateColorCodes('&', string);
    }``` :p
wary topaz
dim bronze
#

and its more readable ๐Ÿ˜Ž

reef lagoon
wary topaz
#

Error Fixed

young knoll
#

Ah yes Kotlin and its whatchamacallit

#

Extension methods?

dim bronze
#

If I mention it every so often maybe someone will give it a try

#

but if you've only just learned java then it's probably not the right way to go

reef lagoon
#

anyone knows why this doesn't give the horse a saddle

dim bronze
#

does that code actually get run? maybe it's stopping execution before it gets to that line

reef lagoon
#

It does get run, because 10 lines later there's horse.setColor(Horse.Color.BLACK); which does work

wary topaz
#

Is there any way to save the current player you are messaging to a variable?

dim bronze
#

is the horse tamed?

reef lagoon
#

I set an owner but I don't know if it does the trick, lemme see

dim bronze
#

haven't checked but maybe a horse can't have a saddle unless it's tamed

#

I imagine that's the problem

wary topaz
#

?

#

wdym

dim bronze
#

this is why people say learn the language before you jump into spigot. A map is a relatively simple data structure you should be aware of

wary topaz
#

Oh like a string?

shut field
wary topaz
#

Similar

shut field
#

map is not similar to string

reef lagoon
opal juniper
dim bronze
shut field
wary topaz
dim bronze
#

in this case you could 'map' the player that ran the command to the player they want to message

wary topaz
#

?doc

#

?docs

#

?javadocs

dim bronze
#

it's because its a part of java not spigot

shut field
#

does anyone know how to read when the recipe book is open, and to set a recipe unavailable

#

smth to do with packets, I'd think

dim bronze
#

Nevermind, I am incorrect

wary topaz
dim bronze
#

its a bit like an array in the sense it will hold many of those relationships

#

so 1 to red isn't the only thing it can hold

wary topaz
#

I just need it to hold 1 thing though

shut field
dim bronze
#

what about when more than 1 player messages someone?

wary topaz
#

You can only do /reply

#

it will delete that one

#

for the most recent

dim bronze
#

yes, but you won't be the only player on the server. If more than one person runs the message command your plugin needs to keep track of who each person is messaging

#

if that isn't the case then there's no need for a map, just a simple Player variable for the person that the player is speaking to

wary topaz
#

oh

#

So what should I put in it?

#
public LastMsg(String user) {
        this.user = user;
        this.lastReceived = null;
        this.lastSent = null;
    }```
Cant I do that?
dim bronze
#

Like I said, before jumping into plugin development, I'd get a good grasp of not only the syntax of java, but also how to 'think in code' to know what to write to get the computer to do what you need it to do, which will involve learning data structures like maps, lists etc.

wary topaz
#

Than I'll use that.

dim bronze
#

although I wouldn't keep track of players by their name

shut field
#

i don't rlly know how to differentiate between different packets

dim bronze
#

yes, I would imagine so, I haven't worked with protocol lib in a while so I can't remember exactly how it deals with things

#

actually, you may not be able to use that packet

#

it's clientbound meaning the server sends it to the player

#

this is the one you want, and yes you'd use a receiving packet listener

#

sorry for sending wikivg links, it's how I've always checked it, but I know people don't like them because they make their own names for things

shut field
#

cool, thx

dim bronze
#

is there a reason you aren't using maven or gradle?

#

yes, but why are you using it over maven, it would make this a lot easier as the tools already exist

#

never used it so I can't help sorry. I imagine you are just giving it the commands to run manually, and I haven't used special source manually

#

I think most people saying to use ant these days are satirical. irrc you can use ant inside of maven if there is something specific you need

#

but gradle or maven will make your life much easier

shy forge
#

Maven won't compile with correct Java version

hasty prawn
#

Are you on Windows?

dim bronze
hasty prawn
#

On the 2nd line, after SpecialSource-1.10.0-shaded.jar, see the colon?

#

Right before your C:/

#

No, change it to a semicolon.

#

md_5 uses Linux, and that guide is designed for Linux. I had the same exact issue. If you do java -help in your Windows CMD and scroll up to the -cp argument, it'll say separated by ;.

#

Yes

gray merlin
#

I updated to the mojmapped spigot build

gray merlin
#

and I don't seem to be able to access any nms classes

hasty prawn
reef lagoon
gray merlin
dim bronze
hasty prawn
#

ItemStack has the same name, net.minecraft.world.item.ItemStack. Check if it's there.

onyx fjord
#

can i make string a charactersequence?

hasty prawn
#

No, the first one

#

Wait

young knoll
#

Arenโ€™t all strings a CharacterSequence

onyx fjord
#

apparently no

#

nvm

#

they are

hasty prawn
#

Yes you're right use the obf one I think @quaint mantle

onyx fjord
#

string joiner being dump

#

you cant provide just prefix

#

dum dum

dim bronze
# wary topaz I didnt get any erro

I think you'll find you will somewhere. The reason you're getting those messages in chat is because either your commands haven't registered or you're returning false in the method (which you aren't explicitly)

gray merlin
#

But it seems like all the mappings are still the same

#

a, b, c, etc...

hasty prawn
gray merlin
#

yep

worldly cradle
#

I'm stupid and idk how to set a plugin variable as the current plugin

hasty prawn
#

Just like the first few lines excluding imports

gray merlin
hasty prawn
#

Welcome to Mojang Maps

gray merlin
#

Ayy

#

But the ItemStack is the same though.

hasty prawn
#

Restart IntelliJ

#

?tas

undone axleBOT
gray merlin
dim bronze
#

i'm sorry I don't remember his name

#

bill wurtz

#

or something

hasty prawn
#

Yes

gray merlin
#

lets go

#

its done

#

thank you

hasty prawn
#

Yes but you can do that inline, you dont have to make a variable for it unless you need it for some reason

#

Sure, try it

undone axleBOT
wary topaz
hasty prawn
#

Send you plugin.yml

undone axleBOT
wary topaz
gray merlin
#

Is there a spigot > mojmaps index?

#

I don't want to come here and ask what X is for everything I need

#

That's bothersome

hasty prawn
gray merlin
#

ty

#

screamingsandals

#

loved it

hasty prawn
#

no

wary topaz
gray merlin
#

Huh, is there no mojmap for NBTCompressedStreamTools?
Found it: NbtIo.

dim bronze
#

can you send your latest.log, I still think theres an error in there

wary topaz
#

alright

dim bronze
#

There's an error within the first 50 lines ๐Ÿคฆโ€โ™‚๏ธ

#

told you there would be

wary topaz
#

wasnt in console

#

could you help me find the problom

dim bronze
# wary topaz

your main class is set to BetterCommands.Main but you're registering your commands in a class called MsgPlugin

wary topaz
#

I made 2 mains/

dim bronze
#

make sure you are pointing to the right main file

wary topaz
#

I'll fix that thogh

#

Though

dim bronze
#

you can only have one plugin class per plugin which should make sense

hasty prawn
#

You registered PlayerEvents but the listener is in MyGoal

#

No, just PlayerEvents

obtuse meadow
#

Hi, does any one know how to "register" a new/custom ItemStack in the server? I mean to able the player to the vanilla command to get the item... Example "/give @p PluginName:CustomItem".... Thanks

hasty prawn
#

The one in MyGoal wont get called unless you register it

#

You should separate the classes instead of having MyGoal be a static class inside PlayerEvents

dim bronze
hasty prawn
#

You can technically register a new ItemStack but it won't actually do anything

#

He did

#

You can add it into the server registry but you can't add it to the client registry

wary topaz
#

Class 'MsgPlugin' is public, should be declared in a file named 'MsgPlugin.java'

red sedge
#

so i have ores as entities, should I check the player proximity every x ticks and spawn the entity if the player is near enough, or have the entity spawned all the time?
which one would be more efficient in a larger scale

dim bronze
hasty prawn
#

So unless you're also requiring a mod that adds the same thing to the client registry, adding new items via registration isn't possible via spigot alone

wary topaz
#

So change it to main?

dim bronze
#

yes

hasty prawn
#

Otherwise you're going to have a ton of loaded chunks for no reason

#

And loaded entities

dim bronze
red sedge
#

alright thanks!

dim bronze
hasty prawn
#

Probably, but I was just assuming he was going to forcefully load the chunk and spawn his entities.

#

Which, is terrible

wary topaz
#

It's so difficult to transfer it to main

#

Ima need some help

dim bronze
#

intellij will do all the refactoring for you

#

shift f6 on the class name

#

but please don't ignore my advice and learn java first

wary topaz
#

๐Ÿ˜ฎ

#

alright

#

let me test the plugin

quiet ice
quiet ice
wary topaz
#
[17:32:12] [Server thread/INFO]: EthanGarey: Please note that this command is not supported and may cause issues when using some plugins.
[17:32:12] [Server thread/INFO]: EthanGarey: If you encounter any issues please use the /stop command to restart your server.
[17:32:12] [Server thread/INFO]: Server Ping Player Sample Count: 12
[17:32:12] [Server thread/INFO]: Using 4 threads for Netty based IO
[17:32:12] [Server thread/INFO]: [BetterCommands] Disabling BetterCommands v1.0 Release
[17:32:12] [Server thread/INFO]: [WorldEdit] Disabling WorldEdit v7.2.12+6240-87f4ae1
[17:32:12] [Server thread/INFO]: Unregistering com.sk89q.worldedit.bukkit.BukkitServerInterface from WorldEdit
[17:32:12] [Server thread/INFO]: Loaded 7 recipes
[17:32:13] [Server thread/INFO]: [WorldEdit] Loading WorldEdit v7.2.12+6240-87f4ae1
[17:32:13] [Server thread/INFO]: Got request to register class com.sk89q.worldedit.bukkit.BukkitServerInterface with WorldEdit [com.sk89q.worldedit.extension.platform.PlatformManager@575644fe]
[17:32:13] [Server thread/INFO]: [BetterCommands] Loading BetterCommands v1.0 Release
[17:32:13] [Server thread/INFO]: Server permissions file permissions.yml is empty, ignoring it
[17:32:13] [Server thread/INFO]: [WorldEdit] Enabling WorldEdit v7.2.12+6240-87f4ae1
[17:32:13] [Server thread/INFO]: Registering commands with com.sk89q.worldedit.bukkit.BukkitServerInterface
[17:32:13] [Server thread/INFO]: WEPIF: Using the Bukkit Permissions API.
[17:32:13] [Server thread/WARN]: [WorldEdit] Server reload detected. This may cause various issues with WorldEdit and dependent plugins.
[17:32:14] [Server thread/INFO]: Using com.sk89q.worldedit.bukkit.adapter.impl.v1_19_R1.PaperweightAdapter as the Bukkit adapter
[17:32:14] [Server thread/INFO]: [BetterCommands] Enabling BetterCommands v1.0 Release
[17:32:14] [Server thread/INFO]: EthanGarey: Reload complete.```
#
[17:32:14] [Server thread/INFO]: Timings Reset
[17:32:21] [Server thread/INFO]: EthanGarey issued server command: /message
[17:32:36] [Server thread/INFO]: EthanGarey issued server command: /msg
[17:32:38] [Server thread/INFO]: EthanGarey issued server command: /msg EthanGarey
hasty prawn
#

Use setOwningPlayer instead of setOwner

hasty prawn
#

Why do you have two classes that extend JavaPlugin

wary topaz
#

It happened when I did shift + f6

hasty prawn
#

wat

dim bronze
#

okay, maybe my advice wasn't perfect and actually requires you to understand what that keybind does

wary topaz
#

;-;

#

Ya want me to share my screen?

hasty prawn
#

Your initial one that you sent in your first message is correct with the exception of MsgPlugin should be called Main

dim bronze
#

the contents of your MsgPlugin needs to all be inside a single Main plugin class (although arguably MsgPlugin is a better name)

hasty prawn
#

True

dim bronze
dim bronze
#

your IDE should be warning you that setOwner is deprecated, that's your first sign that you probably have the wrong method

hasty prawn
#

It wants an OfflinePlayer not a String

dim bronze
#

what's the error

hasty prawn
#

Send that line

#

or error sure

#

Yeah send the line

dim bronze
#

are you definitely depending on 1.12 spigot api?

hasty prawn
#

You didn't pass an OfflinePlayer

#

Give it the Player object

wary topaz
dim bronze
#

that looks better yes

#

although there's no need to wrap getCommand calls in Objects.requireNonNull

wary topaz
#
[17:42:37 ERROR]: null
org.bukkit.command.CommandException: Unhandled exception executing command 'msg' in plugin BetterCommands v1.0 Release
        at org.bukkit.command.PluginCommand.execute(PluginCommand.java:47) ~[paper-api-1.19.2-R0.1-SNAPSHOT.jar:?]
        at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:155) ~[paper-api-1.19.2-R0.1-SNAPSHOT.jar:?]
        at org.bukkit.craftbukkit.v1_19_R1.CraftServer.dispatchCommand(CraftServer.java:911) ~[paper-1.19.2.jar:git-Paper-132]
        at org.bukkit.craftbukkit.v1_19_R1.command.BukkitCommandWrapper.run(BukkitCommandWrapper.java:64) ~[paper-1.19.2.jar:git-Paper-132]
        at com.mojang.brigadier.CommandDispatcher.execute(CommandDispatcher.java:264) ~[paper-1.19.2.jar:?]
        at net.minecraft.commands.Commands.performCommand(Commands.java:305) ~[?:?]
        at net.minecraft.commands.Commands.performCommand(Commands.java:289) ~[?:?]
        at net.minecraft.server.network.ServerGamePacketListenerImpl.performChatCommand(ServerGamePacketListenerImpl.java:2298) ~[?:?]
        at net.minecraft.server.network.ServerGamePacketListenerImpl.lambda$handleChatCommand$20(ServerGamePacketListenerImpl.java:2252) ~[?:?]
        at net.minecraft.util.thread.BlockableEventLoop.lambda$submitAsync$0(BlockableEventLoop.java:59) ~[?:?]
        at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1768) ~[?:?]
        at net.minecraft.server.TickTask.run(TickTask.java:18) ~[paper-1.19.2.jar:git-Paper-132]
        at net.minecraft.util.thread.BlockableEventLoop.doRunTask(BlockableEventLoop.java:153) ~[?:?]
        at net.minecraft.util.thread.ReentrantBlockableEventLoop.doRunTask(ReentrantBlockableEventLoop.java:24) ~[?:?]
        at net.minecraft.server.MinecraftServer.doRunTask(MinecraftServer.java:1361) ~[paper-1.19.2.jar:git-Paper-132]```
#
        at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:185) ~[paper-1.19.2.jar:git-Paper-132]
        at net.minecraft.util.thread.BlockableEventLoop.pollTask(BlockableEventLoop.java:126) ~[?:?]
        at net.minecraft.server.MinecraftServer.pollTaskInternal(MinecraftServer.java:1338) ~[paper-1.19.2.jar:git-Paper-132]
        at net.minecraft.server.MinecraftServer.pollTask(MinecraftServer.java:1331) ~[paper-1.19.2.jar:git-Paper-132]
        at net.minecraft.util.thread.BlockableEventLoop.managedBlock(BlockableEventLoop.java:136) ~[?:?]
        at net.minecraft.server.MinecraftServer.waitUntilNextTick(MinecraftServer.java:1309) ~[paper-1.19.2.jar:git-Paper-132]
        at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1197) ~[paper-1.19.2.jar:git-Paper-132]
        at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:305) ~[paper-1.19.2.jar:git-Paper-132]
        at java.lang.Thread.run(Thread.java:833) ~[?:?]
Caused by: java.lang.ArrayIndexOutOfBoundsException: Index 0 out of bounds for length 0
        at BetterCommands.msgplugin.commands.MsgCommand.onCommand(MsgCommand.java:25) ~[BetterCommands.jar:?]
        at org.bukkit.command.PluginCommand.execute(PluginCommand.java:45) ~[paper-api-1.19.2-R0.1-SNAPSHOT.jar:?]
        ... 23 more```
hasty prawn
#

Yeah because you didn't send a message when you typed the command

dim bronze
#

?paste

undone axleBOT
hasty prawn
#

Do /msg <name> Hello

wary topaz
#

๐Ÿ˜ฎ

#

ty guys so much

dim bronze
#

this method doesn't take strings at all

hasty prawn
#

^

dim bronze
#

you shouldn't be using strings because players can change their name, and although it's probably what you want in this circumstance spigot isn't going to like it

#

Although I am suprised the setOwner method didn't work

civic apex
#

how can I properly load/unload a world?

hasty prawn
#

Same actually, I'm surprised it didn't just retrieve the OfflinePlayer from the provided String

dim bronze
#

ah

#

this is 1.12

#

pre flattening

#

is the skull a skeleton skull when you receive it?

hasty prawn
#

Oh.

#

Yay data values! :D

dim bronze
#

you need to give it data 3 when you create it

hasty prawn
#

Good catch

dim bronze
hasty prawn
#

Yep

dim bronze
#

new ItemStack(material, amount, (short) data)

civic apex
#

but ive been trying for long and its not working

#

unloading once works

#

then i load using Server#createWorld

#

and unload again

#

then it throws exception

#

ClosedChannelException

#

and if i dont delete session.lock it throws a different exception

dim bronze
#

I don't think creating a world inherently loads it?

civic apex
#

and if i pass true on unload the server crashes on the 2nd load

dim bronze
#

I might be wrong

civic apex
#

then how do i load it

dim bronze
#

?paste send your code

undone axleBOT
dim bronze
#

then I think you need to use GameProfile

young knoll
#

Itโ€™s NMS

#

Well

#

Kinda

dim bronze
#

its a separate library from minecraft

young knoll
#

Itโ€™s from AuthLib

#

Which is a part of NMS back in 1.12

#

Probably

dim bronze
#

this seems to be an alternate way

#

then you'll have to use GameProfile, but you'll still need to use reflection

dim bronze
#

according to coll its in NMS, so you'd need to use that, my bad

civic apex
dim bronze
#

no nothing changes, it just allows you to access the actual implementation of Player class, world class etc.

#

what's the exact error?

onyx fjord
#

apparently minecraft:brand runs after PlayerJoinEvent, is there any way i could make sure the value is not null?

dim bronze
#

I don't remember the location of GameProfile in the older versions, but I think it will

#

but if you are developing with the 1.12 api, then you want the 1.12 nms jar

dim bronze
#

ah, I don't think you should be deleting the session lock, that should get deleted when the world is unloaded as there is no need for it to be locked

civic apex
dim bronze
#

what code is on the line the exception is thrown on

civic apex
#

unloadworld

dim bronze
#

hmm figured so

hasty prawn
#

Did you run both commands?

gray merlin
#

Reflection doesn't seem to support mojmappings does it?

hasty prawn
#

It doesn't

#

Use mojmaps to figure out what to do and then go back and change the names to Spigot's maps

#

With the site

worldly ingot
#

Everything is reobfuscated

hasty prawn
#

oh right

#

the obfuscated names then

gray merlin
#

I'll just revert everything back now, then. Thank you guys for the confirmation

dim bronze
# civic apex unloadworld

just so we are clear, are we talking about your unloadWorld method, or boolean success = Bukkit.getServer().unloadWorld(world, save);

If we are talking about your method, which line specifically

dim bronze
#

when do you get the location? is it tied to the old world?

civic apex
#

no

#

its a set location

#

its valid

dim bronze
#

is the world correctly loaded after the first unload?

civic apex
dim bronze
#

this has me stumped honestly

civic apex
dim bronze
#

I don't think deleting session.lock should be a solution to anything

#

that's your error exactly, this does not exist in a static method. You need to pass that skull texture to your method

civic apex
#

IllegalArgumentException and NullPointerException were also thrown dont remember exactly when

fleet comet
#

Is there any videos I can watch to get to know NMS

dim bronze
#

dont just blindly copy and paste. try to understand whats happening. In this case, all that needs to change is base64Str to be the string of the texture you want to put on the head

dim bronze
#

I presume so otherwise the teleports wouldn't work

civic apex
dim bronze
#

you dont call Scheduler#runTaskAsyncronously

civic apex
#

i remember calling stuff async, but i dont think its related

civic apex
dim bronze
#

that looks more like hex than base64, where is it from

#

yes, it is

#

looks good to me, now you just need to set the heads owner to the gameprofile

#

yes,

#

no, theres a separate method for setting gameprofile owners

#

or at least there is now, back in 1.12 you need to use reflection

dim bronze
# civic apex not rn

stumped at the moment. Trying to understand that error if nothing is running asynchronously as the lock should be held by the main thread and released when you want to unload it. This is definitely a more meaningful error than the last one, and by just deleting the lock seems to open you up to more problems.

#

?tas :) i love this macro

undone axleBOT
civic apex
dim bronze
#

I imagine the ClosedChannelException is a result of the lock

#

so just deleting the file is getting rid of the meaningful error

civic apex
#

except (iirc) if i save when unloading in which case i think it just crashes

civic apex
buoyant viper
#

mappings issue

#

specialsource remap when u compile

#

most likely

dim bronze
#

it probably isn't remapping as you think it is

#

there's no need for the setOwner call at the top now because the gameprofile is doing it for you. When you initialise profile, try give it the name of an empty string rather than null, maybe it doesn't like the fact the player has a null name (second arg)

#

GameProfile profile = new GameProfile(UUID.randomUUID(), "");

#

oh no

#

does it have the custom name?

#

This is 1.12

#

pretty sure its gameprofile

gray merlin
#

I have multiple versions for my plugin, across many versions, but when publishing, it only allows me to add one file. How would I add all the versions?

#

And categorize it across the versions (1.7.10 - 1.19)

dim bronze
#

that texture isn't valid

#

it doesn't point to a skin

#

no its not too long

#

if you convert from base64 -> ascii you get this json

{"textures":{"SKIN":{"url":"http://textures.minecraft.net/texture/57ccd36dc8f72adcb1f8c8e61ee82cd96ead140cf2a16a1366be9b5a8e3cc3fc"}}}
#

that url is 404

#

no

#

that's hex

#

the base64 value of the texture property contains the whole result from the skin server

#

which is that json

#

but for whatever reason that skin was deleted from the servers

#

@quaint mantle are you still using ant?

#

send your code for remapping

#

script

#

same thing ๐Ÿ™ƒ

gray merlin
#

You using reflection?

#

Reflection is a java feature

#

but alright you're prob not using it then

#

dunno then

dim bronze
#

just checking if it matches but i thought i'd send for your reading too

gray merlin
#

I have multiple (MC) Versions for my plugin, but spigot only lets me upload one file; How do I upload all the versions and categorize them?

dim bronze
gray merlin
#

is there a reason they cannot be 1 file?
Let's see...

#

NMS, Different APIs, Different functionalities in many GUIs, different events...

dim bronze
#

you can shade them all into 1 jar no?

#

you just need 1 core api and it doesn't matter how different the implementation is in each of the modules, just make sure the right module is used as the implementation and shade them all into your plugin jar

quiet ice
#

Perhaps using ant wasnt the wisest of all choices?

dim bronze
#

perhaps

arctic moth
#

doesnt have a player name

dim bronze
#

what version

arctic moth
#

skullmeta doesnt have the textures thing i believe

arctic moth
#

did you mess up pom

#

run buildtools or smth

dim bronze
#

sshh

#

dont mention pom

arctic moth
#

did you remap

dim bronze
#

i reckon you just bite the bullet and spend 5mins setting up maven instead

vocal cloud
#

Use PDC to find items that are the same

#

?pdc

candid galleon
#

pretty sure you have to do PlayerEvents.MyGoal

smoky oak
#

ye its a nested class

#

where you want to use it

#

see

#

if you want to use for example Particle you just write Particle

#

but Particle has a nested classs like your MyGoal class

#

so i do Particle.DustTransition to get that

#

nono

#

PlayerEvents.Mygoal mygoal