#help-development

1 messages Β· Page 2119 of 1

ivory sleet
#

they just left I think

grim ice
#

It is

compact haven
#

I mean you could code them in C

smoky oak
#

well if you have the right compiler

compact haven
#

Not without an interpreter

grim ice
#

idk why did he do that tho

compact haven
#

or something that transpired python to C or Java

dark arrow
#

there is no python documentation

compact haven
#

With C he can have native binds

dark arrow
#

?

grim ice
#

Maow isnt the type to leave cuz he's been called dumb

river oracle
grim ice
#

python sucks

river oracle
#

lol you gotta know when to use a language

grim ice
#

ive never seen anyone that learns python except since it sounds easy

dark arrow
ivory sleet
#

py def has its places

smoky oak
#

well not in servers

grim ice
#

I dont see a use for py except ML

worldly ingot
#

If you're knowledgeable in Java, you can write a Python plugin loader implementation

dark arrow
#

bots>

worldly ingot
#

Bukkit is designed to have plugins be loaded in any language

dark arrow
smoky oak
#

WHY

river oracle
#

Discord bots work pretty well with python too tbh

worldly ingot
grim ice
#

u can make bots in any language that you can send requests with@dark arrow

worldly ingot
#

Though it's very, very old and doubt it works anymore

grim ice
grim ice
#

that supports web requests

#

Lmao

#

dont give me that shit ass argument

dark arrow
#

so i guess i have to learn java 😦

worldly ingot
#

That plugin doesn't even use the plugin loader like it should lol
EDIT: Oh it does! I lied

grim ice
#

if you learn a langauge because it's "easy" you're either a 12 years old or on drugs

#

or

river oracle
grim ice
#

you're not serious with learning it

