#help-development

1 messages · Page 473 of 1

river oracle
#

oh you are doing matchmaking ?

torn oyster
#

Yes

river oracle
#

gross I cbf to do proper matchmaking

#

PluginMessageChannels should do everything you need though

eternal oxide
#

is your plugin that offered the "play" a spigot or bungee plugin?

river oracle
#

they are a bit weird to get used to at first

torn oyster
chrome beacon
torn oyster
#

I will also need to be communicating to tell the proxy plugin that the server is full or if the game has started or not

eternal oxide
#

You must have a player online to be pressing the Play button

river oracle
#

you need players to play games so I see no issue

chrome beacon
#

I assume they want to send a message to proxy that the server is ready and can be connected to

eternal oxide
#

?pmc

chrome beacon
torn oyster
#

Hold on let me explain what I am doing

#

So I have a pterodactyl panel, and a server template for each minigame

#

The proxy plugin uses the pterodactyl API to create a server

#

And create ServerInfo so they can connect to it

#

That works perfectly

#

I would like to have a way to let players join from a lobby, or click "play again" after it ends

eternal oxide
#

then you need nothing, you are doing everything on the proxy

torn oyster
eternal oxide
#

on the proxy you have access to all connected players

torn oyster
#

Yes but I want a GUI so they can play

#

You can't execute bungee commands from backend I don't think

eternal oxide
#

then you need a spigot plugin and messaging channels

torn oyster
#

If that was possible then I have my solution with a /play <minigamename>

eternal oxide
#

what are you calling the "backend"?

torn oyster
#

Spigot servers

eternal oxide
#

thats not a backend

#

also bungee commands are available on each connected spigot server

torn oyster
#

I am aware

#

but not through codef

#

You cant make a player execute a bungee command from spigot api

eternal oxide
#

?pmc

torn oyster
#

Would I need a custom channel for this

torn oyster
eternal oxide
#

not essential but you should

torn oyster
#

Like say if the minigame is ready to be joined

eternal oxide
#

Who exactly are you planning to communicate with when no players are online?

torn oyster
#

Spigot -> Proxy

#

Like when the minigame is ready to be played/used

eternal oxide
#

There is no one online so there was no one to click the play button

torn oyster
#

What

eternal oxide
#

No players = no game

torn oyster
#

No like on that individual minigame instance

#

No players would be on

#

But there are players in the lobby waiting

eternal oxide
#

you don;t send anything to the mini8game server

torn oyster
#

Yes but the minigame servers sends stuff to the proxy

eternal oxide
#

you only send players

torn oyster
#

And it cant communicate if there are no players on that minigame server

eternal oxide
#

it shoudl not send anythign with no players on it

torn oyster
#

How would the proxy know when server is ready then

eternal oxide
#

You are very confusing with terminology

regal scaffold
#

INSERT INTO ban_trial.banned_players (player_uuid) VALUES ('08341680-0904-4271-af2e-24cc49b12952')

torn oyster
#

When a player requests to play a minigame, it clones the server template and downloads the server jar in the new server instance

#

No players would be on the server at that time

regal scaffold
#

Why would I possibly be getting a success in update

#

But the data doesn't actually get put in the database

torn oyster
#

How would I make the minigame instance (spigot) tell the proxy that it is done setting up and players can join now

chrome beacon
#

So I was right

torn oyster
#

Yes I think I was going off what you said

eternal oxide
#

if it doesn;t respond its not online

torn oyster
eternal oxide
#

messaging channels

torn oyster
#

Oh

#

When I'm making this should I use "BungeeCord" channel

regal scaffold
#

I'm having a issue with MySQL

I have a method to insert data into a table, the method returns the number of updated lines and works perfectly, no errors or anything, I'm looking at the SQL Connections to monitor usage and that's working correctly, no issues anywhere.

Except after all the success, the data isn't actually added to the database. No clue what is going on at all

torn oyster
#

or do I make one of my own?

regal scaffold
#
create table if not exists banned_players
(
    player_id   int auto_increment
        primary key,
    player_uuid varchar(45) not null
);
#

INSERT INTO ban_trial.banned_players (player_uuid) VALUES ('08341680-0904-4271-af2e-24cc49b12952')

hazy parrot
regal scaffold
#

No errors, success all around, no issues with sqlserver connections and returns "1" cause it updated 1

hazy parrot
#

Show whole method

regal scaffold
#
            PreparedStatement ps = connection.prepareStatement("INSERT INTO " + this.DATABASE_NAME + ".banned_players (player_uuid) VALUES (?)");
            ps.setString(1, ban.getPlayerUUID().toString());
            //<---------- Right here print (ps) and that's what I sent 
            ps.executeUpdate();
hazy parrot
#

That is not whole method

earnest lark
#

is there a event for a player taking a item from a gui

regal scaffold
#

There's nothing else

#

Try and catch

#

That does not get executed

#

Cause I have prints everywhere

#

And the data is not null

chrome beacon
earnest lark
#

K

#

luv ya

regal scaffold
#

Literally

#

I've been debugging for close to an hour now... Switched SQL Servers, remade everything, no luck

#

ps.executeUpdate() returns 1

torn oyster
#

Figured it out

#

Pterodactyl has a thing where you can see if a server is running

#

STARTING and ONLINE or something

earnest lark
#

ok im using InventoryClickEvent how do i get the name of the gui

regal scaffold
#

@hazy parrot

#

Any clue?

hard socket
earnest lark
#

oh cool

#

doesent work

river oracle
#

But I wouldn't use title to check inventory for InventoryClickEvent or related

earnest lark
#

well

#

i am

torn oyster
#

java.lang.IllegalArgumentException: Channel must contain : separator (attempted to use Minigame)

#

why can't I use the channel "minigame"

#

why do I need a :

#

how does this work

regal scaffold
#

Well

#

Guess what

#

MySQL autocommit seems to be broke

#

connection.commit fixed it

#

after 1.5 hours

eternal oxide
#

use something like bc:minigame

torn oyster
#

or actually like BungeeCord:minigame

eternal oxide
#

makes no difference, it's just a naming requirement

torn oyster
#

and do I need that same thing on the proxy listener part

river oracle
earnest lark
#

what would you reccomend

river oracle
#

one sec trying to find the resource

#

@earnest lark ^

earnest lark
#

i know what im doing

#

slightly

#

im using the title to find the targeted player

river oracle
#

