#help-development

1 messages · Page 1557 of 1

sharp bough
#

thats why theres so much documentation?

quiet ice
#

they are basically something like an implementation specification, while not being the implementation itself - those are hidden

sharp bough
#

cuz its to know what each thinig does

#

for example

#

the code in w3schools

#

they have the interface animal with 2 public void , no body, they then use public void animal sound and make it sout "the pig...", the one in the interface is not doing anything

#

and if you call it is empty

#

i think i got it

quiet ice
#

Interfaces are basically glorified abstract classes with even less logic than abstract classes

sharp bough
#

thats why its called abstract

ivory sleet
#

Myeah, polymorphism basically

sharp bough
#

cuz its there but its not really doing anything

#

other than explaining what it doers

ivory sleet
#

Yup, abstract methods helps with the what, not the how

clear galleon
#

basically a template. all the classes that extend animal are animals ex. pig

#

fill in the methods according to what it is more specifically than an animal

quiet ice
#

The good thing with interfaces is that other than abstract classes, you can inherit multiple interfaces in a single class - which is good for polymorphism

ivory sleet
#

And interface segregation but yeah it’s very powerful

quiet ice
#

This means for example Player is a ProjectileSource and a LivingEntity, while LivingEntity is not a ProjectileSource and vice versa

sharp bough
#

so the "best way" of doing a plugin is having packages, each package has a main class doing a function and an interface explaining what each method does, so its more orginized in case you need to read the code

ivory sleet
#

Don’t use interfaces just because the sake of it

quiet ice
#

^

#

It is worse for performance

#

plus, it can make the code less readable.

sharp bough
#

i see

#

so 1 interface

#

explaining the code

ivory sleet
#

I see tons of open sourced projects which just layers interface after interface. It makes your application hard to navigate and if we talk about unit testing, not everything need to be strictly unit testable. Use it when you want to achieve powerful abstractions only.

clear galleon
sharp bough
#

i want a more orginized way

ivory sleet
#

Doesn’t really sound like interfaces would solve that

sharp bough
#

"smaller" way

quiet ice
#

spaghetti code I see

sharp bough
#

yea..

ivory sleet
#

🥲

quiet ice
#

interfaces wont help here I digress

sharp bough
#

im trying to find new ways to think a code, im now trying making the entire logic and then making the code

#

like skirpt

ivory sleet
#

I mean if you wanna write clean code, learn to avoid anti patterns and when to use the right design pattern.

compact haven
#

Could not find artifact net.lucaudev:api:jar:1.0.0 in (custom maven repo)

        <dependency>
            <groupId>net.lucaudev</groupId>
            <artifactId>api</artifactId>
            <version>1.0.0</version>
        </dependency>
#

I mean like it clearly exists

#

but it seems to be adding jar to the artifact id or something?

quiet ice
#

did you actually declare the repo in your pom?

compact haven
#

I did

quaint mantle
compact haven
#

and it lists the repository as the one

quiet ice
#

is it http or https?

compact haven
#

https

#

reverse proxied

quiet ice
#

then idk what the issue is

ivory sleet
#

Oh maven, rip

quiet ice
quaint mantle
#

Sorry how are they slow?

ivory sleet
#

I mean more classes to load so probably some negligible impact

quiet ice
#

Either way, INVOKESTATIC is the fastest of all

ivory sleet
#

Hmm I should start writing composeable static methods henceforth

tardy delta
#

how can i specify in which file i want to save something?

wild inlet
#

it's in paper

#

Sorry if you don't know

ivory sleet
#

Lol yeah I don’t know sorry

ivory sleet
craggy plover
#

:D

rigid drum
#

invokestatic is the fastest of all, but interface invokevirtual is no slower than invoking a method on any class. (ie the only faster alternative is 100% static methods)... which is actually totally viable especially in Kotlin. (tho personally I do statics and interfaces together)

quiet ice
#

in this case runnable is invokevirtual

rigid drum
#

Sure but that's not a facet of interfaces

quiet ice
#

Runnable is an interface, Runnable.run is an implementation of an interface

rigid drum
#

It's really the difference between monomorphic vs megamorphic call sites as well as the 2 step virtual lookup.

#

In fact interfaces can be faster than abstract classes since lambdas use invokedynamic/invokestatic and forgo the invokespecial.

ivory sleet
#

Oo

onyx fjord
#

who

#

pinged

#

me

quiet ice
#

lambdas require functional interfaces

rigid drum
#

But either way doesn't matter at all... since in this case good design will lead to better performance (as it does up the point where you have to decide which you want)

granite stirrup
#

no one

onyx fjord
#

someone

quiet ice
#

they got banned already, calm down lad

rigid drum
#

"lambdas require functional interfaces" sure so worst case... ur dealing with normal invokevirtual speed.

quiet ice
#

yes, which isn't much of an issue

rigid drum
#

Yeah, so no issue using interfaces

onyx fjord
quiet ice
#

2021s JVMs should be able to handle it - but I stand with my point of them being ever so slighly worse in terms of performance than public static final everywhere

quiet ice
wild inlet
ivory sleet
#

Nope I don’t

#

I am a mere discord helper lol

wild inlet
#

Could you send it up the chain

wild inlet
ivory sleet
#

You just got mine

wild inlet
#

Helper's are easier 😉

wispy monolith
#

any recommended resources for making a custom item with an action when clicked?

opal juniper
#

Conclure is just better

wild inlet
#

Plus, you're very responsive 🙂

ivory sleet
#

Anyways liquake uh md5 will probably see it soon, no need to hesitate

rigid drum
#

@quiet ice well static abuse

#

cannot be compared to any type of abstraction at all

quiet ice
#

who cares about that

wild inlet
#

Thanks

rigid drum
#

and obv constants are gas where applicable

wild inlet
#

In meantime does anyone know where the collision api went in 1.17?

quiet ice
#

procedural came before OOP, as such procedural must be superior

rigid drum
#

anyone who writes good code and or is a developer by trade.