ivory sleet
smoky oak
#
>++++++++[<+++++++++>-]<.>++++[<+++++++>-]<+.+++++++..+++.>>++++++[<+++++++>-]<+
+.------------.>++++++[<+++++++++>-]<+.<.+++.------.--------.>>>++++[<++++++++>-
]<+.
``` cough cough
worldly ingot
#

throw new InvalidPluginException(new Exception("This shouldn't be happening; go tell whoever altered the plugin loading api in bukkit that they're whores."));
LMAO

river oracle
#

if you want to do android development too I might reccomend kotlin over java but if your just doing minecraft plugins stick with java

grim ice
#

Python has no use at all except for very specific things that most people dont even use, with no use I mean that there are way too many alternatives that may or may not be better

dark arrow
smoky oak
#

yep

#

a fellow man of culture

river oracle
void mason
#

hi

ivory sleet
#

I mean py is good for more than just ML lol

grim ice
#

very specific things I meant ML and a few others ig

grim ice
void mason
#

i have a little question

river oracle
#

?ask

undone axleBOT
#

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

ivory sleet
#

like first of all isnt quite verbose, and yes whilst it certainly isnt the most performant lang out there it can scale quite well in backend

dark arrow
#

python is a very good language for machine learnig and backend of websites

ivory sleet
#

messy as?

grim ice
river oracle
#

its very clean and organized

void mason
#

if someone is spectating an entity, is it possible to detect the mouse scrolling and the mouse motion x and y ???

grim ice
#

messy as its not organized

#

nope, not organized at all

ivory sleet
#

the type hinting in py is dogshit fs

#

but py is definitely not messy

#

perhaps the oo part a bit

grim ice
#

Well that might be opinions

ivory sleet
#

but oo kinda sucks

grim ice
#

but it's syntax disgusts me

river oracle
#

you can code messy python, but you can code messy any language

ivory sleet
#

mye

#

the syntax is questionable

smoky oak
#

wait

ancient plank
ivory sleet
#

altho idk if thats a valid reason to dissuade yourself from it

dark arrow
grim ice
dark arrow
#

and i am 14 yers xD

void mason
grim ice
noble lantern
dark arrow
sterile token
river oracle
dark arrow
#

my bad

grim ice
river oracle
#

thats why you can make spigot plugins fairly easily with it

ivory sleet
# grim ice It is

I mean you can say that to any foreign programming language, altho its not a valid argument, just an opinion

smoky oak
#
print("hello world");
```vs
```java
class HelloWorld{
  public static void main(String[] args){
    System.out.println("hello world");
  }
}

'''easy'''

ivory sleet
#

easy is quite subjective

sterile token
#

So in others words Kotlin, Groove and Java are the same shit with diff color.

grim ice
#

The whole concept of just writing a line of code and it works makes me cringe

ivory sleet
#

thought u liked abstraction

grim ice
#

Not to that extent

#

code();

#

Absolutely awesome abstraction

echo basalt
#

java forces you into oop

sterile token
#

Conclure fully java apis only contains interfaces and abstract right?

grim ice
#

it abstracted my whole project

ancient plank
#

boiler plate doesn't add difficulty imo

grim ice
#

that's not what I like lol

void mason
ivory sleet
#

a java api mustnt have only java interfaces and abstract classes

sterile token
#

I need a good tutorial about java apis

grim ice
#

imo it's quite unorganized that you just write a line of code and it works

ivory sleet
#

sometimes you have pojos simply

#

and in that case just let them be pojos

ancient plank
#

It's always been easier for me to read java than something like python, and debugging java is much easier than debugging python imo

grim ice
#

and writing it in a function will also work

ivory sleet
sterile token
grim ice
#

Python is so unorganized and empty of rules it hurts my eyes

ivory sleet
#

like you can write one line in java and make it work as well

#

empty of rules such as?

grim ice
smoky oak
#

yea java doesnt care about line breaks

river oracle
noble lantern
grim ice
#

You need to have a method to run code

#

or a constructor

smoky oak
#

they're there for us to read it easier

noble lantern
sterile token
#

Burch do oyu have a github tutorial for apis?

smoky oak
#

the compiler just deletes all spaces and line breaks outside of strings

ivory sleet
#

you can in py enforce an entrypoint also

grim ice
#

and code is divided into classes that you have to declare

ivory sleet
#

like thats possible

#

well py offers that as well

grim ice
#

and you have to write the type of the variable

noble lantern
grim ice
ancient plank
#

The big nope for python for me is debugging and lack of curly braces lol

ivory sleet
#

which is good

grim ice
#

If it doesnt enforce at least 2 of what I mentioned, it's unorganized imo

#

There are exceptions surely though

sterile token
ivory sleet
#

quite weird definition of unorganized

river oracle
sterile token
#

I always want to add a picture to a python exe but never find ho

ivory sleet
#

but Ig

ivory sleet
#

I mean py still has types

grim ice
#

thats one more thing

noble lantern
grim ice
#

i hate not having to write a semicolon

#

how do i differ from a line of code or another

noble lantern
#

I just shoved a bunch of shit together, it looked nice and runs smooth so its good for me

ivory sleet
#

lol 9/10 modern languages make semi colons optional

#

guess you're stuck with java, C# and older langs

dark arrow
#

according to me, python is a language which is easy for beginners but its hard to master as it divided into multiple categories and there are lots of libraries to know about

sterile token
#

πŸ€”

ivory sleet
#

bruh

grim ice
#

quit

ivory sleet
#

just look at the end of the line?

compact haven
#

it ends at the end of the statement

#

not very difficult

grim ice
#

:O

#

like Cipher project

compact haven
#

well then cry

dark arrow
compact haven
#

some languages still have them

ivory sleet
#

^

noble lantern
river oracle
compact haven
#

they’re just not required

mortal hare
#

is there any hotspot intrinsic method in java to copy collection in range to another collection or an array?

ivory sleet
#

its just that they're optional like kotlin for instance, as semi colons for line termination has been proven rather boilerplaty

grim ice
grim ice
#

and you couldve had so much potential if you started with something low end like C

river oracle
grim ice
#

but even if you had, you mightve ruined it with learning python as your first since it'll take you a while to get used to C or Java syntax and principles

mortal hare
#

problem is that i need to copy from collection

#

to array

ivory sleet
#

oh

mortal hare
#

i think there's none

ivory sleet
#

toArray?

grim ice
#

And I doubt anyone will care about python in ur portfolio

mortal hare
#

that is not in range of

#

it would create new array

grim ice
#

if it's me, I would ignore it

mortal hare
#

if primitive destination array overfills

grim ice
#

python is so common for starters that it doesnt stand out

#

in portfolios

ivory sleet
grim ice
#

I would care more if you had Rust, or some low end languages

mortal hare
noble lantern
#

List.of(...) or ArrayList#addAll

mortal hare
#

.toArray()

grim ice
ivory sleet
#

py isnt amongst top 5 for some random reason 2hex

#

there are quite justifiable and good reasons

rugged cargo
#

hello all. if i were to want to change the max stack size of an itemstack, would reflection be the approach. or is there even a feasable approach

ivory sleet
grim ice
#

but from what ive seen, i havent seen anyone hired merely for python

mortal hare
noble lantern
#

Arrays should have a similar method to those

ivory sleet
mortal hare
#

Arrays util class has copyOfRange

#

but Collections class does not

#

not sure why

echo basalt
#

on the Material enum

noble lantern
#

Collections cant be modified iirc

#

Thats prolly why

mortal hare
#

eh fuck it, im just gonna do my own iteration

ivory sleet
#

πŸ₯²

grim ice
#

lol

echo basalt
#

System.arrayCopy

void mason
#

hi guys

ivory sleet
#

hello eytan

grim ice
noble lantern
#

Stack overflow may have some answers

mortal hare
#

ArrayCopy does copying from array to array

#

not from Collection to Array

void mason
#

i really need help

echo basalt
#

bruh

mortal hare
#

I need to copy Collection to array. If it overfills, skip overfilling parts of array, just copy how much it'll fit inside array

grim ice
#

in next april fools i want this channel to be renamed to SO-ripoff

#

it would be funny

#

prob never happening tho

mortal hare
#

yea, i was hoping to find something like Arrays.copyOfRange hotspot intrinsic method but for collections but oh well,

#

i would've used Arrays.AsList() if there was Collections.copyOfRange()

void mason
#

i need to detect the mouse motion of a player spectating an entity (he cant move because he is spectating an entity)

#

and the mouse scrolling

echo basalt
#
Collection<Object> collection = ...;
Object[] array = new Object[whateverMySize];

// Collection might not be ordered
int index = 0;
for(Object object : collection) {
  if(index >= whateverMySize)
    continue;

  array[index++] = object;
}
ivory sleet
#

collections do not have any notion of index based order

#

thats an impl detail for List and its derivative

mortal hare
#

Ok then, Lists?

ivory sleet
#

ye

echo basalt
#

lists do

#

sets don't

mortal hare
ivory sleet
#

dovidas, iirc ArrayList even overrides toArray methods from AbstractCollection

echo basalt
#

naive me thinking that hashmaps were looped by order of insertion 4 years ago

ivory sleet
#

so might be worth looking into

echo basalt
mortal hare
#

with iterator

echo basalt
#

ah

#

Whatever then

#

javac probably optimizes it regardless

mortal hare
#

it doesnt matter

#

I agree

quaint mantle
#

I asked this question million times but...

#

org.bukkit.plugin.java.JavaPlugin cannot be resolved

#

i tried it with maven but still

#

i cant code plugins until somebody answers 😦

exotic depot
#

is there any difference in sending a mob effect packet to add glowing to an entity vs a entity metadata packet?

brittle lily
#

Hi Guys Someone Can Tell me how can I add extraordinary enchants to ItemStack

enchantd.addEnchantment(Enchantment.DAMAGE_ALL, 2);

for Example I wanna Make 50 Level Sharpness Enchant...

river oracle
void mason
#

i need to detect the mouse motion of a player spectating an entity (he cant move because he is spectating an entity)
and the mouse scrolling

brittle lily
echo basalt
#

the potion effect is only used for spectral arrows

quaint mantle
exotic depot
#

ok thanks

eternal night
quaint mantle
#

eclipse

eternal night
#

and you are using maven ?

quaint mantle
#

yes

eternal night
#

share your pom.xml file then please

#

?paste

undone axleBOT
brittle lily
#

Oh I couldnt add enchant after that

quaint mantle
brittle lily
eternal night
#

I mean

#

that is just invalid java

#

the pom.xml looks good so far

#

I am unsure how eclipse handles maven

#

maybe you have to import the project as a maven project ?

quaint mantle
#

i did

#

i used it with maven

eternal night
#

Well the pom.xml looks good. Sorry I am not too used to eclipse and cannot really help you passed that

quaint mantle
#

somebody here using it?

brittle lily
green prism
#

Hey guys. I saw a guy doing a weird thing and I was thinking about remaking it. He made a plugin that adds clothes to a player skin but doesn't remove parts like the player head skin. Have you any idea?

golden kelp
delicate lynx
#

add the enchantment to the itemMeta, then pass it into the method to set it ^

golden kelp
#

O

green prism
#

Pls help me

golden kelp
#

I mean it's basic java u should know that

green prism
#

Cool

delicate lynx
#

isn't that skin thing just toggleable layers? that's vanilla

golden kelp
#

Yea ^^

green prism
#

Yep, It adds layers I think

delicate lynx
#

vanilla skins have layers you can toggle in your client settings

#

that's not a plugin

green prism
#

Bro he can add clothes to the player skin

#

That's the plugin thing

delicate lynx
#

you will have to have a list of skins with these clothes and do something with their profile

green prism
brittle lily
#

Like That?

delicate lynx
#

take the addEnchant thing out and put it onto its own line

#

then do setItemMeta(itemMeta)

#

just make sure you add the enchantment first before setting the itemMeta

sterile grotto
#

you can use NMS to change player skin

brittle lily
#

I'm Stuck Again 😦

sterile grotto
#

yes

#

need some reflection

sterile grotto
brittle lily
#

oh wait I think I se

delicate lynx
#

that itemMeta call is useless

sterile grotto
#

Mojang provide an object called GameProfile to store player informations

#

including name UUID skin and other stuff

#

you can use NMS to get access to GameProfile and use reflection to edit it's fields

#

actually no

brittle lily
#

GG GUYS ! Thank You So Much

sterile grotto
#

it can take texture as string

quaint mantle
#

can you also help me

sterile grotto
#

you can get those string value by this website

quaint mantle
sterile grotto
quaint mantle
#

what is NMS

sterile grotto
#

just normal API, get it

sterile grotto
#

can you show us your pom.xml

quaint mantle
#

i already shown and he said its ok

golden turret
#

why is the event not called even if i held an item when i right click in the air?

eternal night
sterile grotto
eternal night
#

maybe java.version murders them here πŸ€” is spigot-api java 17 these days ?

eternal night
#

oh really ?

sterile grotto
#

java 17 and above is required

eternal night
#

well the server needs it

#

I am talking about the api

#

bukkit still compiles to java 8

quaint mantle
#

i changed but still

sterile grotto
#

sometimes it just break for no reason

brittle lily
#

this code will work ?

#

I wanna check my args[0]

quaint mantle
sterile grotto
quaint mantle
#

OMG

brittle lily
#

How Can I check my args[0] if Its "zombie"? The code works no matter what I type.

quaint mantle
#

After week of asking its sucesful

#

Huuge thanks

quaint mantle
#

oh wait

quiet ice
#

preferably .equalsIgnoreCase

quaint mantle
#

it isnt

brittle lily
#

Oh Thanks πŸ™‚

quaint mantle
brittle lily
#

thanks

tardy delta
#

Hopefully you are checking the args length

quiet ice
#

Are you sure that IJ is using maven?

sterile grotto
#

try to use this replace your spigot-snapshots

quiet ice
#

If so, are there any errors in the resolver? If so, you might need to reinstall you IDE if the error indicates that the certstore has blown up

sage merlin
#

i have a hashmap here thats storing the ItemStack and a Particle but im getting a error on line 62 saying that its null

brittle lily
#

Guys Im making boss plugin now What Do you think of Boss's Health. What Should It Be

quiet ice
#

Try to install maven I guess and compile it via maven directly. If it works you IDE is messed up and you might need to either reimport the project or reinstall the IDE

brittle lily
#

I did 400

quaint mantle
#

i think thats good

quiet ice
undone axleBOT
sage merlin
brittle lily
sterile grotto
brittle lily
#

But Okay

midnight shore
#

Hi, how can i listen for every single event in minecraft? like is there like a onEvent(Event e)?

quiet ice
#

Also I might need the full NPE @sage merlin

midnight shore
#

null pointer exception

quiet ice
#

NullPointerException

sage merlin
#

oh

quiet ice
#

There are a few libraries that facilitate this however

sage merlin
fallen thunder
#

How I can check if the enable bungee option on the spigot server is on ?

sage merlin
#

and when they shoot its not gonna allow them unless they have opened their inventory

#

but im still getting a NPE

#

or nms Particle type null

sterile grotto
#

can you show us your log

quiet ice
#

Just use java 15+ and stop wasting our time

sage merlin
quiet ice
#

And no, the "but minecraft version X does not support Java 15" argument does NOT hold up

left swift
#

What is better redis client for java? I am considering jedis and redisson.

quiet ice
#

?stash

undone axleBOT
fallen thunder
#

How I can check if the enable bungee option on the spigot server is on ?

sterile token
sterile grotto
quiet ice
sterile token
#

?paste

undone axleBOT
quiet ice
#

You see, but people are afraid of text, so they need to waste our bandwidth and send text as images

fallen thunder
sterile token
quiet ice
#

?jd-s

undone axleBOT
quiet ice
sterile token
#

geol

#

Do you have experience with multi platform plugins (Bungee and Spigot) ?

fallen thunder
quiet ice
#

No

sterile token
#

Also here we dont support paper

#

You should ask on their discord

fallen thunder
quiet ice
fallen thunder
#

oh thx

#

I don't see sry

quiet ice
#

It is going to remove the need to locating the config file

#

That being said it might not be present on pureblooded bukkit implementations

sterile token
quiet ice
#

For some things you can use wrapper objects that delegate the calls

fallen thunder
sterile token
quiet ice
#

Bukkit.getServer().spigot()

sterile token
#

Geol

quiet ice
#

Otherwise going fully procedural (i.e. abusing the special status of Object) will work but you know the cost of doing that

fallen thunder
#

Wow its powered I search that since 20 min thx (I just put all time Spigot XD)

sterile token
#

Because for example if i add Boostrap to a constructor as an argument and do: boostrap.getPlugin() then i cannot access to all the methods it has

#

Do i explain?

#

That my issue

quiet ice
#

I think I understand you but I think it is better if you were more specific there

sterile token
#

Let me do a code of what i want specific

#

So it better to ask

quiet ice
#

Ideally it'd be best if you share what you have tried (or what you already have)

sterile token
#

Boostrap class:

public interface Boostrap<T> {

    void onEnable();

    void onDisable();

    T getBoostrap();
}

Different boostraps (An example of one):

public interface BungeeBoostrap {

    Plugin getPlugin();

    PluginManager getManager();
}
#

And im stuck there

quiet ice
#

ideally you'd not want to expose the bungee or bukkit side of things at all

#

So wrap every single method call

sterile token
#

My idea is to be able only to register commands, listeners from bungee and spigot

#

But them im stuck how to do the implementation

#

I will be really thankfull if you help me

quiet ice
#

One way would be to have something like

public interface Environment<P, M> {
    public P getPlugin();
    public M getPluginManager();
}
public interface BukkitEnv extends Environment<Plugin, PluginManager> {
}
public interface Bootstrap<E extends Environment<?, ?>> {
     public E getEnvironment();
}
public abstract class BukkitPlugin implements Bootstrap<BukkitEnv> extends JavaPlugin {
// Some shit
}

And so on

sterile token
#

Oh ok

#

A bit mess

#

But yeah i can understand better

left swift
#

When I'm using my plugin main class instance and fields / methods in it, should I do e.g. Main.getInstance().methodHere() or should I make that method public static too and use it like Main.methodHere()?

quiet ice
#

but really exposing the bukkit/bungee datatypes outside of explicit casts is pretty much the opposite of multiplattform

sterile token
left swift
#

ok! thank you!

quiet ice
sterile token
sterile token
quiet ice
#

No static fields :)

indigo iron
#

?paste

undone axleBOT
sterile token
#

Geol

#

So your code example can fix me issue?

#

And really thanks

quiet ice
#

It really depends on what you are aiming for

left swift
sterile token
indigo iron
quiet ice
#

Well it basically does the same thing and is more convenient while you can still say that you did not perform static abuse

quiet ice
sterile token
quiet ice
#

Is it just some utility methods? A while bukkit api rewrite (more or less) or something else

#

Because the way one should behave changes drastically depending on the type

#

Now that I think about it the whole "Bootstrap" system you want to have is a bit counterintuitive considering JavaPlugin.getPlugin exists and bungee probably has something similar

#

?jd-b

#

?jd

quiet ice
#

And nope, bungee does not expose the "owner" of classes in an easy to use way

sterile token
#

Yeah

#

That why i didnt do what you recommend know

#

I already thought that

warm saddle
#

how would I get a Player object that has been defined in a different public class into my event listener?

#

i basically define a player in a class, then I need to check if the attacker from an EntityDamageByEntityEvent is the player that was defined in the other class?

#

The players name is also in a hashmap in the same class the player got defined in

trail pilot
#

val proxyServer: ProxyServer = ProxyServer.getInstance()
error:
getInstance() must not be null

trail pilot
ivory sleet
#

val x: ProxyServer?

#

then null check

desert tinsel
#

can i set the blockType to an itemstack?

ivory sleet
#

or map the optional type

desert tinsel
#

like: ```java
location.getBlock().setType(asdasd);

