#help-development

1 messages · Page 1095 of 1

pine crest
#

what a shame

worthy yarrow
#

I'm still figuring data structures

pine crest
#

which one?

worthy yarrow
#

Uh

#

Mainly island data rn

#

I gotta start working on one thing at a time lol

pine crest
#

yes that would be great

#

i see ur work practices havent reflected over to your freetime projects

worthy yarrow
#

I've got like 4 different half written mechanics and the core is still not up to foundation level

worthy yarrow
#

yeahhhh just means more rewriting in the future hence why i should actually focus on one thing at a time kek

pine crest
#

is it java or kotlin?

worthy yarrow
#

java ofc

pine crest
#

hmm

worthy yarrow
#

Kotlin is for goofy goobers

#

I also just hate the feeling of interpreted langs, I like to read my fields and what not for what they are

#

not what they could be smh

pine crest
#

well its semantical encapsulation can be nice but yea

#

easily abused

worthy yarrow
#

I mean tbf java is very straight forward which is what I like most about it

pine crest
#

myes

#

i mean the main issue with java is verbosity, though seems like theyve been working their butts of to change it

worthy yarrow
#

Ig that's why we make wrappers and abstract shit as much as possible eh?

pine crest
#

well java isnt so flexible when it comes to adapting 3rd party libraries

#

for one lack of distinctive mutable vs immutable types in the std lib

#

but then also, to create a delegate u have to write a lot of fucking code

worthy yarrow
#

I think that depends more on the impl but yeah

pine crest
#

well it ends up sucking

worthy yarrow
#

for the most part yeah

pine crest
#

libraries change after versions and the only reasonable way to protect yourself is to build sand walls of abstraction

worthy yarrow
#

Or just don't support ancient technology duh

pine crest
#

not like its that easy

worthy yarrow
#

Imagine like one of the common libs WE for example without versioning support kek

pine crest
#

i mean heck how much code was using finalize()

#

and then they removed it

#

well deprecated + removing it

#

but still, i get why

worthy yarrow
#

Well that's a fair point

pine crest
#

but its a pain in the ass

worthy yarrow
#

I mean I just think a lot of people get used to one thing and for some reason don't want to accept the new thing

#

Even if it is better this way

pine crest
#

yea, but for production and enterprise its understandable that they hate changing too often

#

instability and distraction

#

then you have dev communities that love new features

worthy yarrow
#

yeah in that regard for sure, but still improvements can always be made

pine crest
#

sure, well if you write software for a car at some point you wanna finish, that is when certain criteria are met

#

if much of the work goes to changing libraries, or other useless stuff well good bye money

worthy yarrow
#

As an example, spigot and the benchmark java versions is something I can appreciate from a software

#

Like I said earlier, I just think people get so used to doing something one way and just don't want to touch a "new/better" way

pine crest
#

i mean spigot lacks implementational transparency

#

but its at the price of keeping the api compatible with older versions of minecraft

worthy yarrow
#

Well that's sort of a requirement wouldn't you say?

pine crest
#

i mean look at paper for example

#

they take a more radical approach where transparency with nms layers is what they value

#

hence the component movements they pulled through with for one

worthy yarrow
#

Yeah spigot component support when? Speaking of lynx sent me the pr for that one and I signed the CLA just so I can see the progress kek

pine crest
#

yes

#

well there's bungee chat

#

but its far less of an attractive module

worthy yarrow
#

I know I've seen a couple completely disregard spigot and only use bungee chat

pine crest
#

anyway most prog language communities face it

#

enterprise vs developers

#

developers like new features (trendy, enhancing and so on), enterprise like stability

worthy yarrow
#

I'm certainly in the middle of that one

#

I can apprecaite a fair balance between both

pine crest
#

if you're a freetime spigot dev, you most likely side as a developer

#

i mean you may be able to sympathize with the enterprise

#

but unless you are enterprise, you wont be one nor care enough about them

worthy yarrow
#

Yeah that's fair

#

I still can appreciate a balance though, some things do just have to change for the better and I'm all for learning new shit so either way its a win to me

#

I either keep doing what I was, or get to learn something new

pine crest
#

myea

#

well java did change a bit

#

they used to be heavily enterprise favored

#

now ATLEAST they have schedules to ship features regularly

#

or well, JEPs

#

anyway even with all that, I am more of a javascript guy

worthy yarrow
#

kek

#

One day I will explore outside of java

pine crest
#

on skibidi you will

worthy yarrow
#

Speaking of the only thing I've done outside of java was use jfx for a notepad application kek

pine crest
#

poor soul

worthy yarrow
#

Hey man I ended up doing a markdown viewer (plain text but eh cool for the time I did it), and implemented a really non functional minigame

#

Like the chrome dino game

#

Oh just remembered I made a calculator module too

pine crest
#

calculator doesnt count

#

thats intern level

worthy yarrow
#

kek I have no . button for the calculator

tardy delta
pine crest
#

lol

dawn flower
#

is there any public placeholder parsing code that supports nesting? everytime i try to make one and make nested placeholders, my pc goes on life support

worthy yarrow
#

papi and minimessage that I know of

dawn flower
dawn flower
worthy yarrow
#

hmm

#

That makes me question minimessage then

dawn flower
#

the only plugin that i can think of with this is probably skript, it does it pretty well tbh

dawn flower
worthy yarrow
#

mmm

#

I think you'd need extra impl

dawn flower
#

one way that i thought about it, is parsing deepest first

#

by putting them in a hashmap with their deep level

worthy yarrow
#

Actually now that I think about it, minimessage would just parse to a component so I'm not even sure if it does support the nesting

#

and I haven't really used it enough to know of a workaround

dawn flower
#

hm

worthy yarrow
#

hm indeed

dawn flower
#

i'm like 99% sure i actually made something similar to that afew years ago on one of those "java challenge websites"

#

but i can't remember how i did it

dawn flower
#

is this what i want

#

jsut with percentages

worthy yarrow
#

God I hope theres a better way

dawn flower
#

oh wait it's gonna be wayy more complicated than that

#

there is no closing percentage

nova notch
#

what the fuck is that

tardy delta
#

Simple coding question

floral drum
#

like a compiler/interpreter

dawn flower
#

what if i just

#

read the string backwards

#

wouldn't that also parse the deepest first?

floral drum
#

reading it backwards would essentially be... the same as reading it forward right?

dawn flower
#

not really, but it would be alot of recursion

#

nvm it prob wont work

floral drum
#

one way to do it -
check the characters with a for loop,
when a ( is found, add to the count.
when a ) is found, subtract the count.
when the count is 0, that's one of the strings

#

that's how I see it

dawn flower
#

yeah i thought of that

#

the thing is

#

i want to do to with percentages (it has no closing)

floral drum
#

that could be done with O(n) time, where n is the length of the string

dawn flower
#

i'm not use parenthesis

buoyant viper
#

does Entity#setGravity just stop it from falling

dawn flower
#

yeah

worthy yarrow
#

%% -> () doesn't really work is what he's saying

buoyant viper
#

but still allow it to have X-Z motion?

