#help-archived

1 messages · Page 67 of 1

boreal tiger
#

entry.getKey().isSimilar(itemstack) this is stupid

#

the point of using a hashmap

wanton delta
#

wdym

#

hes trying to get a value

#

from an itemstack as a key

boreal tiger
#

if you're doing that you might as well just use a list of pairs

vernal spruce
#

i noticed you cant check for perfect match

wanton delta
#

you cant just use get(itemstack)

formal nimbus
#

dude i am using a list of pairs

boreal tiger
#

then use a list

vernal spruce
#

if the itemstack is same item but with less/more amount

boreal tiger
#

dont use a hashmap

formal nimbus
#

I am linking a list of pairs to an itemstack

vernal spruce
#

contains will return false

formal nimbus
#

using a haskmap

#

*hashmap

boreal tiger
#

entry.getKey().isSimilar(itemstack)
if you're doing this, using a hashmap is pointless

wanton delta
#

i aggree

formal nimbus
#

;-;

wanton delta
#

but he asked how to do it with a hashmap

#

so im telling him

#

but youre right

vernal spruce
#

tbh there are many ways wich work

formal nimbus
#

what would I use instead of a hashmap

vernal spruce
#

so its not that big of a deal

wanton delta
#

using List<Pair<K, V>>

formal nimbus
#

0-O

boreal tiger
#

it works but its pointless @vernal spruce

wanton delta
#

but you dont need to

formal nimbus
#

dude

wanton delta
#

youre gonna accomplish the same exact thing

#

@boreal tiger its really not a huge problem

#

its basically the same amount of code

formal nimbus
#

it would turn into Pair<ItemStack, List<Pair<ItemStack, Double>>>

#

I can't deal with that shit xD

boreal tiger
#

its not about the amount of code

wanton delta
#

i understand that

boreal tiger
#

its just stupid

#

just use a list

#

if you're going to iterate

wanton delta
#

you should calm down lmao

#

he wants to use a hashmap

formal nimbus
#

lol

wanton delta
#

let the man use a hashmap

boreal tiger
#

but its wrong xD

wanton delta
#

did anyone ask the perfect way to do it

#

it accomplishes the same thing

boreal tiger
#

you can not use oop and accomplish the same thing

formal nimbus
#

my guy, defending incorrect use of hashmaps

boreal tiger
#

but your maintability is gonna be worse

sturdy oar
#

imma head out

formal nimbus
#

lol

#

I saw that edit

#

what is wrong with using a hashmap exactly

wanton delta
#

because

sturdy oar
#

what are you trying to accomplish again?

boreal tiger
#

because you're iterating over it. the point of a hashmap is that you can~get stuff without iterating

wanton delta
#

^

formal nimbus
#

A crate opening system. I am linking a crate to a pair of ItemStacks and weights

#

because you're iterating over it. the point of a hashmap is that you can~get stuff without iterating
@boreal tiger well that;s the thing. I didn't realise I would have to iterate

boreal tiger
#

yeah thats fine

formal nimbus
#

my plan was that I could pass an item in from a listener

sturdy oar
#

You should make 'Crate' objects

#

i don't know if you're already doing it

formal nimbus
#

and use map.get(object)

boreal tiger
#

yeah I get that

wanton delta
#

yea at this point

formal nimbus
#

and it would give me the corresponding list

wanton delta
#

you have a wrapper for ContentsList

#

get rid of the wrapper

formal nimbus
#

yep

wanton delta
#

and make a crate object

formal nimbus
#

I have a crate object...

sturdy oar
#

n i c e

formal nimbus
#

lol

wanton delta
#

good job, you should use that

formal nimbus
#

I'm confussled

#

but...

#

ok sp

#

*so

wanton delta
#

in your crate object have a List<Pair<ItemStack, Double>> as your weight list

formal nimbus
#

this is my crate object

wanton delta
#

that link is blank

formal nimbus
#

this was my plan:

sturdy oar
#

ehm

wanton delta
#

another

sturdy oar
#

that is the default website link

wanton delta
#

blank link

formal nimbus
#

oops

#

my plan:

#

A crate is an item stack which has certain parameters already defined.
The things which are the same amongst every crate are:

The namespaced key, which will be used to identify when a crate type is right clicked.
The inventory which will open (however, every player must have their own crate inventory)
The lore of the crate (Might be made customisable)
The material (will always be a chest)
The colour of the name (subject to change)

When a crate is created, it must given a name and a list of pairs(itemstacks and weight). During the process of creating the crate, the crate itemstack and list of pairs (ItemStack and weight) will be added to a hashmap. This way, it will be possible in an event listener to get the item in the player’s hand, pass it to the hash map, get back the list of weighted itemstacks, open a standard Inventory, and then run the contents of the inventory through the GUI.

sturdy oar
#

eh that's not really how objects works

formal nimbus
#

lol I tried

sturdy oar
#

let me look one moment and give some tips

wanton delta
#

why do you have a static final crate object

wind dock
#

so for the bungeecord plugins folder, is that olnly for plugins that I want to be spread across the servers?

wanton delta
#

no

#

those are only plugins that are made for bungee

wind dock
#

oh

formal nimbus
#

the crate is an ItemStack

wind dock
#

what if i want luckperms to be applied accross all the servers

wanton delta
#

put the plugin in all servers

#

that is the only static variable you should have

#

all the others need getters and setters

#

this is the wrong use of OOP

formal nimbus
#

screams

#

cries

wanton delta
#

your class should have a constructor

formal nimbus
#

ok so

#

I originally started doing that

#

but then

#

I didn't see how i could do it

#

without extending ItemStack

#

cause it's an itemStack right

wanton delta
#

nope

formal nimbus
#

how am I meant to have the properties of an ItemStack

wanton delta
#

you dont

formal nimbus
#

without it extending ItemStack

wanton delta
#

you cant

#

dont do that

formal nimbus
#

but I need to use it as an ItemStack

wanton delta
#

right

formal nimbus
#

a crate is an ItemStack

wanton delta
#

no its not

formal nimbus
#

but...

wanton delta
#

listen

formal nimbus
#

waaah

wanton delta
#

you have a crate object

#

im gonna tell you the fields that you should have

formal nimbus
#

k

#

weight?

sturdy oar
#

I haven't really got a clear idea of your plugin, but I think:

  1. you should create a 'Crate' interface with all the methods and make implementations of it
  2. A crate object should represent the possible items that can be found, each with its specific odds (supposing you are making a crate drop plugin if I understood correctly)
wanton delta
#

Itemstack icon, ContentsList weights, String name

#

fedi even youre overcomplicating it a bit

#

interfaces dont need to be used