and asdasd is an itemstack
#

and asdasd is an itemstack with a playerhead with textures

trail pilot
quiet ice
#

Not that way at least

sterile token
# quiet ice context?

Geo another question related to what we where talking why when i extend the abstract class BungeePlatform, doesnt ask me to implements the methods onEnable() and onDisable() from Boostrap class?

left swift
#

Did anybody use redis client (jedis) with gradle kts?

quiet ice
left swift
#

I don't know the gradle very well, so I don't know if I typed it correctly too

quiet ice
#

You need to add it in the plugin dependency block

#

But why the hell do you need a database for building a java project?

left swift
#

publish / subscribe

#

to communication between servers

echo basalt
#

my man needs redis, a common dependency

quiet ice
echo basalt
#

you're getting NoClassDefFoundException because you added redis as a dependency, but redis' implementation isn't present on the server

quiet ice
#

Sir, he wants to use it to build it, not to run the server with

#

Otherwise they would use implementation instead of compileOnly

#

As well as using the gradle shadow plugin

echo basalt
#

yeah he wants to shade redis because spigot doesn't include it

#

what's the problem with that

quiet ice
#

Well I just want to be pedantric, okay

distant fern
#

Hello. Im trying to write a plugin that avoids using an exploit. Every broken sugar cane that is gown naturally not placed shoud have message. But that doesnt woek. Why?