floral drum
floral drum
buoyant viper
#

hope so otherwise im gonna have some jank movement code

floral drum
#

loll

worthy yarrow
#

btw hi purple

floral drum
#

hi nuclear

worthy yarrow
#

Would you suggest multi module impl for the core?

#

I'm really leaning towards it because I hate the current look of the structure

#

It's just hard because I'll have to refactor a lot to the api module and I keep running into circular dependency issues

#

Another thing is that I'm just not sure what should actually be implemented in the api module as opposed to like the skyblock / rpg ones

floral drum
#

Do you mind sending me an example of the current structure?

worthy yarrow
#

Well perhaps I'm just not doing it right lol, but basically getting references to my managers and what not

#

It's still in the process of being organized kek but I feel like you get where I'm coming from

floral drum
#

ah

#

yeah I would usually suggest making it multi-modular, as it does improve your workflow, and makes it easier to manage your project's codebase

worthy yarrow
#

That's where I'm having the most trouble currently tbf

#

Erm when was designing a core so difficult smh

floral drum
#

have an api module, which contains all the interfaces, have a common module which contains abstract classes, and the main core functionality.

Then have a skyblock-api module, which contains all the interfaces/abstraction of your skyblock module.
Then a skyblock module which contains all the functionality

#

and the same goes for rpg

#

Might be a bit overkill, but it's a nice way to organize things

#

the skyblock-api module should only depend on the api module. So you need to make sure it's properly abstracted

#

the skyblock-api module is stuff that could be used for rest api's, for other developers working on other projects for it, etc.

worthy yarrow
#

I gotta go look at some larger projects or something cuz jeez I confuse myself

floral drum
#

ahaha

worthy yarrow
#

So as an example would I implement the islandmanager in the base api or the skyblock api module? I would think the skyblock api but then it raises the question of circular dependency again

floral drum
worthy yarrow
#

wow look at you

floral drum
#

basically that's the dependency tree

#

if this is easier to view

#

and you see there should be no circular dependency issues there

#

because api depends on nothing

#

common depends on api

#

skyblock-api and rpg-api depends on api only

#

then skyblock and rpg depends on their own api modules and the common module

worthy yarrow
#

So the base api module is doing what exactly?

#

Am I holding any actual impl there?

#

Wait I think I am understanding now

#

Api is just there for my common interfaces and the skyblock / rpg api is for the implementations of said interfaces correct?

floral drum
#

holding all the abstractions and interfaces for the common module. Basically if you have a

public interface User<T> {
    T getId();
}```

that could be implemented inside of common as
```java
public abstract class AbstractUser<T> implements User<T> {
    private final T id;

    public AbstractUser(T id) {
        this.id = id;
    }

    @Override
    public T getId() {
        return this.id;
    }
}```

And the skyblock-api could then have -
```java
public interface Island {
    User<UUID> getOwner();

    IslandMembers getMembers();
}```
#

might be a bit overkill for your usecase, but it's a good way of structuring imo

worthy yarrow
floral drum
#

So yea

#

in a way

worthy yarrow
#

I guess just play around until I figure a solid structure...

floral drum
#

You can then create an implementation of AbstractUser inside of skyblock or rpg such as
SkyblockUser / RPGUser

#

and contain data specific to the gamemode

worthy yarrow
#

Well when you put it in those terms, it makes me question how I should structure the actual data classes now, in the sense of the core being hybrid skyblock / rpg this data should be common between the both... which leads to me think I'm gonna have some pretty big data classes

#

Not really an issue per se, just hurts the readability

floral drum
#

Oh I see, yeah you are combining both of them, aren't ya?

worthy yarrow
#

yeah

floral drum
#

ahhh

#

okay

#

well in that case

#

hm

worthy yarrow
#

yeahhhhh

#

The common module makes sense here still

floral drum
#

Since RPG is going to be "built off" of skyblock, I would have builders/factories to interact and change how the main skyblock core is going to work

#

basically binding stuff to skyblock

worthy yarrow
#

Kind of ironic being as I always try to write out a plan for impl on my work projects, yet don't for my free time projects kek

worthy yarrow
floral drum
#

So like -

public class SkyblockItem extends AbstractItem {
    ...
    
    public /*final (new)*/ void implement() {
        // The registering of the item inside of skyblock.
    }

    public class Builder extends AbstractBuilder<SkyblockItem> {
        ...
        SkyblockItem build() {
            return new SkyblockItem(this);
        }
    }
}```

RPG Code -
```java
SkyblockItem.builder()...build().implement();
#

something like that

#

or allow the SkyblockItem class to be extended by other classes, but the implement be a final method to not ruin the functionality

worthy yarrow
#

Essentially, as you said just design in a way to allow for "base" implementation as it were, but also rpg mechanics should be able to change the way this implementation works?

floral drum
#

so the structure is basically just now

worthy yarrow
#

Hmm ok I'll certainly keep this in mind, I'm gonna focus on the refactoring first before actually implementing anything new kek

#

thank you purple!

floral drum
#

of course man always here to help

#

gonna get some sleep now

#

gn bro

worthy yarrow
#

❤️ sleep well!

floral drum
#

:)

rough drift
#

Hey guys, I've realized that custom items can be used in recipes, is there an easy way to disable it from being used in crafting or do I just use an event for it

rough ibex
#

I fucking love consolidating 6 concrete classes into a generic class

rough drift
rough ibex
#

the power of being in alpha

#

and able to change everything as soon as it smells bad

rough drift
#

I am keeping all my shit in a permanent -SNAPSHOT state until it becomes squeaky clean

rough ibex
#

0.1-alpha forever

rough drift
#

curse of perfectionism

#

nah but it makes sense when you're changing methods and classes left and right

rough ibex
#

Half of it is just good practice with type parameters

#

I spent a good 10 minutes trying to do something really simple

rough drift
#

I spent a good 5 minutes debugging if(true) return;

rough ibex
#
data class N(val: Class<T>) {
  val thing: T
}```
rough drift
rough ibex
#

I may also scrap this in 2 commits

rough drift
#

YO DID YOU HEAR THE NEWS

#

with records

rough ibex
#

I haven't touched java java in a while now

rough drift
#

basically

#

records with FULLY immutable objects

#

will be translated into just their raw objects

#

removing the overhead of the class

rough ibex
#

where did you hear this

rough drift
#

JEP page

#

it's currently in a testing/proposal phase

rough ibex
#

JEP-???

rough drift
#

LEMME GET IT

rough ibex
#

JEP-666

rough drift
#

@rough ibex

#

The document is a draft of a Java Enhancement Proposal (JEP) titled "Value Classes and Objects (Preview)" by Dan Smith. It introduces a new feature to the Java platform: value objects. These are class instances that have only final fields and lack object identity, meaning they are distinguished solely by their field values rather than a unique identity.