sturdy oar
#

🤷‍♂️ I'm used to them, if he needs just 1 crate prob. not

formal nimbus
#

nah I want to make it so you can add a crate

#

in game

wanton delta
#

yea thats fine

#

have multiple crate objects

formal nimbus
#

so for server owners. They can just make a crate

wanton delta
#

an interface is for referencing multiple similar objects but that have unique properties

#

(also the job of abstraction which is beneficial in its own way)

#

anyways

#

your constructor should look something like this

hollow thorn
#

if a commandsender

#

is not a player

wanton delta
#

if (!(sender instanceof Player))

hollow thorn
#

Then how do i get its location

wanton delta
#

you dont

sturdy oar
#

kotlin instance check is much cooler

#

sender !is Player

hollow thorn
#

so if its a command block

boreal tiger
#

ah

wanton delta
#

CrateItem(String name, ContentsList weights) @formal nimbus
in your constructor create the item that you want, and set the field icon as that item. then make a getter getIcon

formal nimbus
#

ahhhhh

#

ok

wanton delta
#

somewhere else have a list called List<CrateItem> crates

#

and then when you want to test it

#

iterate over that list

#

and do

formal nimbus
#

wel

wanton delta
#

crateItem.getIcon().isSimilar

formal nimbus
#

p

#

time to rewrite all my code

#

again

#

cries

wanton delta
#

your brain will thank you later on

formal nimbus
#

hopefully

wanton delta
#

also just a question

sturdy oar
#

yeah

#

what is PI for

#

lmao

boreal tiger
#

lmao

hollow thorn
#

how do i get if a Command Sender
is a command block
or a function

sturdy oar
#

???

wanton delta
#

if (!(sender instanceof Player))
@wanton delta

hollow thorn
#

and then get the cmd blocks loc

wanton delta
#

cant

sturdy oar
#

the command block either executes as a player or as the Server

hollow thorn
#

so if i use an execute

#

command

formal nimbus
#

also just a question
@wanton delta yes?

hollow thorn
#

bukkit will think it is being done as a player

wanton delta
#

@formal nimbus idk why you have this

formal nimbus
#

oh

#

I was using it to check if a crate has been opened

wanton delta
#

oh

formal nimbus
#

as a universal crate identifier

sturdy oar
#

PI -.-

hollow thorn
#

can i get the world a command is being run in

formal nimbus
#

Pl?

boreal tiger
#

you can get the command block

#

@hollow thorn

wanton delta
#

i think he wants to test if the command sender is an entity

#

which you can do

boreal tiger
#

no he said command block

wanton delta
#

so if i use an execute
@hollow thorn

#

you cant use execute on a non-entity sender

boreal tiger
#

technically some entities implement CommandSender

wanton delta
#

(but this in general sounds fishy, you shouldnt be using vanilla commands)

hollow thorn
#

you cant use execute on a non-entity sender
@wanton delta as in execute as the player

formal nimbus
#

oh yeah

#

@wanton delta

#

you said for me to do that right?

wanton delta
#

dont set it as final

formal nimbus
#

k

#

regardless

wanton delta
#

use private

#

and yes

formal nimbus
#

it's not correct

wanton delta
#

you need to instantiate them in your constructor

#

then the errors wil lgo away

formal nimbus
#

yep

#

ik

boreal tiger
#

@hollow thorn you can check if the sender is a commandblock, is that what you want?

boreal tiger
#

?

wanton delta
#

p sure all entities can be senders

formal nimbus
#

that's not what it'ss for though

#

ContentsList

boreal tiger
#

idk if they are all there xD

#

you were the one who said they cant xD

hollow thorn
#

@hollow thorn you can check if the sender is a commandblock, is that what you want?
@boreal tiger how do i cast it into the varible

formal nimbus
#

It's a list of pairs<ItemStack, Weight>

boreal tiger
#

you want to cast the sender to commandblocksender?

formal nimbus
#

so Weights isn't right?

wanton delta
#

get rid of contentslist

#

just put that list-pair as its own field

formal nimbus
#

kk

sturdy oar
#

wdym 'how do i cast it into the variable'

wanton delta
#

attlantiz i meant that you cant use the /execute command on a non-entity sender

boreal tiger
#

he didnt ask that though xD

wanton delta
#

i know

#

so if i use an execute

#

he said that

#

i got confused

#

but this whole idea seems

#

fishy

#

commandblocks are a big nono on spigot

boreal tiger
#

what

#

I cant see how it is fishy

wanton delta
#

well like

boreal tiger
#

and it doesnt matter

wanton delta
#

it feels like this could be done a different way

#

whatever the main idea is

boreal tiger
#

🤷‍♂️

vernal spruce
#

why would anyone use commandblocks

marsh nova
#

^

sturdy oar
#

ahah bruh imagine programming with Bukkit API, just make the server use command blocks

boreal tiger
#

"commandblocks are a big nono on spigot"
I just dont get this xD

vernal spruce
#

we have everything a command block can do but safer

#

also not sure

wanton delta
#

you shouldt use commandblocks if u have a spigot server lol

vernal spruce
#

if that would run on a commandblock disabled

#

server

wanton delta
#

heck not even on vanilla nowadays lol

marsh nova
#

there are many problems with command blocks

wanton delta
#

use datapacks

#

oh i meant shouldnt*

#

mb

boreal tiger
#

what does the datapack have to do with the command block xD

wanton delta
#

youre misunderstanding me

boreal tiger
#

I'm not

patent monolith
#

datapacks are pretty much commands, right?

wanton delta
#

im saying commandblocks are basically obselete no matter what server youre running

sturdy oar
#

has anyone here worked with GSON ?
Do you know if it's possible to make text "beautified"

#

it sucks to have a 1 line

wanton delta
#

i was just saying on vanilla, you should avoid commandblocks

boreal tiger
#

why?

marsh nova
#

Mostly, maintainability. It's far easier to maintain a simple listener plugin than a command-block monstrosity.

wanton delta
#

datapacks do the same thing

patent monolith
#

New GsonBuilder().setPrettyPrinting().create()

boreal tiger
#

datapacks are not commandblocks xD

marsh nova
#

Command blocks will hold you back significantly if you invest in them.

boreal tiger
#

yeah its easier but you dont know what he's using the command block for

wanton delta
#

you obviously dont understand what im trying to say lmao

boreal tiger
#

I dont

wanton delta
#

if you have a command block setup that is meant to run all the time, you should use datapacks instead

boreal tiger
#

you're confusing datapacks with command blocks and creating an unecessary argument

wanton delta
#

it really wasnt that serious

sturdy oar
#

man I love GSON lib

#

it just works