#
    @EventHandler
    public void onNiszczenie(BlockBreakEvent e){
        if(e.getBlock().getType().equals(Material.SUGAR_CANE)){
            List<Block> exploit = new ArrayList<Block>();
            if(exploit.contains(e.getBlock())){
                exploit.remove(e.getBlock());
                return;
            }

            e.getPlayer().sendMessage("GITTTT");

        }
    }

    @EventHandler
    public void onPostawienie(BlockPlaceEvent e){
        if(e.getBlock().getType().equals(Material.SUGAR_CANE)){
            List<Block> exploit = new ArrayList<Block>();

            exploit.add(e.getBlock());
        }
    }
tardy delta
#

You're creating different lists

quiet ice
#

Your list is discarded after the invocation of the method

tardy delta
#

Make a field

sterile token
#

?learnjava moemnt?

undone axleBOT
sterile token
#

Lmao the bot works when his as sings

distant fern
#

can you paste an example of field. never used that. So basicy I can use field outside of EventHandler?

sterile token
#

πŸ˜‚

sterile token
quiet ice
#

Once anobject is unreachable it is garbage collected. In this case it is unreachable pretty quick considering that it isn't stored to a field or something like that

quiet ice
sterile token
#

Yeah i know i ask just for curiosity

distant fern
#

nvm i figured it out

quiet ice
sterile token
quiet ice
#

I hate publishing updates

#

If everyone knew how to compile from source everything would be much easier. Sigh

sterile token
#

Geol

#

What issue do you have?

quiet ice
#

Just a chronic depletion of motivation

#

... and bukkitdev is down

compact haven
tacit thunder
#

Hey, I just recently picked up plugins and am trying to create a button that will teleport players upwards or downwards. It's basically an elevator button and I wanted to add a custom data or some form of identification for the button, like "elev_button". I don't know how to do that however, since if you name a block something and then place it down, the edited data is lost. Anyone got tips?

#

Oh I tried using datapacks but I ran into multiple problems when trying to code this lol

compact haven
#

perhaps you can also make a CD workflow that automatically publishes releases to bukkitdev and spigot

#

so then you just write a commit message which automatically pushes to your resource distributor

quiet ice
#

I probably could

compact haven
#

thats actually something I'd be interested in looking into

#

@worldly ingot you're very amazing would you tell me if it's against Spigot TOS to use their endpoint to publish an update with CD

glass mauve
#

can I give a block data via PDCs, that will stay after placing and picking the block up again

worldly ingot
#

I don't think we have an endpoint for uploads on Spigot

#

At least not to my knowledge

left swift
compact haven
#

I mean there has to be something that allows users to upload, or else how does the frontend do it

sterile token
#

Maybe they use websocket for uploading files

compact haven
#

so it seems it does

POST https://www.spigotmc.org/resources/RESOURCE/save-version

{
  "resource_file_type": "file",
  "file_hash": HASH,
  "version_string": VER,
  "title": "New Update Yo",
  "message_html": "<p>My Greatest Update</p>",
  "attachment_hash": HASH
  ... [xf? json parameters]
}
#

POST https://www.spigotmc.org/attachments/do-upload.json?hash=HASH&content_type=resource_version&key=resource
FORM DATA containing the binary file upload, content_data[resource_id], content_data[resource_category_id], and a bunch of other file properties, along with xf? properties

#

though I don't really know what xf is, if it's cloudflare tokens idrk that a machine would be able to automatically upload a resource for CD

mortal hare
#

does any of you know what kind of inventories are nameable serverside?

#

I know few, like chest or furnace

#

but is there any list i can view instead of painfully testing it myself

#

im lazy

#

i found those containers which are renameable:

Enchantment Table,
Furnace,
Brewing Stand,
Dropper,
Hopper, and
Dispenser.
Chest,
Trapped Chest,
Smoker
#