regardless that is bad design

#

use the guide I sent as a rough outline for what you need

earnest lark
#

honestly idrc enough

#

if i was bieng paid or soemthing it woudl be different

bronze wren
#

hey guys

earnest lark
#

hi]

bronze wren
#

im new to plugin dev so I get a bit of help with smth

earnest lark
#

k

bronze wren
#

damn I cant send all the code

remote swallow
#

?paste it

undone axleBOT
flint coyote
#

?paste

undone axleBOT
bronze wren
#

oh

remote swallow
flint coyote
#

I even interrupted my coding for that :/

bronze wren
#

so what now I put the code in the site

flint coyote
#

and then ctrl+s

#

and then send the link in here

remote swallow
#

then send us the link

bronze wren
#

i want to make the kills variable seperate for each player

#

like they all have a seperate variable but the scoreboard only displays the kill count of the most recent player

#

because the scoreboard isnt local

flint coyote
#

That's because your bukkitKiller is a class variable. Instead you should make a function in the scoreboard

Something like updateScoreboardForPlayer(Player player). Then in your events you would just call that function after you updated the hashmap

bronze wren
#

alr ill see if that works

#

thanks

#

wait i dont think I follow

#

i created a function that returns the kill value but idk how that would help

#

like I get that it's because they are class variables now but idk how I would fix it

flint coyote
#

I just noticed you have to keep updating inside the scheduler due to the time being displayed.
In that case you want to loop over all players and update the scoreboard for each of them inside your scheduler.

for(Player player : Bukkit.getOnlinePlayers()) {
 // update scoreboard
}
#

If you have a subset of players for each board you should loop the subset ofc

bronze wren
#

so excuse my dumbness cause I started plugin dev a few days ago but for looping for all online players, would I nest my already existing for loop within it?

flint coyote
#

I don't know what you are looping there. What is boards.values()?

bronze wren
#

idfk I followed a tutorial 🤣

flint coyote
#

Send me the FastBoard class pls

remote swallow
#

fast board is alib

bronze wren
#

I don't have its class

#

its an import

flint coyote
#

Oh

remote swallow
bronze wren
#

is there a way to make fastboard boards local

#

or at least some variables within one

flint coyote
#

I'd assume that boards.values() returns multiple scoreboards if there are multiple scoreboards.
I can't tell if each scoreboard is for every player or only one player

eternal oxide
#

teams belong to scoreboards. Players can only be in one team at a time

flint coyote
#

Why would you loop different scoreboards then?

eternal oxide
#

you can have multiple scoreboard but not all in use at teh time

flint coyote
#

Well in that case he doesn't need that loop. Unless there ain't another way of determining the correct scoreboard

bronze wren
#

all I want here is to make kills local

#

ill optimize crap later

flint coyote
#

Just try to put it inside your other loop and see if it works 🤷‍♂️

#

I don't know the lib so I can just guess

regal scaffold
#

Is smile around

#

I was wondering how he did to implement paging into his GUI system

bronze wren
#

how would I make a local scoreboard without fastboard?

flint coyote
regal scaffold
#

I wanna adapt his implementation to allow multi-pages

flint coyote
# regal scaffold I was wondering how he did to implement paging into his GUI system

But I'm also working based on his GUI tutorial and implemented paging by adding a page variable to my inventory.
And then my Consumer just increments/decrements the page and calls decorate again.
Decorate is therefore adjusted to deal with the page

this.addButton(48, new InventoryButton(Material.ACACIA_BUTTON, "Left", null, event -> {
                page--;
                this.decorate();
            }));
bronze wren
flint coyote
#

I just did this an hour ago so sadly I did not clean up all the mess yet. I can still send you the code as a reference if you want^^

regal scaffold
#

Oh oh yes you just game me the idea I needed

#

Thanks!

flint coyote
#

yw :)

bronze wren
flint coyote
#

Nah I was talking to tomis, sry

regal scaffold
#

I assume you store the variable in the implementation and not the abs class

bronze wren
flint coyote
regal scaffold
#

Oh wait you use the consumer like you said, I see what you did

#

Yes exactly

#

What I was just about to say

#

Sick!

flint coyote
#

The guide ain't great since there are no descriptions but it's a general direction

bronze wren
#

final Scoreboard scoreboard = (Scoreboard) manager.getNewScoreboard();
final Objective objective = scoreboard.registerNewObjective("test", "dummy");

#

registernewobjective doesn't exist

flint coyote
#

Yeah some of the methods are deprecated

#

You could use this criteria

bronze wren
#

i think you were right the first time about it being because they were class variables

#

i modified it to display the player's location and it worked fine on a per-player basis

#

so how the heck do I update kills without using class vars

flint coyote
#

When you have the player then you don't have to use the class variable.
Just get the kills of the player from your hashmap like you got the location from the player

bronze wren
#

why didn't I think of that lmfao kills.get(board.getPlayer().getName())

#

im so stupid

karmic mural
#

Hi, so I am rewriting a plugin and noticed that "setLore" is deprecated, but after some searching it seems that it's a paper api thing... Should I just swap back to spigot api. (I took an extended break and can't recall any reason for the switch)
org.bukkit.inventory.meta.ItemMeta.setLore

young knoll
#

Deprecation is just a warning

late sonnet
young knoll
#

It’s still usable

flint coyote
#

Deprecation does not mean that it does no longer work

late sonnet
karmic mural
#

I am aware, I am mostly just asking if there's any real benefit to paper over spigot in terms of development? I am very novice with plugins

late sonnet
sterile token
#

Paper 💀

young knoll
#

Depends if you want the plugin to run on spigot

flint coyote
#

Paper has some things that spigot does not have. Like a PlayerJumpEvent. Besides that, no.
Oh and by using parts of the API that are not part of spigot your plugin will only work on paper servers ofc

karmic mural
# sterile token Paper 💀

Do you have any expanded thoughts on why I shouldn't use paper? I'm looking for the best possible experience both for development and players

flint coyote
#

Do you have any reason for using paper is the better question

karmic mural
flint coyote
#

That's not what I meant. I was asking from a developer perspective. Are you using any special features of the paper api?

karmic mural
flint coyote
#

You can stick with paper. Just keep in mind that if you ever plan on publishing your plugin on spigotmc that not every server is running paper

young knoll
#

You are not allowed to publish plugins that require paper on spigotmc

karmic mural
#