patent monolith
#

Yeah gson pretty fire

sturdy oar
#

I spent 4 hours trying others but they were just making me waste time

#

with adapters and all

wind dock
#

another thing- my first server came with plugin metrics, but my other servers didnt. Should i copy and paste plugin metrics into all of the plugin folders?

wanton delta
#

no

sturdy oar
#

n

wind dock
#

whats plugin metrics for?

sturdy oar
wanton delta
#

i believe some plugins use them to keep track of their stats

#

yea

#

that

#

so copy and pasting wont do anything

#

whatever plugins use them will generate the folder

wind dock
#

oh ok

peak iris
#

could someone help me with my prison server really quick ?

sturdy oar
#

🤷‍♂️

formal nimbus
#

I think this is better right?

wind dock
#

so im getting a bunch of (ip) <-> InitialHandler has pinged

formal nimbus
#

I am gonna do stuff with contents

wind dock
#

in my bungeecord console

formal nimbus
#

etc

wind dock
#

what does that mean?

wanton delta
#

@wind dock that happens whenever someone clicks the refresh button

#

@formal nimbus you dont need the crateMeta field

#

i think thats obselete

formal nimbus
#

oh rlly

wanton delta
#

yea

#

if you ever want the item meta

#

best to just do crate.getItemMeta

formal nimbus
#

oooh

#

👌

#

but otherwise it's good?

wanton delta
#

like i said i strongly recommend to just replace ContentsList with the list-pair

#

and if you want to add something to it or change it create a getter/adder

formal nimbus
#

yep

#

right so

#

hmm

#

so kind of like what I've done in the ContentsList

#

but it's a field of the Crate object instead

#

so it's kind of like merging them

#

into one new incredible being....

wanton delta
#

youre just getting rid of the contentslist wrapper you made

#

and just using the "raw" object so to speak

formal nimbus
#

I prefer the way I phased it

wanton delta
#

so youll have a new field

formal nimbus
#

but yes

wanton delta
#

List<Pair<afasou>> weights or something

formal nimbus
#

I c o m p r e h e n d

#

*contents

wanton delta
#

yah

formal nimbus
#

the weight of each item is part of the pair

#

but yee

#

gotchu my bwoi

#

however

#

Isn't there an issue in that this is now a nightmare to understand?

#

I mean we got this going on

#

private Pair<ItemStack, ArrayList<Pair<ItemStack, Double>>> id;

#

cause I've gonna replace the hash with a pair

#

but it's like

#

yeesh

#

I guess I'm just going to have to annotate

hallow surge
#

so I'm checking in another class if it has a certain name when trying to run the command it doesnt work even if I hold the item

ItemStack Class

ItemStack harvesterhoe = new ItemStack(Material.DIAMOND_HOE);
        ItemMeta harvestermeta = harvesterhoe.getItemMeta();
        harvestermeta.setDisplayName(ChatColor.GREEN + "Harvester Hoe");```

The class I'm trying to execute the GUI in
```java
    @Override
    public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) {
        if(sender instanceof Player) {
            Player p = (Player) sender;
        
            if(p.getInventory().getItemInHand().getItemMeta().getDisplayName() == ChatColor.GREEN + "Harvester Hoe") {
                Inventory inv = Bukkit.createInventory(null, 9, ChatColor.BLUE + "Harvester Hoe Upgrades");
                ItemStack doubleup = new ItemStack(Material.YELLOW_FLOWER);    
                ItemMeta doubleupmeta = doubleup.getItemMeta();
                doubleupmeta.setDisplayName(ChatColor.GREEN + "Double Up");
                ArrayList<String> doubleuplore = new ArrayList<String>();
                doubleuplore.add(ChatColor.GRAY + "Doubles the ammount of sugarcane you harvest");
                inv.addItem(doubleup);
                inv.setItem(0, doubleup);
                p.openInventory(inv);
            }         else {
                    p.sendMessage(ChatColor.RED + "You must have a harvester hoe to execute this command");
            }
        }
        return true;  
        
    } 
}
}```
         any help is appreciated
naive goblet
#

First of all make it formatted right. Second use implicit else when possible. What do you mean by execute the gui?

#

Open it?

hallow surge
#

yea its supposed to open the GUI

naive goblet
#

and it doesnt?

#

well first of all

#

We don't compare Objects with ==

#

use String.equals(String)

#

or even String.equalsIgnoreCase(String)

#

^Will ignore upp and lower case

#

so "hi".equalsIgnoreCase("Hi") would return true

devout mirage
#

When does 1.16 release

naive goblet
#

In some months I guess.

#

I don't think Mojang have a release date yet.

hallow surge
#

thanks

formal nimbus
#

@wanton delta I have a different issue now

#

I've basically moved everything into the crate object

#

actually

#

nvm

#

I think I have a solution

#

sorry for the ping

wind dock
#

so for the bungeecord server

#

I have the bungeecord port aas 25565

#

as*

#

but the hub is 25566

#

when using a subdomain

#

which port do i set it to?

naive goblet
#

25565?

#

or what you mean by subdomain?

wind dock
#

uhm

#

like setting a domain to foward to the ip @naive goblet

#

The 25565 is a port

naive goblet
#

Yes ik

#

the domain is redirecting to the server ip?

#

I'm pretty sure it's 25565

boreal tiger
#

you would set to 25565 yes

#

because you wnat them to join through bungeecord

#

make sure they cant use the other ports

formal nimbus
#

hey, can anyone tell me why JetCobblestone.BasicCrate.getItemStack() returns null?

boreal tiger
#

BasicCrate is null most probably

formal nimbus
#

it's not tho ;-;

#

that's in my onEnable()

#

I have no clue why

hallow surge
#
    @Override
    public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) {
        if(sender instanceof Player) {
            Player p = (Player) sender;
        
            if(p.getInventory().getItemInHand().getItemMeta().getDisplayName().equals(ChatColor.GREEN + "Harvester Hoe")) {
                Inventory inv = Bukkit.createInventory(null, 9, ChatColor.BLUE + "Harvester Hoe Upgrades");
                ItemStack doubleup = new ItemStack(Material.YELLOW_FLOWER);    
                ItemMeta doubleupmeta = doubleup.getItemMeta();
                doubleupmeta.setDisplayName(ChatColor.GREEN + "Double Up");
                ArrayList<String> doubleuplore = new ArrayList<String>();
                doubleuplore.add(ChatColor.GRAY + "Doubles the ammount of sugarcane you harvest");
                doubleup.setItemMeta(doubleupmeta);
                inv.addItem(doubleup);
                inv.setItem(0, doubleup);
                p.openInventory(inv);    
            } else {
                    p.sendMessage(ChatColor.RED + "You must have a harvester hoe to execute this command");
            }
        }else {
            
        }
        return true;  
        
    }``` when the item i hold in my hand is not a harvester hoe it gives me an interneal error any idea's on fixing because i thought the else statement would fix it but apparently not