Key Points:

  1. Goals:

    • Allow developers to create classes where objects are differentiated only by their field values.
    • Migrate existing JDK classes that represent simple values (e.g., Integer) to this model.
    • Improve JVM efficiency by allowing it to optimize memory usage for these objects.
  2. Non-Goals:

    • The proposal does not aim to introduce a struct-like feature, change primitive types, or automatically treat existing classes as value classes.
  3. Motivation:

    • Object identity is often irrelevant or harmful for simple domain values and leads to confusion and inefficiency. For instance, two objects with the same value may not be equal using the == operator because they have different identities.

GPT summary 1/2

#
  1. Implementation:

    • Value objects will be instances of value classes, which do not have object identity. These can be optimized by the JVM to improve performance and reduce memory usage.
    • Existing classes that avoid identity dependency can easily transition to value classes.
  2. Programming with Value Objects:

    • Value classes are defined with a value modifier, making their instances value objects. These behave like regular objects but without identity.
    • Value classes cannot be subclassed, and their fields are implicitly final.
    • The proposal includes examples of how to declare and use value classes, such as Color and USDCurrency.
  3. Construction and Mutation:

    • Value classes must ensure that their fields are initialized before any code can observe the new instance, avoiding mutable states during construction.

In summary, this proposal aims to give Java developers the option to create classes without object identity, simplifying the representation of simple values and improving the performance and memory efficiency of Java applications.

GPT summary 2/2

#

yes I used GPT but whatever

rough ibex
#

fuck that I'm reading the entire JEP

rough drift
#

I'm doing the same but yk

#

saving time

rough ibex
#

very interesting

rough drift
#

Spigot actually gets good perf?

rough ibex
#

N(1) == N(1)

rough drift
#

yes

#

because it's just equal to 1

rough ibex
#

well, yes but no but I know what youre saying

rough drift
#

yeah

#

also

#

is a W

#

it was also delivered

rough ibex
#

holy shit Integer[] approaching int[] performance

rough drift
#

that wants to straight up remove boxed types

#

so you can

#

List<int>

#

if it passes

rough ibex
#

interesting

rough drift
#
void main() {
  List<int> list = List.of(1, 2, 3);
  System.out.println(list);

  var random = ThreadLocalRandom.current().nextInt();

  list.add(random);

  System.out.println(list);
}
#

Java 23 has all of this except List<int>

#

also

#
switch(obj) {
  case Point(_, int y) -> y * 2;
  default -> 0;
}
#

yeah _ works for unnamed now iirc

#

as part of 22

#

also

#

instanceof ColoredPoint(Point(_, int y), Color(_, int g, _))

#

but wait

#

there is more

#

instanceof ColoredPoint(Point p, var _)

rough ibex
#

I'm never going to use any of these

#

not directly

rough drift
#

😭

#

well it's W

#

for me

summer scroll
#

I got a weird issue, so I'm loading a chat color cosmetic from my config and on load it's in the correct order but when I tried to debug the map, the order is scattered basically.

Here's the code and debug messages https://paste.md-5.net/hiqasediso.cs

#

The expected order is gray first and orange last.

rough ibex
#

HashMap is unordered

tardy delta
summer scroll
rough ibex
#

You may, you may not

#

HashMap does not guarantee order

#

If you want order, you wanted LinkedHashMap

#

which is insertion order

#

or a TreeMap

summer scroll
#

Hmm okay, thank you, yeah changing it to LinkedHashMap would work.

#

Yes it works wonderfully, thank you!

rough drift
stuck oar
#

is therer anywhere i can find how to like display entities?

pliant pulsar
#

does spigot support the new item components introduced in 1.20.6 / 1.21?
Would be kinda cool to have eatable tools (kinda for april fools idea)

blazing ocean
keen charm
#

Hey

#

Is PlayerQuitEvent called on player kick?

eternal oxide
#

yes

stuck oar
#

does anyone know why i cant DisplayItem in 1.8?

eternal oxide
#

As most things, they do not exist in 1.8

rough ibex
#

1.8 is god damned ancient

#

upgrade

stuck oar
#

but my servers 1.7

#

1.8

#

.8

rough ibex
#

boo hoo too bad

stuck oar
#

its confusing because other servers have it aswell tho

rough ibex
#

lie with fleas

stuck oar
#

what are you on abt

chrome beacon
stuck oar
chrome beacon
#

Are you talking about the display entities added in 1.19.4 then?

stuck oar
#

the Display.Billboard n stuff

chrome beacon
#

Yeah

#

1.19.4

stuck oar
#

oh

rough ibex
#

that's not even available for 1.8

chrome beacon
#

1.19.4 is in fact newer than 1.8.8

#

so the answer is no you cannot use them

stuck oar
#

im just confused on how some 1.8.8 servers have it

rough ibex
#

they aren't using that class

chrome beacon
#

They're not running 1.8.8

rough ibex
#

they're using items

#

and armor stands

#

workarounds

chrome beacon
chrome beacon
#

unless you're trying to copy Hypixel

stuck oar
#

no

#

im not

quaint mantle
# rough drift Remember: If you want to ensure order, use a linked collection

True, almost

Use Lists if you don't mind having repeated entries.
Use Linked* ONLY if you don't plan to have random access to the collection elements (myCollection.get(2)). In case of almost any Set, retrieving items by index is not an option (I mean, why would you want to, it's not a list)

The thing is that, Linked*, uses "nodes" to store items, which is more "optimized" than the other collections methods, which use an array. The difference is noticeable mostly when the collection gets very huge, but when having random access to the collection elements, the impact is noticeable always.

When using nodes, and retrieving an element in the middle of the collection, the collection must iterate until it reaches the index you provided, or an element matching the provided, unlike in array-based collections, in where you provide the index, and you access the element on the collection array.

  • If you want to ensure order, and you don't mind having cloned instances, use an ArrayList
  • If you want to ensure order, and you don't want to have cloned instances, use a LinkedHashSet
  • If you don't care about order, use any Set implementation which is not Linked (unless you plan your collection to have more than 2^31 elements
rough drift
young knoll
#

Prove it

rough hinge
#

player.setHealth(Math.max(0, player.getHealth() - 3));

#

how i make hit damage anim?

#

without player.daamge

#

because i need remove same health on all armors

young knoll
#

Player#sendHurtAnimation

rough hinge
young knoll
#

F

#

No idea then

rough hinge
#

ok

#

player.setHealth(Math.max(0, player.getHealth() - 3));
player.damage(0.000001); @young knoll

#

ahah

dull walrus
#

i need help with citizens cuz i want to do it so when i click on the villaga it opens a gui menu i created with deluxe menu but it isnt working can somone help plz

young knoll
#

Can’t you just have it force the player to run the command

dull walrus
#

oh how do i do that>

viral halo
#

how can i set a item's durability

drowsy helm
#

Or current?

viral halo
#

current

#

its 1.21 btw

drowsy helm
viral halo
#

damage?!

charred pendant
#

(Sorry for the ping)

drowsy helm
echo basalt
#

I've been thinking on making custom items with components tbh

viral halo
charred pendant
drowsy helm
charred pendant
#

i cant send a screenshot here

#

it wont let me

drowsy helm
#

?img

undone axleBOT
#

Can't send images? That's because you're not verified! Use !verify to complete verification.
Alternatively, you can upload screenshots to any image hosting site and share the link.