~~Does it impact my ability to post plugins to spigotmc if it's built on paper api? ~~ nvm coll answered already

ancient plank
#

I use the API for whichever platform the server I am working with uses, so it's been paper for a while.

#

Pretty neat though

young knoll
#

Smh

#

Pr more api to spigot instead :p

river oracle
#

is there a jira request for PlayerJumpEvent

#

I wonder where'd you inject that at in NMS though

young knoll
#

It’s basically just the statistic increment event

#

Might have some extra checks

river oracle
#

ohhh

#

yeah actually now that I think about that

young knoll
#

That’s what is generally used on spigot to detect jumps

#

Granted idk their exact implementation but I imagine it’s similar

flint coyote
#

Yes there is

#

And it's named exactly like you said

regal scaffold
#

Fabsi

flint coyote
#

Yes?

regal scaffold
#

So I put some page logic on the abstract

#

But now I'm wondering, how exactly did you call decorate only when the prev and next buttons are clicked

#

Did you do it from the consumer inside the button?

#

Or did you override the click method in the implementation

flint coyote
#

I did it from the consumer, yes

regal scaffold
#

Oh cool

#

I wonder tho

#

If I added the prev/next button in the abs class

#

And I call decorate from the abs class

#

Does it still use the implementation?

#

I don't think it does

#

I think the consumer logic needs to be in the implementation

flint coyote
#

No you would call decorate in your implementation which then calls super.decorate(). That would be your pageable class. And the pageable class also calls super.decorate()

regal scaffold
#

Yeah thought so

#

Thanks

flint coyote
#

I just started creating the abstract class but I can get back to you when I'm done so we can compare

regal scaffold
#

For sure, I'll have mine ready in a few mins

#

I implemented a very handy

#

InventoryItem

#

For stuff that doesn't require events, which is really nice

#

CompleteableFuture

#

Doesn't exist

#

Completeable isn't a word

#

It's not a word lol

#

Go on google

#

Completeable

flint coyote
regal scaffold
#

And you'll use it every single time, guarantee

flint coyote
#

I don't have any items without functionality (yet). I might do the same in order to make the GUIs prettier tho

regal scaffold
#

Fair enough

#

Always nice to be able to display a item to just show info

#

Of course you can do it with a InventoryButton

#

But why

#

When you call decorate do you need to reopen the inventory?

flint coyote
#

No it will override the content in the inventory. If you adjust it a little bit

regal scaffold
#

Oh yeah just saw

#

Cool

#
public class InventoryItem {
    private Function<Player, ItemStack> iconCreator;

    public InventoryItem creator(Function<Player, ItemStack> iconCreator) {
        this.iconCreator = iconCreator;
        return this;
    }

    public Function<Player, ItemStack> getIconCreator() {
        return this.iconCreator;
    }
}
#

xd

#

It's just same without the consumer

flint coyote
#

Why do you need the creator tho?

regal scaffold
#

Customize the item still

#

All it is it a InventoryButton with event

#

So for example

#

For background items

#
        InventoryItem backgroundItem =
                new InventoryItem().creator((p) -> createBackgroundItem());

        for (int i = 0; i < getInventory().getSize(); i++) {
            this.addItem(i, backgroundItem);
        }
#

And that fills up all empty spaces

#

The way it works too is order, if you first set it to glass, and then set a specific slot to something else, the latest will be the one that actually shows

flint coyote
#

I see. I did not add the iconCreator thing since my Buttons do not depend on the player viewing it

regal scaffold
#

So always just fill it with a single object to not need to make hundreds of itemstacks

regal scaffold
#

Have both alternatives

flint coyote
#

Yeah that makes sense. Will do that as one of my last cleanups probably.
Still got a lot of more important things to do. Probably one of my largest projects so far

regal scaffold
#

Glad to hear

#

I just got mine accepted on spigot

#

So I'm extremely happy

#

Like, hours ago

flint coyote
#

Accepted by who? The premium resource team?

regal scaffold
#

Yup

plucky pasture
#

Would anyone here know of any type of articles or anything? A couple simple projects to learn the API kinda like a unit test but to learn this lib?

#

(I know java)

flint coyote
#

I see. The biggest part of my project will be free and open source though, That would be the engine and some utility stuff. More complex or specific stuff might then be released as a "premium addon"

regal scaffold
#

Always a good idea

flint coyote
#

Other developers can then create addons themselves if they want to. It'll be a very powerful tool. I already spent over a month working on it. Average is probably 4 hours/day

#

I'd say I'm 65-70% done (for version 1.0 that is)

#

After that there's a lot of room for more features.
And I will have to set up some servers and documentation to test and learn about it

regal scaffold
#

Glad to hear! Keep at it

flint coyote
#

Of course! Alright, back to the abstract class :)

crystal bay
#

anyone got a good anti cheat i can borrow

sleek turret
#

Question, what would be the best option for storing whether a players pvp is on or off?

#

i've used PDCs but ive run into issues sometimes

regal scaffold
#

Also a decent alternative

sleek turret
flint coyote
#

If you have issues with the PDC than that's your next best alternative.

#

Although idk why pdc would not work

sleek turret
#

idk what it is, my pdcs break in certain places

#

could i use meta data on the player?

flint coyote
#

You could use ScoreboardTags

sleek turret
#

ok, thanks for the suggestions

crystal bay
#

still waiting for that response

sleek turret
crystal bay
#

nah not what i need

#

i need to know

#

idc about the server side

#

i just need info

#

Im in the right place quiet frankly

#

SOOOOOOO anyone got something or...

sleek turret
#

"Serious Spigot and BungeeCord programming/development help | Ask development-related questions here"

crystal bay
#

Relax kid ik what im doing

sleek turret
#

ok, have fun waiting for an answer

crystal bay
#

the reason im asking here is cuz like im tryna make one

#

DUH

sleek turret
#

well the way you asked sure doesnt make that clear

crystal bay
#

just keep playing btd6 u seem to be doing just fine with that

sleek turret
#

lmao

crystal bay
#

i hv to make a stupid fucking anticheat for my friend cuz they hate every anticheat out there soooo

#

thats why im asking

#

Vulcan hate it
grim HATE IT
Negativity hate it
HAC hate it

sleek turret
#

damn, thats not gonna be fun. Anti-cheats are the worst to make

crystal bay
#

u can suggest any ac to them

#

they hate it

sleek turret
#

lmfao