wild inlet
#
                    predicted.getMinX(),predicted.getMinY(),predicted.getMinZ(),
                    predicted.getMaxX(),predicted.getMaxY(),predicted.getMaxZ()```
#

Looking for this method

rigid drum
#

I agree OOP is not where it's at

#

see rust

opal juniper
wild inlet
#

I'm assuming it's probably in an instance now

rigid drum
#

but it's possible to be "object oriented" without doing virtual polymorphism too.

wild inlet
#

Inside worldsserver

opal juniper
#

Quick search should reveal it

wild inlet
#

or serverworld

wild inlet
#

Already scanned the class for similar signatures

#

Nothing.

opal juniper
#

Are you using a remapped jar?

#

Or are they on mojang mappings

wild inlet
#

I've got the yarn remapped ones here too

opal juniper
#

Run buildtools with —remapped and then decompile it

quiet ice
#

yarn???

#

you are getting desperate I see

wild inlet
wild inlet
#

I've got obfuscated

#

yarn

#

and the mojang mappings here right now

#

That I'm devving against

zinc yarrow
#

What would be the appropriate way of making tablist names appear for everyone?

Currently I have this set up because I figured that it's how it works but the name in tab is only displayed to oneself. I am running Spigot 1.17

    public void updateTabNames() {
        for(Player p : Bukkit.getOnlinePlayers()) {
            UserObject user = userManager.getUser(p.getUniqueId());
            p.setPlayerListName(p.getName() + " " + ChatColor.GRAY + user.getUsername() + "#" + user.getDiscriminator());
        }
    }
quaint mantle
#

please add the 1.17.1

quiet ice
#

spigot is already updated for 1.17.1

eternal oxide
#

latest still builds 1.17 though

hexed hatch
#

We are on 1.17.1

#

Speaking on behalf of Jacob btw, in a call

granite stirrup
#

how can i know which command im on in TabCompleterEvent?

quaint mantle
#

who tagged me

slim magnet
#

Hi, why are arrows bouncing off players instead of damaging them

quaint mantle
quiet ice
earnest sonnet
#

🤣

lament minnow
#

the legendary jacob spigot

hexed hatch
lament minnow
#

Oh.

#

durr

hexed hatch
#

Good job

earnest sonnet
#

😄

hexed hatch
#

You did it

earnest sonnet
#

I was also trolled tbf

quaint mantle
#

my server jut crashed for no reason and isnt starting up????

#

just*

earnest sonnet
quaint mantle
#

frik

#

ooop

#

oooops

lament minnow
#

bruh

wispy monolith
#

does the InventoryClickEvent work even if clicked without opening player inv?

earnest sonnet
#

but yea, generally, it counts for all types of inventories

mystic tundra
#

Anyone know of any good tutorials for maven? I have no idea what it does, and it seems way more complicated to write it out in the pom.xml than in the plugin.yml

unreal quartz
#

maven is a build system

#

your plugin.yml has nothing to do with it

mystic tundra
#

But I saw that you write out the dependencies and plugin name and all

lament minnow
#

the plugin.yml dependency list controls the order of loading plugins

unreal quartz
#

yes, those are the dependencies you use in your project

lament minnow
#

in that all dependencies load before the plugin

wild inlet
lament minnow
#

it is

wild inlet
#

And for teams - forget about it - it's like the difference between git and sending files back and forth.

mystic tundra
#

Ah

#

Okay

#

How hard is it to learn?

wild inlet
mystic tundra
#

Or to completely move to using maven

#

Ah

wild inlet
#

Quick if you know xml

mystic tundra
#

Nice

#

I dont

wild inlet
lament minnow
#

do you know how html looks

mystic tundra
#

And to convert my plugin to maven, do I have to make a new project and copy rhe files over?

mystic tundra
#

Yes im very siilled with html

wild inlet
#

No

mystic tundra
lament minnow
#

no, maven is not a software like spigot

wild inlet
lament minnow
#

it is just a software for making java projects in general

#

and other types of projects, but we like java here

wild inlet
#

With IDEA you just right click -> add dependency management -> maven

#

Or something like that

mystic tundra
#

I know, i meant how would I make the plugin im working on in maven

#

Ah

lament minnow
#

i also recommend idea because m2eclipse is sort of broken

mystic tundra
#

Ill check it out

#

Ok

#

Thx

wild inlet
#

IntelliJ definitely won that war a long time ago

#

Sooner you switch the better 🙂

mystic tundra
#

Any good tuts for maven?

wild inlet
#

I never looked back

wild inlet
mystic tundra
#

Yeah I want to apply as a dev on a server

#

K

wild inlet
#

Anything you need google it

mystic tundra
#

Ok *

wispy monolith
lament minnow
#

i have been trying to get him to switch to both maven and intellij

mystic tundra
#

Lol

#

Ok ill try tmr

#

I grg now

#

Gtg*

unreal quartz
lament minnow
#
null
#

cursed word

mystic tundra
#

Last thing, when I tried instlaling maven I had trouble

#

I couldnt find out how

#

And the tutorials that I followed didnt do anything

unreal quartz
#

the maven docs tell you how to do everything

mystic tundra
#

Yeah thats what confused me

#

I only found out how to unzip it then I couldnt find ant more steps

unreal quartz
#

i don't use windows for development, though it shouldn't be too difficult to install

mystic tundra
#

Im on mac

unreal quartz
#

then i would look for installation instructions for mac

mystic tundra
#

They have those two lines of code where do I do that? Its everywhere and I dont know wgat to do

#

Do I write it in the terminal?

#

echo $JAVA_HOME
/Library/Java/JavaVirtualMachines/jdk1.8.0_45.jdk/Contents/Home

#

This

unreal quartz
#

that just returns your java home

#

if it's undefined then maven won't work

mystic tundra
#

Ok

#

How do I install it? I just unzipped it

#

Just managed to*

unreal quartz
#

well you have it now, just add it to your path

zinc yarrow
mystic tundra
#

But when I typed mvn -version it couldnt find mvn

#

Also I only got a folder

unreal quartz
#

yes, because it's not in your path or in your immediate director

#

y

#

if you navigate to the bin folder of the extracted files you can do mvn and it will work

mystic tundra
#

Ok

#

And then to use it in an ide

#

I thinkt theres something

#

On their website

unreal quartz
#

well intellij bundles its own version of maven anyway

#

eclipse probably does the same

#

but idk

#

i dont use that

mystic tundra
#

Ok

lament minnow
#

i actually changed my maven version to 3.8.1 today because i hate being outdated in anything

#

though there is another option for something called a "maven wrapper" so i will research that

unreal quartz
#

the maven wrapper just forces a project to use a specific maven version

lament minnow
#

i dislike

candid silo
#

when doing some cleanup with code in onDisable I get a noClassDefFoundError

unreal quartz
#

descriptive

chrome beacon
#

Looks like you're using a class that doesn't exist on the server

candid silo
#

I use the class when the server is running but it just throws an error on reload

unreal quartz
#

then maybe don't reload

candid silo
#

it's a minigame and sometimes I have to to refresh some stuff

#

at the line that I call a static method to remove people from bossbars and kill some entities that shouldn't be there anymore it says this
Caused by: java.lang.ClassNotFoundException: me.mintnetwork.Objects.CapturePoint

#

capturepoint being the class

unreal quartz
#

rebuild the jar, stop the server, install it properly and try again

blissful saffron
#

Hey,
I am trying to recreate a system like hypixel skyblock where when you break a block it turns into bedrock and then turns back into the original block after a few seconds does anyone know how I would go about doing this I just can't find out how to turn it back into stone I know how to turn it into bedrock but not back into stone after a couple of seconds for example 5 would anyone know how to go about this?

unreal quartz
#

use the scheduler

chrome beacon
#

^

blissful saffron
#

idk how to go about that though

candid silo
#

Bukkit.getServer().getScheduler().runTaskLater()

quiet ice
#

1 tick = 1/20seconds so 5 seconds = 100 ticks fyi

worn sierra
#

didn't you guys know that? lol

chrome beacon
#

That could happen in vanilla in older versions if you managed to make a tripplechest

earnest sonnet
#

it's semi-useless though

worn sierra
#

it looks bad

unreal quartz
#

inventories have feelings yk

earnest sonnet
worn sierra
#

and who needs more than 54 slots lol

unreal quartz
#

u sure it's IJ doing that

earnest sonnet
#

maven way too easy, not maven you will need some tweaking

somber hull
#

remove your shade plugin from your pom?

chrome beacon
#

Are you using Maven

eternal oxide
#

set teh dependency to provided in your pom

somber hull
#

can someone hop in a VC rq, and answer a question? For 40 minutes i have been trying to figure out smthng. (its a general java question not a spigot question)

unreal quartz
#

then you've manually added it as a shaded in your build settings

chrome beacon
#

Then it doesn't shade spigot unless you've manually told it to

unreal quartz
#

change the scope or whatever its called to compile only in the dependency settings

worn sierra
#

damn i can't build spigot 1.8.8 via buildtools

unreal quartz
#

same place you added it

somber hull
#

Can someone explain to me the use of interfaces. Are they just for organization??

#

Ive been looking stuff up for 40 minutes now

unreal quartz
#

for abstraction

worn sierra
somber hull
#

Ok, then whats the use of absraction?

chrome beacon
worn sierra
unreal quartz
#

take the entity class for example, there are half a million different entites within minecraft, but they all inherit Entity

onyx shale
#

ur not using java 16 to build 1.8 right?

worn sierra
#

let me paste the error

worn sierra
chrome beacon
somber hull
chrome beacon
#

Oh well send the error

#

?paste

undone axleBOT
somber hull
#

wait

#

nvm

unreal quartz
#

you can check if it is a specific type by doing instanceof Creeper for example, but you will always be able to abstract it with Entity if you are keeping collections of different entites for examples

onyx shale
#

or entityid..

#

if you dont care about info

unreal quartz
#

it's an example of abstraction

worn sierra
#

I couldn't fix that one for like years

#

not even joking

onyx shale
#

are you up to date with the buildtools?

worn sierra
#

yep

#

latest version

onyx shale
#

so if i do it i should also get the error

worn sierra
#

I doubt it is because my internet provider

worn sierra
#

and here is a question

#

what if you compile and send it to me?

onyx shale
#

i... will not do that

somber hull
#

Ok, so what im getting is that it is used so that if you have too many of one specific type of Object it would group them all together?

worn sierra
onyx shale
#

but what you can do... is get the paper one wich doesnt require buildtools

unreal quartz
#

all java objects extend Object

somber hull
worn sierra
#

people be like "no can't otherwise i will get arrested" when I ask that

unreal quartz
#

so you can do Object obj = <any type of object here>

somber hull
#

Ok that makes a lot of sense

onyx shale
#

im just not in the mood to get booted..

worn sierra
#

oh

#

alright

#

can't judge you

unreal quartz
onyx shale
#

as nobody can know if the jar i sent is modified to backdoor or shit

unreal quartz
#

technically they could, but most of them in bukkit don't

onyx shale
#

so its better to keep it safe

earnest sonnet
#

I need a this emoji for reactions

worn sierra
somber hull
onyx shale
#

usually unless you actually code something from scratch the need for abstraction doesnt usually happen

waxen plaza
#

is it possible to color the inventory title?

onyx shale
#

yes

#

just add color to it

waxen plaza
#

do color tags work?

onyx shale
#

aka.. set title with a color string

#

yes ChatColor. does work here

waxen plaza
#

I am trying to get some player input when creating the inventory and idk how I would do this

onyx shale
#

translate the string you receive

#

and let them use the color codes &

waxen plaza
#

ok

#

Ye, ik

onyx shale
#

if they dont..

opal juniper
#

All of the chat colour enums work iirc

onyx shale
#

however dont think its a good ideea to give them a chance to mess them up

slim magnet
#

What makes arrows bounce off players?

proud basin
onyx shale
#

you can get some really stupid strings with some combinations

onyx shale
worn sierra
opal juniper
#

Usecase*

opal juniper
#

Probs just let them use the colour codes - don’t they work by default

onyx shale
#

dont think unless you specify it to

opal juniper
#

Huh

worn sierra
onyx shale
#

unless you call it somewhere in your code its gonna get passed as a literal string

somber hull
#

THANK YOU!

onyx shale
#

so you will have all the color tags

worn sierra
#

yaay

opal juniper
#

I thought that all the chatcolour enums did was be a placeholder for them

worn sierra
opal juniper
#

But I guess

worn sierra
slim magnet
eternal oxide
#

spawn protection?

minor garnet
#

I'm trying to get all other players to see a player pulling a bow, but why isn't it working?

waxen plaza
#

What is a popular permission plugin that work with Vault api?

eternal oxide
#

GroupManager or LuckPerms

shy forge
#

For itemmeta, I’m trying to set the display name. It’s saying that setDisplayName(String) is deprecated and I have to use displayName(Component). I don’t really get components but is there a way to make a string into one?

waxen plaza
#

Ok

young knoll
#

Oh

#

Are display names components now?

sullen marlin
#

they're not deprecated in spigot...

young knoll
#

I see

shy forge
#

Oh shoot is that a paper thing?

shy forge
quaint mantle
#

has playerconnection changed in 1.17?

young knoll
#

Unmapped

#

Don't recall what it is, b or d maybe?

waxen plinth
#

I was summoned?

#

But now the message is gone thunk

young knoll
#

👻 :ping:

quaint mantle
#

sike

sullen marlin
#

WHY DO YOU NEED PACKETS FOR SCOREBOARDS

quaint mantle
#

I found it

young knoll
#

😕

wild inlet
quaint mantle
wild inlet
#

In what way can you not order them correctly?

#

I can think of one scenario - but packets won't help you if that's it.

quaint mantle
#

so its for tab, we can use spigot to set the display of the player but also to keep tab in order by the ranks.
i know you can set the display with the API but you cant order it

sullen marlin
#

Isn’t order determined by their score..l

young knoll
#

I thought it was alphabetical in tab

wild inlet
young knoll
#

Or are we talking tab a plugin

sullen marlin
#

But also idk what tab has to do with scoreboard packets

wild inlet
#

Honestly, making / using a tab api is just easier for us

wild inlet
sullen marlin
#

?1.17

undone axleBOT
young knoll
#

You can already use Mojmap in 1.17

wild inlet
#

I know

#

I meant actual development of spigot

sullen marlin
wild inlet
#

Tried to make that clear

#

I've read that post, but I was curious about actual spigot dev

#

I'd find it nicer to contribute API with mojang mappings

#

Though I'm sure there's a way to back & forth purely in your dev environment

wild inlet
quaint mantle
#

I got another question how do you spawn a entity for only 1 player with out using NMS. To my knowledge it’s not possible with out it.

sullen marlin
#

Pretty sure it does answer your question

wild inlet
#

But no I don't think so

#

I'm asking about development of spigot

gleaming grove
#

md_5 you know why the iteams dont appear in the anvil?

gleaming grove
wild inlet
#

I'm not sure pinging him for coding questions is really a great idea

#

There's plenty of talented people round here that can help

quaint mantle
wild inlet
#

There's only one head of spigot around to answer those questions

gleaming grove
#

ye i asked this question 3 times and noone know the reason

#

so maybe god know the answer

#

: P

wild inlet
#

For starters it's not using correct java formatting

wild inlet
# quaint mantle <@263617378032680962> this isn’t possible with out NMS
Every time you go near NMS you need to ask yourself: 1) Do I need NMS for this? 2) Is there an API for this? 3) Can I contribute / create an API for this? Perpetual (ab)use of NMS by developers hurts everyone. It hurts server owners who must constantly wait for updates and it hurts other developers by stunting API growth and providing a bad example.```
#