Here's some screenshot utilities that you can use to upload images.
Lightshot: https://prnt.sc
Imgur: https://imgur.com/upload
Flameshot: https://flameshot.org

charred pendant
#

ohhh

#

gimme a sec

#

can you explain to me how this specific function was implemented?

viral halo
drowsy helm
#

One sec

#

Dang did I delete the repo lmao

charred pendant
#

Yeah i cant find that either

rough hinge
#

stand.getLocation().getBlock() == player.getLocation().getBlock()

#

block can i compare instances

#

right?

drowsy helm
#

    public void registerListener(Listener... listeners){
        for(Listener listener : listeners){
            getServer().getPluginManager().registerEvents(listener, this);
        }
    }
#

this is all it is

#

just a method inside the JavaPlugin class to easily pass listeners

drowsy helm
charred pendant
#

The CustomItemTutorial object instance is about the Main Plugin Class right?

drowsy helm
#

correct

charred pendant
#

Thank you

rough hinge
sage raptor
#

when i use reflections api, getSubTypesOf method always returns empty list. i dont know the reason
(reflections 0.10.2)

here is my code.
new Reflections(packageName, new ConfigurationBuilder().addScanners(Scanners.SubTypes.filterResultsBy(s->true)).getSubTypeOf(Test.class)

rough hinge
#

thnaks

#

tnaks

drowsy helm
#

lmao

rough hinge
#

tanks

#

thanks

drowsy helm
charred pendant
#

appreciate it!

hushed spindle
#

how would one access bitbucket? im trying to view a pull request

karmic falcon
#

hi, i am making a minecraft minigame, for now whenever i wanna load a world i copy its folder from the plugins folder to the main server folder to then load it whenever i want the game to startt, this is to ensure that changes made to the world dont get saved, is there a better way of doing this?

remote swallow
#

?cla

undone axleBOT
onyx fjord
#

is block metadata persistent?

hushed spindle
#

nop

#

tile entity metadata i believe yes but blocks no

#

?blockpdc

undone axleBOT
hushed spindle
#

use that instead

rough hinge
#

how get maxdurability from item

onyx fjord
#

never used that tbf

#

but sounds like it might work

karmic falcon
tardy delta
#

java serialization api uses reflection

onyx fjord
#

sooo?

hushed spindle
rough hinge
#

how i set durability but no shows on item?

#

basically i want save a durability from item but no use durabillity vanilla system yk

#

i dont want show the "durability bar" on item

hushed spindle
#

ToolComponent does not seem to have a get or set max durability yet

#

though i know 1.21 has that functionality

onyx fjord
#

dont advertise here

echo basalt
#

fuck off

onyx fjord
#

💀

echo basalt
#

zero github followers, nobody knows you in the community

#

If you want to find customers make them want to find you

onyx fjord
#

illusion i lost all my bets

echo basalt
#

kacper I told you spain was gonna win

#

you just suck

#

my dad owns the ball

onyx fjord
#

can i stop bamboo from growing

#

cuz vine just stop growing at age 25

hushed spindle
#

nope never

onyx fjord
#

does bamboo have the same behavior

hushed spindle
#

it keeps growing forever

onyx fjord
#

thats rough bro

hushed spindle
#

you cannot stop bamboo

echo basalt
#

string above it

onyx fjord
#

i can but not with vanilla means

#

yk what ill use custom block data, i cba with handling pistons and shit

karmic falcon
#

hi, i am making a minecraft minigame, for now whenever i wanna load a world i copy its folder from the plugins folder to the main server folder to then load it whenever i want the game to startt, this is to ensure that changes made to the world dont get saved, is there a better way of doing this?

rough hinge
#

rmor.getType().name().contains("HELMET")

#

is helmet or HELMET

#

what works

onyx fjord
#

use Tags bro

rough hinge
#

bro

#

only asnwer

onyx fjord
#

oh wait are there tags for armor?

rough hinge
#

which tags

onyx fjord
rough hinge
#

im on 1.8

onyx fjord
#

💀

rough hinge
#

?

#

its HELMET or helmet

tardy delta
#

ITEMS_ENCHANTABLE_ARMOR

rough hinge
#

on contains

onyx fjord
#

big letters

rough hinge
#

i think no

onyx fjord
#

#name returns the literal enum value name

tardy delta
#

if i were to be on 1.8, id throw a hypixel move and hard fork spigot 💀

hushed spindle
#

did tags even exist on 1.8

onyx fjord
#

hushed spindle
#

aw dang it

onyx fjord
#

either didnt exist or had almost no tags

slate siren
#

.

rough hinge
#

player#getinventory#removeitem remove item on armor slots?

#

HOW I REMOVE

#

ITEM

#

ON ARMOR SLOTS

blazing ocean
#

stop screaming

pseudo hazel
#

you can remove armor slots using getInventory.removeItem

#

just pass the correct slot numbers

#

i think its like 36 to 40 or whatever

lost matrix
lost matrix
pseudo hazel
#

then why am I able to add an item to slot 36 and have it appear in the boots slot

rough hinge
#

my unbrekeable method not works with leather items.why?

rough hinge
#

public ItemBuilder unbreakable(){
return changeItemMeta(meta -> meta.spigot().setUnbreakable(true));
}

pseudo hazel
#

what does changeItemMeta do?

#

please dont tell me it calls getItemMeta every time right?

rough hinge
#

public ItemBuilder changeItemMeta(Consumer<ItemMeta> consumer){
ItemMeta itemMeta = item.getItemMeta();
consumer.accept(itemMeta);
item.setItemMeta(itemMeta);
return this;
}

#

but the problem isntm ethod

#

problem is the leather armor

#

works on other armors

#

but leather armor no

#

maybe colors leather system the problem idk

lost matrix
pseudo hazel
#

yeah thats what I was afraid of haha

#

atleast just take out the meta and have it as a separate field

rough hinge
pseudo hazel
#

because getItemMeta is expensive

lost matrix
#

Like steaf said, allocate an ItemMeta field and initialize it in the constructor

rough hinge
pseudo hazel
#

yes

#

do it when you create the item stack

rough hinge
#

oh yes

#

forget

#

ok

pseudo hazel
#

this.item = new ItemStack(material);
this.meta = item.getItemMeta()

#

or whatever

rough hinge
#

but the problem

#

isnt fixed'-

pseudo hazel
#

which is

#

leather armor is still breakable?

#

did you test with other armor?

rough hinge
rough hinge
rough hinge
lost matrix
#

Why do you call meta.spigot() ?

rough hinge
#

i call

#

public ItemBuilder unbreakable() {
return this.changeItemMeta((meta) -> {
meta.spigot().setUnbreakable(true);
});
}

stuck oar
#

anyone know how i like wait

#

like

#

wait 3 seconds

pseudo hazel
#

right but why

stuck oar
#

then run a cmd

lost matrix
undone axleBOT
rough hinge
stuck oar
#

ty

pseudo hazel
#

💀

rough hinge
#

🤡

lost matrix
stuck oar
#

oh

#

ok

rough hinge
#

HAHAAHA

stuck oar
#

it didnt pop up anywayt

pseudo hazel
#

fyi that will freeze the server

rough hinge
rough hinge
#

for 3 seconds

#

how i make unbreakable

#

.-.

lost matrix
rough hinge
#

maybe setdurability(type.maxdurability) ?

#

and solve my problem?

#

not have meta.setunbreakable

#

on spigot 1.8

pseudo hazel
#

oof

lost matrix
#

?1.8

undone axleBOT
lost matrix
#

Soon its gonna be a decade old 🙂

pseudo hazel
#

oh yeah it turned 9 2 weeks ago 🥳

lost matrix
#

Support was dropped almost half a decade ago. But that doesn stop people from wanting support lul

rough hinge
#

ItemBuilder builder = new ItemBuilder(armor)
                    .name(color + ArmorGive.getNameByItemStack(armor))
                    .setLore("", "§7Resistance: " + color + ArmorGive.getDesignResistanceByCategory(armor.getType(), category), durabilityString, color + Category.getName(category) + " Equipment")
                    .glow(category == Category.MYTHIC);
            
            if (armor.getType() == Material.LEATHER_HELMET || armor.getType() == Material.LEATHER_CHESTPLATE || armor.getType() == Material.LEATHER_LEGGINGS || armor.getType() == Material.LEATHER_BOOTS) {
                armor.setDurability(armor.getType().getMaxDurability());
            } else {
                builder.unbreakable();
            }```
#

unique solutino

pseudo hazel
#

use codeblocks

#

anyways

#

the point is , like noone knows whats going on with 1.8 since we are like 2 generations past it

#

so idk why it doesnt work

rough hinge
#

what is codeblock

pseudo hazel
#

what does builder.unbreakable do

#

its using tripple backticks `

rough hinge
#

have armordurabilitydesincreaseevent something like this?

pseudo hazel
#

and surround your code by it

#

then discord will display it nicely

lost matrix
#

?codeblock

undone axleBOT
#

You can use the discord code block format to display code or just text in a more pleasing way:
```java
public class MyPlugin extends JavaPlugin {
@Override
public void onEnable() {

}

}```
Becomes:

public class MyPlugin extends JavaPlugin {
    @Override
    public void onEnable() {

    }
}```
pseudo hazel
#

ah there is a command for it

lost matrix
pine crest
tardy delta
#

Lol

lost matrix
#

I mean it technically makes sense. Its just expensive.

rough hinge
#

maybe this then

lost matrix
#

I would simply set the item to unbreakable

river oracle
#

O my

#

Hashset is in shambles

pine crest
#

okay maybe not bad

#

but like

rough hinge
#

with leather armor

lost matrix
lost matrix
# pine crest but like

I can totally see this being viable

  private final ItemStack itemStack = ...;
  
  private final List<Consumer<ItemMeta>> consumerList = new ArrayList<>();

  public ItemBuilder apply(Consumer<ItemMeta> consumer) {
    consumerList.add(consumer);
    return this;
  }
  
  public ItemStack build() {
    ItemMeta itemMeta = itemStack.getItemMeta();
    consumerList.forEach(consumer -> consumer.accept(itemMeta));
    itemStack.setItemMeta(itemMeta);
    return itemStack;
  }

for a builder

pine crest
#

viable maybe

#

but extremely unnecessary

#

and as said if u truly care about not creating any item metas unless needed

#

flag it, apply later

lost matrix
#

How would you flag it

pine crest
#

a normal java field?

#

no its not gonna be noticeable in terms of space nor time

tardy delta
#

Just have An itembuilder that stores a meta field 🗿

pine crest
#

well the itemstack and itemmeta api is a joke to begin with

#

but here we are

lost matrix
#

I have never heard about the term "flag"ing for storing an object in a field...

pseudo hazel
#

my item builder stores meta changes with consumers similar to what smile showed

river oracle
pine crest
#

flagging is just a higher level term explaining the intent behind the semantics u impose on ur code

pseudo hazel
#

this allows any item to do anything with teh meta that isnt covered by the builder

pine crest
#

at least

pseudo hazel
#

but all things covered by my builder have fields

river oracle
pine crest
#

you are one true blessing

river oracle
#

Need ItemType tho

#

I don't get what the slowdown is Coll never told me

lost matrix
pine crest
#

i mean if u want u can do it literally and store some state in a bit set

#

but eh, thats just too low level nowadays

remote swallow
pine crest
river oracle
#

@young knoll gonna ask again :> why was ItemType not fully implemented in 1.21 we waiting for 1.22 now?

#

Or is there some crossroads

pseudo hazel
lost matrix
river oracle
pseudo hazel
#

how

#

thats like the most flexible option

lost matrix
#

I would argue that its more flexible even

pine crest
#

not really

river oracle
#

Inflexible my ass

#

Lol

pine crest
#

its very common to read from builders as well

remote swallow
#

what

river oracle
#

No

pseudo hazel
#

in what country

pine crest
#

yes

#

look at adventure for example

remote swallow
#

no it isnt

pine crest
#

spring

pine crest
river oracle
#

Why do we need to read from an ItemBuilder

pine crest
#

it depends

river oracle
#

0 benefit

pseudo hazel
#

this is about an item stack builder

pine crest
#

well say that to all api designers

river oracle
#

You just said it for sake of saying it

pine crest
river oracle
pseudo hazel
#

what does it depend on

pine crest
#

then additionally you lose all integrity w using a bunch of consumers

river oracle
#

This is clown behavior

pine crest
pseudo hazel
#

but inflexible is not the term I would use

pine crest
#

what would you use?

lost matrix
#

Imagine if spigot adds new methods to ItemMeta. The consumer approach doesnt need to be changed. If you have
concrete methods like setAmount(x) then you need to update your builder. The consumer works either way.
(I personally think that methods need names, so having just the consumer method is unclean)

pseudo hazel
#

i dont even know

pine crest
lost matrix
#

The true question is, how do you handle methods delegating to more specialized instances of ItemMeta, like PotionMeta.

river oracle
#

I use a consumer but really it'd be best to just pray ItemStack gets an overhaul so it's not so blegh

lost matrix
pine crest
#

how?

lost matrix
#

Because of the flexibility i just described

pseudo hazel
stuck oar
#

how do i kill an armorstand entity

lost matrix
#

.remove()

stuck oar
#

thank you

pine crest
#

you're talking about a non existent flexibility

lost matrix
#

If the built object gains more properties/functions, and the builder doesnt change, then you break the builder contract.
If you have a consumer of the underlying object, you can simply keep your builder as it is, and call the new methods via the
consumer. It breaks encapsulation, but its def more flexible in that regard.

stuck oar
#

weird question but does anyone know how to make an armorstand move? like if it could just walk a couple blocks or just move itself a couple blocks

karmic falcon
#

hi, i am making a minecraft minigame, for now whenever i wanna load a world i copy its folder from the plugins folder to the main server folder to then load it whenever i want the game to startt, this is to ensure that changes made to the world dont get saved, is there a better way of doing this?

pine crest
#

If the built object gains more properties/functions
entirely depends on what changes are imposed on the actual class, and even then any good lib maintainer should try to keep it somewhat retrocompatible, but sure lets say it does change thus leading to binary imcompatibility, well its a good thing i used the builder, the builder can and should serve as a factory, knowing how to instantiate and prepare the object its going to publish decoupling creation from instantiation to its clients, thus as long as you maintain the builder, even the actual class itself imposes binary incompatibilities you can save yourself by encapsulation and interfacing, that is afterall why we use static factory methods, builders, factories and abstract factories

lost matrix
stuck oar
#

id like it to move there without teleport

#

so that the nametag moves

#

instead of teleports

karmic falcon
#

Like move smoothly?

stuck oar
#

yeah

#

kinda

#

if thats not possible its fine

karmic falcon
#

Just add to its location a certain speed value

#

U need it's direction vector tho

stuck oar
#

i have no cluie what any of that means ahha

#

ill look in docs

pine crest
#

anyway i did take back that using a bunch of consumers is bad, it has its place probably, its just isnt as flexible or well ideal whatever you wanna call it, especially if you're moving to a layered builder where you pipeline different states and what not (which usually requires to read what wants a change before applying the next)

stuck oar
#

thank you

karmic falcon
#

Do armorstand.getDirection
Direction.multiply by speed
Location.add direction

stuck oar
#

speed?

#

liek how fast

karmic falcon
#

Ye

stuck oar
#

i need it to like

#

stay there

#

aswell

karmic falcon
#

Cuz the direction vector is usually normalized

stuck oar
#

move a few blocks, then stay

karmic falcon
#

lemme write it in code for u

stuck oar
#

you dont need to do that haha but thank you

karmic falcon
#

oh

#

u want it to stop

#

well

stuck oar
#

yeeea

karmic falcon
#

u can check in ur loop for a bool

#

isMoving

#

if(isMoving) //do weird math stuff

stuck oar
#

is there no just

#

stopMoving

#

(0

#

()

tardy delta
karmic falcon
#

i mean there is no way to get around this somewhere in the code gotta check if u reached the destination

#

except if u use a lerp method

#

not necessary tho

pine crest
lost matrix
#

By builder is far gone anyways

public class ItemBuilder<SELF extends ItemBuilder<SELF, T>, T extends ItemMeta>
pine crest
#

lol

tardy delta
#

you remind me of someone

stuck oar
#

i might just use teleport lol

pine crest
#

i do?

tardy delta
#

but that person got kicked, so doubt it was you

karmic falcon
stuck oar
#

alr thank you

pine crest
lost matrix
#

Who was it

tardy delta
#

nah that dude with a skull pfp with christmas hat, with the long random name

#

years ago

lost matrix
#

frost def was very keen on arguments. I remember when he joined and he was very convinced that memory mapped files are a good idea for a region system

tardy delta
#

i mean..

pine crest
lost matrix
pine crest
#

no thats not me, im not quite as racist as that bloke

karmic falcon
tardy delta
#

oh he might've said weird things but he thought me how to write some proper code lol

lost matrix
#

Loading worlds will always yield some overhead

karmic falcon
#

and those worlds are always loaded

#

like always

pine crest
#

i heard there was a guy who wrote his own fucking jvm here

#

god bless him

wet breach
#

vanilla MC memory maps region files currently. However Mojang implemented a flaw that caused servers to crash when loading them

lost matrix
tardy delta
lost matrix
karmic falcon
#

so is it okay for me to have them always loaded or is it not okay T-T

lost matrix
#

Depends how much memory you have to spare and how far you plan on scaling

karmic falcon
#

and btw as i said my approach was to copy the selected arena from my plugins folder to the main server folder to make it a temporary world then delete it

#

but that crashes

#

my server

tardy delta
pine crest
#

@wet breach

#

have you actually implemented

#

memory mapped regions

lost matrix
wet breach
tardy delta
#

regions like chunks? o.O

pine crest
#

i mean memory mapped files for region system

#

what the my eyes burn

karmic falcon
pine crest
karmic falcon
#

another question is i think its kind of messy for the server implementing the plugin having to place the worlds by hand in the main server folder is there a better way to do this?

lost matrix
tardy delta
#

and no im not 14

lost matrix
#

Or simply on some of the public server world hosts and then download it from there when the server starts

wet breach
# pine crest i mean memory mapped files for region system

not specifically, but I have used memory mapping for plenty of other stuff. Like some years ago I helped with a plugin that tracked all blocks that were placed from creative and who placed it. The test conducted was to see how long it took to load up a large amount of data. It took like 6 seconds to load 10 million blocks of information and 3 seconds to save it.

pine crest
lost matrix
pine crest
tardy delta
#

tHe VeRiFiEd NaMe

lost matrix
#

Ah true

karmic falcon
wet breach
#

of course their name means they have fourteen brushes that they use

#

that wasn't the right one lmao

lost matrix
#

Or that they brushed their teeth a total of 14 times in their lives

wet breach
#

all a memory mapped file is, is just a file that is mapped into memory

lost matrix
#

The os handles the loading strategy for memory mapped files, no?

wet breach
#

pretty much, the only thing you can change is whether or not a conversion takes place

pine crest
#

dou have the benchmarks still

#

thats quite interesting

wet breach
#

in this instance the file was binary

#

having the file as binary avoids having the OS do a conversion before loading into memory since all data in memory is binary

lost matrix
#

I would argue that there is no actual reason for this. A region can be defined with a few bytes.
Keeping 10k regions in memory will maybe hog 40MB in RAM. And nobody has this many regions.

pine crest
#

it has some potential

#

i mean the appeal to a very specific audience

wet breach
#

um yeah if the chunks are not modified or you have many empty chunks in the region

#

vanilla mc adds too much data currently to allow 10k regions to be loaded

pine crest
#

im sure u could optimize that

wet breach
pine crest
#

unfortunate

wet breach
#

one of the main reasons way back when a chunk could crash a server via books

lost matrix
#

Ah i was just thinking about regions as in BoundingBoxes
Worlds UUID -> 2 * 64 bits
lower x,y,z -> 3 * 32 bits
higher x,y,z -> 3 * 32 bits
= 224 bits or 28 bytes. Then throw the object header in (make it a record for good measures)
and you'll be more in the kilobytes apartment

wet breach
#

was because MC never bothered to check the size of a region file before attempting to load it into memory

pine crest
#

sadly that exploit went on for way too long

wet breach
#

so, it doesn't bother me

pine crest
#

some

wet breach
#

yes, I rather have a large pool of customers with little competition then no customers and lots of competition 😉

pine crest
#

you do realize you sound like a villain saying that

#

i mean no judgements, but well

lost matrix
#

Was about to say. Frostalf is a server exploiter confirmed.

wet breach
#

I don't exploit servers, but I will exploit people's need for something

pine crest
#

not sure of which is worse

lost matrix
#

servers > people
So in my mind this sounds fine

pine crest
#

if it keeps the smile up, sounds skibidi enough for me

wet breach
#

I think its safe to say I am the capitalist in this discord XD

#

and then we have Alex who is a lawyer for your tax needs in Germany

pine crest
#

are you funding spigot?

wet breach
#

no

pine crest
#

right

lost matrix
wet breach
#

it funds itself just fine. but even if it doesn't not sure what me funding spigot would even do

#

MD_5 has been developing spigot long before any donations

#

and I am pretty sure the current server/web related things are not super costly currently

#

bet it probably costs something like no more then $500/month

lost matrix
#

Hm, website + File hosting service + stash server

wet breach
#

pretty sure its all one dedi

#

no more then 2 for purposes of backup I guess

#

if I remember think all the plugins currently on spigot only takes up like 300gb

grand flint
#

maybe 3

#

one for files

#

2 for hosting

#

one backup host

wet breach
#

don't need an entire server for the files

lost matrix
#

Hmm, dont you think its decentralized? People access files from all over the world.

grand flint
wet breach
grand flint
#

what purpose is ur backup server

#

if it doenst have anything

wet breach
#

its in case of HDD failure, not backup in to route traffic

#

I mean you could set it up like that, but I wouldn't unless it was necessary

grand flint
#

well depends on the host

#

ur server could fully go down

#

then u can still operate bc ur files arent there

#

and u can host on another server

wet breach
#

not sure what hosting providers you are going with

#

but the ones I use if that happens they can stick those HDD in the backup server

grand flint
#

well mine went down once in the past like 2 years

wet breach
#

big hosting companies won't keep your data from you

grand flint
#

what

wet breach
#

generally they are prohibited from doing such things

grand flint
#

ik but ur data may be unavailable if its down

wet breach
#

why would it be unavailable?

grand flint
#

bc its a computer

wet breach
#

hdd's are not removable?

grand flint
#

i dont think a large company is gonna change their hdd locations for a downtime

wet breach
#

depends how long it will be down for, but if you have another Dedi in the same building

#

they will connect it to that

grand flint
#

ye if its for long they would

#

but a day is a day

wet breach
#

and they will connect it to the other server....

#

not sure what makes you think they wouldn't o.O

echo basalt
#

Usually you have replicas in sep datacenters

wet breach
#

if you wanted to prevent network failure related things sure

#

but in the case of something like spigotmc, it really isn't even necessary

#

nor would I say worth it. Its not like everyone pays for spigot service

#

the only thing I would ensure is that the plugins and the DB for the site have a backup not on the same machine

#

that is the minimum that is necessary

#

however, just having them on more then one HDD also works too

#

if I recall I believe all the plugins on spigot currently only take up 300gb

#

maybe a bit less then that

slate siren
#

Guys I encountered a problem

#

Now the Enchanted book ItemType; the name is the same but the features are different

#

I wrote something to choose an item by chance but this time it can't distinguish it.

#

He always gives the same book

#

What should I do?🤔

#

ItemType can distinguish those that are not the same, but not others

#

Do I have to define a unique UUID key for each item?

burnt oriole
#

?paste

undone axleBOT
burnt oriole
#

could anyone more advanced help ?

chrome beacon
#

I assume you mean SLOWNESS

wraith dragon
#

?paste

undone axleBOT
wraith dragon
#

I have a feeling it's my direction method that is wrong

echo basalt
#

yeah uh

#

isn't it just -radius..radius + direction?

wraith dragon
#

uhmmm

lost matrix
#

There has to be a proper closed solution for this. Ive seen so many switch-case approaches for this.
Probably need discrete vector geometry. Hm maybe joml is now the solution.

echo basalt
#

It's kinda uh

#

messy

#

:)

#

because of block faces

lost matrix
#

Blockfaces have a toDirection method. And they produce a normal vector on the plane.

echo basalt
#

Yep

wraith dragon
#

yuppers, uhh I tried using mfnalex's code from a while back here in this discord but I used a different way of getting the direction so I assumesd that the direction method was wrong

echo basalt
#

Idea is to get the block face the player is looking at with getLastTwoBlocks, create a cuboid and shift it by the opposite direction of the block face

lost matrix
#

getLastTwoBlocks?

echo basalt
#

it's really degenerate

#

but it returns the block you're looking at

#

and the block before

#

you can get the face a player is looking by comparing the 2 blocks

#

with getFace or getRelative, one of those methods

#

list is always expected to have a length of 2

lost matrix
#

Thats a paper method i suppose

echo basalt
#

nope

#

bukkit and really old too

shadow night
#

why the actual fuck

echo basalt
#

I used it way back in the day

shadow night
#

Have pairs or array not existed back then

echo basalt
#

pairs are poor structure and I assume arrays are unsafe?

lost matrix
#

How about you listen for the BlockDamageEvent, which already has the BlockFace the player is hitting at

shadow night
#

that method is so fricking stupid

#

"get me the two last blocks the player is looking at" like what, who thought that was a good idea

echo basalt
#

exists since 1.8 at least

wraith dragon
#

wait sorry for the ping

#

forgot to turn it off

lost matrix
#

Hm maybe the PlayerInteractEvent is more suitable. The BlockDamageEvent doesnt have a BlockFace in spigot

burnt oriole
torn badge
lost matrix
#
public class MultiBreakListener implements Listener {

  private final Map<UUID, BlockFace> breakDirections = new HashMap<>();
  private final Set<Block> skipBlocks = new HashSet<>();

  @EventHandler
  public void onQuit(PlayerQuitEvent event) {
    this.breakDirections.remove(event.getPlayer().getUniqueId());
  }

  @EventHandler
  public void onDamage(PlayerInteractEvent event) {
    this.breakDirections.put(event.getPlayer().getUniqueId(), event.getBlockFace());
  }

  @EventHandler
  public void onBreak(BlockBreakEvent event) {
    Player player = event.getPlayer();
    Block block = event.getBlock();
    if (this.skipBlocks.remove(block)) {
      return;
    }
    BlockFace blockFace = this.breakDirections.get(event.getPlayer().getUniqueId());
    List<Block> blocks = this.getMultiBreakBlocks(block, blockFace);
    this.skipBlocks.addAll(blocks);
    blocks.forEach(player::breakBlock);
  }

  private List<Block> getMultiBreakBlocks(Block origin, BlockFace direction) {
    // Add logic here
  }

}

This would be my first idea. Just need to implement the getMultiBreakBlocks(...) method.

#

This btw automatically supports protections from any plugin because of how the blocks are being broken.

#

And it incorporates the tool the player has as well

shadow night
peak depot
#

I know not spigot related but anyone got idea for java project thats not a calculator

eternal oxide
#

Game of Go

lost matrix
#

Im... not sure if this makes sense. In my head it does.

  private List<Block> getMultiBreakBlocks(Block origin, BlockFace direction) {
    List<Block> blocks = new ArrayList<>();
    Vector forward = direction.getDirection();
    Vector up = new Vector(0, 1, 0);
    Vector right = forward.getCrossProduct(up).normalize();

    for (int deltaRight = -1; deltaRight <= 1; deltaRight++) {
      for (int deltaUp = -1; deltaUp <= 1; deltaUp++) {
        Vector rightOffset = right.clone().multiply(deltaRight);
        Vector upOffset = up.clone().multiply(deltaUp);
        Block relative = origin.getRelative(rightOffset.getBlockX(), upOffset.getBlockY(), rightOffset.getBlockZ());
        blocks.add(relative);
      }
    }

    return blocks;
  }
shadow night
shadow night
#

And it should also be able to add dependencies to an already existing pom.xml/build.gradle

#

As well as remove them

#

and all of that with awt

dense falcon
#
            String UUID = Redis.getUUIDFromUsername(targetName);
            
            Inventory AP_MainUI = Bukkit.createInventory(null, 54,  "§c§l/ap §8§l" + targetName);

            ItemStack head = new ItemStack(Material.SKULL, 1, (short) SkullType.PLAYER.ordinal());
            SkullMeta head_meta = (SkullMeta) head.getItemMeta();
            head_meta.setDisplayName(targetName);
            head_meta.setOwner(UUID);
            List<String> lore = new ArrayList<>();
            lore.add("UUID:" + ChatColor.YELLOW + UUID);
            lore.add("Rank:" + ChatColor.YELLOW + Redis.getRank(UUID));
            head_meta.setLore(lore);
            head.setItemMeta(head_meta);

            AP_MainUI.setItem(0, head);

            plr.openInventory(AP_MainUI);
``` I'm trying to get the head of the player from username (I have UUID saved in my Redis DB).
But I'm getting this error:

org.bukkit.command.CommandException: Unhandled exception executing command 'ap' in plugin NeoWorld v1.0
at org.bukkit.command.PluginCommand.execute(PluginCommand.java:46) ~[spigot-1.8.jar:git-Spigot-c3c767f-33d5de3]
at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:141) ~[spigot-1.8.jar:git-Spigot-c3c767f-33d5de3]
at org.bukkit.craftbukkit.v1_8_R1.CraftServer.dispatchCommand(CraftServer.java:646) ~[spigot-1.8.jar:git-Spigot-c3c767f-33d5de3]
at net.minecraft.server.v1_8_R1.PlayerConnection.handleCommand(PlayerConnection.java:1115) [spigot-1.8.jar:git-Spigot-c3c767f-33d5de3]
at net.minecraft.server.v1_8_R1.PlayerConnection.a(PlayerConnection.java:950) [spigot-1.8.jar:git-Spigot-c3c767f-33d5de3]
at net.minecraft.server.v1_8_R1.PacketPlayInChat.a(PacketPlayInChat.java:26) [spigot-1.8.jar:git-Spigot-c3c767f-33d5de3]
at net.minecraft.server.v1_8_R1.PacketPlayInChat.a(PacketPlayInChat.java:53) [spigot-1.8.jar:git-Spigot-c3c767f-33d5de3]
at net.minecraft.server.v1_8_R1.PacketHandleTask.run(SourceFile:13) [spigot-1.8.jar:git-Spigot-c3c767f-33d5de3]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_422]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_422]
at net.minecraft.server.v1_8_R1.MinecraftServer.z(MinecraftServer.java:696) [spigot-1.8.jar:git-Spigot-c3c767f-33d5de3]
at net.minecraft.server.v1_8_R1.DedicatedServer.z(DedicatedServer.java:316) [spigot-1.8.jar:git-Spigot-c3c767f-33d5de3]
at net.minecraft.server.v1_8_R1.MinecraftServer.y(MinecraftServer.java:634) [spigot-1.8.jar:git-Spigot-c3c767f-33d5de3]
at net.minecraft.server.v1_8_R1.MinecraftServer.run(MinecraftServer.java:537) [spigot-1.8.jar:git-Spigot-c3c767f-33d5de3]
at java.lang.Thread.run(Thread.java:750) [?:1.8.0_422]
Caused by: java.lang.ClassCastException: org.bukkit.craftbukkit.v1_8_R1.inventory.CraftMetaItem cannot be cast to org.bukkit.inventory.meta.SkullMeta
at fr.program.neoworld.Commands.Moderation.ApplyPunishment.onCommand(ApplyPunishment.java:52) ~[?:?]
at org.bukkit.command.PluginCommand.execute(PluginCommand.java:44) ~[spigot-1.8.jar:git-Spigot-c3c767f-33d5de3]
... 14 more