anything to add?

#

why tf Loom is not renameable while Smoker is

#

Mojang pls fix

chrome beacon
#

Hm didn't expect Enchanting Tables to be renameable

#

Otherwise it makes sense

brave trellis
#

Why does a log filter out everything for the console, it logs out everything once its passed through a filter, i know im returning it as Filter.Result.NEUTRAL, but once this is inside the server it stops every log entirely

mellow edge
#

why does BlockBreakEvent executes twice?

#
  @EventHandler
    public void onPlayerBlockBreak(BlockBreakEvent e) {

        if(e.getPlayer() == null) {
            return;
        }

        Player player = e.getPlayer();

        System.out.println(e.getBlock().getType());

        if(e.getBlock().getType() == bed) {
            if(!this.players.contains(player)) {
                Bukkit.broadcastMessage(ChatColor.BOLD + ChatColor.WHITE.toString() + "BED DESTRUCTION > " + ChatColor.RESET + ChatColor.RED + "bed was destroyed by: " + e.getPlayer().getName());
            } else {
                e.setCancelled(true);
                player.sendMessage(ChatColor.DARK_RED + "[SYSTEM] " + ChatColor.RED + "You cannot destroy your own bed!");
            }
        }
#

not finished but that's not the point

chrome beacon
#

Bed has two parts

mellow edge
#

ohhhh

#

lol

#

nope

#

still

#

everything I break executes the event twice

#

maybe is it registered twice????

silent vigil
#

what do the CachedPlayer and GameState classes do/what are they?

mellow edge
#

nm I figurated it out πŸ™‚

#

thanks anyway

midnight shore
#

why is this not correct?

dapper harness
#

Hello, I'm trying to make a random teleport plugin but when the range is big and the selected random chunk is not generated yet it creates huge amount of lag for everyone on the server, how can I prevent that ?

round finch
#

preload?

#

cooldown

dapper harness
#

Because I'm trying to check if the location is safe so I need to generate the chunk and it freezes the server for several seconds each time someone rtps

#

Yes but how do I do that?

#

I didn't think generating a chunk and check if it's safe would take that long

tall dragon
# dapper harness I didn't think generating a chunk and check if it's safe would take that long

generating a single chunk should not generate much lag to be honest, but when the player is teleported all chunks in his view distance will also need generating. so, you could make the player wait like 5 seconds and use those 5 seconds to generate the needed chunks. but not all at once obviously. spread it out over those 5 seconds.

i would for example generate only the selected chunk. check if its safe, the continue to generate X amount of chunks in X radius around the chosen chunk.

dapper harness
#

I already do that, I chose a random location, check if the location is lava and if it's not lava the player is teleported 5 seconds later

tall dragon
#

do you make sure the chunks are generated gradually

#

instead of all at once

dapper harness
#

But the thing is when I do the command the server lags a lot when trying to check if the location is saty

#

The lag is not when the player is teleported it's when trying to check safety

rugged cargo
#

someone mentioned changing the max itemstack size via the material, but int maxStack is immutable. I've tried using reflection (which may or may not be the right approach), and got java.lang.NoSuchFieldException: modifiers. any tips?

tall dragon
ivory sleet
#

altho

#

idk maybe its inferred

#

in which it wont be easy even w/ unsafe

round finch
#

wait wait it possible to pass the ItemStack limt?

#

πŸ€”

rugged cargo
#

im trying to reduce the stack limit, so im not sure. though it should be similar

ivory sleet
#

reduce?

#

I mean just decrement the amount?

rugged cargo
#

yeah, make it to where only one of my item can reside in a slot

tall dragon
#

that can be made through other means

rugged cargo
#

ive seen the approach of giving each item unique nbt but im not sure

ivory sleet
#

technically just use sth like pdc for that

tall dragon
#

im pretty sure you can apply unique nbt

ivory sleet
#

yeah

#

do that

#

changing the hardcoded max amount would fuck the api

rugged cargo
#

oh, I see

round finch
#

i were thinking code a stacking plugin?

rugged cargo
#

so by trying to change the max stacksize, i would screw over a bunch of other things?

ivory sleet
#

well lets say you do reflectively change it in Items.java from nms

#

then yeah

round finch
#

if slot 1 is at certain amount

dapper harness
# tall dragon ok can we see your code for this?
        if(System.currentTimeMillis()<lastRtpCommand+5*1000) {
            getBukkitPlayer().sendMessage("Β§cDo not spam this command.");
            return;
        }
        lastRtpCommand = System.currentTimeMillis();
        if(!canRtp()) {
            getBukkitPlayer().sendMessage("Β§cYou have to wait "+Main.getTimeLeft(lastRtp+Main.rtpDelay-System.currentTimeMillis())+" before being able to rtp again.");
            return;
        }
        Location loc;
        do {
            loc = new Location(Bukkit.getWorld("world"), Main.random.nextInt(Main.rtpMaxDistance*2)-Main.rtpMaxDistance+0.5, 100, Main.random.nextInt(Main.rtpMaxDistance*2)-Main.rtpMaxDistance+0.5);
            loc.setY(loc.getWorld().getHighestBlockYAt(loc));
        }
        while(!Main.isSafe(loc));
        new TeleportRequest(this, loc, TeleportType.RTP);
    }

    public static boolean isSafe(Location loc) {
        int x = loc.getBlockX();
        int y = loc.getBlockY();
        int z = loc.getBlockZ();
        return !(badBlocks.contains(loc.getBlock().getType()) || badBlocks.contains(loc.getWorld().getBlockAt(x,y+1,z).getType()));
    }
rugged cargo
#

I was trying to change it for the Material.book instance, but still. i guess that would cause issues

#

ill just apply a random integer to them via nbt and hope that i get unique numbers each time

tall dragon
round finch
#

Oh no

#

that explains lag

rugged cargo
#

that'll cause major issues. lol.

dapper harness
ivory sleet
#

not so sure 'bout that

rugged cargo
#

could be a problem with isSafe then?

round finch
#

i dont think using Main thread is a good idea

ivory sleet
#

its inevitable

tall dragon
#

you need it for generating chunks

ivory sleet
#

but you probably ought to determine a threshold

dapper harness
#

I'm not sure I understand what should I change ?

ivory sleet
#

tldr, but from what I understand that code snippet causes some lag right?

dapper harness
#

yes

ivory sleet
#

well idk what happens in canRtp(), but you probably want to make sure that while look can iterate a maximum of x iterations

granite beacon
#

Conclure did you ever figure out that projectile thing from the other day?

ivory sleet
#

as there's no upperbound as of now

#

thus causing the plausibility of a million iterations if you're unlucky

ivory sleet
prisma needle
#

Hide players from user count?

ivory sleet
#