md_5, if you want reasons people don't contribute API, it's because:

  • It's a lot faster to make an NMS solution yourself usually
  • You're being asked to get a feature in quickly, and developing and testing especially when honestly deving for spigot is difficult to setup, it takes forever.
  • Once you do get it working, you're then locked out of updates until your pull request is accepted, if it's even accepted.

So the dominant strategy is just use NMS if API doesn't cover it. The other route takes forever, most devs on the job just don't have that kind of time.

#

It's a tricky problem to solve, but I there are a few things that could be improved.

sullen marlin
#

Obviously I’m aware of those reasons

wild inlet
#

You come across quite hostile.

sullen marlin
#

It’s clearly locally more efficient to use NMS, but when 1000 devs all use NMS for the same thing, globally its not more efficient

whole stag
#

^

wild inlet
#

Of course, but that's a difficult problem to solve

#

Because humans are... humans.

whole stag
#

Look at python, its strength comes from all the modules and libraries

sullen marlin
#

Also if you use NMS you need to update each version, whereas if you make an API we handle that

wild inlet
#

If it was easier to contribute API than do it yourself, I'd be doing it all the time

#

I certainly don't want that NMS everywhere

whole stag
#

It's not that much harder

#

And definitely cleaner and more portable

sullen marlin
#

As for on the job, maybe people should contribute something to the free software they rely on