chrome beacon
#

Looks like it isn't a player head

#

also;

#

?conventions

dense falcon
#

?

chrome beacon
#

Don't use the ordinal

#

for player head

viral halo
#

how to make a item with enchantment glint without enchantment in 1.21

viral halo
#

alright thanks

dense falcon
#

Thx :).

burnt oriole
#

?paste

undone axleBOT
burnt oriole
#

does anyone know why i might be getting this issue with my paper dependancies

worthy yarrow
#

We're not paper lol

burnt oriole
#

oh

#

damn

worthy yarrow
#

Also there's no error listed in that paste

burnt oriole
#

this was the error

worthy yarrow
#

Uh you probably didn't add the repo for paper, and theres something wrong in the <project> path where you tried to add a [children] tag?

rough drift
grave lion
#

would it be better to have an api and various independant plugins for an entire server or condense it to one plugin

echo basalt
#

monolithic vs segmented plugin let's see

#

less code duplication and overall fuckery with the added benefit of being hard to split vs clean, digestable modules that hook into a common base

chrome beacon
#

condense it to one plugin

#

Users can't update/download dependencies

#

They don't read documentation nor the Spigot page

echo basalt
#

shade the api

#

ezpz

grave lion
chrome beacon
#

Then split it up

grave lion
#

yay