boreal tiger
#

@formal nimbus can you send your full main class and the class where you call JetCobblestone.BasicCrate.getItemStack()

formal nimbus
#

yep

boreal tiger
#

@hallow surge you're trying to get the meta of an item that might be null

hallow surge
#

oh i have an idea on a fix

formal nimbus
boreal tiger
#

p.getInventory().getItemInHand().getItemMeta().getDisplayName().equals(ChatColor.GREEN + "Harvester Hoe")
You need to check if itemInHand is null before getting the meta

formal nimbus
#

main

boreal tiger
#

public static CrateItem basicCrate; is null

#

@formal nimbus

#

you're not assigning it

#

CrateItem basicCrate = new CrateItem("Basic Crate", null);
this is a local variable inside onEnable

formal nimbus
#

isn't the = new assigning it?

boreal tiger
#

CrateItem basicCrate
You're making a local variable

formal nimbus
#

OOOH

#

I see the dumb ass mistake now

#

fixed

boreal tiger
#

you should probably have your crates in a list or something though

#

or even make something like a CrateRegistry class to handle that

hallow surge
#

something like this attlantiz
java if(e.getCurrentItem().getItemMeta() != null) { //code here }

boreal tiger
#

not quite

#

you should check if the current ite mis null

#
if (e.getCurrentItem() == null) {

}
#

that would be null if they dont have an item in their hand

hallow surge
#

also quick question with Item lore haven't worked with it before how do you add it to the stack

#

oh i found out

formal nimbus
#

you should probably have your crates in a list or something though
@boreal tiger yeah I have a list

hallow surge
#

nvm

boreal tiger
#

@formal nimbus why do you have that static crate then xD

formal nimbus
#

which static crate?

boreal tiger
#

public static CrateItem basicCrate;

formal nimbus
#

oh

#

I haven't made something to create crates yet

#

so I've just done it in there

#

to test it works

boreal tiger
#

ah right 👍

formal nimbus
#

which atm it's not

#

for some reason none of the stuff is being assigned

#

and it's giving me just a normal chest

tawny crescent
#

Who has a /spawn plugin
I would like there to be a delay before the teleportation and the teleportation is canceled if the player moves
Also that the player is not spawn when he joins for the first time or when he dies

hallow surge
#

./spawn plugins aren't hard xD

#

just look it up on google

#

there is bound to be one

dusty topaz
#

essentials spawn

tawny crescent
#

I have been searching since yesterday :'(
I had a perfect one but it crashes when I change the message.yml however on my old server it worked

#

i don't like essentials spawn because i have to download essentials too

naive goblet
#

Search Spigot spawn plugin

#

on google

tawny crescent
#

i sought

hallow surge
#

@tawny crescent what you want the delay to be

tawny crescent
#

5 seconds

cerulean snow
#

hi I'm having issues with changing the color of a players name received from an event listener.

                                                        ChatColor.DARK_GRAY + ChatColor.BOLD + "] " + ChatColor.GOLD + event.getPlayer().getDisplayName() + ChatColor.GOLD + " has started a 1 hour 2x mcMMO experience boost! " +
                                                        ChatColor.DARK_GRAY + "" + ChatColor.BOLD + "[" + ChatColor.RED + ChatColor.BOLD + "!" + ChatColor.DARK_GRAY + ChatColor.BOLD + "]");```
I've set the color to gold before event.getPlayer().getDisplayName() but when ingame, the colors are correct for the rest of the message except for the players name, which is just white.
#

I might just be overlooking something simple but I don't know lmao

formal nimbus
#

put speech marks inebetween then ChatColor.GOLD and the event.getPlayer

#

so ChatColor.GOLD + "" + event.getPlayer...

#

@cerulean snow

#

Also

#

could somebody try and figure out which the ItemStack isn't returning correctly?

wanton delta
#

Describe

formal nimbus
#

sorry

#

dicord laggede

#

ok so that's my crate class

#

this is my main in which I make a crate

#

this is my command to get a crate

#

when I use the command

#

I just get a normal chest

#

not sure why

hollow thorn
#

how do you use pitch

#

for playSOund

chrome edge
#

Is it possible to change default world while the server is on?

#

So whenever player joins, the player must spawn in default map as we set

silent veldt
#

@chrome edge I think you can change those setting with the Server object, but it's easier to just teleport the player to the world you want in PlayerJoinEvent.

naive goblet
#

@cerulean snow Consider using ChatColor.translateAlternateColorCode method instead of concetenating strings and enums.

worldly heathBOT
#

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.

#

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.

wheat forum
#

So basically, I made my own script and uploaded it too spigot, but how would I change the link to it since I want to update it?

naive goblet
#

script?

wheat forum
#

a skript

#

my bad

naive goblet
#

what is that

wheat forum
#

A language

wanton delta
#

uh

frigid ember
#

Can a staff member change my name on spigot its been 3 days

wanton delta
#

greg

#

have u donated

frigid ember
#

Yea

wanton delta
#

do you have the redstone thing

wheat forum
#

so how would I update the link to one of my spigot plugins

frigid ember
#

Yes

wanton delta
#

you need to update the resource arlists

naive goblet
#

He changed it on spigot lol

wanton delta
#

@frigid ember have you change the name in your settings in your profile

wheat forum
#

How would I do that?

frigid ember
#

i already requested the name change

wanton delta
#

well then

#

you just have to wait

frigid ember
#

its been 3 days and still no change

#

ill just email md

wanton delta
#

mine took around a week or so

#

no

#

dont email him lmao

wheat forum
#

Martoph how do I update the resource?

naive goblet
#

Well, Greg once changed on spigot dm a forum staff and they will assist you with a change on here as well.

wanton delta
#

@frigid ember i highly recommend you just be patient

frigid ember
#

Its fine i emailed him

wanton delta
#

name changes take a while

#

🤦‍♂️

frigid ember
#

fastest way

wanton delta
#

no lmao

naive goblet
#

omg

wheat forum
#

how do I get there lmao

wanton delta
#

its not faster

mental bone
#

Hello, my scoreboards work but it's not in descending order and I need a condition to say that

if (Bukkit.getPlayer(name).getStatistic (Statistic_PLAYER_KILLS) > to others){
then put the one with the most kills first
}

naive goblet
#

Dm someone like Choco or Noble here

#

they should assist you asap

wanton delta
#

no

#

dont dm anyone

#

🤦‍♂️

frigid ember
#

They dont do name changes

wheat forum
#

Martoph what should I click to get there?

naive goblet
#

Well yes they do

wanton delta
#

thats my resources page

#

bottom right

frigid ember
#

Martoph Dont tell people what to do my guy

wheat forum
#

oooo

naive goblet
#

Grek they do name changes

wanton delta
#

greg, if you were a lead of a project that has thousands of clients

#

would you want someone to email you about a name change?

formal nimbus
#

^

wheat forum
#

Now what, I am on the edit resource?

frigid ember
#

Forums staff dont have access to name changes

#

its only md

naive goblet
#

On discord yes?

wanton delta
#

greg

#

you should just be patient

#

md will get to it

inland meteor
#

its a name

wanton delta
#

when he gets to it

inland meteor
#

lmao

wanton delta
#

i doubt he'll even do anything after seeing your email

formal nimbus
#

^

wheat forum
#

Martoph should I post resource update?

frigid ember
#

donated 10 dollars for a name change lol

naive goblet
#

Omg Greg if it's on spigot be patient

wanton delta
#

@wheat forum i dont know

#

greg go through the process like everyone else lmfao

#

i paid $10

#

waited around a week

naive goblet
#

Once changed their just ask a forum staff here to change it on discord as well

wanton delta
#

stop acting privileged

inland meteor
#

then forum staff can ask someone if they dont have access ^

#

because some do

frigid ember
#

Its all good he will get my email

inland meteor
#

whatever

naive goblet
#

BenH I am talking about the discord server

#

jeez

formal nimbus
#

Posted this about 25mins ago but haven't got a reply, so will post again as it has been buried:

wanton delta
#

yea he'll read your email probably after he changes ur name lmfao

inland meteor
#

Conclure im in agreement with you lol

wanton delta
#

@formal nimbus youre not describing your problem nicely

#

we have no idea what youre trying to do

inland meteor
#

i was just saying like "some dont have access but they can find someone if not when you ask them once they change it"

formal nimbus
#

Sorry - I'm trying to get a special chest which has a name and a lore

#

it has some other stuff to, but the ItemStack doesn't seem to be creating properly

naive goblet
#

I said "once changed on spigot you can dm a staff here to change it on the server as well"

formal nimbus
#

I just get a normal chest when I try to give myself the ItemStack

wanton delta
#

youre not setting the crates itemmeta

#

silly

formal nimbus
#

oh lol

wanton delta
hearty trellis
#

Hi guys, does anyone know where the actual logic code of explosions is located? Cause everytime i try to find it in the bukkit source it just shows me interfaces, but im looking for the implementation of those functions

wanton delta
#

ah yes

naive goblet
#

CraftBukkit?

formal nimbus
#

how do I set the item meta/

#

since their isn't an itemmeta varaible

naive goblet
#

ItemStack#setItemMeta

formal nimbus
#

but what do I put it?

#

it takes an arg

naive goblet
#

ItemMeta meta = item.getItemMeta();

formal nimbus
#

👌

naive goblet
#

ItemStack#setItemMeta(meta)

wanton delta
#

@hearty trellis so i recommend getting jdgui

#

decompile the spigot jar

marsh nova
#

lol

#

you don't need to do that

wanton delta
#

and open net.minecraft.server.v1_15_R1.Explosion

naive goblet
#

Intellij

wanton delta
#

i have no fucking clue what ide they use lmfao

marsh nova
#

Buildtools will decompile for you

formal nimbus
#

like so?

hearty trellis
#

i use intellij

wanton delta
#

ok

#

in that case

naive goblet
#

Jet yes

wanton delta
#

when you open the explosion interface

formal nimbus
#

thanks 😄

wanton delta
#

click on the little green i button next to it

#

itll show you the origin

naive goblet
#

cerrealic you can right click the class/interface name and operate "Find Usages"

wanton delta
#

not even that

naive goblet
#

Huh?

#

If he want to locate where the java file is being used that's how you do it lmao

wanton delta
#

well

#

they need the nms dependency

wheat forum
#

How do I update my spigot plugin link??

naive goblet
#

Sure he does ?

wanton delta
#

yea

#

im just saying

silent veldt
#

@formal nimbus That code will not work

hearty trellis
#

i dont have nms dependency

wanton delta
#

add it

marsh nova
#

getItemMeta() returns a copy

#

you need to modify the copy

formal nimbus
#

@formal nimbus That code will not work
@silent veldt :0

wheat forum
#

How do I update my spigot plugin link??

naive goblet
#

@formal nimbus You have to create a reference of the copy

wanton delta
#
            <dependency>
                <groupId>org.spigotmc</groupId>
                <artifactId>spigot</artifactId>
                <version>1.15.2-R0.1-SNAPSHOT</version>
                <scope>provided</scope>
            </dependency>```