opal juniper
#

I’d have to learn how server patching and stuff works though… that’s what holds back

wild inlet
#

In fact most of the time it isn't

whole stag
#

It's a question of if you want to do it right, or if you want to do it lazy

wild inlet
wild inlet
sullen marlin
#

The point is you and your boss are completely free riding

#

You’re not contributing time and you’re not contributing money

wild inlet
#

And that's the best I can offer

sullen marlin
#

Maybe you should reconsider one of those

wild inlet
#

I'm a hobbyist, not a full timer in this community.

#

I think if you're trying to appeal to a sense of morality, especially in this community

#

You're going to fail

opal juniper
#

True

wild inlet
#

And you're either blind or stubborn if you can't see that.

whole stag
#

Okay, appeal to your sense of actually being a good programmer then

#

NMS is an antipattern

wild inlet
#

I don't know what you're trying to do here

#

Insult me into contributing API?

whole stag
#

Good programmers don't use anti-patterns

wild inlet
#

This is a bigger issue than just me

opal juniper
#

I don’t know if I like where this is going…

opal juniper
whole stag
#

Yee

opal juniper
#

Nice one

wild inlet
#

I don't really understand the point of his argument honestly, I'm just trying to hope it'll be better in future.

whole stag
#

It's not hard

wild inlet
#

And doing my best to give thoughts on why it's not a better environment

sullen marlin
#

We can't appeal to your morality and we can't appeal to your programming skill. What should we appeal to?

wild inlet
opal juniper
#

He is a lost cause

wild inlet
#

In this one conversation

whole stag
#

make NMS a payed expansion

opal juniper
wild inlet
#

I will, and I want to contribute API

opal juniper
sullen marlin
#

You, plural

#

Everyone

wild inlet
#

I wouldn't be talking about this if I didn't care

opal juniper
#

I would

sullen marlin
#

You said morals will fail

wild inlet
#

I think it's naive to think they won't

#

As humans people prove time and time again it's better to make it the objective course

#

Game theory - and all that.

sullen marlin
#

Yes, so what will work

wild inlet
#

If the dominant strategy was to contribute, I think that would be beneficial for everyone

sullen marlin
#

That's what I'm asking you

wild inlet
#

I think the path for developing spigot should be simpler. More little tools to streamline the process

opal juniper
#

Hey md did you say in your announcement that at some point in the future you were gonna add armour events? Did that mean like change armour sorta thing? Just wondered

wild inlet
#

We've been through it before, and it wasn't pleasant

#

that was a while ago though.

#

I'm sure it's improved a little since then

sullen marlin
#

You're just saying shit should be better without actually saying how

cobalt lagoon
#

Do you think mojang will ever switch from zlib to lz4?

wild inlet
#

There's always more resources to put out. If it was very simple, say one command to get the source in front of me, do my edits, then another simple command to get proper patches and one other to commit + push them properly in a neat little bow. That'd be lovely.

eternal oxide
#

I think its time to start deprecating bukkit and homogenise it all under spigot.

wild inlet
#

I'm gonna look it up some more

#

It's been a while since I've tried the spigot dev stuff

#

I'll educate myself on the current toolset

sullen marlin
wild inlet
#

Then come back with more

#

Because it's been too long

sullen marlin
#

Both of which have existed for 6+ years

wild inlet
#

and I'm not educated enough on this

whole stag
#

obviously

sullen marlin
#

It's already happened?

#

Several versions ago

cobalt lagoon
#

Well @wild inlet the docs explain all the hook points? The rest is just understanding Java.

opal juniper
#

I think what we mean is change from org.Bukkit to org.spigot or something like that, well that’s what I mean. Remove all Bukkit references

sullen marlin
#

Relatively pointless change

eternal oxide
#

yep, drop bukkit all together in the end

#

pointless for anything other than uniformity

wild inlet
#

I mean

#

What's the benefit

#

of relocating code

#

Is it hurting your workflow?

#

Doubt it

cobalt lagoon
dusk flicker
#

Force people to not use old vers

#

No backwards compatibility easily

wild inlet
opal juniper
dusk flicker
#

Well it's about time tbh

wild inlet
opal juniper
#

Which I always found weird

eternal oxide
wild inlet
#

I can't remember the last time I used spigot()

opal juniper
#

Components

wild inlet
#

i think they just need new names

#

Hasn't paper given them new names?

#

That's a decent way of doing it

#

Hell

#

Isn't method overloading valid?

opal juniper
#

Probably In the middle of bitching about them

wild inlet
#

Except for return types

#

Probably.

dusk flicker
#

A good first step to elimate Bukkit is stop giving options for making the jars with bt lol

#

People still run Bukkit for whatever damn reason

opal juniper
#

What?