chrome beacon
#

if you plan on putting everything in one plugin

grave lion
#

does anyone know basic electical wiring? i want to be able to control a lightbulb with a switch but i dont have an available microcontroller, any resources to start out?

stuck oar
#

hi can anyone help pls

as7.setHelmet(new ItemStack(Material.DIAMOND))

the item is there and you can pick it up but its invisible, anyone know why? (as7 is an armor stand)

grave lion
#

do you have to put it in the hand slot?

worthy yarrow
#

A diamond (unless forced in this way) would never be on an entities head

#

Therefor no reason to support a model I guess you could say

wet breach
grave lion
rough hinge
#

i have level-data on tutorial world but im not teleporting to tutorial world why

wet breach
grave lion
#

sorry

#

i forgot people understand here

worthy yarrow
#

Are you sure you're american cmoe?

grave lion
#

ping me

worthy yarrow
#

Wait, tell me this

#

what is the current time

grave lion
#

um

#

10 37 am

worthy yarrow
#

hmm

#

You need to smoke less weed

grave lion
#

today is my day off

#

but youre definitely right

worthy yarrow
#

I've got the same issue don't feel bad

wet breach
#

anyways there really isn't much to controlling the microcontroller. Its more or less give it appropriate voltage

#

some LED's let you do different stuff, but again its just variance in voltage

grave lion
#

i soldered right on the contacts and nothing happens

wet breach
#

ok, did you make sure the polarity was correct?