#help-archived

1 messages · Page 216 of 1

quick arch
#

Temperature Sensor is broken

hollow root
#

hm do I run the class file from linux cli? I dont want to bother to put it into a jar rn

quick arch
#

no idea

hollow root
#
few decimals:
20256346 nanoseconds
many decimals:
20356270 nanoseconds
integer:
12286823 nanoseconds
#

some AMC Epic

#

AMD seems to be faster with integers

quick arch
#

still wonky

hollow root
#

(this is 1 million instead of 10k iterations)

quick arch
#

doing 100 million atm 🤔

hollow root
#

lol really strange. my AMD seems to be faster with few decimals and integer being even faster while Intel is faster with more decimals and integer is the slowest on average lol

quick arch
#

oh it broke

#

Java heap space

hollow root
quick arch
#

restarting again, giving it... 8gb of ram this time

keen compass
#

might want to show how you tested these things before assuming that intel is really indeed being slower

#

and that AMD is being faster

quick arch
hollow root
#

what I did is not really comparable, I used Windows on Intel and Debian on AMD

worldly heathBOT
hollow root
#

also I should go to bed now, gotta visit my parents in a few hours^^

keen compass
#

Indeed you are correct on that it seems

#

cya later

hollow root
#

good evening everyone

keen compass
#

still be nice to show the code you used

#

maybe others can test?

#

😛

hollow root
#

I posted it

#

wait

quick arch
#

Integers faster, yeah

#

100,000,000 values btw

hollow root
#

quick and dirty, it was just for fun^^

keen compass
#

well I have a server with quad core xeon hyperthreaded 😉

#

I can test for intel but not AMD

quick arch
#

._.

hollow root
#

I tested on i7 9700K and on a VPS with 4 dedicated AMD EPYC 7702 cores

#

well after all it seems like it doesnt matter until you want to calculate 10 million of numbers at once^^

#

but its kinda strange that integers are slower for me on intel

#

(compared to doubles on the same CPU)

quick arch
#

AMD is just superior :kappa:

keen compass
#

intel is generally really good with floating points

hollow root
#

I don't think the 7702 beats my 9700K 😛

#

but its a stupid comparison as the intel runs with ~4GHz and the epyc runs at 2ghz

keen compass
#

I will create a project for testing various primitives 😉

quick arch
#

I can probably overclock mine with amd's overclock tool thingy

keen compass
#

I am fairly certain intel has no problems with integers

hollow root
pastel condor
#

help would be really appreciated

quick arch
#

Should remove 1.13 compatibility and make it use Persistent Data Containers 👀

pastel condor
#

why remove 1.13 compat?

quick arch
#

cause 1.14+ is persistent data containers

pastel condor
#

lol

quick arch
#

1.13 is custom item tag (which only support item stacks)

pastel condor
#

but I mean it should be storing my data fine

#

anyways I don't actually test it on 1.13

#

and the api version I use in maven is 1.16

#

idrc about 1.13

#

I just leave the number as that

quick arch
#

:)

pastel condor
#

so the data should be persistent

#

because theres only one instance

#

but it almost looks like the data isn't

#

thats why I'm really confused

spare tiger
#

I have a question about the api

#

I want to override one small part about generation

#

I don't want to completely rewrite generation

#

I just want to add a block that is generated underground

#

is this possible?

pastel condor
#

you can edit blocks using that event

spare tiger
#

ah

#

yay

pastel condor
#

oh my bad thats on compleation

spare tiger
#

thanks

pastel condor
#

yup np

quick arch
#

nice...

pastel condor
#

wtf how

#

I swear

#

at this rate I'm just going to store that stuff in the main class

sharp breach
#

Its opening two on my server command line and another

pastel condor
#

k

sharp breach
#

this aint good

quick arch
#

Just use Persistent Data Containers at this point

pastel condor
#

Just use Persistent Data Containers at this point
I need that 1.13 support

quick arch
#

._.

#

Doesn't that mean your plugin supports 1.8.8-1.16

sharp breach
#

also the memery IS SLOPING UP INSAINLY

pastel condor
#

oh I guess no one who uses my plugin is on 1.13

#

time to ditch 1.13 support

quick arch
#

oh, some are 1.12.2

#

why

pastel condor
#

idc for them

quick arch
#

oh good

pastel condor
#

I already dropped support for that trash

#

1.12 = yuck

nimble oar
#

Old and stable version

pastel condor
#

1.12 ocean = 🤮

nimble oar
#

It is good for servers without lots of resources

quick arch
#

Converting it to Persistent Data Container shouldn't take that long

pastel condor
#

the only good thing with 1.12, is glowstone

#

Converting it to Persistent Data Container shouldn't take that long
I'll look into that

nimble oar
#

1.12 ocean = 🤮
@pastel condor 1.14+ performance 🤢

#

Lol

pastel condor
#

@pastel condor 1.14+ performance 🤢
@nimble oar
1.16 performance > 1.14 performance

sharp breach
#

how do i make a hashmap anyway?

quick arch
#

Probably could look like that

pastel condor
#

ty I'll look into that

sharp breach
#

?

pastel condor
#

also HashMap<String, String> mappy = new HashMap<String, String>();

#

then mappy.put("hi", "bye");

nimble oar
#

Where String, String is Key, Value

pastel condor
#

then mappy.get("hi") returns "bye"

quick arch
#

Map<K, V> map = new HashMap<K, V>();

#

pretty sure Map is recommended over HashMap for the type

sharp breach
#

how do i make like a vault thing tho where it stores the blocks a player puts in the GUI to a haspmap thats under vaultPlayerName than when the server starts again it open a GUI with the blocks the player put in earlier?

lone fog
#

you’ll need to store it somewhere when the server stops

sharp breach
#

yes.

#

that part is obivoud

#

but how do i save the blocks the player puts in the GUI

#

and use the hashmap to export to the GUI?

nimble oar
#

So you want a GUI that stores items?

sharp breach
#

yeah

#

and it keeps it the data forever

#

?

nimble oar
#

If it isn't going to be accessed a lot, you can use a .yml file and some base 64 to ItemStack conversion

quick arch
frigid ember
#

how do i dispay the lp rank next to the name with TAB plugin

nimble oar
#

@quick arch You're right

sharp breach
#

how do you even MAKE A TAB plugin.

frigid ember
#

issaa plugin

sharp breach
#

i am very curious today.

frigid ember
quick arch
#

I heard that plugin breaks some other plugins 🤔

nimble oar
frigid ember
#

i do

pastel condor
frigid ember
#

yo there's a table in the Java book I'm reading and it says something like