#

Oh

eternal oxide
#

Yep, so it only produces spigot

tired dagger
#

I say we eradicate the Spigot API altogether. Problem Solved.

dusk flicker
#

Genius

#

I heard paper broke backwards compatibility in 1.17 but no clue about it

tired dagger
opal juniper
#

Yeah

#

They did

eternal oxide
#

I believe they only support java 16 now

dusk flicker
#

I saw they changed their packages but anything else change?

opal juniper
#

They removed destroytokyo iirc

#

And like apparently some spigot shit don’t work

wild inlet
#

Someone say if I'm wrong

#

But where's the part of this to actually compile your changes?

dusk flicker
#

Interesting

eternal oxide
#

?contribute

quaint mantle
#
public ConcurrentHashMap<UUID, Integer> getPlayerVoted = new ConcurrentHashMap<>();
public ConcurrentHashMap<String, Integer> getVotes = new ConcurrentHashMap<>();
``` I have that for the map voting system I'm trying to make. The getPlayerVoted just gets what the player has voted on and getVotes just gets the map + the amount of votes it has. I'm having an issue with it because I 'm trying to check if they have voted on something else prev and then removing their last vote and then apply the new one, but I'm not sure why I can't / how I can do that with what I'm currently using.
wild inlet
young knoll
wild inlet
#

This is all I see

#

Which doesn't seem to be very helpful.

#

Install git and run buildtools? What?

opal juniper
#

What’s a cla

eternal oxide
wild inlet
opal juniper
#

I feel like a dumb dumb

#

Ok

wild inlet
opal juniper
#

But what does it stand for

cobalt lagoon
eternal oxide
undone axleBOT
wild inlet
opal juniper
#

U do

dusk flicker
#

You use buildtools run it and edit off of it afaik

unreal quartz
dusk flicker
#

Then generate a patch I believe, I'm no expert in spigot contributing

eternal oxide
quaint mantle
wild inlet
#

The guides are great

#

But they're unclear

cobalt lagoon
#

Yeah, I assume the votes will be interacted by players in-game, and I don’t see why you would need the map sync

unreal quartz
wild inlet
#

And there's questions

eternal oxide
unreal quartz
eternal oxide
wild inlet
#

It definitely needs work

#

Because this just takes forever

#

All the commands

#

Testing patches

#

Even the CLA

cobalt lagoon
#

Can’t you just fork it from github?

whole stag
#

What do you mean "all the commands"

wild inlet
#

Most devs will say "Fuck waiting 24h I'll just get this in production now and be done and go to sleep"

wild inlet
eternal oxide
#

I shoudl do the CLA myself sometime as there are some features I know are missing that could easily be added

wild inlet
#

But tbh the red tape of submitting a pr etc

#

It's all gonna take time

whole stag
#

From testing?

#

And reviews?

wild inlet
#

What?

whole stag
#

Where is all the time you're talking about coming from?

wild inlet
# whole stag Where is all the time you're talking about coming from?
Fork Craft Bukkit
Clone your new repo
Download BuildTools.jar and move to a separate folder (it will generate a lot of files next step)
Run BuildTools.jar (follow the guide at the bottom of this post)
Now we need to generate some code from the current existing patches in order to have all the classes and files necessary to compile and build the project.
make sure you are in the directory of your cloned CraftBukkit repo.
run:
./applyPatches /path/to/buildtools/work/decompile-xxxx
That will generate the appropriate nms-files and classes. Make sure that you don't add these to version control. The only code that gets added to version control is the nms-patches/ directory.
You can now edit the CraftBukkit code and make your changes/implementations.
When you are finished, run the following commands to create a patch for the work that you've completed.
make sure you are in the directory of your cloned CraftBukkit repo.
run:
./makePatches /path/to/buildtools/work/decompile-xxxx
git add nms-patches
git commit -m "Adds implementation of x"
git push origin your_branch_name
Now that your branch is all updated, you can follow the creating a PR guide above under Bukkit.```
#

And that's not all of it

whole stag
#

...

wild inlet
#

Plus

#

May I draw to your attention

#

You still need to test

#

Then get into your project

#

and actually code for your new API!

#

you haven't even got in your original feature!

#

Tbh, I need to come up with solutions

whole stag
#

What's the problem with those commands?

wild inlet
#

But I don't think ignoring the fact there's an issue to be solved here helps anyone

unreal quartz
#

are you just going to keep moaning about it?

wild inlet
#

True

#

Tbh

#

I do keep getting pinged with qs

#

A bit of humility wouldn't hurt around here.

dusk flicker
#

What are you on about

eternal oxide
#

Impossible, you are amongst the egos of programmers here.

whole stag
#

That's about as streamlined of a workflow that you could ask for. Build, test, push

#

Technically there isn't even that much testing in there

wild inlet
#

Software is the worst

#

Most jaded people I've interacted with? Open source software leads

#

You get beat down over the years

#

Can't really blame them

eternal oxide
#

I've seen worse. I joined the Paper one once 🙂

wild inlet
#

Being wrong isn't bad.

#

Anyway

#

This isn't relevant to spigot dev

eternal oxide
#

No idea what you mean there, I'm always right.

whole stag
#

Is this the same person that was talking earlier?

wild inlet
#

I'mma had out

wild inlet
#

I needed to educate myself

#

and I still am.

#

Anyway

#

G'night all.

wild inlet
whole stag
#

You make no sense though

wild inlet
#

This discussion ultimately serves no purpose

whole stag
#

You realize that you are one of those problem people that you just described, and that the open source team leads that you "understand" are the same that you just said were doing things wrong

wild inlet
whole stag
#

With the contribution workflow?

wild inlet
#

Just because it's a difficult job doesn't mean someone should never critisice

#

And you're trying to suck me into more

#

I need sleep

#

Goodbye

whole stag
#

The contribution workflow is pretty darn streamlined as far as workflows go, and well documented too

#

The reason that most people don't contribute is that they're too lazy, not that the workflow is convoluted

wild inlet
#

I'll leave it to you to solve an entire population of developers being lazy!

whole stag
#

You don't need to solve that

#

You just need to solve the good developers being lazy, and convince people that are lazy that it's not always our place to fix things for you

#

Everybody on this server contributing changes would be just as bad as nobody

cobalt lagoon
#

Is it possible to change the world compression to lz4 within a spigot fork?

whole stag
#

Probably. What are you looking to gain?

cobalt lagoon
#

Less disk usage and better performance. Could possibly add in a in-memory world feature for smaller worlds as well ofc.

#

Well performance on the game itself might not be a possible outcome of this.

whole stag
cobalt lagoon
#

Ohh nice

#

Didn’t know.

blissful saffron
#

would anyone happen to know why this doesnt work?

runic mango
#

hi, bit of a noob question: I'm trying to make a plugin but I keep getting cannot load plugin, uses the space character in its name but i can't find where this space is, i despaced the name in plugin.yml and and pom.xml then rebuilt but that didn't fix it

whole stag
#