crystal bay
#

fr

#

Cant make that up

sleek turret
#

tbh though, ive never found one i truley liked

crystal bay
#

fair

sleek turret
#

what you should do is just get an open source one and modify the branding and tell them you made it. see what they think lmao

crystal bay
#

do i compile that to a jar file tho

sleek turret
#

i there are some you can jsut edit it through the config file

crystal bay
#

i did just rip one off the internet and handed it to them said "here ya go shut the fuck up and accept it"

sleek turret
#

i know, the other owner of my server did that but idk what the AC was that he used

#

lmao

#

good

static ingot
#

Anybody have an idea why I'm getting a "player moved too quickly" warnings when they're teleported on-command?

river oracle
#

Pretty sure that's just an unfortunate side effect I'm not sure if you can do anything about that

#

This behavior can be replicated by /tp in game

regal scaffold
#

Why would ChatColor.translateAlternateColorCodes('&', string);

#

Still return

flint coyote
#

It should not. You probably forgot to reassign the string

regal scaffold
#

I make a string, then translate the colors

#

Then add it to a list, so doubt

flint coyote
#

do you reassign the translated string?

regal scaffold
#

Oh that's what you mean

#

...

#

Distracted me

flint coyote
#

:)

regal scaffold
#

Genius

static ingot
#

just a minor annoyance

flint coyote
regal scaffold
#

You know what's interesting about smile implementation

#

The gui title cannot be player-specific

#

Maybe if you make the abstract Inventory inventory not final, and call createInventory in the implementation constructor instead of in abstract

flint coyote
#

Yeah I had problems with that, too. I added the title and the inventory size to the constructor now. I don't have a createInventory method anymore

#
public InventoryGUI(int size, String title) {
        this.inventory = Bukkit.createInventory(null, size, title);
    }
regal scaffold
#

Well

#

I just did

#
Abstract

    private Inventory inventory;
#

Remove createInventory from constructor

#
    public HistoryMenu(ArrayList<History> history) {
        super(history.size());
        this.history = history;
        super.setInventory(createInventory());
    }

Inside the menu implementation call setInventory so then the Data you're using to populate the GUI "Or even just the player name"

#

Is available

flint coyote
#

That would also work, yes

regal scaffold
#

Handy when you need to populate a GUI with a object

#

Works like a charm

flint coyote
#

Is there a way to NOT call the overwritten method from the parent class? Probably not

regal scaffold
#

Impossible

#

That's what abs classes are

#

I mean

#

maybe you can override

#

And not super()

flint coyote
#

Yeah I want to not call the final implementation but just the function in the abstract class

#

nah I'll show you the problem

regal scaffold
#

Try override and do not super

#

Oh show

flint coyote
#

?paste

undone axleBOT
flint coyote
regal scaffold
#

Tag me btw

flint coyote
#

Basically the this.decorate in the Left and Right buttons calls the overwritten version of the extending class. This then sets the buttons again.
I would just need it to reload the page.

#

Don't you have a second screen? But here you go @regal scaffold

regal scaffold
#

I have 3

#

And they're all used

flint coyote
#

I see

regal scaffold
#

database in 1, google in 2 and IJ in main

#

Ok so

#

Easiest thing to do

flint coyote
#

and I just noticed I don't need a getter and setter on the page

regal scaffold
#

Is set a bool

#

And define if you do need to super or not

#

Now, let me show you something

flint coyote
#

the super is not the problem.

regal scaffold
#

I personally don't like some things

#
        InventoryButton previousPage = new InventoryButton().creator(player1 -> {
            ItemStack item = new ItemStack(Material.ARROW);
            ItemMeta meta = item.getItemMeta();
            meta.setDisplayName("Previous Page");
            meta.setLore(List.of("Click to go to the previous page"));
            item.setItemMeta(meta);
            return item;
        }).consumer(event -> {
            this.decrementPage();
            decorate(player);
        });
#

Then what are you referring to

flint coyote
#
 if (page != 0) {
            super.addButton(pageSize + 3, new InventoryButton(Material.ACACIA_BUTTON, "§aLeft", null, event -> {
                page--;
                this.decorate();
            }));
        }

This calls the implementation in the child class

#

I would need it to call the implementation in the same class only

regal scaffold
#

Ohhhh

#

Ok so

#

What I did to workaround that

flint coyote
#

I can still do the boolean and ignore the added buttons tho

regal scaffold
#

Is make a protected function to make the button

#

In the abs class

#

And in the implementation is where you add the button

flint coyote
regal scaffold
#

You can probably make a InventoryPageButton class too

#

And then you can make the button in the abs

#

And assign the consumer in the implementation

#

Be careful with page-- and page++

#

I was showing I did this.decrementPage();

flint coyote
#

Because you probably check to not go negative, right?

regal scaffold
#

Yup

flint coyote
#

I fixed that by not displaying the button to go "left" (or page--) on page 0

regal scaffold
#

Either loop around

#

Or just not decrease

#

Oh

#

Yeah also a good idea

#

But looping around is fancy

flint coyote
#

that's why there's the if

flint coyote
regal scaffold
#

Well like I said, you have to call the method directly from the implementation

#

Or

#

Override the clickevent

#

In the implementation

flint coyote
#

But it doesn't matter where I call decorate, it will always call the "highest" overwritten version

regal scaffold
#

make a boolean in the implementation

flint coyote
#

I could fix it by not overriding decorate on the child class at all. Then I would have to override the onOpen

regal scaffold
#

If the buttons are pressed set the boolean to false

#

Check the boolean in the parent

#

If it's false, skip and go to the super.parent

#

default back to true

flint coyote
#

Isn't that the same thing I do now with extra steps?

echo basalt
#

Is it possible to load a world by its UUID?

regal scaffold
#

Didn't you say right now it doesn't work?

echo basalt
#

or is the uuid tied to the actual loaded instance itself

regal scaffold
#

Yes illusion

#

Same method

flint coyote
#

It does work with the lock I introduced

regal scaffold
#

Then you're set

#

Sorry I was a bit distracted

flint coyote
#

all good

echo basalt
#

I can't create a worldcreator with a uuid param

livid dove
#

If it ain't broke...

regal scaffold
#

You said get a world

#

Not make one

echo basalt
#

I said load

regal scaffold
#

Then it's my bad

#

You can't

echo basalt
#

not loading chunks but the actual world itself

livid dove
#