marsh nova
#

then set the item meta of the stack back to the modified meta

naive goblet
#

edit that copy

hearty trellis
#

thx

silent veldt
#

@formal nimbus You need to store crate.getItemStack as an ItemMeta object then modify that

hearty trellis
#

wait what but thats just spigot api

silent veldt
#

and set it back with crate.setItemMeta

wanton delta
#

no its not

formal nimbus
#

oh. I was told that was obsolete

wanton delta
#

spigot-api and spigot are different

hearty trellis
#

oh yeah

naive goblet
#
ItemStack item = new ItemStack(Material.DIRT);
ItemMeta meta = item.getItemMeta();
meta.setDisplayName("dd");
item.setItemMeta(meta);
marsh nova
#

org.spigotmc:spigot is installed by Buildtools

silent veldt
#

Every time you do crate.getItemMeta, it's getting the item meta, modifying it, and throwing it away

cerulean snow
#

I've tried a bunch of different things but the players name still prints out as white instead of gold

wanton delta
formal nimbus
#

right

marsh nova
#

it's not a getter really, it's a copier

wanton delta
#

@hearty trellis you can use that to navigate

naive goblet
#

JC it's smart to have some type of itembuilder

wanton delta
#

to net.minecraft.server.v1_15_R1.explosion

hearty trellis
#

ah yes

#

thx

silent veldt
#
ItemMeta im = crate.getItemMeta();
im.setLore("My cool lore");
// other modifications to im
crate.setItemMeta(im);
naive goblet
#

setLore requires a List<String> ?

silent veldt
#

Yeah, it's just an example

marsh nova
#

if it needs a list, give it a list

silent veldt
#

Of how to do it

formal nimbus
naive goblet
#

Arrays.asList("line1", "line2")

wheat forum
#

How do I update my link to download my plugin???

marsh nova
#

JetCobble, that's better