My question is if it uses lower disk space, does it also increase the time needed to compress and uncompress things written to the disk?

cobalt lagoon
#

I know swm made the use of Zstd, just wanted my implement it directly in the fork so we don’t need to add an agent.

cobalt lagoon
whole stag
#

Nice

cobalt lagoon
#

The one minecraft uses originally is over 20 years old 😛

#

Zlib or something

blissful saffron
#

package TreeSpawning;

import org.bukkit.Bukkit;
import org.bukkit.Material;
import org.bukkit.block.Block;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.block.BlockBreakEvent;
import org.bukkit.event.player.PlayerDropItemEvent;
import org.bukkit.scheduler.BukkitRunnable;

import me.facemonster11.TreeSpawnerCrypticCraft.Main;

public class OakLog implements Listener {

int Task;

    @EventHandler
    public void onBreak(BlockBreakEvent e) {
        Block block = e.getBlock();
   
        Player player = e.getPlayer();
       Task = Bukkit.getServer().getScheduler().scheduleSyncRepeatingTask(new Main(), new Runnable() {
           
            int x = 0;
            int limit = 5 * 20; 

            public void run() {
                if(block.getType() == Material.STONE) {
                block.setType(Material.BEDROCK);
                x++;
                if (x == limit) { 
                    block.setType(Material.STONE);
                }
                }
            }
        }, 0, 200); 
   
    }

}

Does anyone know why this doesnt work?

granite stirrup
#

?paste

undone axleBOT
blissful saffron
steep nova
#

what are you trying to do?

blissful saffron
#

When u break a stone block it turns into bedrock and after 10 secconds it turns back into stone

eternal oxide
#

You can;t use new Main()

#

you have ONE instance of your Main and thats created by Spigot

blissful saffron
#

what should I put there instead

eternal oxide
#

inject your main instance into the class through a constructor