or well, extremely random and arbitrary

granite beacon
#

Not looking for perfection

tall dragon
#

@dapper harness if you develop for paper. you could generate a chunk async

#

but idk if thats the case

dapper harness
ivory sleet
#

i didnt get that far as to being able to call it close

granite beacon
dapper harness
tall dragon
#

using a future

ivory sleet
#

teleportAsync provides a CompletableFuture

#

so chain a callback

tall dragon
#
CompletableFuture<Chunk> chunk = PaperLib.getChunkAtAsync(loc);
            chunk.thenAccept(result -> {

}

for example

ivory sleet
#

oh that too

#

and then in case you wanna go over to the server thread again, Server/Bukkit::getScheduler would be the only option

cold field
brave trellis
#

wasnt it not allowed?

#

i may be wrong as usual but as far as I remember there was a reason for it not to really exist connecting to the spigot and downloading the file, only allowing an update notifier

ivory sleet
round finch
#

what spiget?

cold field
#

yey TY

round finch
#

i only know spigot

ivory sleet
#

rest api

#

for spigot

round finch
#

nice!

ivory sleet
#

ye

round finch
#

just imagine if i got rickrolled

#

from that link πŸ˜‚

ivory sleet
round finch
#

Legends never die

ivory sleet
#

indeed

round finch
#

i need some tip!

#

i'm working with TLS

#

anyways to be better at making sense of source?

ivory sleet
#

sense of source?

round finch
compact haven
#

okay yeah there's no way we'd know about that from "TLS", TLS is a HTTPS standard lmao

round finch
#

decipher i mean

#

rn i'm trying to find block location

#

this kinda like mcp

sterile token
#

@mellow edge BlocksBreakEvent its executed everytime a block/door, etc its breaked

mellow edge
#

ofc

#

but I registered it twice

sterile token
#

Oh ok

elfin atlas
#

Does anyone has a good idea which Websocket Server Library is good for Spigot Plugins?

ivory sleet
#

nv websocket client

#

and okhttp

#

but if you're creating a web server system perhaps spring?

granite beacon
#

Question about my approach, the best way to make a mob that can build and destroy blocks to get to the desired target is to use the internal mob goal system correct?

echo basalt
#

Yeah, for custom mob AI you always want to avoid the overhead and just use pathfinders

elfin atlas
raw sky
#

The only way to detect a player and their alts is through ip right?

delicate lynx
#

yes

shy skiff
#

Hey, someone know how to fix this?

river oracle
shy skiff
#

on old versions it's working but on 1.18 it's not..

river oracle
#

I can't even find EntityCreature on 1.18 docs

#

maybe I'm stupid but I'm not even seeing the class

shy skiff
#

It's on nms

river oracle
#

oh no clue can't help you then

#

I don't use NMS

shy skiff
#

It's okay.

river oracle
# shy skiff It's on nms

if it works on previous versions try to find a method with similar return type and brute force it

#

I'm pretty sure thats the best you can do with NMS

river oracle
#

it probably has something to do with my repo but I have no clue

#

fixed

rugged cargo
#

ive been monitoring /tps for the entire development of my plugin, and it finally has dropped below 20.

#

i say that as if its a good thing... i have no idea why

#

^optimization time

foggy fiber
#

How do I update a lodestone compass' location to a player's location constantly

#

Even player.updateInventory() doesn't update the compass to the new location after setting its metadata

#
    @EventHandler
    fun onPlayerMove(event: PlayerMoveEvent) {
        if (event.player == runner) {
            for (entry in playerTrackers) {
                val meta = entry.value.itemMeta as CompassMeta
                meta.lodestone = runner.location
                entry.value.itemMeta = meta
                entry.key.updateInventory()
            }
        }
    }```
#

this is the code im using to do this

quaint mantle
#

kotlin 🀒

quaint mantle
foggy fiber
quaint mantle
foggy fiber
#

Would you prefer I write this?```java
@EventHandler
public void onPlayerMove(PlayerMoveEvent e) {
if (event.player.equals(runner)) {
for (Player player : playerTrackers.values()) {
ItemStack stack = playerTrackers.get(player);
CompassMeta meta = (CompassMeta) stack.getItemMeta();
meta.setLodestone(runner.getLocation());
stack.setItemMeta(meta);
player.updateInventory();
}
}
}

#

How exactly is this less ugly

#

It's overly verbose

#

Anyway, I'd appreciate an actual answer to the question if you're here to judge, otherwise don't waste my time

summer scroll
river oracle
summer scroll
foggy fiber
#

That's not the issue

#

The problem is that they don't update except for the first time when adding it to the inventory

quaint mantle
#

or am I thinking of something else?

summer scroll
#

oh, i thought you was asking something like that

foggy fiber
#

Why? I already have the ItemStack

#

I figured I could just update the existing stack

quaint mantle
#

Itemstacked obtained from a players inventory is cloned

#

atleast I think so?

foggy fiber
#

Ah, I figured that could be the case. The thing I'm trying to avoid is edge cases failing (two compasses for example)

summer scroll
foggy fiber
#

Every example I see replaces every compass with the retargeted compass or changes the global compass target

#

Which is pretty bad imo

#

Not having ItemStack UUIDs kind of hurts

#

Good at Java/Kotlin, not good at Spigot, so I may be missing something simple here

quaint mantle
#

guess you could try and track where the compass is in the inventory

foggy fiber
#

And update it when they move it?

quaint mantle
#

InventoryClickEvent

summer scroll
#

pdc

foggy fiber
#

Is there a way to replace the item in the inventory without triggering an animation

quaint mantle
#

inventory.setItem?

summer scroll
#

no

quaint mantle
#

oh does it do that in later versions?

summer scroll
#

i have this issue before

foggy fiber
#

Maybe I need to use NMS

summer scroll
#

well you can try to use packet interceptor

quaint mantle
#

the bukkit api just calls nms

#

it's probs client side

summer scroll
#

yeah client side

foggy fiber
#

ugh

#

maybe I should just make it update when you right click it or something

#

lol

#

the main constraint I have here is vanilla compasses need to retain functionality, so I think that's a good compromise

#

it's for a custom manhunt plugin I'm writing

inner lintel
#

Just noticed wrong chat lol sorry

#

Ok let me just spit it out, been typing this for about 3 different versions, ok so i want to create a custom configuration, like message.yml but i know the usual way to set it up wont let you add comments like you can with the default config.yml, any way to set up custom configurations that way by creating the file and commenting it that way, i search in stackoverflow, all over YouTube, all over github like bro why isn’t there any files bout this at this point ive literally been thinking of decompiling a plugin and just checking out the code cause if others can do it why can’t i find out a way to do it

noble lantern
#

idk what you were googling

#

but there is a guide on spigot for custom configs

river oracle
#

I have a util for custom configs if you want it

#

preserves comments etc

inner lintel
#

Yes yes yes

river oracle
#

pretty basic

inner lintel
#

I want it also the spigot docs

noble lantern
#

Saving using default yaml lib also saves comments

river oracle
#

but gets the kob done

noble lantern
#

idk why it would do that for you, never had issues with it

river oracle
#

?paste

undone axleBOT
crisp steeple
#

sounds like a stupid question, but does ANYONE know a way to serialize an itemstack to json using gson? i've tried everything i could find/think (directly serializing the itemstack, using the itemstack#serialize method, bukkitobjectoutputstreams, nms #createItemStack from nbttagcompound method) and all of them had flaws that made them not usable

noble lantern
#

actually

#

not really

crisp steeple
river oracle
# inner lintel Yes yes yes

https://paste.md-5.net/makedanabi.java

// create config utils instance
ConfigUtils configUtils = new ConfigUtils(plugin);
configUtils.createConfigFile("config.yml");
configUtils.createConfigFile("messages.yml");

// get config
FileConfiguration messages = configUtils.getConfigFile("message.yml");
noble lantern
#

since gson can serialize too

inner lintel
river oracle
#

this should work fine and you can just pass around the util or add a getter in your main class

crisp steeple
#

itemstack doesnt have any transient fields so it keeps trying to serialize things it shouldnt

river oracle
#

I hate the default spigot getConfig() crap

inner lintel
#

Same

river oracle
#

have never used it

inner lintel
#

So do i

crisp steeple
#

something about an itemframe and im sure theres a lot more

noble lantern
#

ahhh i see

#

hmm

#

i know somewhere in spigot source code theyres serialization for ItemStack -> FileConfiguration or YamlConfiguration

#

might be of help somehow

crisp steeple
river oracle
#

that way an owner could edit item stacks in the config too

#

i prefer to just use the commands I have setup in my lib though /retrieve and /send to send and retrieve items from the configuration file

noble lantern
river oracle
#

I use yaml for this as imo its more readable and i'm tryna give an option for if you want to do it ingame or in the configs

noble lantern
#

i think hes saving it to save it through a restart or if it ever dissappears

crisp steeple
river oracle
#

Ahhh

noble lantern
#

what kind of database

crisp steeple
#

mysql

river oracle
#

Oof

noble lantern
#

you could

#

do something fucking ugly

#

but might work

crisp steeple
#

i doubt it

#

because even if i could get yaml in it

quaint mantle
#

Don’t know if this is the right place to ask for help on plugins I apologize if it’s not but anyone familiar with how to set an area for players to use shopkeeper plug-in

crisp steeple
#

the one thing that actually did work reliably was the bukkitobjectoutput method

noble lantern
#

Serialize itemstack to yaml configuration -> translate it to raw yaml -> save as string in mysql

Would be stupid as shit though, better off more or less looking into something better

crisp steeple
#

but then the problem was that in my api server it cant deserialize it because spigot acts weird when theres no minecraft serfver

crisp steeple
noble lantern
#

you can just like new YamlConfiguration().setItemStack() or something i dont remember the exact method one moment

crisp steeple
#

ik that but itemstacks dont work at all when theres no minecraft server running

noble lantern
#

ie getting from a MemorySection or declaring them at all?

crisp steeple
#

it would also be very strange to have all the api in json except for the inventory being in yaml

noble lantern
#

indeed it would be, more or less a last resort suggestion

crisp steeple
#

what i have right now

noble lantern
#

basically a json field that stores the yaml config, its hacky but it would work nonetheless

You probably better off looking at the code behind something like this https://hub.spigotmc.org/javadocs/spigot/org/bukkit/configuration/ConfigurationSection.html#getItemStack(java.lang.String,org.bukkit.inventory.ItemStack)

I beileve to set an ItemStack to config you just use set(string object) and theyres likely code on how they serialize it there, unless they just call ItemStack.serialize() then were in the same boat as before

Your likely better off writing your own quick serializer, wouldnt take that long either, just store name, material, amount, loop through PDT & NBT and store them under seperate values

crisp steeple
#

its so close to working except for the fact it doesnt directly add the itemmeta to the itemstack

crisp steeple
#

only problem is probably going to be nbt

noble lantern
#

you could use something like NBTApi if you dont wanna deal with it directly

#

handles all major versions down to 1.8.9

#

seems like all spigot does is run through and store the item meta directly but now you have to look for ItemMeta's serialize() method

crisp steeple
#

the serialization part works fine

#

i have all of the info i need by the time its there for deserialization

#

the only problem is that in the ItemStack.deserialize() function assumes it was serialized in yaml, and thus the meta part wont actually be an instance of ItemMeta

noble lantern
#

wild question

#

have you tried serializing ItemMeta to gson instead of the ItemStack

crisp steeple
#

i was thinking that

#

but then i either have to store both the itemstack and meta which is really inefficient

#

or make my own item system which wouldnt be that bad

#

i would have to check though if serializing meta even works though

noble lantern
#

well you would store a ItemStack object that has field type amount meta_data other_things

noble lantern
crisp steeple
#

will have to make own methods of storing the stuff though

#

for type and amount ... or whatever

noble lantern
#

yeah but would be stupidly simple, just 2 lines of code for it

#

well technically 4 for both methods

crisp steeple
#

2 lines?

noble lantern
#

just run through each item and manually setting them

crisp steeple
#

wouldnt you have to create a JsonObject directly

#

and then set the fields of material and such

noble lantern
crisp steeple
#

i suppose

noble lantern
#

definatly do check if ItemMeta is able to be parsed through gson first before going through all that ofc

crisp steeple
#

yea

noble lantern
#

if its not youll have to loop through everything in item meta which would be big sad

crisp steeple
#

also what is the implementation of itemmeta?

#

i couldnt find it but i was trying to to see how it did custom nbt tags

noble lantern
crisp steeple
#

interesting

#

well ill just see what happens when trying to serialize it

noble lantern
#

im wrong sorry i was thinking of MaterialData

#

Bukkits ItemFactory handles that

quaint mantle
crisp steeple
#

checked exceptions

noble lantern
#

sneakythrows

crisp steeple
#

sneaky

noble lantern
#

super sneaky

#

the sneakiest

noble lantern
#

try it with NB data appl- oh wait

#

try PDT

crisp steeple
#

i mean

noble lantern
#

oh my

crisp steeple
#

if itemmeta is working

#

i dont really see a problem

noble lantern
#

okay nevermind you dont need to worry about pdt

#

PDT stores plugin instances, cant remember if they store as strings in NameSpaced values though but i think they do

#

So I'm not entirely sure how serializing PDT values to Gson would work, but if you're on an older version prolly don't gotta worry about it

crisp steeple
#

yea pdt doesnt exist here

noble lantern
#

bada bing bada boom

#

actually glad i figured this out too cause now i can use it >: )