p & q p | q
False False
False True
False True
True  True
``` Could someone explain to me what this means?
lapis wedge
#

i'm not sure what's broken, but I get this log, no plugins enabled nothing

quick arch
#

what are the true and false for

lapis wedge
#

(fresh spigot-1.15.2.jar, and when I copy that and only that to a new folder, it works perfectly)

frigid ember
#

Apparently, the last sentence says the logical operators &, |, ^, !, support the basic logical operations AND, OR, XOR, and NOT, according to the following truth table.

#

I assume their ordered from AND to NOT from top to bottom?

void owl
#

Are there any good scripters here?

quick arch
#

i'm not sure what's broken
looks like 2 chunks are corrupted

lapis wedge
#

any high level devs here?

#

@quick arch those are brand new chunks

#

it happens for every new world regen

humble venture
#

I'm debating on whether or not I should use ExactChoice, it says it's a draft API and it's marked as deprecated, so is that a good idea, or is it risky?

lapis wedge
#

does spigot look through every folder to see if it a world?

#

i mean I dont have any corrupted worlds in my server folder, but this started to happen after I messed up a server close i think

#

after that ive redownloaded spigot.jar, deleted all worlds, renamed my plugins folder to "eh" and same error? How is it remembering the corrupt chunk?

#

is there some server cache that im missing

hallow surge
#

if there is a corrupted chunk in the world

#

its gonna stay there

lapis wedge
#

how? When the world is deleted

hallow surge
#

So you deleted the entire server

#

and reinstalled it

#

alll of the foldesr

#

everything

lapis wedge
#

nope, just spigot.jar and world*

hallow surge
#

yea well the issue may persist

lapis wedge
#

and the plugins

#

how?

hallow surge
#

Idk exactly how spigot saves data

lapis wedge
#

everything else is text files

#

logs and configs

#

last i checked world data isnt stored in configs

hallow surge
#

you deleted nether end as well

lapis wedge
#

world*

#

yes

#

the log shows as much

hallow surge
#

have you tried booting a new world without plugins at first

lapis wedge
#

I can run it again if you want

#

there are no plugins

#

unless spigot checks every folder for plugins

#

i renamed my plugins folder to 'eh'

hallow surge
#

erm

lapis wedge
#

but the logs do not load plugins

hallow surge
#

you should keep your plugins folder

#

named plugins

#

as intended

lapis wedge
#

if you check the log there are no plugins loaded

hallow surge
#

if you want to play with plugins just download a regular minecraft server

#

without*

lapis wedge
#

???

#

Im debugging here

hallow surge
#

something is storing that world data

lapis wedge
#

i removed the plugins to narrow it down

hallow surge
#

corruptions dont just carry over

lapis wedge
#

that's exactly what im saying

#

im asking what that could be

hallow surge
#

remove the plugins completely from the spigot

#

i would actually reccomend you create a new folder for a spigot server

lapis wedge
#

you're repeating everything i just said

#

i literally said I did all that

frigid ember
#

How long does it usually take for a premium resource to be approved? Been waiting almost two weeks now

hallow surge
#

however long it takes ig

#

@lapis wedge are you using the same seed? or is it randomisde

lapis wedge
#

theres no seed defined in server properties

#

I dont think there are any seeds that corrupt worlds though

#

actually its minecraft, there probably are

frigid ember
#

antvenom has some videos on seeds that corrupt worlds

lapis wedge
#

yea but its randomseed here so I dont think thats the problem

#

unless im that mathematical 1/18,446,744,073,709,551,616 chance that gets the seed every time

#

every. time.

#

anyway I made a forum thread, cba with this anymore, i just thought it was a weird bug

open herald
#

Can someone Help me with Essentials

#

Pls

sudden elk
#

How would I put armor on an NPC? (EntityPlayer spawned with Packets)
I've tried both this:
npc.getBukkitEntity().getEquipment().setHelmet(new org.bukkit.inventory.ItemStack(Material.DIAMOND_HELMET));
and this:
npc.getBukkitEntity().getInventory().setHelmet(new org.bukkit.inventory.ItemStack(Material.DIAMOND_HELMET));
But neither has worked for setting it. I've tried to update the inventory but it gives an error in console wen trying to update the invo.

open herald
#

I need help with Essentials I need help setting perms for the plugin BetterRTP, But when I set the perms, the Perms do not work and i am not able to /rtp in the "world world"

frigid ember
#

Npcs are fake entities so pretty sure you need to edit their inventory with packets

open herald
#

Do you know how to help me?

sudden elk
#

What packet would I need to use @frigid ember

warm crane
#

Heyo anyone got a free plugin for prison backpacks and enchants?

humble venture
#

I'm having trouble figuring out custom ore gen

#

does anyone know how to go about doing that?

#

I want to implement my own ores by combining it with a resource pack

#

but I don't know the math involved

#

or how to optimize it

grave galleon
#

what is java.lang.AssertionError: TRAP
and how do we prevent it guys?

warm crane
#

Heyo anyone got a free plugin for prison backpacks and enchants?

anyone?

frigid ember
#

no one can pvp

plush nexus
#

is it possible to spawn items from the fishing loot table in a chest?

frigid ember
#

no

#

yes

#

do /loot

plush nexus
#

you are god

fast ore
#

how do i make it so on a player's death i can change their gamemode to spectator mode?

#

i have this so far but im not sure if im doing this right

   @EventHandler
    public void onDeath(PlayerDeathEvent event){
        Player player = event.getEntity().getPlayer();
        event.setKeepInventory(false);
        event.setDeathMessage("RIP");
    }```
vernal spruce
#

Is player.setGameMode not a thing or..?

nimble oar
#

I'm not sure, but after the death event, the player has to still press the "Respawn" button to be able to switch gamemodes.

#

If you're using spigot, you can force respawn the player using something like player.spigot.respawn();, and only then use player.setGameMode(gameMode);.

#

Alternative would be to listen to damage event, and if the current player health - damage dealt in the event is under or equal to zero, then cancel the event and set the players gamemode. (Way smoother than the previous method)

hollow grail
#

Hi, guys I want to make a home security system (privates), by type as / / wand can you throw links that need to be installed? Please! (1.16.1)

winged sparrow
#

So you want a region protection system. I’d recommend worldguard for public locations and staff defined regions, and grief prevention for player managed claims (golden shovel)

hollow grail
#

@winged sparrow only WorldGuard? me just for spawn, that's all.

winged sparrow
#

Worldguard will handle that just fine.

#

It’s a powerful plugin, be sure to read the documentation.

hollow grail
#

@winged sparrow worldedit, unnecessary?

winged sparrow
#

Worldedit is needed

#

Worldguard depends on worldedit for region selection.

hollow grail
#

May I ask you to send links? I beg you please

winged sparrow
#

I’m not at my computer. Just look up world guard on google.

#

I believe the download is available via a link on Bukkit’s website.

hollow grail
#

thank

#

@winged sparrow beta will work, right?

hollow grail
#

thank

#

I already figured it out, you work great.

spring coyote
#

How can I specify what type of damage spigot does to an entity? 1 damage of void or 1 damage of entity attacking

hexed harness
#

What's the difference between BukkitScheduler and BukkitRunnable?

paper folio
#

does anyone know how i can add an entity to the world and be able to interact with it with playerinteract event, i've tried added the entity to the world with
WorldServer#.addEntity(), i can see the entity but when i click on it nothing is happening. I can click other natural spawned entities and they work fine.

frigid ember
#

u mean like spawn an entity?

paper folio
#

yeah, its spawning correctly but i cant interact with it

frigid ember
#

try World.spawnEntity()

#

this

paper folio
#

thats for a entity type, im trying to spawn a EntityPlayer