formal nimbus
#

sweet

marsh nova
#

although I'm not sure why you call getPersistentDataContainer() right there

silent veldt
#

@formal nimbus Yup. That will work.

formal nimbus
#

hmm

#

I'm not sure wither

#

I'll delete that

silent veldt
#

Also, he's right about setLore

#

It does require a List<String>, so just surround your text with Arrays.asList as he suggested

formal nimbus
#

sorry I didn't catch where that was said

#

how do I do that?

meager crest
#

is there a good way of downloading plugins on a remote ubuntu box, I've been trying to wget/curl directly from the forums however I've been unsuccessful - additionally I cannot find a way to create an embed link on either Google drive or Onedrive

silent veldt
#

You are creating a List<String> in your code, but never using it

wheat forum
#

How do I update my link to download my plugin???

marsh nova
#

no, he's using it

naive goblet
#

Else do something like this

class ItemBuilder {
  ItemStack item;
  ItemMeta meta;
    
  public ItemBuilder(ItemStack stack) {
    item = stack;
    meta = stack.getItemMeta();
  }

  public ItemBuilder withLore(String... lore) {
    meta.setLore(Arrays.asList(lore));
    return this;
  }

  public ItemStack toItemStack() {
    item.setItemMeta(meta);
    return item;
  }
}```

```java
class OtherClass {
  //Some EventHandler
  ItemStack stack = new ItemBuilder(new ItemStack(Material.DIRT))
    .withLores("loreline1", "loreline2");
}```
hearty trellis
#

@wanton delta nms is not hosted tho, there's no spigot folder to get the dependency from

#

so how the heck did you manage to do that

silent veldt
#

You're right, he is

marsh nova
#

like I said, BuildTools will install the org.spigotmc:spigot arifact

silent veldt
#

That code is good

formal nimbus
#

kk

#

I have one more question however

silent veldt
#

Shoot

formal nimbus
#

this is a method in my Crate object class

#

however it appears to not be working

naive goblet
#

Specify

silent veldt
#

shuffle?

hearty trellis
#

like I said, BuildTools will install the org.spigotmc:spigot arifact
@marsh nova ah so i just need to shade it, or flatdir it or somehting

marsh nova
#

no

#

don't shade the entire spigot jar

formal nimbus
#

I'll explain it and post the whole class so it makes more sense

boreal tiger
#

no dont shade it xD

marsh nova
#

lol

boreal tiger
#

lmao

hearty trellis
#

lol

marsh nova
#

i have seen people shade it before

#

"why is my plugin 19 mb?"

naive goblet
#

compileOnly is enough

formal nimbus
boreal tiger
#

lmao 😂

marsh nova
#

provided is better

naive goblet
#

Does it exist in gradle?

marsh nova
#

otherwise you get dependency hell in dependent projects using different spigot versions

formal nimbus
#

the shuffle function is supposed to open a generic crate inventory.

#

it is then meant to take the items out of the crates contents list

#

and move them across the screen

#

in a scrolling GUI

marsh nova
#

plugin A declares spigot 1.15 as compile, plugin B uses spigot 1.12 -> no good. That's why you use provided for spigot

formal nimbus
#

each item in the crates contents is paired with a weight

marsh nova
#

JetCobble, don't use static getCrateId like that

#

make a CrateManager instead

formal nimbus
#

what would the manager do?

marsh nova
#

maintain the crateList

hearty trellis
#

im using gradle tho, no 'provided' i think

cerulean snow
#

@naive goblet I'm using ChatColor.translateAlternateColorCodes but its still printing in white
ChatColor.translateAlternateColorCodes('6', event.getPlayer().getDisplayName() + ChatColor.GOLD + " has started a 1 hour 2x mcMMO experience boost! ")

formal nimbus
#

what do you mean by maintain?

naive goblet
#

Lol

#

well rock

marsh nova
#

nothing special or technical

naive goblet
#

switch the first 6 to &

formal nimbus
#

how would thing provide me the id of a crate provided a similar item stack in a player's hand

marsh nova
#

just hold the crateList, find crates by id, add crates, etc.

naive goblet
#

Then use color codes like &7 and it will be colored then

formal nimbus
#

right..............

#

ok

#

I'll give it a shot

silent veldt
#

What he's getting at, is that you shouldn't be tracking the crates in the CrateItem class. It complicates it

formal nimbus
#

alright

silent veldt
#

The CrateItem class should only hold functions that relate to the actual crate. Tracking a master list of crates is out of the scope of that.

formal nimbus
#

right

silent veldt
#

While it will technically work, it's not good coding practice

naive goblet
#

CrateItem is only going to represent a Crate and then everything else should be managed with a manager.

formal nimbus
#

yep, I can see that

#

more organised to separate them

silent veldt
#

That won't solve your shuffle problem however. What's the issue with that?

naive goblet
#

Try avoid static in the CrateItem as it should not be needed

formal nimbus
#

it seems that the id I tried to shuffle with was null

#

so it might be a problem with crate management funnily enough

silent veldt
#

Hmm, let me look over that code

formal nimbus
#

right

silent veldt
#

The error happens in shuffle()?

formal nimbus
#

you'll need me listener

#

no

#

it happened in the listener

silent veldt
#

K

formal nimbus
#

when I tried to call the shuffle

#

there you are

#

is it ok to add the crate to the list of crates in the crate manager in the constuctor?

silent veldt
#

You should have an add method in the CrateManager

cerulean snow
#

@naive goblet that method works for everything else in the string except for the players name

naive goblet
#

What r u trying to do

silent veldt
#

But if you have a stored list of crates somewhere, it would be ok to load those

formal nimbus
#

like that?

silent veldt
#

Let me check this shuffle method first

formal nimbus
#

ok, thanks 😄

#

sorry the id is so complicated

#

it makes it a pain to follow, whenever it's mentioned. I did have a warpper class for the contents (id.getRight())

silent veldt
#

It could be simpler.. that's what we're trying to help you with 😄

formal nimbus
#

but I was told to remove it

#

thanks 😄

silent veldt
#

In shuffle, what is id? Is that the master list of crates?

formal nimbus
#

no

#

the id is a crate id

#

essentially, in each crate id you have the ItemStack of the crate paired with a list of pairs

#

in each pair you have an ItemStack and a Weight

#

essentially, it's linking a Crate to it's contents

#

each item in the contents has a weight

silent veldt
#

What error do you get when listener tries to call shuffle?

formal nimbus
#

null pointer exception

silent veldt
#

Of course

formal nimbus
#

the classic

silent veldt
#

The data is null, and you are calling .isEmpty() on it

cerulean snow
#

@naive goblet I'm trying to send a server message when someone uses a certain item, so it would say "{playername} has started an event" in chat, but the player name prints as white instead of gold like the rest of the message

formal nimbus
#

where is this?

silent veldt
#
if (this.id.getRight().isEmpty() == true){
#

id.getRight() must be returning null

formal nimbus
#

ah

#

that was me trying to catch a null exception lmao

silent veldt
#

you want

#
if(this.id.getRight() != null) {
formal nimbus
#

😮

naive goblet
#

ChatColor.translateAlternateColorCodes(‘&’, “&6” + player.getName() + “ &f text after”)

#

@cerulean snow

formal nimbus
#

either way though, it shouldn't have been null?

silent veldt
#

That will fail

formal nimbus
#

how come?

silent veldt
#

You can't call a method (.isEmpty()) on a null object

boreal tiger
#

small apart: you dont need to == true in that if statement

formal nimbus
#

ah

silent veldt
#

Also, the || works from left to right

formal nimbus
#

oh yeah I don't know where that slips form

silent veldt
#

The null check needs to be on the left

formal nimbus
#

*slipped in from

#

kk

naive goblet
#

JC keep in mind that boolean should represent a success or a fail

formal nimbus
cerulean snow
#

ah ok thanks. I was using getDisplayName() not getName() lmao @naive goblet. works great now

silent veldt
#

if you do this, for example

boolean value = true;
if(value)
    System.out.println("Value was true");

it works fine.

naive goblet
#

We can’t get the boolean of the Object if the object is null

formal nimbus
#

👍

silent veldt
#

Also, || is a short circuit operator. Once it finds the first condition true, it quits checking the other ones

formal nimbus
#

just added that in too

silent veldt
#

So when you do

if (x == null || x.isEmpty())
  System.out.println("X was empty");

It does the null check, notices it was true, and doesn't check the second condition

formal nimbus
#

Also, || is a short circuit operator. Once it finds the first condition true, it quits checking the other ones
@silent veldt inteeesting

#

that's fine though

#

because if it isn't empty, it's not null

silent veldt
#

That makes it safe, because if the first condition is null, it won't run the second check, which would cause an NPE

naive stratus
#

What is the cheapest way to check if any player is at a specific location?

naive goblet
#

Compare block x y z between 2 locs?

naive stratus
#

I am trying to regenerate a block, but I want to make sure no player is in the way. I assume that if I regenerate and a player is in the way, I will crush them.

formal nimbus
#

huh, interesting

boreal tiger
#

@silent veldt hi, to avoid having to add something everytime I add a new section for a new class, I was thinking about having a Set<? extends MyClass>
and then, given that each class requries the same parameter to be passed on the constructor, I could use reflection to create a new instance.

Is this a legitimate use of reflection?
I also thought about initializing the class iinstance with some default values and then if the configuration section was defined, I could just update it using a setter

formal nimbus
#

I just tried running it again

#

this time WITH the null catcher

#

still got a null pointer

silent veldt
#

Let me see your new code

clever hornet
#

what would count as "player" as in like the person who clicked something in the console

formal nimbus
#

wait...

#

hang on

naive goblet
#

NPE is often thrown when an undeclared field is used

formal nimbus
#

I think I know why lmao

#

I remove the crate from somebodys hand

#

before I check with it

#

I think?

silent veldt
#

Let me see your new code

formal nimbus
#

k

dusty topaz
#

Is there a way to send all your players to a fallback server when your server shuts down (and how would you do it, code wise)

formal nimbus
silent veldt
#

@boreal tiger You shouldn't need to use reflection if you are designing all the classes

formal nimbus
#

haven't finished the crate manager

silent veldt
#

You typically only need that when breaking into someone else's classes

naive goblet
#
Person person;

method() {
  person.getName(); //Would throw NullPointerException
}```
boreal tiger
#