crisp steeple
#

gg

#

dear me

#

really need to find what the itemmeta implementation is

#

found it but its not a public class πŸ™ƒ

worn tundra
#

Spigot has source code?

noble lantern
crisp steeple
#

yea i found it

#

CraftMetaItem

noble lantern
crisp steeple
#

theres a thing in it called serializablemeta that seems useful

noble lantern
#

little known fact spigot doesnt actually have code, neither does craftbukkit

crisp steeple
#

yep

noble lantern
crisp steeple
#

yeah that's what im doing

#

very useful

torpid copper
#

when i compile my spigot plugin using maven to a jar, my server cant find the plugin.yml even though it is in the .jar. how do i change how it packages it? using vscode btw

mortal hare
#

is there any difference in terms of resource packs between smoker, furnace and a blast furnace

#

do they all have separate textures for eac

#

or they all use generic furnace ones

golden kelp
#

Seperate

inner lintel
mortal hare
golden kelp
#

I think they are on their own as well

#

As they are pretty different in game so...

mortal hare
#

well shulker boxes have separate inventory type id, regarding the serverside view

#

but i can't see barrel there

golden kelp
#

Barrel is just a more thicc chest

mortal hare
#

since its a different block which can hold items

golden kelp
#

Why are those related

wicked totem
#