frigid ember
#

oh

#

a player

paper folio
#

yes

frigid ember
#

hmmmm

#

idk bout that one

frigid ember
#

is there a way to add/edit servers and add/edit forced hosts inside bungeecord without using /greload?

agile cairn
#

the paypal button is not working for me

edgy cove
#

Hello I have a method called getNumber with the parameter playername in my API class in my spigot plugin and I want to it return a number that is saved on my bungeecord plugin. Here is a small scehematic of the messages that I sent of what is happenning: https://prnt.sc/tte5bl. So explaining writing... in my method I send a message to bungee and then bungee when it gets that messages send a message for spigot with the number (the listener of received messages is in the main class). Now when I receive that number I add it in a Map... so in my method I need to send the message and then when the main class receives the message I need to return the number that is saying on the message (that was putted on a map). How can I do this? (I already made everything sending messages I just need to make something to wait until the Map contains the number and then yes get the number from it and return it on the method)

Lightshot

Captured with Lightshot

sturdy oar
#

High quality UML diagram

undone narwhal
#

The simplest way to do it is to use Redis actually, cause you'll need to play with threads if you follow your system. Have a look on CompletableFutures, could be usefull if you don't use Redis.

sturdy oar
#

Guys need a little help

#

How are these flying spinning blocks achieved? I don't want code , I just don't know how they make them also unpickable

#

(from Hypixel skywars)

frigid ember
#

ArmorStands

undone narwhal
#

Put block on armorstand

#

Head

ancient ridge
#

bedwars*

sturdy oar
#

Oh so it's just an invisible armor stand

undone narwhal
#

Yep

sturdy oar
#

Spinning

#

Ok

undone narwhal
#

Rotation + y moves

sturdy oar
#

But only the head rotate, not the entire armor stand

undone narwhal
#

That's what I used for my plugin: dropping non gravity items with nms is impossible

#

Rotate the entire armorstand is easier

#