right, would it better to just update with a setter then?

#

if that section is defined

formal nimbus
#

!!!

silent veldt
#

I'm don't understand the problem 100%

formal nimbus
#

something has happened

naive goblet
#

Pog

formal nimbus
#

lol

silent veldt
#

here's the problem @formal nimbus

cold wharf
#

How do I wait for certain amount of time?

naive goblet
#

BukkitTask

silent veldt
#
if (this.id == null) {

Should be

if (this.id.getRight() == null) {
formal nimbus
#

it's not giving null anymore

clever hornet
#

what counts as "player" in the console

formal nimbus
#

and I check for it here

silent veldt
#

Ah, well that wasn't the null then. But it could have been null, so you still needed the check

formal nimbus
#

I do both

silent veldt
#

Ah

formal nimbus
#

because I can't check this.id.getRight if the id is null

#

right?

silent veldt
#

Right

cold wharf
#

T

naive goblet
#

BukkitScheduler#runTaskLater(Plugin, () -> {

}, 20L); @cold wharf

boreal tiger
#

@silent veldt some context
I have an abstract class Enemy which I then extend for different enemies.
Each enemy has some attributes I want to load from a configuration section.

formal nimbus
#

I already fixed the null issue

naive goblet
#

20L == 1 second

silent veldt
#

Yup I see that. That works

boreal tiger
#

👌 thanks again

formal nimbus
#

Essentially I removed the crate from their inventory, before using that crate to check for the crate id

#

so essentailly the crate no longer existed

#

and I was passing in null

#

however

#

now i'm getting a different issue lmao

paper compass
#

Guys, how can I make an excavation enchantment?

formal nimbus
#

it's another null pointer excption!!!

#

wooooo

#

but at least the crate identification sysytem is working

naive goblet
#

@paper compass what did you come up with ?

formal nimbus
#

this is progress

cold wharf
#

@Conclure#1262 can you give me an example pls?

naive goblet
#

And wym with excavation

dusty topaz
#

Is there a way to send all your players to a fallback server when your server shuts down (and how would you do it, code wise)

paper compass
#

This currently lags

#

when it procs

naive goblet
#

rudra sure

silent veldt
#

Can either of you do voice? I think it would be much easier to explain that way

naive goblet
#
//onCommnad
Bukkit.getScheduler().runTaskLater(plugin, () -> {
sender.sendMessage(“One second has now passed”);
}, 20L);```
#

Craig how old are you?

silent veldt
#

38

naive goblet
#

Oww I am kind of like super young compared

cold wharf
#

Hey

naive goblet
#

Sup

silent veldt
#

Age doesn't define programming skill 😄

naive goblet
#

👍

formal nimbus
#

lol I'm 16

silent veldt
#

I started programming when I was young. BASIC at least

formal nimbus
#

cool 😮

cold wharf
#

BukkitScheduler#runTaskLater(Plugin, () -> {

}, 20L); @cold wharf
@naive goblet
Example pls

naive goblet
#

== you got pro skills

silent veldt
#

I wish. I still learn every day lol

naive goblet
#
//onCommnad
Bukkit.getScheduler().runTaskLater(plugin, () -> {
sender.sendMessage(“One second has now passed”);
}, 20L);```