#
public OakLog (JavaPlugin plugin) {
    this.plugin = plugin;
}```
light merlin
#

Is there any reason why SpecialSource2 code isn't public?

eternal oxide
#

Fear?

light merlin
eternal oxide
#

Criticism

#

I'm only guessing as I have no idea what special source 2 is

light merlin
#

SpecialSource2 from what I understand is not public for some reason.

eternal oxide
#

The Licence says all rights reserved

light merlin
#

That is irrelevant to what I am asking though. A lot of licenses say "All rights reserved". The SpecialSource license allows anyone one to use it as long as the original copyright notice is included.
I just want to know why SpecialSource2 is not Open Source.

eternal oxide
#

Because the owner chose all rights reserved.

#

There is no obligation to open source your code

light merlin
#

Considering md_5 is the creator of SpecialSource2 and uses it in BuildTools, it would be against the interest of the community to keep it closed source.

eternal oxide
#

His code, he can do as he likes with it.

minor garnet
#

. Can some help me with it,

lament minnow
#

For Maven, which dependency scope would be best suited for annotations?

blissful saffron
lament minnow
#

triple help request combo

eternal oxide
#

Your OakLog class will not even compile

#

add a field for plugin

#

up where your Task field is

#

then replace new Main() with this.plugin

#

Then in your Main change new OakLog() to new OakLog(this)

blissful saffron
#

what do I put in as a field

eternal oxide
#

JavaPlugin plugin;

#

above or below int Task;

blissful saffron
#

Im not getting any more errors but its not doing what its supposed to do though

eternal oxide
#

check your latest.log for any startup errors

blissful saffron
#

Nope none

#

is the code all correct?

eternal oxide
#

no idea, what are you expecting it to do?

blissful saffron
#

When u break a stone block it turns into bedrock and after 10 secconds it turns back into stone

eternal oxide
#

ok, does it turn into bedrock to start?

blissful saffron
#

no

eternal oxide
#

it shouldn't need it but you should have @override on your run method

#

and delete the line e.getPlayer(); its pointless and doing nothing

#

now the reason its not workgin is because you are using Block

#

by the time your code runs the block has been broken so when you test its already AIR

#

you need to use a BlockState

#

BlockState block = e.getBlock().getState();

#

then after you call setType you need to block.update() after

blissful saffron
#

okay im trying this

split egret
#

What's the best method to get a player's UUID from name?

eternal oxide
#

getOfflinePlayer(name) is your only real option

split egret
#

But it's deprecated .-.

eternal oxide
#

yes

#

is your player always going to be online?

split egret
#

Nope

eternal oxide
#

is it always going to be a player that has been on your server?

split egret
#

Should be

eternal oxide
#

then you could use getOfflinePlayers() and search them

split egret
#

Querying the API?

eternal oxide
#

that will return a Collection of all known players for yoru server

#

thats what getOfflinePlayer(name) would do

split egret
#

ight cheers

lament minnow
#

may i go next

eternal oxide
#

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

lament minnow
#

ah okay

#

well i said it earlier

#

For Maven, which dependency scope would be best suited for annotations?

eternal oxide
#

compile

lament minnow
#

from my understanding, provided can be used for things like the spigot api and spigot plugin dependencies, and compile can be used for non-spigot assets like swing layout and such

#

okay thanks

#

no idea of what situation would call for runtime though

dusk flicker
#

as far as I know provided means you dont need to have them in the jar, while compile means you need them

dusk flicker
#

Theres prob a lot more info on that just thats my common sense reason lol

lament minnow
#

i understand what it means, but i can not think of any examples

#

in other words, i do not know how to apply it to anything

blissful saffron
#

Still not working here is what its looking like now

eternal oxide
#

does your block get changed to bedrock?

dusk flicker
#

external libraries that spigot doesnt include would require to be compiled, apis, etc, provided would be using a library that spigot provides but you cant access through the api would be my best example in spigot terms

blissful saffron
#

no it doesnt

lament minnow
#

so would integrating plugins require compile or provided

dusk flicker
#

if you are using an api of a plugin, if that plugin is run on the server already you dont need to create a new instance of it in your jar, so it would be provided

eternal oxide
lament minnow
#

i was using provided because i was thinking that compile could make parts of the plugins function inside of the compiled jar

dusk flicker
#

You really shouldent have to use compile much in spigot unless you are using external libs

blissful saffron
#

Ight

lament minnow
#

oh okay i was thinking that i was using compile too little

#

thank you for your maven knowledge

eternal oxide
blissful saffron
#

okay

eternal oxide
#

your code should then at least turn it to bedrock, but it will not set it back to stone

blissful saffron
#

Alright trying now

dusk flicker
# lament minnow oh okay i was thinking that i was using compile too little

So heres a better definition that I found online,

Provided are dependencies that should be provided at runtime by an outside executor or a JDK, such as Spigot.
Runtime are for dependencies required at runtime but not for compilation of the project.
System basically means you host the jar yourself and you point to it.
Compile basically means that the dependency is not provided and you will be providing it.

all paraphrased, excluding Test and Import scopes

lament minnow
#

i can comprehend all of them, excluding runtime

#

and import since i rarely hear of it

dusk flicker
#

yeah runtimes a weird one lol

blissful saffron
#

@eternal oxide Nothing.... idk what im doing wrong

#

is block update in the right location

lament minnow
#

i can not understand how a project could be compiled without a dependency but then require it whilst running

eternal oxide
#

does your plugin load?

dusk flicker
#

¯_(ツ)_/¯

lament minnow
#

maven moment

dusk flicker
#

Mavens fun xD

#

I use compile a lot lol but thats also cause I work on weird shit

eternal oxide
lament minnow
dusk flicker
#

ill send one of my pom's 1s lol

blissful saffron
#

it does yeah and no errors a few mins ago it placed the bedrock if I spammed placing it and breaking it but that was before putting in the BlockState block = e.getBlock().getState(); thing so it does work its the block.update in the right area?

lament minnow
#

oh boy

dusk flicker
#

but yes

eternal oxide
lament minnow
blissful saffron
#

yes stone block I did this before and It worked but without the scheduler

dusk flicker
#

yeah like I said the formatting is weird dont question it lmao

eternal oxide
#

one sec

dusk flicker
#

Pulled it from my git rather then opening my IDE

lament minnow
#

i spot a SYSTEM DEPENDENCY

dusk flicker
#

I spot 2

lament minnow
#

oh your plugin annotations are provided

#

does the spigot server include them

dusk flicker
#

as far as I know that executes stuff at compile

#

Let me check quickly

lament minnow
#

oh right

#

so it is not really needed after compilation

dusk flicker
#

yeah

#

the Spigot wiki on them actually dont say to put them at anything

lament minnow
#

i do not think that a scope exists for that kind of dependency

#

despite being needed only for compilation, the compile scope would keep them afterward

#

maybe gradle has one, but i do not know gradle at all

dusk flicker
#

Considering its a spigot resource by md they might be shaded into Spigot, gonna check quickly- its not.

eternal oxide
blissful saffron
eternal oxide
#

I didn't try it

blissful saffron
#

Didnt work and no errors

eternal oxide
#

I guess I need to run up a server then

blissful saffron
#

sorry for this

cursive glen
#

How would I got about combining two text components?
like this

#

oh

#

uh

#
TextComponent join_message = new TextComponent(ChatColor.translateAlternateColorCodes('&', "&c[DeathSwap] " + p_send.getDisplayName() + " is starting a DeathSwap game! Click to Join >"));

TextComponent join_button = new TextComponent(ChatColor.translateAlternateColorCodes('&', "&a[JOIN]"));
                join_button.setClickEvent(new ClickEvent(ClickEvent.Action.RUN_COMMAND, ""));
                
                
                Bukkit.getServer().spigot().broadcast(join_message + join_button);
#

the bottom line is the non working one

granite stirrup
#

Lol there's a 69 in it kinda

lament minnow
#

the funny

eternal oxide
# blissful saffron sorry for this

This works ```java
@EventHandler
public void onBreak(BlockBreakEvent e) {
Block block = e.getBlock();

    if(block.getType() == Material.STONE) {
        block.setType(Material.BEDROCK);
        e.setCancelled(true);

        Bukkit.getServer().getScheduler().runTaskLater(this.plugin, new Runnable() {

            @Override
            public void run() {

                block.setType(Material.STONE);
            }
        }, 200);
    }
}```
urban lava
#

How would i start out making a plugin

#

its super confsuing and I don'

#

t have much experience with java dev environments

granite stirrup
#

Tutorials

eternal oxide
#

?learnjava first

undone axleBOT
granite stirrup
#

A bunch of them

cursive glen
urban lava
#

not just an online compiler

urban lava
#

is it possible with vscode

#

just wondering

eternal oxide
#

eww

granite stirrup
#

Yes I think so

cursive glen
granite stirrup
#

You will need a extension tho

eternal oxide
#

please pick InteliJ or Eclipse. You will get more support using those

urban lava
#

ok

cursive glen
#

would never recommend vscode to anyone for spigot development

#

Literally only chads do that

blissful saffron
eternal oxide
#

np

urban lava
#

ok ill go install it, im just looking to make a plugin that gives a random potion effect on kill

#

that stacks

#

ive seen it in a youtube video but can't pay for patreon

shadow gazelle
#

Okay so I have an issue

#

My plugin makes it so that you can fly when you have a chestplate with my enchant, and it breaks essentials fly

eternal oxide
blissful saffron
eternal oxide
#

above

blissful saffron
#

cause I was having that problem and tried to fix it

eternal oxide
#

I just updated the code I posted above

blissful saffron
#

okay ty

slim magnet
#

Hello, I have an Endercrystal and I'm trying to cancel all damage events to it (without making it invulerable because I need to detect left clicks). Now it doesnt get destroyed when I hit it, but when an explosion I spawn through code happens near it, the ender crystal disappears. Why is that?

#

And how do I cancel it

hasty prawn
#

Hey, so I'm having some issues with the new 1.17 Mojang mappings. I got everything working I'm pretty sure. Depend on remapped-mojang, and use SpecialSource to remap back to obfuscated when building the JAR.

If I decompile my plugin, it looks like everything was re-obfuscated correctly, and almost everything NMS wise works as intended, except for 1 thing.

CraftInventoryView#getHandle throws a NoSuchExceptionError. For seemingly no reason. I even used Reflection to manually call the method and it worked perfectly fine, it only doesn't work if I invoke it directly on a CraftInventoryView object.

#

I know this isn't a Spigot issue directly, but was hoping someone might have so insight as to how to resolve the issue.

hasty prawn
#

Also seems like EnchantmentMenu is called that in the Mojang mappings, called "bnc" in the obfuscated maps, but the Server implementation refers to it as "ContainerEnchantTable" 🤔 I think I've done something wrong but I don't know what

hollow river
#

hey i've been struggling with this for an hour now, for some reason a slime im trying to spawn is spawning at 0 0 0

#

it works on my local server, but when i upload it to an online server it doesn't work on there

#

other entities i spawn with the exact same method do work but only not the slime, on the public server and i have no clue why

#

does anyone haven an idea why on the public server it gets teleported to 0 0 0 while on my local server it just works? i have no idea what it could be

hasty prawn
#

How are you spawning it

hasty prawn
hollow river
#
public static LivingEntity spawnEntity(JXEntity entity) {
        LivingEntity livingEntity = ((CraftWorld) entity.spawnLocation.getWorld()).addEntity(entity.entity, CreatureSpawnEvent.SpawnReason.CUSTOM);
        livingEntity.teleport(entity.spawnLocation);
        LivingEntity finalEntity = entity.livingEntity(livingEntity);
        plugin.entityManager.livingEntities.put(finalEntity.getUniqueId(), entity);
        if(entity.getPassenger() != null) {
            LivingEntity passenger = ((CraftWorld) entity.spawnLocation.getWorld()).addEntity(entity.getPassenger().entity, CreatureSpawnEvent.SpawnReason.CUSTOM);
            passenger.teleport(entity.spawnLocation);
            LivingEntity finalPassenger = entity.getPassenger().livingEntity(passenger);
            finalEntity.addPassenger(finalPassenger);
            plugin.entityManager.livingEntities.put(finalPassenger.getUniqueId(), entity.getPassenger());
        }
        return finalEntity;
    }
hollow river
#

so i'd do EntityManager.spawnEntity(new Slimethingmob(new Location(location data))); which works fine on my local server, or for any other custom mob im trying to spawn

hasty prawn
#

Can you send the EntityManager.spawnEntity line for the Slime

hollow river
#
Location towerSlimeLocation = towerLocation.clone();
towerSlimeLocation.setY(towerSlimeLocation.getY()+5);
LivingEntity towerSlime = EntityManager.spawnEntity(new TowerSlime(new Location(plugin.world, 1882, 79, 755)));
#
LivingEntity boss = EntityManager.spawnEntity(new BossNecromancer(new Location(plugin.world, 1882, 79, 755)));

and this always work, even on the public server so its just the slime, when i try to get the location of the slime it returns 0 0 0

#

(they're at the same location now because i was trying to see if the location was the issue but it wasn't)

#
public class TowerSlime extends JXEntity {
        public String name = "";

        public TowerSlime(Location location) {
            this.spawnLocation = new Location(location.getWorld(), location.getX()+0.5, location.getY()+0.5, location.getZ()+0.5);
            entity = nmsEntity(this.spawnLocation);
        }

        public EntitySlime nmsEntity(Location location) {
            EntitySlime entity = new EntitySlime(EntityTypes.SLIME, ((CraftWorld) location.getWorld()).getHandle());

            return entity;
        }

        @Override
        public LivingEntity livingEntity(LivingEntity livingEntity) {

            livingEntity.setPersistent(true);
            livingEntity.setRemoveWhenFarAway(false);
            livingEntity.setSilent(true);
            livingEntity.setAI(false);
            //livingEntity.setInvisible(true);
            ((Slime) livingEntity).setSize(5);

            return livingEntity;
        }

        @Override
        public void onDeath(EntityDeathEvent event) {
            event.getDrops().clear();
            bossBar.removeAll();
        }
    }
#

and this is the towerslime custom mob class

hasty prawn
#

Hm, try printing location right before & after you set this.spawnLocation in the constructor.

hollow river
#

i already did that, and the location given to the entity is the correct one but after it's spawned (directly after spawning the entity in the spawnEntity method) it returns 0 0 0

#

so im really, really clueless, the console gives no errors or info about an error or anything

hasty prawn
#

Could you send JXEntity in a pastebin

#

?paste

undone axleBOT
hollow river
#

well it doesn't have much

hasty prawn
#

I don't see any place you modify the location except for this.spawnLocation = new Location(location.getWorld(), location.getX()+0.5, location.getY()+0.5, location.getZ()+0.5);, and if you already verified that the location is correct before and after this line I'm not sure what's happening

hollow river
#

im thinking it's something external but again i wouldn't know what

#

yeah i'm pretty stumped on this, i haven't tried one thing which is trying to spawn a different mob where i now spawn the slime, but i dont see why it wouldnt work on the public sever while it works on my local one

hasty prawn
#

Yeah that is odd. Is there any configuration for spawn locations for the entities or do you hard code them all into the plugin?

hollow river
#

no configuration for that, it's "hardcoded" in the class where i spawn it in (hardcode because its an event class but like a boss event)

quaint mantle
hollow river
#

so i just tried to spawn another custom mob which did work this time so it's the slime mob that won't work on the public server

#

very very wild assumption, but could it be java versions or whatever? the slime mob is an inner class so it can interact with the boss event easily while the others aren't

#

no wait nvm the boss mob is also an inner class one so that's out of the question

hasty prawn
#

What happens if you change the EntityType of TowerSlime to something else that you know works?

hollow river
#

was about to try that, uploading to the server now

#

maybe the server just hates slimes with a passion

#

nope, changing the entity type won't work either so it's definately something in the mob class

hasty prawn
#

Well, whats different from TowerSlime vs BossNecromancer?

hollow river
hasty prawn
#

You're missing entity.setPosition(location.getBlockX(), location.getBlockY(), location.getBlockZ()); in nmsEntity() for TowerSlime

hollow river
#

didnt see that, i think i copy and pasted the base things from 2 different places then, trying it out now!

#

because the location is already set in the EntityManager.spawnEntity method, it did work without that line on my local server

hasty prawn
#

¯_(ツ)_/¯

#

Would still try it, I'm guessing that's what it is though

cold tartan
#

is there a way to get the item entities when a player dies?

hollow river
#

AH

#

IT WORKED

#

but why did it work?

#

i've been stuck on this for like 1:30 hours now

#

thanks so much holy

hasty prawn
#

Only thing I can think of is that the Local & Public servers are on different versions and they treat that differently? Not sure honestly.

hollow river
#

yeah that's what i was thinking

#

it's probably the reason why it worked on my local, but oh well it's fixed now

hasty prawn
hollow river
#

would love to know why that happened but im not gonna dive into it further for hours

cold tartan
#

oh wait

#

i know

#

u just clear the death event drops

#

then spawn the items in new

candid silo
#

for the case of using a GUI to select a kit, I have a switch case for which one you clicked that is clicked, is it is bad practice to do a player.performCommand(); ?

proud basin
#

What is the best way to implement a api key to use the plugin but without people being able to decompile it to find the api key?

compact haven
#

at the end of the day the api key needs to be read by the jvm to send the http request or whatever u want

proud basin
#

hm ok

proud basin
#

So only certain people can use the plugin

compact haven
#

wot

whole stag
#

Just supply it separately from the plugin then, all will work nicely

#

Plugin starts, checks for API key file, validates API key file, continues if appropriate

#

People could still decompile, crack, and then recompile the plugin, but there's not really much you could do about that

#

Could do same basic obfuscation if you feel like it

lunar wedge
#

Is there a way to change a players time, but not affect other players? For example, it could be night, but I could run /ptime day and it would be day for me?

lunar wedge
whole stag
#

There's not really that much more to explain. You distribute your jar, and then give the API key separately. When the plugin loads you check for the API key file exists, read the key out of it, and then check if it's a valid key. If it's a valid key, you continue loading. Else, terminate

proud basin
#

right

#

but where should I be storing these api keys

leaden falcon
#

How do I completely stop creepers from exploding?

#

Like not stop the explosion damage, but just make them never ignite?

#

Is there some CreeperIgniteEvent I can cancel?

proud basin
#

You could maybe use EntityExplodeEvent

leaden falcon
#

I want to stop the creeper from ever igniting

hasty prawn
#

EntityCombustEvent maybe? Kinda hazy on what "Combust" means.

whole stag
leaden falcon
#

Also my reasoning is I wanna experiment with my own creeper mechanics

#

Like instead of it exploding, it shooting snowballs or smth

leaden falcon
#

Yeah that isn't working