#help-development

1 messages · Page 1599 of 1

novel shuttle
#

Can anyone help me, I have the id of an item, for example Jungle Sapling which is 6:3, how can I make this id into an item in minecraft with my plugin?

royal garden
#

@torn shuttle tysm! are there any starter projects you'd recommend?

torn shuttle
#

hm

#

honestly it's down to your own personal interest and what you want to do with spigot

#

I'd recommend not starting with modifying chunks

#

and not starting with nms

#

stick to the api and maybe stick to doing something with players

#

my first plugin was a recreation of the just cause 3 grappling hook mechanic and retroactively I think it was a pretty good point to start at

blazing lintel
#

if you know java it should not be too hard

crude cedar
#

?

torn shuttle
#

the wiki also has some sample plugins if you want some real basic examples to follow

dire marsh
#

that will make 16 default

crude cedar
#

what's JavaSoft registry keys?

dire marsh
#

I've not used those, not sure what they're for

crude cedar
#

mk

willow oar
#

if(block.getBlockData().getMaterial() == Material.SPRUCE_DOOR && itemInHand.getType() == Material.STICK && itemInHand.getItemMeta().getDisplayName().contains("Lockpick") && player.isSneaking() == true) { ItemStack lockpick = player.getInventory().getItemInHand(); lockpick.setAmount(lockpick.getAmount()-1); Random r = new Random(); player.getInventory().setItemInMainHand(lockpick); int precent = r.nextInt(100); if(precent > 29) { player.sendMessage(ChatColor.RED + "Lockpicking didn't work. Your lockpick broke."); return; } block.setType(Material.AIR, true); player.sendMessage(ChatColor.GREEN + "Lockpicking worked! Door has been destroyed."); return;
does anyone know why if I have only 1 stick the door breaks in half?

chrome beacon
eternal oxide
#

cast block to Bisected

#

I think

#

then you can get top and bottom

crude cedar
#

sorry to interrupt but q question:

how can I put more than 1 GB into my test server if needed?

@echo off title Server Console java -Xmx1G -jar testserver.jar PAUSE

is the code

#

would i just change the -Xmx1G to like -Xmx3G or so...?

chrome beacon
#

Yeah

#

Oh and Aikars flags are recommended

#

?flags

undone axleBOT
crude cedar
#

??

paper viper
#

JVM arguments

#

Add those flags to your command

crude cedar
#

where...?

paper viper
#

Makes your server run more efficiently

#

After the -Xmx

#

Part

opal juniper
chrome beacon
crude cedar
#

@echo off title Server Console java -Xmx1G -XX:+UseG1GC -XX:+ParallelRefProcEnabled -XX:MaxGCPauseMillis=200 -XX:+UnlockExperimentalVMOptions -XX:+DisableExplicitGC -XX:+AlwaysPreTouch -XX:G1NewSizePercent=30 -XX:G1MaxNewSizePercent=40 -XX:G1HeapRegionSize=8M -XX:G1ReservePercent=20 -XX:G1HeapWastePercent=5 -XX:G1MixedGCCountTarget=4 -XX:InitiatingHeapOccupancyPercent=15 -XX:G1MixedGCLiveThresholdPercent=90 -XX:G1RSetUpdatingPauseTimePercent=5 -XX:SurvivorRatio=32 -XX:+PerfDisableSharedMem -XX:MaxTenuringThreshold=1 -Dusing.aikars.flags=https://mcflags.emc.gs -Daikars.new.flags=true -jar paperclip.jar nogui -jar testserver.jar PAUSE

so like this?

opal juniper
#

Yeah ig

willow oar
chrome beacon
#

Then get top and bottom and set to air

deft spire
#

Hi, I am facing a dilemma which im unsure about how i can fix it properly.

I have a (part) of a plugin which functions like a tinkers' tool, there is a modifier which auto-repairs on a async timer (it needs the itemmeta to add durability (this becomes important)).
Meanwhile when you perform an action you will get experience on the tool and eventually level-up (gets stored in a namespacekey (also in the itemmeta)).
This will on rare occasion result on the itemmeta being written to at the same time and somehow corrupt (i assume) it that it looses enchantments/lore/displayname (not all the time, sometimes partially).

I had this idea to make some sort of event queue where every action needed is done one after another per tool, but the part i am unsure about is how to 'save' the tool (which keeps being used and thus changes).

Is there any way of achieving the above or make it like only 1 source may edit the itemmeta at a time?

chrome beacon
#

Don't modify world or player data async

#

Your auto repair needs to be done sync

deft spire
#

But will that fix the issue, the repair is on a timer but the exp gain is immediate as the action is performed?

chrome beacon
#

If it's sync multiple things can't happen at once

#

And you won't have issues with corruption

upper skiff
#

can somebody help me? I don't know what this is and I can't get rid of it

near crypt
#

I have a question that I'm interested in so how do you guys learn java (with yt tutorials, books etc.)?

eternal oxide
#

?learnjava

undone axleBOT
near crypt
#

Or in general start with coding

eternal oxide
#

Punch cards, then manual mnemonic to hex conversion by hand for Z80 asm

near crypt
eternal oxide
#

no, thats how I started

dense goblet
#

Step 1. Learn C#
Step 2. Code in Java

eternal oxide
#

but that was 40 years ago

near crypt
lusty cipher
near crypt
#

ik

dense goblet
#

Learn programming concepts in general, especially data structures and some simple algorithms

near crypt
eternal oxide
#

learn OOP before diving deep into any language

near crypt
#

Yeah true

near crypt
lusty cipher
near crypt
#

You first have to get a brief look into how coding in general works

eternal oxide
#

ThinMatrix on YT is a good channel to learn basic java

granite stirrup
near crypt
granite stirrup
#

I actually self learned a little

lusty cipher
#

I never specifically learned java tbf, I just used my JavaScript and C++ knowledge to just go ahead and write stuff. That's also the reason why it was so terrible code back then

granite stirrup
#

By play testing

#

Xd not the best way but I did sometimes

near crypt
#

Do you guys know Alex lee? in my opinion he's making the best tutorials on java ever

granite stirrup
#

Idk I'm pretty average at java

#

I learned a little bit of lwjgl but all I can do is make a window with a background color of choice

near crypt
#

Who codes in intellij: 1
Eclipse: 2

#

1

eternal oxide
#

2

near crypt
#

Why? @eternal oxide

lusty cipher
#

I used Eclipse in 2019 and honestly, the experience with IDEA has been so much better for me.

eternal oxide
#

I started with Eclipse, its free, and I like an IDE that lets me do what I want without nagging me. I also find it light weight and easy on memory

lusty cipher
#

Especially I remember trying to import and configure dependency JARs and I was so lost doing that. And nowadays I just use Gradle and reload the project and 🎉. So much cleaner, but I guess that's not specifically a point for Eclipse/IDEA.

near crypt
#

Switch to intellij was the best decision in my life just the fact that it's looking so cool especially with material theme UI

eternal oxide
#

no its not

near crypt
#

It is

#

Bruh

lusty cipher
#

Ultimate is paid, the Community Edition is free

near crypt
#

The community edition works for almost everyone perfectly fine

granite stirrup
#

just submitted a define for deskist

lusty cipher
#

Ultimate only gives you useless stuff like JavaScript support lol

#

And for JavaScript, just use VSCode or Atom

granite stirrup
#

now waiting for it to get accepted

eternal oxide
#

I have Eclipse with DevStyle for Themes and its great.

lusty cipher
#

how does that look like?

#

I only know the default look

eternal oxide
#

Themes

lusty cipher
#

eh, that looks better than the default theme but not that good imo

#

this still looks quite a bit better imo.

eternal oxide
#

Not really anythign in it

manic bison
#

Hey, i'm having a problem with my code

I'm trying to do so everytime someone mines granite, it would give
50/100 chance of dropping coal
40/100 for iron
10/100 for diamond

but on my server, this code doesnt work and gives me coal, iron, and diamond at the same time

code :

eternal oxide
#

other than my text is larger as my eyes are older

lusty cipher
#

text is probably the same, my monitor is just quite large

manic bison
novel shuttle
#

I have this yml file, how can I make it so that when the player clicks the slot defined in the file it does something?

#

'0':
name: Maçã
slot: 10
price: 10000
id: 260

eternal oxide
#

2560x1440

eternal oxide
manic bison
#

oh

#

i'll test it, thanks

granite stirrup
#

can you cast a object back to its original class without having to make a massive switch statement and check manually

lusty cipher
#

you could track the Class<?> somehow, but otherwise no?

granite stirrup
#

i guess i could add the class to a hashmap

wooden geode
#

Does anyone know how to get a player head as a falling block?

granite stirrup
#

i was kinda looking for a way to do it without tho

lusty cipher
#

I don't think there is another way

#

and it's Class<?>#cast btw

#

fairly simple

granite stirrup
#

i need the original class and not the one extending or the method im calling isnt gonna be the method of that original class

unreal quartz
#

huh

#

by "original class" do you mean the super class

granite stirrup
#

like BClass extends AClass i want to get the original class which is BClass but i have a AClass

lusty cipher
#

wth are you trying to do

unreal quartz
#

^

wooden geode
#

Are skulls blocks? Because they cant be falling blocks

granite stirrup
#

idk but all i got is a thing that implements a interface and i put it in a hashmap of that interface but now i cant get the actual class out of it

unreal quartz
#

cast it?

granite stirrup
#

i dont know the original class

ivory sleet
#

Sounds like a bad design

lusty cipher
#

I really don't quite understand why, but probably adding a Class somewhere would help.

#

but yes ^

unreal quartz
#

oh i see, are you trying to access a method in the subclass?

granite stirrup
#

also how do you convert a List<String> to a String[] lmao

ivory sleet
#

toArray iirc

granite stirrup
#

didnt work

#

still red underline

lusty cipher
#

🤔

#

just check what type you have and what the function (or whatever) wants

unreal quartz
#

did you cast it to String[]

ivory sleet
#

E[] arr = collection.toArray(new E[0]);

#

Or smtng but that’s pretty much a google question

granite stirrup
#

i guess i just have to do thing with all the classes

#

so i can get the class

unreal quartz
#

you still haven't really said what you're trying to do

upper skiff
#

can someone please help me? I don't know what this is

ivory sleet
#

Your error covers the code

#

I would suggest showing the code also. (;

upper skiff
ivory sleet
#

And where does the error come from?

#

Doesn’t seem to be existing in that picture if yours

upper skiff
#

from package

ivory sleet
#

Send entire class

#

Also is the class in the right package?

unreal quartz
#

it looks like your ide has forgotten the jdk exists lol

upper skiff
#

this is the entire class

unreal quartz
# upper skiff

do you even have the jdk present in your project? it looks like it cant fin dit

upper skiff
#

idk im very new to making plugins is it this?

unreal quartz
#

i dont use eclipse but you should see the jdk somewhere as a library

upper skiff
#

then it must be tis one

granite stirrup
#

do you know how to stop mc launcher from corrupting

unreal quartz
#

i have no idea then, try rebuilding your project or reimporting it or clearing the cache

upper skiff
#

ok i will try

#

if I delete import org.bukkit.inventory.ItemStack; or import org.bukkit.Material; then the problem goes away

#

but I need both

unreal quartz
#

yeah becauise i assume ItemStack uses java.util.Map

#

but your ide can't detect the jdk for some reason

fluid cypress
#

is there any way i can debug a plugin with intellij? or keep track of something while playing? or something, idk, i literally have no idea whats happening with an inventory im using as gui, an item is being removed, always the same, for some reason, in the slot 9, but instead of setting the slot 9 as null, the rest of the array is shifted down, making the last index to be null

unreal quartz
#

there is some guide somewhere to set up some level of debugging, though you can't use breakpoints for more than like 30 seconds otherwise the client times out

fluid cypress
#

setting a breakpoint can corrupt a world or something? or is it safe

eternal oxide
upper skiff
#

Eclipse

fluid cypress
eternal oxide
#

goto Help -> about and show me that window

upper skiff
eternal oxide
#

What JDK do you have installed?

upper skiff
#

i think 16

unreal quartz
eternal oxide
#

go to Window -> Preferences, then Java and expand it to select Installed JRE's

fluid cypress
#

is there a mod for specifically that?

eternal oxide
#

and is it a JRE or JDK?

unreal quartz
#

i have no idea, but you will also need to change the timeout threshold on the server, though i think tha tvalue is configurable

upper skiff
eternal oxide
#

is it Java or another brand like Adopt?

upper skiff
#

it is java

eternal oxide
#

ok, so long as its ticked, select it and press edit

upper skiff
#

done

eternal oxide
#

does it have a JRE home and JRE name filled in?

upper skiff
#

yes it does

eternal oxide
#

um, then it should be working

haughty kayak
#

how can I remove everything from the end?
I want to make a void world on the end dimension

eternal oxide
#

You could try Project menu -> clean

haughty kayak
#

whats this?

eternal oxide
#

wasn;t to you, sorry

haughty kayak
#

oh ok np

upper skiff
granite stirrup
eternal oxide
#

My only suggestion at this point is delete your Eclipse and install fresh

granite stirrup
#

gives me a null pointer error

granite stirrup
#

tmr :)

upper skiff
ivory sleet
#

Also ftr arrays don’t extend object nor object array

#

They’re quite special

#

Or well they do extend object

#

But not Object[]

granite stirrup
#

no but .toArray gave me Object[]

ivory sleet
#

No

#

It gives you a List

granite stirrup
#

it did tho

ivory sleet
#

You’re officially lying

foggy bough
#

is ti possible to override the lines in config with different onesz and save that?

lusty cipher
#

Arrays.asList gives you a java.util.Arrays.ArrayList.

granite stirrup
#

i already have List<String> i want to convert it to String[]

ivory sleet
#

list.toArray(new String[0]);

granite stirrup
#

i will try that tmr

dusk flicker
#

dude be patient

ivory sleet
#

Yes Nerd it’s fully possible

foggy bough
manic bison
#

hey, whenever this line of code is executed, i always get n org.bukkit.EventException: null and Caused by: java.lang.NullPointerException

all these errors shows whenever i do a single player interaction.
these errors points to one of my class' line 57 which is
if(it.getType() == Material.COMPASS && it.hasItemMeta() && it.getItemMeta().hasDisplayName() && it.getItemMeta().getDisplayName().equalsIgnoreCase("§4§lMenu Admin"))

#

is there a way to ignore null whenever this line is executed ?

#

it justs floods my console

lusty cipher
#

no something is null, meaning you cant call a function on it

#

you can't just "ignore" it

manic bison
#

this line checks if i have an specific item in my inventory to do an action

#

but whenever i don't have it, it throws this error

ivory sleet
#

Extract that nasty predicate, anyways how do you know it isn’t null?

lusty cipher
#

it is probably null at the beginning.

#

I assume you're iterating over your entire inventory?

#

and if theres no item in a slot, I think that slot is then just null

#

so you have to take that into consideration

eternal oxide
#

so add to teh beginning if(it != null &&

lusty cipher
#

^

manic bison
haughty kayak
#

I'd like to make a spawn lobby on another dimension, is there a way to remove all blocks from it?

manic bison
#

do u have mutliverse

#

if so, you can with a plugin, generate a new world with just void

haughty kayak
#

but I'd like a void dimension

#

on the same world

#

so players can teleport from the lobby to the overworld

upper skiff
paper geyser
#

(above has error and code)

eternal oxide
#

Whats teh actual error?

paper geyser
#

1 sec

#

full error

eternal oxide
#

thats not the full error

#

at least 1 line above that

#

We need to see the FULL error

paper geyser
#

1 line above it is the line at the very end I just assumed it was looping sorry

eternal oxide
#

thats just a list of classes, we need teh actual error

paper geyser
#

ahhh

#

no theres way more you're right

eternal oxide
#

ok stack overflow, your spawn is a constant loop triggering more spawns

#

Because teh event is cancelable the event fires Before teh entity is actually spawned, so when you check for <4 that value never increases because yoru event never gets to end

paper geyser
#

OH

eternal oxide
#

the entity doesn;t exist in teh world until your event finishes

paper geyser
#

you're right!

#

I didn't even think of that! Thank you

warm lynx
#

Hello again
so
I did not succeed in restarting the servers because I need java 16
But I don't know how to install it
@quaint mantle how did you do?

eternal oxide
paper geyser
#

ahhh

#

I was thinking of checking before I despawn the entity

#

that should also work right?

eternal oxide
#

If you also use the spawn method with a consumer you can do any alterations to your slime before it is spawned.

paper geyser
#

ahh alright

fluid cypress
#

i cant debug the plugin, im using the 2nd method https://www.spigotmc.org/wiki/intellij-debug-your-plugin/
i get this error on the sv jvm

ERROR: JDWP Specify launch=<command line> when using onthrow or onuncaught suboption: -agentlib:jdwp=transport=dt_socket,server=n,address=DESKTOP-EPTVBLM.mshome.:5005,suspend=n,onthrow=<FQ

how i start it

& $java -agentlib:jdwp=transport=dt_socket,server=n,address=DESKTOP-EPTVBLM.mshome.:5005,suspend=n,onthrow=<FQ exception class name>,onuncaught=<y/n> -jar $server_jar --nogui

$java is just the path to a java16 installation, and $server_jar the path to the sv jar

eternal oxide
#

if you don;t want that entity to spawn you cancel the event not remove()

paper geyser
#

alright! Thank you!

warm raft
#

Is there a way to consume/don't leave behind the bucket for a recipe which takes in a water bucket?

paper geyser
#

uhhh

#

you could set the slot to air

foggy bough
#

I want to make a plugin that when you break a block the drops will be random and the number of items is also random but I don't know how to put the number of items in if I have a variable called block can someone help me? ```java
public void onBreak(BlockBreakEvent e) {
Block block = e.getBlock();
Player player = e.getPlayer();

    this.plugin.getConfig();
    
    if(!e.getBlock().getDrops().contains("COMMAND") 
            || !e.getBlock().getDrops().contains("DEAD") || 
            !e.getBlock().getDrops().contains("FIRE") 
            || !e.getBlock().getDrops().contains("WATER") || 
            !e.getBlock().getDrops().contains("LAVA")) {
        
        Material rmat = mats[ran.nextInt(mats.length)];
        int r = ran.nextInt(600)+30;
        
        while(rmat.name().contains("COMMAND") || rmat.name().contains("DEAD") 
                || rmat.name().contains("FIRE") || rmat.name().contains("WATER") 
                || rmat.name().contains("LAVA")) {
            
            rmat = mats[ran.nextInt(mats.length)];
            
        }
        
        HashMap<Material, Integer> map = new HashMap<Material, Integer>();
        this.plugin.getConfig().set("blocks", block);
        this.plugin.getConfig().set("blocks", arg1);;
        
        
    } else {
        return;
    }
    
    
}```
paper geyser
warm raft
#

so I have to listen to all the recipe events?

paper geyser
#

i mean ig? idk haha

#

shouldn't lag you if thats what you're worried about

hardy pivot
#

Its posible to set the view distance to an armor stand name?

hardy pivot
#

say that

#

xD

warm lynx
opal juniper
foggy bough
#

I want to make a plugin that when you break a block the drops will be random and the number of items is also random but I don't know how to put the number of items in if I have a variable called block can someone help me?

public void onBreak(BlockBreakEvent e) {
        Block block = e.getBlock();
        Player player = e.getPlayer();
        
        this.plugin.getConfig();
        
        if(!e.getBlock().getDrops().contains("COMMAND") 
                || !e.getBlock().getDrops().contains("DEAD") || 
                !e.getBlock().getDrops().contains("FIRE") 
                || !e.getBlock().getDrops().contains("WATER") || 
                !e.getBlock().getDrops().contains("LAVA")) {
            
            Material rmat = mats[ran.nextInt(mats.length)];
            int r = ran.nextInt(600)+30;
            
            while(rmat.name().contains("COMMAND") || rmat.name().contains("DEAD") 
                    || rmat.name().contains("FIRE") || rmat.name().contains("WATER") 
                    || rmat.name().contains("LAVA")) {
                
                rmat = mats[ran.nextInt(mats.length)];
                
            }
            
            HashMap<Material, Integer> map = new HashMap<Material, Integer>();
            this.plugin.getConfig().set("blocks", block);
            this.plugin.getConfig().set("blocks", arg1);;
            
            
        } else {
            return;
        }
        
        
    }```
opal juniper
warm lynx
#

What is my main directoy ?

opal juniper
#

?paste Can you put it in a paste

undone axleBOT
opal juniper
#

So it is easier to read

foggy bough
foggy bough
opal juniper
#

U don’t need to

foggy bough
#

in md_paste

foggy bough
opal juniper
#

It detects automatically

opal juniper
#

Yep thanks

hardy pivot
#

first do your drop items in the config

opal juniper
#

For the first bit here, I think you would need to do the .contains differently

warm lynx
#

already stopped

opal juniper
#

What it means is the set of drops contains this string

warm lynx
#

I need java 16 to turn them on xD

#

no

#

on VPS

foggy bough
opal juniper
foggy bough
opal juniper
#

No - what is the overall goal of this code

#

What are you trying to do

#

And I can help u from there

hardy pivot
foggy bough
#

@opal juniper I want Random drops and a random amount of them I have that but I don't know how to put the amount of drops in the config so it will drop

opal juniper
#

Oh right ok

foggy bough
#

thisw is the problem

opal juniper
#

So when a player breaks a block a random amount of the drops appear?

foggy bough
#
HashMap<Material, Integer> map = new HashMap<Material, Integer>();
            this.plugin.getConfig().set("blocks", block);
            this.plugin.getConfig().set("blocks", arg1);```
foggy bough
hardy pivot
#

what arg1 is?

foggy bough
#

I want to put Material rmat = mats[ran.nextInt(mats.length)]; rmat in there

hardy pivot
#

this.plugin.getConfig().set("blocks", map.get(block));

#

there is your answer

opal juniper
hardy pivot
#

to obtain a info from hashmap u need hashmap.get(key)

foggy bough
round finch
#

?learnjava

undone axleBOT
round finch
#

ignore that

foggy bough
foggy bough
hardy pivot
#

plug.getConfig().getConfigurationSection("").getKeys(false).forEach(key ->{

    });
#

wait

opal juniper
hardy pivot
undone axleBOT
#

Spoonfeed a newbie for a day and they'll come back with more questions. Teach them to find their own answers and you'll both be better off: you won't get stuck answering the easy questions and they'll be much more productive than before.

opal juniper
#

Meh

eternal oxide
foggy bough
#

So I don't need to put the amount

eternal oxide
#

no

foggy bough
#

it is random already

#

OHHHH

eternal oxide
#

you randomize teh amount every time a block is broken

round finch
#

? set(item)

opal juniper
#

Hey ElgarL I had an idea for the name of your pathfinding algo:

ElgarL - rithm

please laugh

foggy bough
eternal oxide
#

its a random amount every time

foggy bough
#

so it can be an amount from 0 to 10000

#

?

eternal oxide
#

yes, you just generate a random number of whatever magnitude you want each block break

hardy pivot
#

so u dont need to set in the config? xD

eternal oxide
#

no

#

you only set teh block replacement in the config, the Map

hardy pivot
#

i mean i dont what is trying to do xD

foggy bough
#

k

hardy pivot
#

so im helping with what is asking

foggy bough
#

then thx XD

hardy pivot
#

know*xD

eternal oxide
#

its basically a Material replacement Map. Whenever the key Material block is broken the value is what Material type ItemStack drops

eternal oxide
foggy bough
#

think it will work?

hardy pivot
#

The first thing you should do is that the items are dropped with a random number.
Then if you want to change from how many to how many I recommend doing a config by hand. to later obtain the data in the code

eternal oxide
hardy pivot
#

you need to think how you handle the code

fluid cypress
#
ItemStack item = new ItemStack(BetterWarps.warps.get(index).material, 1);
ItemMeta meta = item.getItemMeta();
meta.setDisplayName(BetterWarps.warps.get(index).name);
if (!BetterWarps.warps.get(index).description.isEmpty())
    meta.setLore(Arrays.asList(BetterWarps.warps.get(index).description.split("\\\\n")));
meta.addItemFlags(ItemFlag.HIDE_ENCHANTS);
meta.addItemFlags(ItemFlag.HIDE_ATTRIBUTES);
meta.addItemFlags(ItemFlag.HIDE_DYE);
if (BetterWarps.warps.get(index).enchanted == 1)
    meta.addEnchant(Enchantment.ARROW_DAMAGE, 1, true);
item.setItemMeta(meta);
inventories[page].addItem(item);

all the items are being added to the inventory page (wich i create like this Bukkit.createInventory(null, int, String)) successfully, EXCEPT this one, for some reason that i dont know

ItemStack{FROSTED_ICE x 1, UNSPECIFIC_META:{meta-type=UNSPECIFIC, display-name={"extra":[{"text":"Ice"}],"text":""}, lore=[{"extra":[{"text":"A lot of ice"}],"text":""}], ItemFlags=[HIDE_ENCHANTS, HIDE_ATTRIBUTES, HIDE_DYE]}}

it is like inventories[page].addItem(item) is doing nothing with THAT SPECIFIC ITEM, without any errors, why?? i literally spent hours trying to fix this, and i still dont understand why this happens

eternal oxide
#

you shoudl not be adding anything to yoru map in yoru blockBreak

#

you generate your Map before your plugin starts (load from config)

hardy pivot
foggy bough
eternal oxide
#

then in BlockBreak you if (map.contains(e.getBlock().getType))

opal juniper
#

I have enlisted (he offered) the help of GodCipher now wit the plugin

eternal oxide
#

you store Map<Material, Material>

opal juniper
#

Doing this shit with unloaded chunks is a pain in the arse

fluid cypress
foggy bough
hardy pivot
#

BetterWarps.warps.get(index) i need o see this method

#

or what value has index

#

if warps is an hashmap

eternal oxide
#
Material mat = e.getBlock().getType();
if (map.contains(mat)) {
    // drops will be
    new ItemStack(map.get(mat), randomAmount);```
proud basin
#

so I

#

so I'm having an issue with this ```java
if (!cooldown.isOnCooldown(player, "dailyKit", 86400000)) {
Kits.DailyKit(player);
player.sendMessage(ChatColor.translateAlternateColorCodes('&', "&6You have received kit Daily."));
cooldown.setTime(player, System.currentTimeMillis(), "dailyKit");
} else {
long i = cooldown.getTime(player, "dailyKit") + 86400000 - System.currentTimeMillis();
player.sendMessage(ChatColor.RED + "You can't use that kit again for another: " + ChatColor.GOLD + Cooldown.convertTime(TimeUnit.MILLISECONDS.toSeconds(i) * 1000));
}

eternal oxide
#

show your isOnCooldown method

fluid cypress
#

ah, its an arraylist of instances of this class

public class Warp {
    public String name;
    public String rawName;
    public Material material;
    public int enchanted;
    public String description;
    public Location location;
    public Warp(String name, Material material, int enchanted, String description, Location location) {
        this.name = name;
        this.rawName = name.replaceAll("§.?", "");
        this.material = material;
        this.enchanted = enchanted;
        this.description = description;
        this.location = location;
    }
}

specifically that ice warp object is this

proud basin
#
public boolean isOnCooldown(Player player, String cooldown, int ms) throws SQLException {
        return getTime(player, cooldown) + ms - System.currentTimeMillis() > 0;
    }
fluid cypress
hardy pivot
# fluid cypress .

use this method for createItemStacks

//Method createItem

public static ItemStack createItem(String name, Material mat, List<String> lore){
        ItemStack item = new ItemStack(mat, 1 );
        ItemMeta meta = item.getItemMeta();
        assert meta != null;
        meta.setDisplayName(name);
        meta.setLore(lore);
        item.setItemMeta(meta);
        return item;
}```
eternal oxide
proud basin
#

yes

eternal oxide
#

check getTime IS returning zero when there is no cooldown

proud basin
#

omg LMAO

#

when I tried fixing before I never replaced the jar

#

and when I just placed the jar its fixed

eternal oxide
#

🙂

proud basin
#

oh wait

#

hold up

#

it never fixed it

#

weirdf

proud basin
eternal oxide
#

then thats what you need to fix

proud basin
#

hm

#

Your allowed to do if (res.getString("UUID") == null) right as res being ResultSet res = psa.executeQuery();

unreal quartz
#

of course

proud basin
#

ok then it's not null

#

so it's not returning 0

eternal oxide
#

zero or a negative number should be fine

unreal quartz
#

you should probably have a constraint for UUIDs to not be null anyway

proud basin
#

constraint?

unreal quartz
#

as in your schema does not permit the UUID column to have null entries

proud basin
#

like a restriction?

unreal quartz
#

but i'm just guessing what your data structure looks like

proud basin
#
if (res.next()) {
                if (res.getString("UUID") == null) {
                    return time = 0;
                } else if (res.getString("Cooldown") == null) {
                    return time = 0;
                } else if (res.getString("Time") == null) {
                    return time = 0;
                } else {
                    return time = res.getLong("Time");
                }
``` this is what it looks like
eternal oxide
#

sysout what it is returning

proud basin
#

nothing

#

because it's not null

eternal oxide
#

we are really only interested in what value getTime returns

proud basin
#

see

#

Idk if the issue is that I have multiple cooldowns

eternal oxide
#

so long as you name them differently in cooldowns its fine

fluid cypress
# hardy pivot use this method for createItemStacks //Method createItem ```java public static ...

still the same thing, almost the complete class, just in case, idk

public class WarpsInventory implements Listener {

    private final Inventory[] inventories;

    public WarpsInventory() {
        int inventorySize = 9 * (int) Math.ceil(BetterWarps.warps.size() / 9.0);
        int pages = (int) Math.ceil(inventorySize / 54.0);

        if (pages == 0) {
            inventories = new Inventory[1];
            inventories[0] = Bukkit.createInventory(null, 9, warpsInvGUITitleSinglePage);
            return;
        }

        inventories = new Inventory[pages];

        int index = 0;

        // iterate over pages
        for (int page = 0; page < pages; page++) {
            inventories[page] = Bukkit.createInventory(null, Math.min(inventorySize, 54), pages > 1 ? warpsInvGUITitle.replace("{page}", Integer.toString(page + 1)) : warpsInvGUITitleSinglePage);
            inventorySize -= 54;
            // iterate over each slot of the page
            for (int slot = 0; slot < 54; slot++) {
                // previous page button
                if (page > 0 && slot == 0) {
                    ItemStack item ... // stuff for a banner with an arrow
                    inventories[page].addItem(item);
                
                }
                // next page button
                else if (pages > 1 && slot == 53) {
                    // the same thing above
                    inventories[page].addItem(item);
                } else {
                    warp warp = BetterWarps.warps.get(index);
                    ItemStack item = createItem(warp.name, warp.material, Arrays.asList(warp.description.split("\\\\n")));
                    inventories[page].addItem(item);

                    if (++index == BetterWarps.warps.size()) break;
                }
            }
        }
    }

    public static ItemStack createItem(String name, Material mat, List<String> lore){
        ItemStack item = new ItemStack(mat, 1 );
        ItemMeta meta = item.getItemMeta();
        assert meta != null;
        meta.setDisplayName(name);
        meta.setLore(lore);
        item.setItemMeta(meta);
        return item;
    }
dusk flicker
#

How would I go about replacing the default logger in spigot (the PluginLogger, replaced with my own ver of the java Logger)

#

Not sure if it's possible to replace the JavaPlugin#getLogger's return but thought i've seen it before

#

Perform certain actions on send and just make the messages more detailed to my liking

proud basin
#

One of the cooldowns work

#

but the others don't

hardy pivot
proud basin
#

oh nvm your not talking to me

fluid cypress
#

the frosted_ice

#

apparently that cant be placed in an inventory, but idk why addItem doesnt throw an error or something

proud basin
#

@eternal oxide Honestly your gonna wanna see this in a screenshare or something it's acting really weird too much to explain

ancient whale
#

Hi I would like to create an Euler angle for an amorstand which point to north (I've been google this but ngl I didn't understand a thing about euler angles)
I've got this pointing to west from but I can't manage to transform it forumsarmorStand.setHeadPose(armorStand.getHeadPose().add(0, -Math.atan2(location.getX(), location.getZ()) + Math.PI / 4, 0));

manic crater
#

I dont understand what im doing wrong here, is it because i still have the 1.8 spigot version implemented into my plugin? Or is it because i didnt specify an api version???? Or am i just stupid??

dusk flicker
#

yes

#

getTitle doesn't exist anymore in that sense

lament minnow
#

he asked three questions--

dusk flicker
#

Update your library to 1.17

manic crater
#

Im not using Intellij, atm im using Eclipse

dusk flicker
manic crater
#

Ill show u my code so u understand

dusk flicker
#

I don't need to see your code, you need to update the library for spigot you are using.

manic crater
#

I mean i have 2 jar files implemented atm, 1.17.1 and 1.8

dusk flicker
#

Remove the 1.8 one

manic crater
#

Ok

dusk flicker
#

And it should then throw an error as that method doesn't exist since 1.13 I believe

manic crater
#

Now i have many errors.

dusk flicker
#

Yep

#

You need to edit it for 1.17

manic crater
#

Like many errors being it doesnt know what "a click method is" and what "chatcolor" is

#

And etc

lament minnow
#

maybe you should update one minecraft version at a time

dusk flicker
#

You may not have the correct lib then

manic crater
#

Oh im not doing a mass update, im just making a version of my plugin for 1.17

lament minnow
dusk flicker
#

^

manic crater
#

I mean, i wouldnt say its "fucked" if i had an project going with 2 versions and it never has had errors, but k

lament minnow
#

i presume that this is not maven

manic crater
#

Yeah i have errors because spigot 1.17 is being stupid

lament minnow
#

bruh

manic crater
lament minnow
#

may we see what the ide says are the errors

manic crater
manic crater
#

Also why the agreesion? Lmao

lament minnow
#

yeah why

manic crater
#

Cool thanks discord for taking 100 years to process my typing.

#

Bukkit issue

#

And it says this for everything else when i hover over it

lament minnow
manic crater
#

Dude like i been saying to u for the past 50 times now, i have spigot 1.17 imported as a jar file.

lament minnow
#

quick question: are you using the 1.17 or 1.17.1 api

manic crater
#

Dude can you chillaxe?

manic crater
lament minnow
#

okay

granite stirrup
#

guys do not watch this #general message

#

in general

lament minnow
#

for maven, should all compile-scope dependencies be shaded

#

or should shading be avoided

eternal oxide
#

avoid if you can

lament minnow
manic crater
eternal oxide
#

When you can;t avoid it 🙂

lament minnow
#

bruh

#

i thought that the compile scope already takes care of that

eternal oxide
#

thats provided scope

#

provided does nto shade

lament minnow
#

yes, and compile does

eternal oxide
#

however, Spigot now has the libraries feature in the plugin.yml

lament minnow
#

i am not referring to the scope as the issue, by the way

#

i am mainly referring to the shade plugin

#

and whether to use that for compile-scope dependencies

#

okay

manic crater
#

So should i restart than?

eternal oxide
#

If you are building for 1.17 use libraries in plugin.yml instead of shading

lament minnow
#

no no

#

dishy, you are not including the spigot jar in your plugin

#

it is provided, so it is not necessary

lament minnow
#

provided meaning that it is already present when the plugin has to run, in the server's directory

manic crater
#

Should i rename the spigot 1.17 jar file to spigot.jar?

lament minnow
#

you do not need to worry about shading

#

no, that is not what it means

#

do not mind shading

manic crater
#

Iyherfagdbskv

#

Okay so what is recommended than? Should i add the api-version to the plugin.yml or?

lament minnow
#

none of the shading conversation applies to your project, as far as i know

lament minnow
manic crater
manic crater
lament minnow
#

have you removed the old spigot jar from the project's dependencies

#

and have you imported the class

manic crater
#

Yes i have removed the old spigot.jar from the project.

manic crater
lament minnow
#

What do you mean it has nothing in it?

manic crater
#

Let me show u something hold up

lament minnow
#

uh

#

that is not the right one

#

you created that

manic crater
#

Nope

eternal oxide
#

me.wisdome.addon

lament minnow
#

what is the package of your project

manic crater
lament minnow
#

well

eternal oxide
#

thats yoru class

lament minnow
#

then you made it

#

you need to import the bukkit chatcolor class

manic crater
lament minnow
#

not create one

#

yes

#

that makes it

elfin moth
#

hi?

eternal oxide
elfin moth
#

who use skript plz?

granite stirrup
unreal quartz
#

nobody

manic crater
unreal quartz
#

"import"

granite stirrup
manic crater
eternal oxide
#

Eclipse CTRL+SHIFT+O

manic crater
#

Yeah when i import stuff it doesnt do anything

lament minnow
eternal oxide
#

then you don;t have spigot as a dependency

lament minnow
granite stirrup
manic crater
lament minnow
manic crater
eternal oxide
manic crater
granite stirrup
unreal quartz
#

?

proud basin
#

ehhh OneDrive

lament minnow
proud basin
#

ew

unreal quartz
unreal quartz
#

take ur shit out of here

granite stirrup
#

i send one more video

#

and then i go

unreal quartz
#

and blocked

proud basin
#

LMAO

manic crater
#

F

lament minnow
granite stirrup
#

idrc im trying to beat retrooper anyway or was it someone else idk

manic crater
#

Ive restarted the ide yes.

lament minnow
#

Caches?

#

Did you clear them?

eternal oxide
#

Project menu -> clean

manic crater
#

Idk how to do that sir.

lament minnow
#

see above

manic crater
#

I did that and i still got the same errors

eternal oxide
#

did you add the import manually?

manic crater
#

Yes and i still got the errors

eternal oxide
#

shows us a screenshot of the IDE with the manual import

manic crater
#

I put in the server jar manually.

eternal oxide
#

by chance is this a maven project?

lament minnow
#

it is not

#

he said that he assumed that eclipse makes projects maven automatically

eternal oxide
#

please SS yoru project structure (left pane expanded)

lament minnow
#

which i think is false, so it is probably a normal project

manic crater
#

I dont mind importing stuff manually.

eternal oxide
#

maven is optional in Eclipse

manic crater
#

Idk what showing the project list is gonna do but ok

lament minnow
#

quick comment: i will be talking about naming conventions after we solve this

manic crater
eternal oxide
#

it definately doesn;t like your referenced library

lament minnow
manic crater
eternal oxide
#

remove it. put it somewhere thats NOT OneDrive and re add it

manic crater
near swan
#

@manic crater if the paper-1.17.1.jar is from the paper website then it won't work; thats a paperclip jar not a server jar

eternal oxide
#

oh true

near swan
#

need to run the server once then use the patched jar in the cache folder

manic crater
#

Okay so should i get the spigot jar file than?

lament minnow
#

oh i see

eternal oxide
#

I don;t build against paper so no idea on that

dusk flicker
#

or use their api

lament minnow
#

that is probably the issue, actually

dusk flicker
#

rather then the jar

near swan
#

yea

#

that would be smarter

manic crater
lament minnow
#

well we did know prior

manic crater
#

I mean how am i supposed to know that.

lament minnow
#

but i did not think about the paperclip thing

near swan
lament minnow
heavy void
#

Someone help me pls. (Im using Gson)
Code: https://paste.md-5.net/egidinenol.cs

When it isnt has Solo it works fine.

But when it has solo

Caused by: java.lang.IllegalStateException: Not a JSON Array: "[\"test\"]"
eternal oxide
undone axleBOT
eternal oxide
#

it will build spigot for you

sturdy patrol
#

Hi. Do you guys know if chunk loading / world gen is done async in the latest versions of minecraft / spigot?

manic crater
#

I got it in BUT! Now im having an inventory related issue, xd

eternal oxide
#

maven is much easier

lament minnow
#

i sort of want to try to fix dishy's project myself and add maven whilst doing it but that would be sort of difficult

sturdy patrol
#

Before I start checking isAsynchronous everywhere

lament minnow
#

unless the project has a github repository

eternal oxide
#

all he has to do is right click his project and convert to maven

lament minnow
#

.

#

THAT IS A THING?

near swan
#

are you writing a ChunkGenerator?

lament minnow
#

i do not use eclipse anymore so i did not know

near swan
#

if so yes it will be off main

#

or, can

sturdy patrol
#

Alright, thanks

manic crater
#

How do u get the inventory name in 1.17?

#

Well inventory detection name for guis?

dusk flicker
#

Don't use the title anymore

#

Look at that

manic crater
#

And time to spend another 2 days working on this project all day and night included. Sigh

proud basin
eternal oxide
#

then yoru query is bad, you shoudl only be fetching the relevant timer

proud basin
#

hm

#

lets see

eternal oxide
#

sounds like you are pulling ALL timers for a player

#

you need a WHERE ... in the sql

proud basin
#

I do

#

PreparedStatement psa = conn.prepareStatement("SELECT * FROM kitCooldown WHERE UUID = ? and Cooldown = ?");

eternal oxide
#

cooldown is the name of it?

proud basin
#

yea

#

although I should rename it

eternal oxide
#

then no other timer should affect it

proud basin
#

yea

eternal oxide
#

your ResultSet should only have that one timer

proud basin
#

but I changed the time on another kit and it worked fine

granite stirrup
#

is move event a good idea to check players coords or no xd

proud basin
#

Why not just get their location?

eternal oxide
#

does your sql not require ``

proud basin
#

I don't believe so

eternal oxide
#

k

proud basin
#

otherwise if it did I wouldn't even be getting a time

granite stirrup
#

is the move event a good idea to check if a player passed a certain point :)

eternal oxide
#

pretty sure SQL is case sensitive though, so and should be AND

lost matrix
proud basin
#

Could be let me try

granite stirrup
#

so its a little limited

proud basin
#

nope

ivory sleet
#

Dispatching events async can be called more often or no?

granite stirrup
#

?

lost matrix
ivory sleet
granite stirrup
#

i mean its probs fine if your just checking location

lost matrix
granite stirrup
ivory sleet
#

If it’s sync that is

#

Or on the server thread

eternal oxide
#

Most events shoudl nto be triggered Async

lost matrix
proud basin
#

Elgar what also happens is if I pick 1 kit the others go on cooldown too

eternal oxide
#

the code they will activate may well not be async safe

proud basin
#

so maybe it's not something with the time

eternal oxide
narrow vessel
#

use worldguard api if you need to check stuff like that

granite stirrup
#

what about no worldguard lol

ivory sleet
narrow vessel
#

i mean i think its pretty good if you need it for location stuff like what you want

granite stirrup
#

i kinda just want to check if a player walked past a boundary teleport them back inside

#

but i dont want to use worldguard

proud basin
eternal oxide
#

if your query was correct it shoudl only have 1

proud basin
#

hm

eternal oxide
#

each player should only have one entry per UUID and cooldown name in the table

proud basin
#

why not multiple?

#

wait

eternal oxide
#

because the cooldown is based upon the player UUID and the cooldowns name

proud basin
#

right

#

on my table

#

it puts the kit and their uuid

#

I click

eternal oxide
#

so each player should only have one entry that matches their UUID and the cooldown called "kitPlatinum"

proud basin
#

right

#

what im doing when I set their time is I delete them from the table and then insert them into it

ancient whale
#

Hi I would like to create an Euler angle for an amorstand which point to north (I've been googling this but ngl I didn't understand a thing about euler angles thanks wikipedia)
I've got this from a forum pointing to west but I can't manage to transform it to point to north 😒

armorStand.setHeadPose(armorStand.getHeadPose().add(0, -Math.atan2(location.getX(), location.getZ()) + Math.PI / 4, 0));
eternal oxide
#

you need to setup your table so it uses a unique pair of UUID and cooldown

proud basin
#

unique pair of uuid?

unreal quartz
#

composite primary key of uuid and cooldown name

eternal oxide
#

a CONSTRAINT

#

teh last section see where it puts a constraint on ID,Lastname

torn shuttle
#

I wish there was a way to not see the code you're not working on on a class

proud basin
#

There is a way

#

or just delete it

torn shuttle
#

I am compacting things as much as I can but it's still a lot of volume

#

I've collapsed them but they're still pretty long

#

I'm not

proud basin
torn shuttle
#

that's also what I've been doing lol

#

I mean fundamentally this class needs to have 28 fields for now and with getters and setters it just gets a bitch chunky which I dislike

eternal oxide
torn shuttle
#

and once I readd comments it will probably blow past 1000 lines

eternal oxide
#

in your case that would be UUID,cooldown

torn shuttle
#

no, this is a class which creates plugin entities

eternal oxide
#

that means each player can only have one cooldown entry per cooldown name

torn shuttle
#

and manages them

proud basin
#

hm

#

and I guess would I be using that when I set their time cooldown?

eternal oxide
#

you have 3 columns, UUID, cooldown, time

proud basin
#

4

torn shuttle
#

lol

eternal oxide
#

whats the 4th?

proud basin
#

UUID, Player, Time, Cooldown

eternal oxide
#

why player and uuid?

proud basin
#

so I can see their name

torn shuttle
#

why time and cooldown

eternal oxide
#

cooldown is actually its name

unreal quartz
#

name should belong in a table of its own

#

this table should describe cooldowns only

eternal oxide
#

if you have teh players UUID you can easily get their name from OfflinePlayer

proud basin
#

it's actually named Name

#

not Player

#

but I don't check their name

#

so it's fine

eternal oxide
#

then you shoudl, names can change

#

if you store it in SQL its set

proud basin
#

yea

eternal oxide
#

and not needed as its in OfflinePlayer

proud basin
#

I know that's why I have their uuid

eternal oxide
#

yep, you only need 3 columns, and set the UUID and cooldown as unique constraint pair

proud basin
#

ok ok

#

I will delete name

#

done

#

so should I use CONSTRAINT when getting their time or setting their time

unreal quartz
#

well both

eternal oxide
#

yes

unreal quartz
#

you can have the pair as your primary key, which forms a composite key

ivory sleet
#

🥲

eternal oxide
#

CONSTRAINT P_COOLDOWN PRIMARY KEY (UUID,Cooldown)

proud basin
#

now I should still delete them from the table correct

unreal quartz
#

well it's an unnessecary write if the cooldown is a date

proud basin
#

a date?

#

why would it be a date

unreal quartz
#

i'm guessing thats what it is?

proud basin
#

varchar

unreal quartz
#

the cooldown expiry time

#

time

eternal oxide
#

he has a 3rd column for time

unreal quartz
#

whatever the coluimn was called

eternal oxide
#

Cooldown = name (String)

proud basin
#

oh no it's bigint

unreal quartz
#

and thats the date for when it expires?

proud basin
#

the time type is bigint

unreal quartz
#

yes

proud basin
#

what are you talking about then

unreal quartz
#

what do you write in that column

proud basin
#

the time of the cooldown

unreal quartz
#

as in the date it expires or the literal seconds left

proud basin
#

seconds

#

left

#

well

#

it doesn't go down

#

it's a perm number

unreal quartz
#

i would suggest you store the date it expires instead

#

or the date the cooldown was applied

#

either works

eternal oxide
#

from his code I believe it stores the current time in ms

proud basin
#

yes it's in ms

eternal oxide
#

so time the cooldown started

unreal quartz
#

i mean you could delete it when it expires, but that imples you're constantly checking the database whcih does not sound like a good idea

proud basin
#

I have it so when a new time for that cooldown is set it deletes it

unreal quartz
#

i assumed you're just storing the time it expires and just comparing it

#

you don't need to delete it, you can just update the row

proud basin
#

oh

#

so I should check first using CONSTRAINT then update/delete

unreal quartz
#

as in how to check if the player has a cooldown or not?

eternal oxide
#

you don't import awt.Color

#

just use bukkit.Color

unreal quartz
#

ChatColor.of(java.awt.Color)

proud basin
unreal quartz
#

just insert into ... on duplicate key update ... if you want to set the time

#

no need to delete the row just to reinsert it

proud basin
#

how do you reinsert?

young knoll
#

on duplicate key update is mean

quaint mantle
#

You never learn do you

#

?ban @quaint mantle ban evasion

undone axleBOT
#

Done. That felt good.

unreal quartz
#

i'll see him in about 15 hours

quaint mantle
#

lmao

ivory sleet
#

I wonder how many alts the guy actually got

unreal quartz
#

probably already in this channel right now 👀

quaint mantle
jade perch
#

Hullo

ivory sleet
#

Hola webdev

jade perch
#

I've made tetris in react

#

Checkmate

dusk flicker
#

nice

dusk flicker
jade perch
#

I made my code so modular I could literally copy and paste it into Java

#

It wouldn't work

#

But I could do it

quaint mantle
#

how you been

#

why you no work on HAC

#

i was gonna use that

jade perch
#

Fuck you

quaint mantle
#

Huh!!!

#

im just asking a question

jade perch
#

You're asking stupid questions

quaint mantle
ivory sleet
jade perch
#

Too much work

ivory sleet
#

🤔

jade perch
#

What's next

#

Minecraft in react

dusk flicker
#

yes

ivory sleet
#

No

jade perch
#

Then you'll be asking me to make an anticheat for the minecraft I made in react

ivory sleet
dusk flicker
#

or just if(cheating) ban;

jade perch
#

There are many layers of abstraction behind that cheating var

cold tartan
dusk flicker
#

they have comments in the paste

crude charm
#

except with different activate methods, is there a way to store a list of these and call the activates of all of them?

ivory sleet
dusk flicker
#

Storing a list of them, ArrayList; for having different activates I would just have an abstract void method that is called on the execution

#

Id use abstraction rather then what you are doing

cold tartan
#

could you give me an example, im not sure what abstraction is

dusk flicker
cold tartan
#

ty

ivory sleet
#

Rack you still work on that core?

dusk flicker
#

yep

#

Nearly done

#

I need to go slowly tho or I get myself burnt out

ornate heart
#

How would I utilize custom sounds/music. I assume i'd need a resource pack?

crude charm
#

or do the website method

#

but that one is shit

#

so pack

cold tartan
proud basin
#

@eternal oxide ok so I added the CONSTRAINT

ornate heart
#

Gotchu. How would I point to a custom sound in a plugin? I'm trying to play a sound when a player enters a specific area.

dusk flicker
ivory sleet
dusk flicker
ivory sleet
#

That server got a discord yet?

dusk flicker
#

ye

#

1s i'll dm

ivory sleet
#

Danke

paper viper
#

website better than pack

#

lol

#

much better

#

idk what u talking abt

dusk flicker
#

ehh personally I prefer a pack

#

but I only do that if you really require a pack for a server

crude charm
#

Yes

#

I'm not pulling up some random website in the back

paper viper
proud basin
dusk flicker
#

no?

paper viper
#

Yes if its custom

dusk flicker
#

1 pack

paper viper
#

and you didnt add it in before

dusk flicker
#

tons of songs

crude charm
#

Just set the tunes to different songs

paper viper
#

No lets say you load a spotify song

#

you cant fit that into a pack

crude charm
#

like pigstep = Song

paper viper
#

but on a website u can do that easily

#

easier accessibility

#

swappable

#

and also more features

#

and better user interfaces in general for websites

crude charm
#

pack better imo

cold tartan
#

r u trying to use like the noteblock api to make a spotify player?

paper viper
#

no

#

lmfao

ivory sleet
#

Pack feels cumbersome

paper viper
#

Exactly

crude charm
#

^

cold tartan
paper viper
#

you have to wrap it over and over again

crude charm
#

Pack is all warm and snuggy

paper viper
#

its all fun and games until they have to download a 2 gigabyte pack

#

yeah no

#

fuck that

ivory sleet
paper viper
#

thats gonna take long as hell

crude charm
paper viper
crude charm
#

over 200 a month

#

SUPER SPEED

paper viper
#

just because you have fast wifi doesnt mean that everyone else has that privelage

#

i used to be stuck at 15 megs download for my whole wifi

#

and 2 megs upload

crude charm
#

sooooooooo

paper viper
#

Kekw

crude charm
#

I get MORE then I pay for LMFAO

#

I pay for 100

#

and 100 is legit like 150 a month

dusk flicker
#

150 bucks a month

#

for 100 download?

#

👀

prime mountain
#

can i use Kotlin and not java

#

java is fucking disgusting and i hate it

quaint mantle
ivory sleet
#

Sure

quaint mantle
#

yes u can use Kotlin tho

prime mountain
#

woooaa cool

quaint mantle
#

personally tho.. kotlin is fucking disgusting and i hate it

prime mountain
#

I haven't tried it out but i wanna see if its better

quaint mantle
#

bruh

prime mountain
#

because java currently isn't really.... flowing

#

but

quaint mantle
#

idk what java version ur using

prime mountain
#

maybe i just have to practice more

quaint mantle
#

or what you even mean

ivory sleet
#

Well kotlin got the upper hand in terms of features I guess

quaint mantle
#

but java seems to work great for me

prime mountain
#

no i mean just like mental space

#

in my creativity and stuff

quaint mantle
prime mountain
#

coding is art. My pen feels very stiff and the ink is spotty and its not inspiring me

#

i wanna see if this other pen by a different brand is more appropriate for my hand

magic glacier
#

how can I make it so if a player dies to any cause, like another player killing them, or them dying to a natural cause like lava, or fall damage, they can keep this specific item? I've tried to search this up but i've had no luck in finding an answer.

proud basin
#

use the PlayerDeathEvent

eternal oxide
#

Yes it should fix your issue. You can only now have one cooldown for each player per type

proud basin
#

yea

#

um

#

it doesn't seem like the correct syntax

eternal oxide
#

your resultset should now only have a single entry

proud basin
#

CONSTRAINT kitCooldown PRIMARY KEY (?, ?)

#

that's correct?

eternal oxide
#

that is in your table create query yes?

proud basin
#

yea