Just teleport and change the yaw (or pitch don't remember(

sturdy oar
#

But can't the armor stand only be rotated 90° at a time

undone narwhal
#

No

sturdy oar
#

And the hologram

#

Are also armor stands?

undone narwhal
#

Yep

sturdy oar
#

Lol wtf

#

Everything is armor stands

#

Do you by any chance know how did some plugins made them bigger?

#

Like the balloons plugin

#

My thought was invisible giant zombie wearing block in head

edgy cove
#

@undone narwhal uuh ty I will try use COmpletableFeatures

hollow thorn
#

how do isend meesages to the actionbar

sturdy oar
#

Version?

undone narwhal
#

Invisible, no gravity and Marker true

#

That's it @sturdy oar , invisible Giant Zombie

#

Or make many small armorstand blocks fit together

#

(way more complicated)

sturdy oar
#

Damn I wish we had an API that actually wasn't just using hacks around Minecraft entities

#

Would be way more efficient than spamming the server with armorstand

undone narwhal
#

.... i wish too but no

hot anvil
#

Hey guys, i just saw that i got banned, i didn't uderstand why?

undone narwhal
#

@sturdy oar to make the rotation just teleport the armorstand to same location but change the yaw between -180f and 180f

#

It's really easy to get banned lmao, welcome to the club

hot anvil
#

@undone narwhal Yeah it's seems to be that way, but i really wanna know why, waht means "Bypassing the premiums resource requirements"

undone narwhal
#

Did you follow the requirements to post a premium resources?

ancient ridge
#

did you ever post a premium resource

hot anvil
#

@undone narwhal I just uploaded my resources on spigotmc but extenral link to other website

rare prairie
#

did you ever removed your screen from desk

hot anvil
#

but what's the problem? they allowing to to it are they?

#

They litteraly removed 2 resources with 200+ downloads :/

ancient ridge
#

so they were free resources?

hot anvil
#

no

#

i have to have the requirements to even share external link?

ancient ridge
#

then you had two premium and one free, you also don't have enough messages or ratings

hot anvil
#

then you had two premium and one free, you also don't have enough messages or ratings
@ancient ridge Mmm i get it now...

strange forge
#

hello o/ want some tips/advice. in my minigame i have leaderboards, and i store player stats in a database. is there any more efficient way of creating and sorting leaderboards other than caching the entire database? i use Caffeine to cache the data and all but querying everything from the database takes time when there are more than 1000 entries. although i have it all run async

ancient ridge
#

I don't even know how you managed to post a premium resource in the first place

hot anvil
#

I don't even know how you managed to post a premium resource in the first place
@ancient ridge Instead of upload the jar i uploaded the link to mcMarket

#

There I am a premium

sturdy oar
#

@sturdy oar to make the rotation just teleport the armorstand to same location but change the yaw between -180f and 180f
@undone narwhal how do you make them not fall?

ancient ridge
#

lol well that's obviously bypassing it

#

you can't just link a free resource on spigot to a paid mcmarket one

umbral dirge
#
@EventHandler
    public void onClick(PlayerInteractEntityEvent e) {
        if (e.getRightClicked() instanceof ArmorStand) {
            System.out.println(e.getRightClicked().getCustomName());

            if (e.getRightClicked().getName().equals("§8§l§o§o")) {
                Player p = e.getPlayer();

                p.sendMessage("egall!1");
            }
        }
    }

Does anyone have an Idea why this is not returning anything? There is no Error. It just does not return the name of the armorstand.

ancient ridge
#

well using § is a bad idea

umbral dirge
#

But i use color codes for a blank name

hot anvil
#

you can't just link a free resource on spigot to a paid mcmarket one
@ancient ridge Yeah now it's sounds kind of silly...

rare prairie
#

ChatColor#stripColor

umbral dirge
#

if it gets clicked it opens a menu

#

?

#

It does not return anything in the console

hot anvil
#
@EventHandler
    public void onClick(PlayerInteractEntityEvent e) {
        if (e.getRightClicked() instanceof ArmorStand) {
            System.out.println(e.getRightClicked().getCustomName());

            if (e.getRightClicked().getName().equals("§8§l§o§o")) {
                Player p = e.getPlayer();

                p.sendMessage("egall!1");
            }
        }
    }

Does anyone have an Idea why this is not returning anything? There is no Error. It just does not return the name of the armorstand.
@umbral dirge Try to check if it's contains §8§l§o§o and no equals, sometimes it's solving everything lol

umbral dirge
#

Okay

#

nope

hot anvil
#

@umbral dirge Try to check if it's contains §8§l§o§o and no equals, sometimes it's solving everything lol
@hot anvil Also check in console if there is errors or null exceptions about the println of custom name

umbral dirge
#

There is nothing getting printed out

hot anvil
#

You registered the event?

umbral dirge
#

yes

hot anvil
#

Try to do a if statement to instanceof and check if it's armourstand print in chat true if else print false,

rare prairie
#
if (ChatColor.stripColor(e.getRightClicked().getName().toLowerCase()).contains("armorstandname")) {
hot anvil
#

if you see the false it's means the problem in instance, probably you are not clicking on armour stand

hot anvil
#

if you not getting any print it's means the event not called.

#

Try them both each

@EventHandler
public void onClick(PlayerInteractEntityEvent e) {
    if (e.getRightClicked() instanceof ArmorStand) {
        System.out.println("Instanceof ArmourStand");
        System.out.println(e.getRightClicked().getCustomName());
        if (e.getRightClicked().getName().equals("§8§l§o§o")) {
            Player p = e.getPlayer();

            p.sendMessage("egall!1");
        }
    } else {
        System.out.println("Not instanceof ArmourStand");
    }
}


@EventHandler
public void onClick(PlayerInteractEntityEvent e) {
    try{
        if (e.getRightClicked() instanceof ArmorStand) {
            System.out.println("Instanceof ArmourStand");
            System.out.println(e.getRightClicked().getCustomName());
            if (e.getRightClicked().getName().equals("§8§l§o§o")) {
                Player p = e.getPlayer();

                p.sendMessage("egall!1");
            }
        } else {
            System.out.println("Not instanceof ArmourStand");
        }
    } catch(Exception e){
        e.printStackTrace();
    }
}

You have to get some console message.

rare prairie
#

makes no sense

umbral dirge
#

wai-

#

its registered

#

but it does not do anything

#

it works at sheeps

rare prairie
#

you cant get exception because instanceof is null "checker" also

umbral dirge
#

but the armorstands arent "entitys"

hot anvil
#

you cant get exception because instanceof is null "checker" also
@rare prairie The exception it's about the whole process, just to make sure.

rare prairie
umbral dirge
#

the plugin thinks the armorstands arent entitys

rare prairie
#

@rare prairie The exception it's about the whole process, just to make sure.
thats unecessary

hot anvil
#

thats unecessary
@rare prairie Okay, try the first one which checks if instance of armour or not

rare prairie
#

if you see Nullable annotation, that can be null

umbral dirge
#

Yep

#

Sheep works

#

Armor stand doesnt

rare prairie
#

armorstand is can be an entity

hot anvil
#

try PlayerInteractAtEntityEvent event

umbral dirge
#

omg

#

finally works

hot anvil
#

How did you solved it?

umbral dirge
#

try PlayerInteractAtEntityEvent event
@hot anvil

hot anvil
#

🙂

umbral dirge
#

:D

hollow thorn
#

how do i send action bar messages

umbral dirge
#

packets i think

forest thorn
#

no

#

you can do it with the API

umbral dirge
#

public void onPlayerJoin(PlayerJoinEvent e) {
Player p = e.getPlayer();
ActionBar actionBar = new ActionBar(ChatColor.GOLD + "Hello world");
actionBar.sendToPlayer(p);
}

forest thorn
#

dont use packets

hot anvil
#

p.spigot().sendMessage(ChatMessageType.ACTION_BAR, "")

forest thorn
#

^^^

rare prairie
#

only need reflection/packets if you want to send actionbars to old versions

#

okn't

forest thorn
#

old servers

#

not old clients

#

if possible, use Reflex's method

hot anvil
#

"old versions" good enough (:

forest thorn
#

there are very few things you need packets or nms for in 1.13.2+

hot anvil
#

there are very few things you need packets or nms for in 1.13.2+
@forest thorn They love to make our lives harder than they are already.. -.-

hollow thorn
#

p.spigot().sendMessage(ChatMessageType.ACTION_BAR, "")
@hot anvil it says no valid method

undone narwhal
#

@sturdy oar ArmorStand#setGravity (sorry for ma late)

hot anvil
#

Which version you using?

hollow thorn
#

1.16

forest thorn
#

did you add bukkit

#

or spigot-api

#

you need to add spigot-api as a dependency

hot anvil
#

Yeah try to make sure.

#

try this

BaseComponent component = new TextComponent( "My text!");
player.spigot().sendMessage(component);
blazing burrow
#

does Material.values()[ThreadLocalRandom.current().nextInt(Material.values().length)]; select a random item?

hot anvil
#

Did you tried this code already?

forest thorn
#

yes

hollow thorn
#

or spigot-api
@forest thorn spigot

#

also how do i use it alongside ChatColor

hot anvil
#

Wdym?

#

Just import the chatColor and use it

blazing burrow
#

@hot anvil i did not try it yet

hot anvil
#

Try it real quick and tell me whats the result you get

#

It's seems to looks okay

blazing burrow
#

Okay thanks

hollow thorn
#

alongside it

#

it sayd bad operating types when i use ChatMessageType.ACTION_BAR+ChatColor.GREEN

forest thorn
#

@hollow thorn uhh

#

you need to use the chat color in the message

#

not the chat message type

hot anvil
#

+1

blazing burrow
#

Oh yeah and does the Block interface just mean like ACTUAL blocks in the world or does it means like their time like grass block

hollow thorn
#

oh yeah now it says no suitable method

hot anvil
#

send the code

hollow thorn
#

what imports do i need to use

rare prairie
#

build your project

hollow thorn
#

it doesnt let me because of the error

hot anvil
#

import org.bukkit.ChatColor;

hollow thorn
#

import org.bukkit.ChatColor;
@hot anvil for the ChatMessageType

hot anvil
#
import net.md_5.bungee.api.ChatMessageType;
import net.md_5.bungee.api.chat.BaseComponent;
import net.md_5.bungee.api.chat.TextComponent;
forest thorn
#

please

#

format your source file

#

;-;

#

ctrl + alt + L on intellij

hot anvil
#

Where the baseComponent are?

#

I mean which line

worldly heathBOT
grim halo
#

?paste

hollow thorn
#

I mean which line
@hot anvil 120

hot anvil
#
me.spigot().sendMessage(ChatMessageType.CHAT, "ye");
#

That's not how you use it

#
BaseComponent component = new TextComponent( "My text!");
player.spigot().sendMessage(component);
#

Try this way

#

Also if it's not critical you can use § sign as color instead of ChatColor it.

hollow thorn
#

works

#

Also if it's not critical you can use § sign as color instead of ChatColor it.
@hot anvil i use windows they dont have that

hot anvil
#

I'm not sure § will work on action bar altough

#

It's pretty rare.

blazing burrow
#

and like is Block just an actual block in the world

grim halo
#

"§" is translated in every text component. So actionbar titles lore etc

hot anvil
#

AtinChing what do you mean

grim halo
#

Yes(ish) Block represents the actual Block in the World.
Its still abstracted but it refers to the actual instance.

sturdy oar
#
final PlayerConnection playerConnection = ((CraftPlayer) player).getHandle().playerConnection; final IChatBaseComponent chatBaseComponent = new ChatMessage("text"); 
final PacketPlayOutChat chatPacket = new PacketPlayOutChat(chatBaseComponent, 0x02); playerConnection.sendPacket(chatPacket);
``` @hollow thorn
dreamy glacier
#

hello, it's possible to make a mob disappear if it doesn't do any damage for a while ?

subtle vigil
#

Does anyone have a good "recipe" for creating MineCraft Server as a Windows-Service - what i've tried works in accordance to the log (server should be up and unning), but i cannot connect to it and doesent show the CMD/Console when running

#

I can make it work fine with just a BAT file - but i cant seem to work out how to make it as a service

blazing burrow
#

@hot anvil i mean like if i do Block does it reference to an actual block in the world or like a block type

half badge
#

Havn't done so for years, but I used McMyAdmin as a service on win 2008 back in the day

#

Which worked fine, the majority of the time

sturdy oar
#

The majority here uses Linux for server hosting 😐

hollow thorn
#

hello, it's possible to make a mob disappear if it doesn't do any damage for a while ?
@dreamy glacier you could use a persistant data tag to say the last time it did any damage then check every 20 ticks to see if it a certain time past that before deleting it if it is

sturdy oar
#

HashMap > PersistentDataContainer

#

999% faster

#

Also I don't see why he would need this to be persistent

subtle vigil
#

Thanks Niall - I'll take a look at it - or reinstall it as Linux as Viper indirectly suggests (O.o)

sturdy oar
#

You would also

#

Maybe be able to run them on Linux from windows using a container

tranquil aurora
#

Is there a spigotmc API to check if a user brought a plugin?

vernal spruce
#

@sturdy oar noice drawing skills m8

#

Bit non linear but i give 8/10

umbral dirge
#

Im having a Coin System, and is there a way how to get a list from the top 10 richest players?

grim halo
#

@umbral dirge Yes. But it highly depends on your implementation.
Do you use mysql or mongodb for storage?

umbral dirge
#

mysql

#

jdbc thing

grim halo
#

Then you can simply use a query to only get X entries with the highest value in one property.

umbral dirge
#

How?

alpine kiln
#

select * from {table} order by coins limit 10

grim halo
#

For example SELECT TOP 3 * FROM CoinHolders

umbral dirge
#

oh ok

#

How do i make them to a like arraylist

alpine kiln
#

iterate over the resultset and add it to the arraylist

umbral dirge
#

resultset.next()?

alpine kiln
#
ResultSet rs = query;
while (rs.next()) {
    ...
}
umbral dirge
#

oh k

grim halo
#

Harry your first query will order the whole table... this will take a time if he has a lot of entries.
I think a TOP call is better here.

blazing burrow
#

Uh how would i get the display name for a material?

alpine kiln
#

didn't even know top was a thing in mysql tbh

hollow thorn
#

how do i set the max value for a bossbar

blazing burrow
#

Like i dont want it to say "You need to find GRASS_BLOCK" in chat

#

I need it to say "You need to find a Grass Block"

alpine kiln
#

also wont you need to order the whole table, to ensure you get the top x records?

undone narwhal
#

Remove _ and make it lower case except the first char

alpine kiln
#

just having an index on the coins column in the correct order would make the order a lot faster

blazing burrow
#

@undone narwhal material only has _ and uppercase

#

Like Material. i mean

grim halo
#

That is not how you should work with localized names. You can probably do something with the namespaced key and get the name for the players language settings.

undone narwhal
#

Yes, so replace _ by a space and make it lowercase , except first case of word

alpine kiln
#

Material.GRASS_BLOCK.name().replace('_', ' ') if you want to do it that way, but yes @grim halo is right

blazing burrow
#

Ohh okay

rare prairie
#

how do i set the max value for a bossbar
wat? did you mean the progress value?

grim halo
#

The max value is always 1.0

alpine kiln
#

^ and cannot be changed

#

but it's a percentage, 1.0 could mean 10000, could mean 10

rare prairie
#

you can, between 0.0 and 1.0

alpine kiln
#

you can't change the max value tho

rare prairie
#

bossbar progress value?

alpine kiln
#

assuming that's what you/they are referring to, yes

blazing burrow
#

so what does NamespacedKey.minecraft(exampleMaterial.name()); do

bold anchor
#

Adds minecraft infront of it

umbral dirge
#

how do i loop through the hashmap now? public static HashMap<String, Long> top10 = new HashMap<>();

grim halo
#

It creates a NamespacedKey minecraft:name

blazing burrow
#

Bruh okay

#

Oh

bold anchor
#

Get the entryset,keyset or valueset @umbral dirge

umbral dirge
#

for(int i = 0; i < CoinsDB.top10.size(); i++) { p.sendMessage("§8● §3§lSkyU §8» §7" + CoinsDB.top10. + " Coins§8: §7"); }

blazing burrow
#

Ive yet to figure out how to work with namespacedkeys

grim halo
#

@umbral dirge You should generally not hava a public static datastructure. But the simplest way would be iterating the keySet.

bold anchor
#

He probably want the entryset too

#

Cause, he wants name and value

#

prolly

#

idk i'm guessing.

umbral dirge
#

I wanna get the value from the first

#

so its like

#

top10.get(1)

grim halo
#

@blazing burrow namespacedkeys are just keys. You need the right environment to get the values you want.

#

@umbral dirge A HashMap does not provide ordering. The elements in there are randomly arranged.

umbral dirge
#

What bout a Map

blazing burrow
#

Oh damn okay

undone narwhal
#

You need to order all your element

bold anchor
#

Use a LinkedHashMap i suppose

undone narwhal
#

Compare then or use a LinkedHashMap

grim halo
#

A Map is just a generalisation of HashMap

bold anchor
#

A Map is the interface HashMap is implementing.

sturdy oar
#

I usually don't like using Map

umbral dirge
#

uh

grim halo
#

LinkedHashMap would be a solution but i think this is a xy problem.
You rarely want ordering from a map.

umbral dirge
#

i want it so top 10 coins

#

Oh wai-

#

im so dumb

#

why cant i just

sturdy oar
#

Yes

umbral dirge
#

...

#

sorry

#

for wasting ur time

hollow thorn
#

how do i set the max value of a bossbar

umbral dirge
#

?

hollow thorn
#

with a bossbar you can set the maximum value of it

undone narwhal
#

Mac value is 1

formal nimbus
#

yo

#

so awhile a go it was recommended to me that I should make all my variables private, which I've now done

#

and use a getter

#

the reason for this given to me was that it stops the value being changed when it shouldn't be (by other programmes)

#

but private doesn't stop that right as you can still use reflection?

#

surely just using public final is fine

peak marten
#

final is fine. But that means that once a value is assigned once

#

And the value can be set either directly, or through the constructor

copper star
#

How would I replace a string with a list from the config

peak marten
#

What do you mean?

#

@copper star

copper star
#

I know .replaceAll()

#

with .contains()

peak marten
#

I don't understand your usecase

copper star
#

I am making a plugin that blocks words

#

Wait I can use a for loop

sturdy oar
#

?

#

Use regex?

lofty meadow
#

Hello! How to get item slot in a player inventory?

sturdy oar
#

Get the player's inventory

lofty meadow
#

Then?

sturdy oar
#

getItem(index)

#

I guess

lofty meadow
#

Ahh

sturdy oar
lofty meadow
#

Okay

#

Thanks

frigid ember
#

Im trying to make everyone have perms for "moar bows" plugin can anyone help me ?

lunar widget
#

how to change a player skin?

rare prairie
#

gameprofile, getproperties

lunar widget
#

I don't understand

lime crater
#

Hi. Is there any reason why this wouldn't register as proper recipe?

        ItemStack egg = new ItemStack(Material.EGG);
        ItemMeta eggIm = egg.getItemMeta();
        eggIm.setDisplayName("Epic Egg");
        ItemStack eggHelmet = new ItemStack(Material.GOLDEN_HELMET);
        ItemMeta eggHelmetIm = eggHelmet.getItemMeta();
        eggHelmetIm.setDisplayName("Hard Helmet");

        ShapedRecipe recipe = new ShapedRecipe(eggHelmet);
        recipe.shape("EEE","EAE","EEE");
        recipe.setIngredient('*', egg);
        recipe.setIngredient('B', Material.AIR);
        getServer().addRecipe(recipe);```
#

(Trying to use ItemMeta so only a certain named item can be used to craft)

lunar widget
#

change setIngredient to "E" or "A"

lime crater
#

bah

lunar widget
#

idk

lime crater
#

I'm so stupid lol.

#

Changed the keys, not in ingrediens.

jaunty gazelle
#

if you use the setIngredient function u gotta use them in your shape

#

okay

lunar widget
#

yeah that

lime crater
rare prairie
#

take a look at docs

lunar widget
#

how to change a players skin

#

😩

lime crater
#

take a look at docs
@rare prairie Sure, I've tried, mind pointing me somewhere? Kind of why I came here.

frigid ember
#

Does anyone know moar bows plugin?

#

If yes i need help with perms

#

Only ops can shoot bows but normal players cant

rare prairie
#

@lime crater so use new ShapedRecipe(eggHelmet.getType().getKey(), eggHelmet);

#

Does anyone know moar bows plugin?
better to ask the developer of that plugin

odd knoll
#

No idea if this is possible so, with tab completion, can you add a command to it that isn't defined in the plugin.yml / isn't under another command's aliases.

rare prairie
#

yes, you can

odd knoll
#

Know where I can find a guide?

#

Oh wait, think I see how. getCompletions is mutable on TabCompleteEvent.

lime crater
#

@lime crater so use new ShapedRecipe(eggHelmet.getType(), eggHelmet);
@rare prairie It says required type NamespacedKey, not Material.

#

Discord is dying again great

rare prairie
#

yep, .getType().getKey()

wise spoke
#

i am using multiverse and i was wondering what the command is to only have certain mobs spawn? such as onyl endermen and endermite

rare prairie
#

you can't, you can only setup that the mobs can spawn in worlds, you can find a plugin for that

lime crater
#

ah that appears to be working. I'm still not quite sure about the setIngredient though

rare prairie
#

@lime crater

lime crater
#

java.lang.IllegalStateException: Duplicate recipe ignored with ID minecraft:golden_helmet

#
        ItemStack egg = new ItemStack(Material.EGG);
        ItemMeta eggIm = egg.getItemMeta();
        eggIm.setDisplayName("Epic Egg");
        ItemStack eggHelmet = new ItemStack(Material.GOLDEN_HELMET);
        ItemMeta eggHelmetIm = eggHelmet.getItemMeta();
        eggHelmetIm.setDisplayName("Hard Helmet");

        ShapedRecipe recipe = new ShapedRecipe(eggHelmet.getType().getKey(), eggHelmet);
        recipe.shape("EEE","EAE","AAA");
        recipe.setIngredient('E', egg.getType());
        recipe.setIngredient('A', Material.AIR);
        getServer().addRecipe(recipe);```
All I have, I genuinely don't see how it's a duplicate recipe
hollow thorn
#

how do i use subtitles

#

as in the /title subtitles

rare prairie
#

@lime crater

lime crater
#

ah because it's already defined in the game.

#

I see

echo path
#

i have made a plugin using spigot but when i use it in my server it says in the logs that it has not specified API verson pls help

rare prairie
#

it describes, add api-version to your plugin.yml

echo path
#

oh ok so i cn add
api-version: 1.0
is that right?

rare prairie
#

no

#

1.13

echo path
#

ok ty for help

lime crater
#

Is this just a list of recipes that clears?

rare prairie
#

the list of added recipes

hollow thorn
#

how do i make a bossbar compass

rare prairie
#

use google

hollow thorn
#

i can only find plugin names

mellow wave
#
  1. Create a bossbar
  2. Check the direction of the player
  3. Convert the direction in to a suitable compass string
  4. Set the bossbar name to that string
  5. Repeat

@hollow thorn

sturdy oar
#

Yeah it takes like 5m to do that

mellow wave
#

^

sturdy oar
#

It's super simple

#

You just need to check the YAW of the player and have a static method that produces a string based on that number

#

I recommend to round the values

#

to integer

frigid ember
sturdy oar
#

?

frigid ember
#

click the link ;-;

sturdy oar
#

You have LuckPerms?

frigid ember
#

Im just having a survival server with friends

#

why I need that

#

dont I need just to go to config and put perms?

sturdy oar
#

To Manage permissions?

frigid ember
#

so everyone can use

sturdy oar
#

LuckPerms is a permission manager

marsh hawk
#

Is there any good ways to utilise redis pubsub to have a response/acknowledge system

frigid ember
#

http://prntscr.com/tttqeq well check this link so u can see where I put perms so people can use it u can see what wrongs did I do

sturdy oar
#

You either use the permissions.yml file in the server or you use LuckPerms to give permissions to someone.

#

I can't help any further

frigid ember
#

okay thanks

light stone
#

I'm trying to launch a boat with a player inside in the air, but it only works with boats with no players inside. I've tried setting the Motion with commands (this actually sometimes worked) and setting the velocity with setVelocity(). Any idea how I could achieve my goal?

frigid ember
#

Well what are good survival plugins im on aternos and im struggling to find some

#

its just survival with plugins btw so dont put any LuckPerms,essentials/etc

sinful spire
#

uh SmoothTimber?

frigid ember
#

anyone know why this happens ? 4.08 08:37:57 [Server] ERROR Cannot execute command 'msg' in plugin ChatManager v3.6.5 - plugin is disabled. 04.08 08:37:57 [Server] INFO org.bukkit.command.CommandException: Cannot execute command 'msg' in plugin ChatManager v3.6.5 - plugin is disabled.

mellow wave
#

Plugin is disabled

frigid ember
#

@sinful spire any others?

#

do i just remove the plugin

mellow wave
#

That or find why it's disabled

river cradle
#

Could it be that Bukkit.getWorld(String name) returns null inside JavaPlugin#onEnable() and that I have to schedule it as a task, or is something else wrong?

mellow wave
#

Make sure your plugin loads post world

#

(Loads after the worlds) or it may be null

jagged torrent
#

plugins load by default POSTWORLD unless you added load to your plugin.yml

river cradle
#

Ahh that makes sense

#

Thank you so much!

frigid ember
#

Any good survival plugins? its just a survival server with few friends im on aternos btw

hollow thorn
#

whats the name of the event for opening the inventory

#

Any good survival plugins? its just a survival server with few friends im on aternos btw
@frigid ember slimefun

ancient ridge
frigid ember
#

What are some minigame server plugins I'm gonna need?

mellow wave
#

Grab a permission plugin like LuckPerms

river cradle
#

^^

frigid ember
#

Ok

mellow wave
#

Other than that it depends

frigid ember
#

I also need citizens npcs that stand still so when they click one it tps them to the game

dry horizon
#

how can i change the player name tag in 1.16.1

bold anchor
#

Just get citizens

mellow wave
#

You making a plugin or looking for one? @dry horizon

dry horizon
#

making one

sturdy oar
#

NMS

dry horizon
#

yes how

jagged torrent
#

scoreboards

dry horizon
#

btw i just want to change the color

mellow wave
#

Scoreboards then

dry horizon
#

teams, right?

mellow wave
#

Yeah

sturdy oar
#

I honestly just edit clientbound packets but whatever

dry horizon
#

aight

frigid ember
#

Any good survival plugins that I can use with my friends on 1.16.1? Im on aternos

mellow wave
#

No need to ask every 5 minutes

#

Anyway if it's just for your friends you don't need any

sturdy oar
#

Aternos is so bad

frigid ember
#

yeah I know

#

Which other server should I use then @sturdy oar ?

sturdy oar
#

I usually just buy shared hosting

#

You can get a 3GB server for 92$ a year on MelonCube

frigid ember
#

well what bout free ones?

sturdy oar
#

😂 😂 😂

frigid ember
#

xd

sturdy oar
#

free = 💩 ,
No one will keep a computer running 24/7 for you for free

frigid ember
#

who says I want 24/7?

#

should I use minehut over aternos?

tiny dagger
#

free < your pc

#

actually better

#

free < any pc even old ones

dry horizon
#

i use an RDP

#

24/7 hosting on PC for free

sturdy oar
#

A raspberry PI is better than free hosting

hollow thorn
#

does /n work in lore

tiny dagger
#

no

hollow thorn
#

free < any pc even old ones
@tiny dagger unless if you want it up all the time

tiny dagger
#

aren't host incredibly cheap nowdays anyway?

sturdy oar
#

Yes

#

You can get a 3GB server for 92$ a year on MelonCube
@sturdy oar ^

light stone
#

How can I send a custom packet?

sturdy oar
#

Custom packet?

#

You need to respect the protocol

#

Define "Custom packet"

light stone
#

A packet which has the payload I want.

sturdy oar
#

You need to import NMS

#

And get the playerConnection

echo path
#

@rare prairie hey can i add the api version under the normal plugin version?(in plugin.yml)

grim halo
#

the client listens only to certain channels and throws away packets that are not valid to it,

sturdy oar
#

((CraftPlayer) player).getHandle().playerConnection.sendPacket(packet )

#

I think

bold anchor
#

Only thing that needs to be imported there is CraftPlayer

grim halo
frigid ember
sturdy oar
#

?paste

worldly heathBOT
echo path
#

thanks and which api-version should i use for a 1.16.1 plugin?

sturdy oar
#

'1.16'

echo path
#

👍

grim halo
#

@frigid ember You need to properly parse your command input to numbers.

sturdy oar
#

if you want to support older versions put '1.13'

grim halo
#

if you do this:
Integer.parseInt("Hi");
You get a NumberFormatException

formal nimbus
#

does ItemStack.isSimilar() check the stack size?

grim halo
#

@formal nimbus No

sturdy oar
#

N o

formal nimbus
#

;-;

#

ooom watcha sayyyyy

#

how to check?

grim halo
#

Its basically equals without respecting stack size

sand osprey
#

when PlayerKits will run on 1.16.1?

formal nimbus
#

o

#

so can I just use = ?

grim halo
#

just like you would nromally do... with .equals()

formal nimbus
#

ah

#

I see

#

t h a n k

grim halo
#

== would compare instances and this will not work in most cases

sturdy oar
#

(yourCount == expectedCount && isSimilar)

#

Idk

formal nimbus
#

nah nah, .equals() is where it's at

frigid ember
#

why wont salary manager work?

#

on 1.16

grim halo
#

Ask the dev

frigid ember
#

?

#

it doesnt create the file with theconfig etc

grim halo
#

Ask the developer of the plugin for help

frigid ember
#

who is it

sturdy oar
#

Bill Gates

grim halo
#

No idea. Read it on the plugin page.

frigid ember
#

ok

#

how do i message him

grim halo
#

Its actually drives_a_ford

#

he is in here surely likes to get pinged

#

Just ping him and tell him that his plugin doesnt work because he doesnt know how spigot works

frigid ember
#

?

grim halo
#

with "@"

sturdy oar
#

Leave 1 star review:
"Plugin sucks uninstalling xd1!1!1!1!11!1!"

ancient ridge
#

no just post entire server log in review

grim halo
#

And post an error log from another unrelated plugin below that

sturdy oar
#

Yes much better, also advertise something in the bottom

sinful spire
#

post a 1 star review with "." and "my plugin is better, this sux"

grim halo
sinful spire
#

is that ShaneBee?

#

i remember that profile pic

ancient ridge
#

Yes

sturdy oar
sinful spire
#

hm

#

i wonder if they own that

sturdy oar
#

😂

ancient ridge
#

lagpixel

sturdy oar
#

I own cloudflare Minecraft server

sinful spire
ancient ridge
#

also that review should be removed

#

they are bypassing the minimum character limit

sturdy oar
#

Come join

frigid ember
#

I tried slimefun

#

this happened

#

im on spigot-aternos

sturdy oar
#

Wasn't slime fun the meme plugin

#

For having the worst code on spigot

frigid ember
#

idk

#

so cant use spigot huh?

sturdy oar
#

???

sinful spire
#

u running offline-mode?

frigid ember
#

do I need premium to use modpacks on aternos?

silver pewter
#

Hello, is anyone good with database and can explain why I am getting this error thanks

frigid ember
#

i need a help, on 1.12.2 spigot when im entering mesa biome server automatically crash so i stuck and i cant do nothing about it.

silver pewter
#

com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: No operations allowed after connection closed.

sturdy oar
#

Connection is closed

silver pewter
#

I ain't closing the connection tho?

sturdy oar
#

Someone is using closed connection

frigid ember
#

@sturdy oar idk do you know but do modpacks work on aternos without premium?

sturdy oar
#

No

#

I don't use aternos

silver pewter
#

It's after a result set

sturdy oar
#

Get a real server

frigid ember
#

then why the fuck they put modpacks there

sinful spire
#

u cant use spigot and forge on aternos

frigid ember
#

waht about magma/fabric?

balmy sentinel
#

?paste

worldly heathBOT
balmy sentinel
#

@silver pewter post your code

sinful spire
#

fabric is 1.14.4 and mods only

grim halo
#

@silver pewter Use something like hikaricp to manage your connections

frigid ember
#

and magma?

sinful spire
#

magma is kind of weird

#

but u cant use custom jars on aternos

#

so

#

magma is probably the only option

silver pewter
sinful spire
#

because CatServer seems better

silver pewter
#

No I'm using mysql

sturdy oar
#

Or Sponge server

serene escarp
#

Ok, so I downloaded the BuildTools for 1.16, but how do I get it to appear as an option when creating a new project on IntelliJ IDEA?

sturdy oar
#

???

silver pewter
#

I've never used databases with java before so I'm like idk lol

serene escarp
#

Like, for compiling as a plugin

sturdy oar
#

Do you need the spigot API?

sinful spire
#

Or Sponge server
@sturdy oar dont sponge is like the weird brother of spigot

serene escarp
#

I do @sturdy oar

silver pewter
worldly heathBOT
balmy sentinel
#

@silver pewter Close the statement and result set after using them in your methods. Also post your full class and the full error.

silver pewter
balmy sentinel
#

where is line 70

silver pewter
#

Statement statement = plugin.getDatabaseManager().getConnection().createStatement();

grim halo
#

Thats why i told you to use hikaricp. You are trying to prepare a statement on a closed connection...

bold anchor
grim halo
#

Im assuming you only manage one connection right?

balmy sentinel
#

that’s what it looked like

silver pewter
#

Yeah one connection

#

I know databases when it comes to website development lol

grim halo
#

Ok and in the addAllRewards methods. Where do you open the connection?

silver pewter
#

onEnable

grim halo
#

Wait... you open one connection in the onEnable and then try to keep it open untill the server closes?

silver pewter
#

Yeah

bold anchor
silver pewter
#

Should only be opened when I need to use it then?

grim halo
#

Normally you would have a connection pool that just handles all of that boilerplate for you. You simply just tell it "give me a connection"
and then forget about it.

silver pewter
#

aha okay

#

Thanks for works lol thanks for the support

serene escarp
#

Figured it out, tyvm

grim halo
#

Yes. Write code and the output jar will differ

#

add
volatile static int X = 100;
And your output jar will differ

balmy sentinel
#

are you talking about changing the location of the output jar or the output jar itself?

grim halo
#

Oh. Thats another story. The output directory. Do you use maven?

#

Ok then there are multiple ways. The simplest one:

<build>
  <directory>my_new_build_path</directory>
</build>
#

Or if you use the maven jar plugin

        <build>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-jar-plugin</artifactId>
                    <version>2.3.1</version>
                    <configuration>
                        <outputDirectory>${dir}</outputDirectory>
                    </configuration>
                </plugin>
            </plugins>
        </build>
frigid ember
#

I fixed it

#

ty tho

frigid ember
hollow thorn
#

how do i use the Recipe.setGroup()?

mellow wave
frigid ember
#

help

#

i am dying

mellow wave
#

hm?

frigid ember
#

boss shop pro 1.16.1

mellow wave
#

You don't have vault

frigid ember
#

?

mellow wave
#

Vault plugin is a dependency for bossshop to work with economy plugins

#

To fix that install Vault

grim halo
#

but shouldnt spigot throw a "unknown dependency" at you first?

mellow wave
#

I guess someone forgot to add it as a dependency in the plugin.yml

#

That's what I can think of :/

#

Or maybe there's something else named Vault

hollow thorn
mellow wave
#

Read what it says

#

It explains what the method does

frigid ember
#

also how do i set the bal for some1

candid wyvern
#

Anyone know how to setblock a spawner with a custom entity

frigid ember
#

essentials

rare prairie
#

/eco

mellow wave
#

/eco set <player> 1

#

I believe that's correct

rare prairie
#

/eco give

#

take

frigid ember
#

ok

mellow wave
#

@candid wyvern Vanilla or with a plugin?

candid wyvern
#

plugin

grim halo
#

@candid wyvern Get the BlockState -> cast to CreatureSpawner -> CreatureSpawner#setSpawnedType​(EntityType creatureType)

mellow wave
#

^ Or use NMS for more options when setting the entity

grim halo
#

Yes if you want it to spawn custom stuff then you need to use NMS

frigid ember
#

for some reason I cant install forge

grim halo
#

btw why isnt there an api for that?

mellow wave
#

idk

#

pr time maybe...

grim halo
#

@frigid ember Ask for help in the forge forum/discord

frigid ember
#

okay

hollow thorn
#

Read what it says
@mellow wave so how do i know the different names for the groups

#

do i just write Redstone?

mellow wave
#
  1. Take a vanilla recipe
  2. get the group from it
  3. print the name
  4. Profit
#

Now it isn't too hard to figure out

echo path
#

whats the code to enter the api version again in plugins.yml

vernal spruce
#

api-version

ancient ridge
#

api-version: 'whatever'

vernal spruce
#

Kinda ironic btw..

grim halo
hollow thorn
#
  1. Take a vanilla recipe
  2. get the group from it
  3. print the name
  4. Profit
    @mellow wave how do i get vannila recipe
mellow wave
#

...

#

Stop pinging me and use the javadocs I sent

#

There's a search bar you can look around

frigid ember
#

hey Olivo 😊

mellow wave
#

oh hi

hollow thorn
#

Stop pinging me and use the javadocs I sent
@(you get the idea) sorry cant find anything

mellow wave
#

It's a list get one of the entries

#

@hollow thorn

past basalt
#

guys help, whenever i join my server it kicks me for the reason "Connection lost to the proxy"

mellow wave
#

Is the connection to the proxy stable?

frigid ember
#

That means you have bad internet basically

mellow wave
#

^

past basalt
#

how i was connected to a localhosted server earlier and it was okay

#

now when i connect to the network it kicks me

#

"[Proxy] Lost connection to the server"

frigid ember
#

just because it was ok before doesn’t mean it’ll always be ok :/

mellow wave
#

There are many reasons why that error can happen

formal nimbus
#

hmm

#

I have a question

#

so look at dis code here right

#

I plan to make only one instance of Tracker

#

in my main

#

however

mellow wave
#

so you want a singleton class

formal nimbus
#

I only want one copy of forwardArrow

#

and backArrow

#

singleton class?

mellow wave
#

Basicly there is only going to be one instance of that class at all times

formal nimbus
#

yes

#

what I've done at the moment is instantiate it on onEnable()

#

then make a getter

#

which all the other classes can use

#

then at the start of each class I'll have

#

Tracker tracker = myMainClass.getInstance().getTracker();

#

so how do I make a singleton class?

wispy pewter
#

Easy

mellow wave
#

So what you need to do is set the constructor to private

formal nimbus
#

uh huh

past basalt
#

@mellow wave @frigid ember my connection is ok, when i join the server it kicks me right away after 2 secs

wispy pewter
#

just make a private variable which is the instance and then create a method that checks for the instance

#

if its null then create a new instance and return it

candid wyvern
#

So, I am trying to give this ArmorStand something in its helmet slot for the spawner, but the setSpawnedType method only takes an EntityType which is an Enum

#

spawner.setSpawnedType(EntityType.ARMOR_STAND);

mellow wave
#

Create the instance staticly instead

frigid ember
#

@past basalt then it just might be a server problem

formal nimbus
#

.................

#

soooo

#

if we were using the tracker example

#

I would have

frigid ember
#

does it happen to any other servers)

mellow wave
#

static {
instance = new <InsertClassHere>
}

frigid ember
#

yo, what's the order of operator precedence?

wispy pewter
#
private static Class1 _instance;

public static Class1 getInstance() {
     if(_instance == null)
         _instance = new Class1();
     return _instance;
}
mellow wave
#

Yeah that works too

wispy pewter
#

@formal nimbus

formal nimbus
#

right

#

which one is better?

wispy pewter
#

I recommend mine

#

since the user has no direct access to the instance Field