anyone know what i should put in the commented section? ive tried to remove the item is a bunch of different ways but its none have worked so far

delicate lynx
#

are you wanting to remove all tridents

wicked totem
#

itll only end up being 1 but it can be all

rugged cargo
#

maybe search for the slot its in, then set that slot to Air?

thin pike
#

03:50:35 [INFO] Loaded plugin reconnect_yaml version git:reconnect_yaml:1.18-R0.1-SNAPSHOT:eae9d45:1631 by SpigotMC
03:50:35 [INFO] Loaded plugin EasyProxySystem version 1.1 by LionGaming1995
03:50:35 [INFO] Loaded plugin cmd_find version git:cmd_find:1.18-R0.1-SNAPSHOT:eae9d45:1631 by SpigotMC
03:50:35 [INFO] Loaded plugin BungeeYAML version ${pom.version}-${build.number} by roblabla
03:50:35 [INFO] Loaded plugin cmd_server version git:cmd_server:1.18-R0.1-SNAPSHOT:eae9d45:1631 by SpigotMC
03:50:35 [INFO] Loaded plugin cmd_alert version git:cmd_alert:1.18-R0.1-SNAPSHOT:eae9d45:1631 by SpigotMC
03:50:35 [INFO] Loaded plugin cmd_send version git:cmd_send:1.18-R0.1-SNAPSHOT:eae9d45:1631 by SpigotMC
03:50:35 [INFO] Loaded plugin Yamler version 2.4.0-SNAPSHOTb-16 by geNAZt
03:50:35 [INFO] Loaded plugin cmd_list version git:cmd_list:1.18-R0.1-SNAPSHOT:eae9d45:1631 by SpigotMC
03:50:35 [WARNING] Forced host server pvp is not defined
03:50:35 [INFO] Enabled plugin reconnect_yaml version git:reconnect_yaml:1.18-R0.1-SNAPSHOT:eae9d45:1631 by SpigotMC

Can someone help me? The server always hangs for me. As soon as I pack my own plugin in

torpid copper
#

check your if/while loops for infinite

thin pike
#

ProxyServer.getInstance().getScheduler().schedule(this, new Runnable() {
@Override
public void run() {
if (intege == 0) {
for (ProxiedPlayer all : ProxyServer.getInstance().getPlayers()) {
all.sendMessage(" ");
all.sendMessage(" Β§7Unsere Β§aTeamSpeakΒ§7 IP:");
all.sendMessage(" Β§aPixelerlebnis.net.de");
all.sendMessage(" ");
}
}
}
}, 0L, 5L, TimeUnit.MINUTES);

#

My Plugin send Automatically this message in 5 Minutes

golden kelp
#

Can't u just broadcast

#

Without looping

fierce spear
#

hello I just started a project and I'm getting this weird error

#

Cannot resolve method 'setInvisible' in 'EntityArmorStand'

noble lantern
#

it could be running that every 5 ticks, instead of minutes

fierce spear
#
EntityArmorStand stand = new EntityArmorStand(((CraftWorld)p.getWorld()).getHandle().getMinecraftWorld(), pos.getX(), pos.getY() + offset, pos.getZ());
stand.setInvisible(true);
stand.setCustomName(pl.getName());
stand.setCustomNameVisible(true);
stand.setMarker(true);
noble lantern
#

thats a odd way for a runnable to be initialized though, never seen someone use schedule before

golden kelp
fierce spear
#

I'm pretty sure it does

#

well not mine apparently

#

but should have

#

import net.minecraft.world.entity.decoration.EntityArmorStand;

noble lantern
#

I dont see EntityArmorStand as a class in javadocs

#

normally its just ArmorStand

fierce spear
#

yup

#

it is

crisp steeple
#

tomorrow ill just bite the bullet and make my own item serialization system

noble lantern
noble lantern
#

and see what i can manage to slam together

crisp steeple
#

gl

fierce spear
#

I'm 1.18.2

noble lantern
# fierce spear I'm 1.18.2

I would say just use the ArmorStand class then, as it provides anything you need, to making it mini to moving arms and legs, pretty much anything as well as everything from LivingEntity

torpid copper
#

my plugin still wont load. spigot says that it is missing plugin.yml but it is in the jar in the rources as specified on the spigot documentation. any advice?

noble lantern
#

and check if its in there

#

are you using maven?

torpid copper
#

yes i have

#

i am using maven

noble lantern
fierce spear
#

Let me try

noble lantern
torpid copper
#

plugin.resouces.plugin.yml

#

~<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>dev.cibmc.spigot.pluginbaby</groupId>
<artifactId>pluginbaby</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
</properties>
<repositories>
<repository>
<id>spigot-repo</id>
<url>https://hub.spigotmc.org/nexus/content/repositories/snapshots/</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot-api</artifactId>
<version>1.17-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
</dependencies>
<build>
<sourceDirectory>${project.basedir}/src/main/java</sourceDirectory>
<resources>
<resource>
<directory>${project.basedir}/src/main/resources</directory>
<includes>
<include>plugin.yml</include>
</includes>
</resource>
</resources>
</build>
</project>~

#

oops

noble lantern
#

?paste

undone axleBOT
torpid copper
#

how can i change the behavior of the maven package?

visual tide
noble lantern
#

hard to read in just discord text

fierce spear
#

it works but I cant get data watcher from ArmorStand

#

DataWatcher watcher = stand.getDataWatcher();