Id

echo basalt
#

like

#

I get a world, keep track of its UID but I unload the world

#

I'd like to load the same world

#

instead I'll have to fucking keep track of its name or something

livid dove
#

Shame?

#

Jokes aside its likely a no chief

sullen marlin
#

Name the world the same as it's uid

echo basalt
#

ehh

remote swallow
#

Lombok woo

true perch
#

Any ideas as to how to make my plugin load on the server? java Caused by: java.lang.IllegalArgumentException: File 'plugins\Realms.jar' is not a valid plugin file, cannot load a plugin from it! at io.papermc.paper.plugin.provider.source.FileProviderSource.registerProviders(FileProviderSource.java:54) ~[paper-1.19.4.jar:git-Paper-507]

misty ingot
#

send class

#

it says its not a valid plugin file, therefore theres some issues with your code

remote swallow
#

[INFO] --- maven-jar-plugin:2.4:jar (default-cli) @ Realms ---
[WARNING] JAR will be empty - no content was marked for inclusion!

?paste your pom

misty ingot
#

his plugin version is missing

#

possibly the issue

true perch
true perch
#

If so what would the format be?

misty ingot
#

send plugin.yml

true perch
#
name: Realms
version: '${project.version}'
main: me.combatborn.realms.Realms
prefix: Realms
authors: [ CombatBorn ]
description: The plugin used for Realm Servers.
api-version: 1.19
commands:
  gm:
    permission: admin
    description: Changes a player's gamemode.
  gi:
    permission: admin
    description: Give a custom Item to a player.```
misty ingot
#

hm

remote swallow
#

no version on the jar plugin

#

add <version>3.3.0</version> below the artifact id

true perch
#

Thank you! I'll try that now.

kind hatch
remote swallow
#

reload maven

kind hatch
#

Reload the pom

remote swallow
#

top right

true perch
#

reloaded, same issue

remote swallow
#

reloading should fix that, check it isnt still indexing

true perch
#

Yeah on the bottom right it finished thinking

#

still red 🤔

remote swallow
#

try reloading it again, the non popup button is in this

true perch
#

Yeah after doing that a few times it's still red

remote swallow
#

just checked online, it appears the version isnt needed there but thats what the error is talking about

#

@tender shard may know more

true perch
kind hatch
#

Means the path in your plugin.yml is wrong.

true perch
#

I have recently changed some file names around, but it does seem that it was the correct path already in the plugin.yml: me.combatborn.realms.Realms

kind hatch
#

No it doesn't

#

It's not in the player directory

#

He has the right path, can't think of why it can't find it though.

true perch
#

By any chance would it have anything to do with this file?

kind hatch
#

Is there a different error thrown if the class doesn't extend JavaPlugin?

true perch
#

I recently changed the project name from Realm Plugin to Realms

kind hatch
#

It might have been updated with the project rename.

#

Might want to check your variables in the pom

true perch
#

Unsure how to fix the issue. If anyone has any ideas please let me know ❤️

cobalt thorn
true perch
true perch
jagged monolith
#

?paste your Realms class - Make sure you paste it. Easier to read and formats it better.

undone axleBOT
regal scaffold
#

Why is

#

Bukkit.getOfflinePlayer(String) saying not found

#

When I just left the server

#

Even though it's deprecated it should still work correctly

jagged monolith
#

What String are you passing in? Username or UUID

regal scaffold
#

Username

jagged monolith
#

Use UUId

regal scaffold
#

I can't

regal scaffold
#

I don't have it

#

I could have it

#

But String should still work

jagged monolith
#

If you can get the username, you can get the uuid

regal scaffold
#

It's a command

#

unban

jagged monolith
#

Show code

regal scaffold
#
        Player target = Bukkit.getOfflinePlayer(strings[0]).getPlayer();
#

This shouldn't be null

#

If I just left the server 10 seconds ago

#

But it is, it says not found

#

And secure profile is disabled

lost matrix
cobalt thorn
#

Hi im making an Api for my plugins, i need to call the getCommand() but i can't find it by using the plugin instance, any solution?

lost matrix
regal scaffold
#

My other solution is to querry all banned players by UUID, Convert to offlinePlayer

#

And find a match

kind hatch
true perch
regal scaffold
#

I need to get the UUID

#

So I can run the command

#

It's a /unban <offlinePlayer> by name

jagged monolith
regal scaffold
#

So either I querry all banned UUIDS ( Which is stored ) and check the name of each offline player object

#

Or idk

kind hatch
#

So just use OfflinePlayer#getUniqueId()

true perch
jagged monolith
lost matrix
regal scaffold
#

It's stored as UUID

#

But I did it...

#
OfflinePlayer target = Bukkit.getOfflinePlayer(strings[0]);
#

This returns the uuid

lost matrix
#

Then create a second table
UUID | LastSeenName

regal scaffold
#

Solved without needing more sql

jagged monolith
regal scaffold
#

Works correctly now

lost matrix
#

Ok but for bigger servers you should not run this command on the main thread.
There is an offline player cache and if your queried name is not in it then you are
doing a ton of IO which could lead to some lag if used too often.

regal scaffold
#

Yeah I am aware

#

But does Getting a single offline player really take that many resources?>

#

I'm not looping through anything

#

Just 1

lost matrix
true perch
kind hatch
regal scaffold
#

If they were on the server at some point

#

Should still be faster no?

kind hatch
#

Oh it's the plugins tab.

lost matrix
kind hatch
#

Use the Lifecycle tab

lost matrix
#

Or package

kind hatch
#

I'd use package since install will copy that code to your local maven repo. No need for that unless used by other projects.

true perch
lost matrix
#

package will

  • compile the classes
  • run unit tests
  • jar the classes and resources

install will

  • package
  • put jar into local maven repo to be used as dependency
jagged monolith
lost matrix
true perch
#

I currently have the API added as a library in the project

#

That's the only way I know how to implement APIs. Is there a better way?

lost matrix
#

Only if you create a multi module project

#

Otherwise you need to install the api every time you make changes to it.

true perch
#

My plan is to have a few different plugins using this same API

lost matrix
#

Then you are on the right track. APIs should contain code that can be useful to
any kind of plugin. Like GUIs, Holograms, maybe NPCs, Persistent block data,
formatting utilities, util classes in general etc

true perch
#

Yes. I have a custom item system in particular that I'm very interested in distributing amoungst a few types of server. That way when I transfer the custom item data from Server A to Server B, both servers will know what a custom item is without needing to use the exact same plugin.

#

I have a few other systems I also intend to add to the API

true perch
#

I will be yoinking that inventory gui library. Would you say it's well built?

cobalt thorn
#

its possible to get getCommand() from a plugin instance for an api?

kind hatch
#

As long as the class extends JavaPlugin, then yes.

lost matrix
cobalt thorn
lost matrix
true perch
#

Yeah it's just not making sense though

kind hatch
regal scaffold
#

smile have you played around with DisplayEntities already?

cobalt thorn
lost matrix
regal scaffold
#

Next step is clickable, animated words

lost matrix
cobalt thorn
kind hatch
#

Mmmm, very smooth.

true perch
regal scaffold
#

It does look smooth doesn't it

#

I'm pretty proud about that

regal scaffold
#
    public void updatePhase() {
        double time = System.currentTimeMillis() / 3000.0;
        double value = Math.sin(time * 2 * Math.PI) * 0.5 + 0.5;
        double reversedValue = 1 - value;
        double output = value > 0.5 ? reversedValue : value;
        phase = (output - 0.5) * 2;
    }

probably can be optimized a lot

#

But the effect is pretty nice

#

What's nice is, I adapted the entities to be able to support Components

#

Cause that's never getting added...

#

So I can use stuff like MiniMessages too

lost matrix
#

Use this as a dependency in your other projects

true perch
lost matrix
true perch
cobalt thorn
kind hatch
lost matrix
cobalt thorn
lost matrix
#

Because im suspecting you doing that right now

true perch
lost matrix
#

Remove the spigot jar and remove your API jar

true perch
lost matrix
#

Alright 👍

lost matrix
true perch
#

Server loaded with no errors!!! so happy thank you a million

true perch
#

I haven't had this much fun programming in a while. I am really enjoying the project I'm working on right now

kind hatch
#

It depends, what kind of info do you need stored?

true perch
#

You can store it in a database or with .yml files

kind hatch
#

Databases are the recommended approach, but yml files are the easiest to get something up and running quickly.

#

Honestly either way will work, it's just that databases are scalable. Flat files are not.

elfin atlas
#

Yep but from plugin side

lost matrix
#

But at least create one yml file per player
playerdata/<UUID>.yml

kind hatch
#

Efficiency

#

Because you can load and unload the ones you need instead of everything at once.

cobalt thorn
kind hatch
lost matrix
#

Because reflections are utter garbage

#

It still uses nms but its much slower and you need a fk ton of extra code.
As well as a rewrite for every other version as well.

cobalt thorn
lost matrix
#

I dont want to bother looking up every obfuscated name of every field and method i use.

kind hatch
#

IMO, if you are dealing with NMS, Abstraction > Reflection.

cobalt thorn
#

if for example, i wanted to use this code is I need to rewrite for every version as I understood?

lost matrix
#

Now that we have mojang mappings i would just create a multi module project
and use the latest implementation for unknown versions.
Has a decent chance of working for upcoming versions. Same chance as reflections.

#

Even better than reflections actually because you dont get fked if the obfuscation seed changes for no reason

#

*As long as you dont use CraftBukkit

#

That is

#

Because then the package names are fked

hazy parrot
#

Doesn't statistics holds first join. Not sure tho

cobalt thorn
#

if i want to use the code then for me who wants use it for multi versinon like 1.16 and 1.19.4 i can use protocollib

kind hatch
lost matrix
#

Probably not

cobalt thorn
#

so for what I understood its better-using packets in case you want to support the vast majority of versions, if I make a plugin in 1.16 it will be the same as 1.19 without chainging

lost matrix
#

If you want to support more versions then use plib

#

But even then you need multiple modules

warm mica
#

These are the kind of plugins I'd throw out of my server without thinking twice

jagged monolith
#

Bukkit 1.0.0 o.O

kind hatch
#

Need some advice. I have a relative time class that I want to modify to support multiple languages. Class is here: https://paste.md-5.net/xecagupevo.java
I want to have the map keys pull from the language files I already have. The problem is that this is a util class. I don't have a static instance of my main class anywhere. In fact, I've purposely avoided it due to claims of it being bad practice. That being said, it would be nice if I wouldn't have to supply an instance every time I want to use a method.

Should I just cave and create a static instance or is there a better way to handle this?

jagged monolith
#

Firstly, Id recommend not using the bukkit api. Use the Spigot API - Then you'd probably need to make use of ProtocolLib to support multiple versions. Depending what versions you're wanting to support and what you are wanting the plugin to do.

true perch
kind hatch
#

They have ever since 1.14

rough ibex
#

pretty sure yeah

true perch
#

I hate staring at obfuscated code

boreal sparrow
#

Hey guys, if you cancel a RunTaskLater bukkit task, then it just wont execute right?

kind hatch
misty ingot
#

I just realised something

#

once we get 1.20

#

i could use display entities to display the memes in the map thingy kinda thingy wingy like i thought

remote swallow
#

Display entities came 1.19.4

misty ingot
#

oh wait what

#

wat da hec

#

are you telling me that I have been tricked, fooled and possibly even bamboozled?

brittle swallow
#

For the brewery plugin, is there anyway to make yourself explode after drinking a potion?

#

like is there a code for that?

misty ingot
#

theres probably an event for drinking potions

#

just check for your potion

#

then boom

#

does anyone know how to check if the item which was clicked (InventoryClickEvent) was in the top inventory exclusively?
there is a method to get the top and bottom inventories but I cant find one to check the position of the item

sullen marlin
#

getClickedInventory ?

misty ingot
#

I see

#

e.getClickedInventory().equals(e.getView().getTopInventory()) seems to be it

shadow night
#

how do I get the armor value of an entity and how does minecraft calculate damage?

serene sigil
#

can someone help me with dust particle spawning? is there any like template i can use?

misty ingot
#

nothing too interesting going on with it

serene sigil
#

but there is like this DustOptions class

#

oh wait, which one is it?

misty ingot
#

yeah

#

color and size

serene sigil
misty ingot
#

either BLOCK_DUST or FALLING_DUST iirc

serene sigil
#

so i did particle and location, how what?

misty ingot
#

now you can change size and color using DustOptions class

dire marsh
#

ah yes the particle api

#

the worst thing to ever exist

#

you always have 0 clue what data particles take

copper moss
#

how do you enable tnt duplication on spigot

#

pls help

remote swallow
#

tnt duping isnt disabled on spigot

dire marsh
#

block dust is the particle that shows when a block is broken, and falling dust is the sand and gravel particles falling i believe

misty ingot
#

also its only disabled on paper iirc

copper moss
#

how do you enable it

remote swallow
#

its not disabled on spigot

#

its only disabled on paper

copper moss
#

shi wrong server

#

did you know how to enable it on paper

remote swallow
#

one of the files in config/

vivid cave
#

Is it possible to make protocollib stuff but just with nms (intercepting packets and changing them/packet events)

#

I don't wanna add a whole dependency just for one packet event tbh

shadow night
#

how do I found out how many armor points a entity has? Like the health bar but the armor bar

serene sigil
#

anyone knows how to spawn a particle line on all six sides of a block?

#

cuz i really couldnt find out

#

basically here everywhere

#

and ofc on the hidden sides too

eternal oxide
#

math in a for loop

misty ingot
#

a bunch of maths i suppose

serene sigil
#

💀

#

any idea how i can roughly do it?

eternal oxide
#

get the block coords...

#

calculate every point you want a particle, like x, y + (0 to 16), z

#

that would do the vertical line at one corner

#

maybe +/- I forget if the block position is top or bottom corner

#

you do that for each of the corners for x, y and z

#

simplest would be add them to a Set (no duplicates), then spawen your particles

serene sigil
#

how to get the center location of a block?

vivid cave
#

Isn't it all .5 ?

eternal oxide
#

you don;t get the center, you get a corner

#

if you are still talking about particles

serene sigil
#

and how do i get a corner

eternal oxide
#

you get teh block location

#

it will be a corner

serene sigil
#

but what corner?

dire marsh
#

try it and see ig

eternal oxide
#

always the same

#

getting the block at 0,0,0 will be a corner

#

I believe bottom left

serene sigil
#

yes but wheres the corner?

serene sigil
vivid cave
#

What particles are those btw ? (To support many many colours)

#

And thin (like a pixel )

serene sigil
vivid cave
serene sigil
#

yes u can

vivid cave
#

That's amazing thank you

serene sigil
#

and add it at the end

vivid cave
#

Wow.
Really maybe it's something commonly known but in all these years I didn't know.
It's one step closer to making 3d object holograms I guess.

tawdry echo
#

PotionEffectType.HARM in minecraft is instant damage?

native ruin
#

think so

#

check docs if not sure

vivid cave
#

Although block displays (with player heads) will probably be even more interesting for that purpose of holograms

vivid cave
dire marsh
#

you can also make the new displays interactable with

#

they are very powerful

vivid cave
#

Yeah af

#

One of the best update tbh

dire marsh
#

and they support newlines in text

#

blessed

native ruin
#

btw is this place also for other things besides logic?

vivid cave
#

I only regret the fact that Armor trims are data driven rather than nbt driven.
Would have loved to customize at least stuff like trim colour rgb from nbt rather than needing a datapack. I was expecting something like leather armour RGB customisation

lost matrix
dire marsh
#

and supports rgb

vivid cave
dire marsh
#

ah

vivid cave
#

For trims we can only play with a limited amount of colours (unless using a dp)

remote swallow
#

i thought the colour was resource pack

native ruin
jovial shadow
#

hello world

native ruin
vivid cave
# remote swallow i thought the colour was resource pack

It's complicated but basically the trim thinggie inherit from data files which reference palette colours.
However there are a lot of paletted colours in the default palettes, otherwise adding a new palette would be texture pack I think yes

lost matrix
crude loom
#

?paste

undone axleBOT
native ruin
lost matrix
native ruin
#

ah like that

#

mb

lost matrix
# native ruin ah like that

You should know this because Spigot needs this tag as well.
And one more thing:
When using maven - never add any jars to your project.
Not the spigot jar and not any other dependency.
If you have added artifacts then remove them right now.

native ruin
#

i don't know if this matters but i have a plugin/extention/tool thingy in intellij that does the spigot things for me

misty ingot
#

is there a way to store just a string of data in an item in a menu without having to use nms for custom nbtTags?

lost matrix
#

?pdc

misty ingot
#

how come no one ever talks about it then

#

do you have any idea how much time I have wasted

#

now I have even more sympathy for the poor hypixel devs who have to do shit in 1.8 💀

native ruin
remote swallow
#

a lot

#

most people just know about it though

lost matrix
#

I need some brainstorming. What do you guys think is an elegant way of creating glowing boxes when
using the new display entities? I thought about simply using a block entity and applying a scaled transformation
on it. But the BARRIER block is not visible when rendered (the glow is hidden as well).
Let me know if you have an idea.

remote swallow
#

i would guess glass is your best bet with display entities, otherwise you would need math

tawny remnant
#

Is there any way to break a loop using Bukkit.getScheduler.runTaskLater

eternal oxide
#

Are you certain the glow doesn't show? I know it breaks when using shaders

native ruin
#

so you want like a lightsource?

misty ingot
#

rip 1.13 support with PersistentDataHolder

lost matrix
#

Otherwise ill probably add a custom ItemStack which has the same dimensions as a block when worn on the head.

#

Wait... that sparks an idea

#

I could use an Item display with a barrier item and render it as if it was on a players head

#

Let me try that

magic summit
#

ist player.spigot().sendMessage(); deprecated?

eternal oxide
#

not in Spigot it's not

magic summit
#

i want to send the player a message in the action bar

#

player.spigot().sendMessage(ChatMessageType.ACTION_BAR, new TextComponent(ChatColor.RED.toString() + "#############################")); is this correct?

lost matrix
#

Yeah thats not what i expected...

dire marsh
#

haaha

#

rip

#

kinda looks cool though

remote swallow
#

just use like 6 item displays per thing

misty ingot
#

pretty sure it will get really laggy after a while

lost matrix
#

Yeah, no. Ill use one display and apply a transformation on it. Just need to find the right approach.

remote swallow
dire marsh
#

less laggy than armourstands

misty ingot
#

are you telling me that Mojang is optimizing their game?

dire marsh
#

performance has been getting better

#

they massively improved start time in 1.19.4

misty ingot
#

I havent even opened 1.19.4 so i didnt know that

remote swallow
#

no item displays for you

tawny remnant
#

is this cancel(); going to cancel the public void run() ? (I want that)

tawny remnant
#

is it going to cancel the bukkit runnable or not is my question

lost matrix
#

It is going to cancel the outer class

#

So the BukkitRunnable of which run method you are in currently

remote swallow
#

wouldnt you need to task.cancel to cancel the task

tawny remnant
#

bruh

lost matrix
#

Yeah. Just dont use lambdas for this.
There is way too much logic happening for a lambda to be viable

#

And please: Use a for loop that increments in 5er steps.
If you have to copy/paste any code, then you should stop right
away and think about how to prevent this

serene sigil
eternal oxide
#

there is no line particle

#

you draw individual particles

#

at whatever step you want

lost matrix
remote swallow
#

i wonder if its just worth shading jda

tall dragon
#

so weird again

#

it can find Material.RAW_FISH fine when i type it in, when i compile. nope

#

any1 know what could be causing this

lost matrix
tall dragon
#

for some reason it also puts 1.13.1 in my libraries when its not even in my pom

eternal oxide
#

wrong dependency order

young knoll
#

Put your spigot dependency first

#

Some other dependency is providing an old version of spigot

tall dragon
#

ahhhhh

#

i feel so dumb now

#

thanks

lost matrix
#

Vault being vault again

orchid trout
#

its probably because the fsh has no eyes

tender shard
orchid trout
#

what is the name of the spigot thread where it teaches you how to fill blocks very efficiently?

tender shard
cobalt thorn
#

Its possible to make a plugin communicate with another plugin in the same server?

tender shard
#

sure

#

you just add it to your classpath, e.g. by adding the other plugin to your pom.xml

cobalt thorn
#

Dynamically

tender shard
#

?xy

undone axleBOT
eternal oxide
#

You are not understanding plugins

cobalt thorn
#

I now realized how much stupid i am

kindred valley
#

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

lost matrix
#

Other than that you just call methods of other plugins

tawdry echo
#

Item#getItemStack return clone of itemstack?

pseudo hazel
#

idk why it would

young knoll
#

I believe it does

#

Hence setItemStack

pseudo hazel
#

why is that

#

why would setItemstack mean that its cloning the itemstack

young knoll
#

Because generally stuff in spigot with setters means the getter returns a clone

serene sigil
#

can you cancel a block breaking sound somehow?

kindred valley
#

Someone had a forum about handling hard threads does anyone have spigot link

pseudo hazel
#

well how else would you set something

#

regardless of if it is a clone

lost matrix
kindred valley
misty ingot
#
            // lore
            List<String> loreList = plugin.items.getStringList(ymlPath + ".item_lore");
            ArrayList<String> lore = new ArrayList<>();
            for (String line : loreList) {
                lore.add(line.replace("&", "§"));
            }
            lore.add(" ");
            List<String> sellLore = plugin.lang.getStringList("item-sell-lore");
            for (String line: sellLore) {
                lore.add(line
                        .replace("&", "§")
                        .replace("{amount}", String.valueOf(plugin.items.getInt(ymlPath + ".sell_price")))
                        .replace("{currency}", plugin.currencyName)
                        .replace("{amount}", String.valueOf(getPlayerItemAmount(player, itemForSale)))
                );
            }
            itemMeta.setLore(lore);

the upper foreach works and adds the lore (it appears on the item)
but all the lore added from the lower foreach loop just does not want to be shown on the item

kindred valley
#

Ah thanks

pseudo hazel
misty ingot
#

heres sellLore and loreList

#

one works, other doesnt
both are the same

#

neither makes sense

pseudo hazel
#

and you can confirm that is does enter the for loop?

terse ore
serene sigil
#

rip

rotund ravine
young knoll
#

Pretty sure the client will still play it

terse ore
#

only 1 way to know

#

but I think the sound will still be played, I don't think the servers sends a packet telling the client if they broke or not the block

granite owl
#

some weird idea but hear me out:

every item can have a custom skin with a custom model data value right? every item can be a 3D object of technically any size and have 1 stateless animation, for example wynncrafts weapons are usually 3D animated. now if i wanna make a custom mob i can put such an item skin on its head right and have this be the model of my mob which i make permanently invisible. now based on the state of the mob i can change the head items custom model data to represent a different animation right? as such use the custom model data mechanic to have custom mob skins?

terse ore
#

that's partially how mythic mobs works iirc

granite owl
#

iirc it works with an armorstand per limb which can cause distored modells

#

on high lag

young knoll
#

Display entities are better

#

Since you can have them all riding a single entity

granite owl
#

hm

#

ill check that out

granite owl
#

to allow players to summon a dummy entity without native behavior?,

#

as such nothing has to be overriden?

tawny remnant
granite owl
#

shouldnt that be new ArrayList<Player>()

#

like ur using a templated class

tawny remnant
#

that doesnt answear my question

hazy parrot
hazy parrot
#

Souts to check ifs or whatever

tawny remnant
#

believe me i do not need to

#

only the fireball part doesnt work

undone axleBOT
#

"Does not working" is a useless statement. Please describe what exactly is not working, what you expect it to do, and what actually happens. If you get any console errors, also ?paste the entire stacktrace.

eternal oxide
#

for 79 tyicks you are looping over all players in a 30x30x30 area around yoru entity and adding them to a List. Lists allow duplicates but you only ever use the first one added.

tawny remnant
eternal oxide
#

bro stop with the attitude, you do it daily

tawny remnant
#

and you send ?learnjava to every person

misty current
#

is it possible to convert .schem files into .nbt files?

echo basalt
#

.schem files are stored as nbt

#

so you can just rename them

misty current
#

they compress data in a different way afaik

echo basalt
#

gzip for both

misty current
#

unless they've changed it when they've renamed them to .schem from .schematic

tender shard
#

and I only send ?learnjava to people who I think would benefit from reading those tutorials

tawny remnant
#

sorry

tender shard
#

ah ok

eternal oxide
#

I very rarely send learnjava to anyone

echo basalt
#

I haven't worked with fireballs but I remember them being very picky about their internal yaw and pitch

#

you can set their velocity to something but they'll trail back

tawny remnant
tender shard
#

yeah anyway, what's wrong with your current code? what happens to the arrows, if not launched at players?

#

are they going in the wrong direction?

#

do they not spawn at all?

#

etc etc

echo basalt
tender shard
#

just saying "it doesnt work" is useless. you have to tell us what is actually happening