@naive goblet

#

Rudra

#

This

silent veldt
#

I think programming is something you'll never completely figure out, no matter how old you get

naive goblet
#

Haha good one

silent veldt
#

OK I'm out for a bit. Good luck guys

naive goblet
#

Cya

cold wharf
#

Con Where do you put the X time?

paper compass
#

Should I put a seperate BlockBreakEvent in each of my enchantment classes?

naive goblet
#

Oh

#

okay so like this

#
//onCommnad
double seconds = 3.0;
Bukkit.getScheduler().runTaskLater(plugin, () -> {
sender.sendMessage(“One second has now passed”);
}, seconds * 20L);```
cold wharf
#

Oh will this work on events too?

naive goblet
#

Yes?

#

Why wouldn't it

cold wharf
#

And what if I leave it empty?

naive goblet
#

Leave what empty?

cold wharf
#

Like remove the send message

naive goblet
#

Yeah you can put whatever code you want there

#
//onCommnad
double seconds = 3.0;
Bukkit.getScheduler().runTaskLater(plugin, () -> {
  //code that should be executed in x seconds
}, seconds * 20L);```
cold wharf
#

I am trying to do it so if you sleep after 5 seconds it will check of you're still sleeping or not and if you're still sleeping then it will change the time to day. I got everything working apart from the wait thing

naive goblet
#

ok

#

oh

#

What's the event when a player is going to sleep

meager crest
#

is there a good way to Wget spigot plugins on a remote linux server

cold wharf
#

PlayerBedEnter

meager crest
#

or curl

paper compass
#

Should I put a seperate BlockBreakEvent in each of my enchantment classes?

formal nimbus
naive goblet
#
//EventHandler
public void onSleep(BedEnterEvent event) {
  Bukkit.getScheduler.runTaskLater(plugin, () -> {
    if (event.getPlayer().isSleeping()) {
      event.getPlayer().getWorld().setTime(3000L);
    }
  }, 100L);
}```
#

Idk if 3000 ticks is the right

cold wharf
#

1000

naive goblet
#

yeah change it to 1000 then

cold wharf
#

Aight tysm

naive goblet
#

@paper compass What are you trying to do

#

JC

paper compass
#

Prison server

naive goblet
#

More specific

paper compass
#

But my current block break event has like over 500 lines

naive goblet
#

@formal nimbus Send more code

formal nimbus
#

k

paper compass
#

and it lags the server

naive goblet
#

Yeah add another event ig

#

Idk how your code looks but try optimize it

formal nimbus
naive goblet
#

What is this code suppose to do?

formal nimbus
#

so, when I right click on a crate item

paper compass
#

thats the code

formal nimbus
#

it opens up a generic crate GUI

#

and the items asociated with the crate that was opened will scroll across the central row

naive goblet
#

@paper compass thats a bad code sry

paper compass
#

mhm

formal nimbus
#

it's only moving the items along once when I open a crate unfortunately

paper compass
#

I'm looking for a way to optimize it

naive goblet
#

for of all

#

first*

formal nimbus
#

I tested the outer for loop by putting in a Bukkit.getServerSender.SendMessage in

#

and only got 1

#

when it sohuld be 100

#

*should

cold wharf
#

@naive goblet what is that plugin there?

#

It is giving me error

naive goblet
#

@paper compass maybe use a switch statement and enums to check enchants. Also use dependency injection instead of static instance of main.

#

rudra your main class

paper compass
#

but how do I reduce lag

cold wharf
#

Oki

naive goblet
#
        for(int i = 0; i < 100; i++) 
            CrateGUI.crateInventory.setItem(17, (this.randomItem(getContents())));
            Bukkit.getConsoleSender().sendMessage("hi");
            for(int itemIndex = 9; itemIndex < 17; itemIndex++) {
                if (CrateGUI.crateInventory.getItem(itemIndex+1) != null) {
                    CrateGUI.crateInventory.setItem(itemIndex, CrateGUI.crateInventory.getItem(itemIndex+1));
                }
        }
``` @formal nimbus
#

add a {

formal nimbus
#

LOL

#

I'm so sorry xD

naive goblet
#

OhSry it's not a question of how rather what does reduce lag.

cold wharf
#

Also what is that 100L?

naive goblet
#

100L is 5 seconds

formal nimbus
#

working now 😄

naive goblet
#

each seconds takes 20 ticks

cold wharf
#

Oh oki

formal nimbus
#

I'm just a dummy

naive goblet
#

JC nice

frigid ember
#

currently looking into servers that have managed to get mods working along side spigot plugins aswell. So far I've only seen mention of sponge which was a disappointing mess and how people say its not possible but nobody really gives any in depth detail as to why or how to make it possible. Currently my goal is to just get it working on 1.14.4 and then later when 1.16 comes out have the same done there aswell. 1.14.4 will be where I'm testing basically to get this working the first time.

Side question, why is minecraft weird and refering to plugins and mods as 2 seperate things when their both basically mods just one is serverside only?

naive goblet
#

Does sponge works with spigot plugins? The main reason is because the Forge API and Spigot API works totally different

#

Keep in mind that Forge API should allow devs to create new Entities and stuff which Spigot isnt capable of

frigid ember
#

iirc forge required some clientside handling while spigot was all server side. and no I'm 90% sure most spigot stuff doesn't work with sponge :p

naive goblet
#

yep

#

Well, yes

#

Client handles stuff like rendering and textures

#

ServerProxy handles items, behaviour etc

#

And in forge even in local worlds there is a "local server" running

#

Need to get out a couple of min bbl

turbid musk
#

Does anyone know he 1.14 equivalent to the 1.12.2 (World world)? I heard WorldServer is a possibility..?

naive goblet
#

Spigot API?

ashen stirrup
#

How do you use the placeholder API?

String format = "%player_name% >> %message%";
format = PlaceholderAPI.setPlaceholders(player, format);
turbid musk
#

?

naive goblet
#

iirc WorldServer is nms ?

#

Jeez checkout their documentation

#

Just use the World from spigot

#

\bukkit api

turbid musk
#

I am but it doesn’t works it’s ym super. It works fine in 1.12.2 but not 1.14.4

cold wharf
#

That worked con tysm

naive goblet
#

Code Mera?

#

Nice Rudra :0

formal nimbus
#

anyone know why this isn't working?