#help-archived

1 messages Β· Page 63 of 1

haughty sundial
#

And are you sure i can use -1 ? not like currentXP - 1

#

Because -1 usually means unlimited right or something

tiny dagger
#

you need to get

hoary parcel
#

but its still dum

tiny dagger
#

the actual one

hoary parcel
#

if you gonna hard code messages

#

at least use the proper char

#

or like, use the chat color enum like sane ppl

wanton delta
#

Yes mini, you make a class called C and declare static final variables and use C.Red C.Green etc

tiny dagger
#

set level (getlevel-1)

paper compass
#

Guys do you think this code is good for saving and loading my arenas/games

hoary parcel
#

oh yes, sure, just fucking clone the chat color enum

paper compass
#
        for (Arena arena : arenas) {
            int i = 0;
            plugin.getConfig().set("arenas." + arena.getName() + ".prespawn", serializeLoc(arena.getPreSpawn()));
            for (Location spawns : arena.getSpawns()) {
                plugin.getConfig().set("arenas." + arena.getName() + ".spawns." + i, serializeLoc(spawns));
                i++;
            }

        }
    }
    
    public void loadArenas() {
        for(String arenas : plugin.getConfig().getConfigurationSection("arenas").getKeys(false)) {
            createArena(null, deserializeLoc(plugin.getConfig().getString("arenas." + arenas + ".prespawn")), arenas);
            
            for(String spawns : plugin.getConfig().getStringList("arenas." + arenas + ".spawns")) {
                addSpawn(deserializeLoc(spawns), arenas);
            }
        }
    }```
wanton delta
#

LOL

cloud sparrow
#

You could just do ChatColor.RED?

haughty sundial
#

Ah yes that makes sense @tiny dagger thank you! πŸ‘

wanton delta
#

C > ChatColor

hoary parcel
#

you could just do an on demand static import for chatcolor

#

then you just do RED

sturdy oar
#

import static ChatColor.*;

hoary parcel
#

or you could use minimessage

#

"<red>Message"

wanton delta
#

Probably gonna switch to the textcomponents next update tho

paper compass
#

Shut up mini

#

lmao

hoary parcel
#

use mini message if you want text components but sane

tiny dagger
#

text components are gonna be the future soon

wanton delta
#

no

hoary parcel
#

they were the future 5 years ago

#

lmao

tiny dagger
#

not quiet tho

wanton delta
#

They should delete chatcolor enum

#

Get rid of it

#

No more

hoary parcel
#

why?

wanton delta
#

Im jk

hoary parcel
#

to both of you

tiny dagger
#

i don't see it being that used still

sturdy oar
#

So I have a question, do List implementation such as ArrayList use arrays to store elements?

paper compass
#
        for (Arena arena : arenas) {
            int i = 0;
            plugin.getConfig().set("arenas." + arena.getName() + ".prespawn", serializeLoc(arena.getPreSpawn()));
            for (Location spawns : arena.getSpawns()) {
                plugin.getConfig().set("arenas." + arena.getName() + ".spawns." + i, serializeLoc(spawns));
                i++;
            }

        }
    }
    
    public void loadArenas() {
        for(String arenas : plugin.getConfig().getConfigurationSection("arenas").getKeys(false)) {
            createArena(null, deserializeLoc(plugin.getConfig().getString("arenas." + arenas + ".prespawn")), arenas);
            
            for(String spawns : plugin.getConfig().getStringList("arenas." + arenas + ".spawns")) {
                addSpawn(deserializeLoc(spawns), arenas);
            }
        }
    }```
Are they good ways of saving and loading arenas?
hoary parcel
#

mmmmh

#

arraylist

#

array list

cloud sparrow
#

gur.

sturdy oar
#

oh

cloud sparrow
#

plugin.getConfig().getStringList("arenas." + arenas + ".spawns").stream().forEach(this::addSpawn(deserializeLoc(spawns), arenas))

hoary parcel
#

javadoc "Resizable-array implementation of the {@code List} interface"

#

mmmh

#

I think its fair to say that the array list uses arrays

sturdy oar
#

I just wasn't finding the array variable in the class

#

ty for confirming

hoary parcel
#

-> .stream().forEach

#

not just forEach

#

pfff

#

solo still sleeping

paper compass
#

what

tiny dagger
#

gotta find usecases to stream

sturdy oar
#

i don't think so

#

or im dumb

tiny dagger
#

that's cool

paper compass
#

Syntax error on token "::", . expected

tiny dagger
#

didn't knew either

paper compass
#

hmmmm

cloud sparrow
#

plugin.getConfig().getStringList("arenas." + arenas + ".spawns").forEach(addSpawn(this::deserializeLoc(), arenas))

haughty sundial
#

Ok dumb question but, what does :: mean again 😊

paper compass
#

plugin.getConfig().getStringList("arenas." + arenas + ".spawns").stream().forEach(spawn -> addSpawn(deserializeLoc(spawn), arenas));

#

oh

#

kk

sturdy oar
haughty sundial
#

Thank you

sturdy oar
#

I think it was added in Java 8 although I'm not sure

cloud sparrow
#

Stream was added in Java 8

paper compass
#

The method deserializeLoc(String) in the type ArenaManager is not applicable for the arguments ()

tiny dagger
#

it's probabily static then

paper compass
#

nope

#

I'm just gonna do this

#

plugin.getConfig().getStringList("arenas." + arenas + ".spawns").stream().forEach(spawn -> addSpawn(deserializeLoc(spawn), arenas));

subtle blade
#

you can just method reference with arguments???
90% certain you cannot

narrow crypt
#

i am making some sort of kill counter but since it might be called quite fast at a time, how should i save?
i heared something about Maps or so? like Map<Player, int> or something?
what is that saving method called so i can google a bit more

wanton delta
#

I would recommend using AtomicInt or Map.compute

subtle blade
#

compute is fine. AtomicInt is overkill

wanton delta
#

Its personal preference i guess

wind dock
#

anyone know a way to get crackshotplus for free
like a dev build or something

wanton delta
#

map.get(player).increase()

narrow crypt
#

im quite new to that

runic wadi
#

why are you turning the collection into a stream for no reason

wanton delta
#

Or map.compute((k, v) -> v++) or something

narrow crypt
#

any tutorials?

runic wadi
#

computeIfPresent

wanton delta
#

Not always

narrow crypt
#

i dont have any experience and dont feel like asking it here all

runic wadi
#

you shouldn't ask people in this discord because you will get what is known as bad advice

wanton delta
#

lmao

#

If you know how to use compute

#

You dont need computeifpresent

runic wadi
#

what in god's fuck

narrow crypt
#

well i dont know

subtle blade
#

Just use merge lol

narrow crypt
#

googling saving data to map but just get a ton of results containing "maps"

subtle blade
#

map.merge(player, 1, Integer::sum);

#

jeez

wanton delta
#

yea fine whatever

narrow crypt
#

thanks

subtle blade
#

compute() even tells you in the docs to use merge for this very purpose KEKW

wanton delta
#

some people dont read docs for every single thing they use 😑

ashen stirrup
#

I can't update my scoreboard without it duplicating whenever I use teams.
It'll go from Nickname: Straggly to

Nickname: Straggly
Nickname: test
#

Using o.getScore(Formatting.colorize("&8 ")).setScore(17); to update it

#

Do I need to clear entries?

subtle blade
#

some people dont read docs for every single thing they use 😑
YOU SHOULD OR YOU SHOULDN'T BE USING IT PES_HyperReee

wanton delta
#

wow

#

This is abuse

#

Spam caps

#

i cant respond in the same way smh

subtle blade
#

:))

wanton delta
#

Tbf i should read docs more often

#

They are too intimidating

runic wadi
#

i mean you literally said If you know how to use compute You dont need computeifpresent

#

weaponized autism

wanton delta
#

bro chill

#

Im still right lmao

#

I mean in his context

#

You didnt need ifpresent

#

But yes there are times when you need to use ifpresent

#

weaponized autism
This is a sign of a weak mindset

ashen stirrup
#

Can anyone help with the scoreboard issue above?

cloud sparrow
#

We've mentioned what the issue was already.

#

Look at teams mate for the most successful help in fixing your issues.

#

Or show your code in how you are using it fully.

ashen stirrup
#

I am using teams

runic wadi
#

you can probably fix the issue with BiDnsQueryLifecycleObserverFactory::newDnsQueryLifecycleObserver

#

very obvious

wanton delta
#

πŸ€”

tiny dagger
#

who choose that name should be fired

cloud sparrow
#

you'd likely need a custom plugin

#

to ban them on all servers except anything that is considered a "hub"

sturdy oar
#

is x << n

#

the same as x * pow(2,n)

boreal tiger
#

isnt << a logical shift?

sturdy oar
#

yes

#

I started learning them and often see them even in plugins , expecially with chunks where i see << 4

subtle blade
#

Yes, because it's a binary shifting operator, you're shifting the bits to the left and leaving the ones to the right as 0

#

Well, sort of

sturdy oar
#

oh, does the JVM work faster with these operators

subtle blade
#

I think that only holds true in cases where there's only 1 bit

#

Say you have 00000010 (base 10 is 2), shifting that to the left by 4 would give you 00100000 (base 10 is 32)

sturdy oar
#

oh clear

subtle blade
#

<< 4 is used because it acts as a multiple of 16

#

Which, yes, chunk coordinates are just block coordinates / 16. >> 4 accomplishes this goal through binary operations

hoary parcel
#

its just faster and saver

subtle blade
#

Yeup

sturdy oar
#

Yeah im planning to fully learn all of them

#

even if I don't use them so often

subtle blade
#

They're super useful to know but it's rare that you'll actually find a use case for them in every day programming

keen compass
#

bitshifting can be faster if you already know the bits you need

vernal spruce
#

oh boy alot of spaghetii while working with persistentdata

#

why no PersistentDataType.Object reeee

subtle blade
#

Especially because if you just do something like System.out.println(13 << 5); it just sprints out some seemingly random number. There's a reason it prints what it does but if you don't understand what << is doing, it looks random

#

What do you mean, Stell?

vernal spruce
#

atm i save a string wich i dissect to get certain info

silk bane
#

You can’t just serialise any object in a persistent data container

subtle blade
#

You can create a PersistentDataType, yea

vernal spruce
#

rly

subtle blade
#

Yep

#

It's meant to be implemented

#

PersistentDataType<Primitive, Complex>

vernal spruce
#

well that wouldv been good to know fk me

subtle blade
#

Primitive is what it will save as in NBT (it should be some sort of base value - a String, whatever), Complex is the type you want to set / get

vernal spruce
#

oh boy.. wouldv saved me quite some work

silk bane
#

But you’ll probably be writing the serialisation code using the existing types

vernal spruce
#

sadly the deed is done..

subtle blade
#

not an ideal deserialization but it works lol

vernal spruce
#

oh wow wouldv been so easy dammit

subtle blade
#

Can then just keep a constant instance of that object and re-use it

#
public static final PersistentDataType<String, NamespacedKey> PDT_NAMESPACED_KEY = PersistentDataTypeNamespacedKey.get();```
sturdy oar
#

It's a Singleton

subtle blade
#

It is, you're right

vernal spruce
#

well now my spawner holds a string of the type "name type 1 1"πŸ˜‚

subtle blade
#

I did that to avoid constant recreation of that object. Could do the call to get() every time if you're like

sturdy oar
#

I just learned today of that return syntax

subtle blade
#

I just prefer the look of a constant

#

Ternary operator, yea

sturdy oar
#

No non

#

assigning while returning

subtle blade
#

Oh absolutely, yea. It's the bane of new programmers lol

vernal spruce
#
                                cs.update();
                                pl.getServer().getConsoleSender().sendMessage("Found close spawner");
                                return true;```hmm
subtle blade
#

The amount of times I see if (something = false) { }

#

lol

wraith thicket
#

I saw that on the forums just today πŸ™‚

subtle blade
#

^ point exactly

sturdy oar
#

I should be worried I've been using Java for more than 1 year now πŸ˜†

#

And didn't know it

subtle blade
#

Nah. I still learn new things every day

#

It's been 5 years for me

wraith thicket
#

If you stop learning, then you're probably not trying hard enough πŸ™‚

subtle blade
#

I only just recently wrapped my head around bitshift operators when I wanted to learn bitmasks

sturdy oar
#

I wasted 3 day on natives I regret watching that tutorial

subtle blade
#

lol. Native methods are fun. Still want to dive more into that as well. My knowledge is minimal. I understand how to do it and how it works, just haven't spent time making anything using them. Use-case is rare

#

Had a project in mind though

sturdy oar
#

BungeeCord has them

#

they should be in the native package I think

neat orbit
#

Hey I'm making my server that is managed by multicraft and run on spigot. I have noticed that when you are only player in server, you can not do /seen bc it says that "Error: Player not found" but when you are more than 1 player it works perfectly. Is there a simple solution to this error? Pls tag me if you know.

subtle blade
#

It does, yea. I think it's for math-related operations?

#

Ah, ciphering. Right

wraith thicket
#

/seen is a plugin command (likely Essentials). Thus Spigot has no control over how it works.

wise token
#

hi how do u get a new build of craft bukkit to stop the 20 second start up please

vernal spruce
#

you download the latest with this

wise token
#

thanks

#

how do you use the build tools think

vernal spruce
#

there is a quick guide

#

on that link

#

on how to use it

wise token
#

ok thanks im not the best with this sort of stuf

vernal spruce
#

all you need to do is install "Git Bash" so you can use it on windows

wise token
#

i dont understand how you install that i cant see a link

vernal spruce
wise token
#

thank you

#

it said Unable to access jarfile BuildTools.jar when i ran a commanf

#

command

fervent sorrel
#

i have a question, will 1.16 spigot be out as soon as it comes out or not?

sturdy oar
#

?eta

worldly heathBOT
#

There is no ETA. Having an ETA leads to unrealistic deadlines, false hope, and a bad product. It will be ready when it's ready.

fervent sorrel
#

ok thx

wanton delta
#

@fervent sorrel theres not been many technical changes so my realistic guess would be very soon after the update

#

But thats me

#

Not spigot

sturdy oar
#

yeah also work is already in progress on some things

#

it's not going to take like 1.13, but we don't know

fervent sorrel
#

cool, thx

wise token
#

hi will this spigot 1.15.2.jar run both spigot and bukkit plugins

#

thats what the code made

hoary parcel
#

yes

#

thats the point of an api

#

bukkit plugins can generally run on all implementations

#

craftbukkit, spigot, paper, tuinity, you name it

wise token
#

thanks i never knew that

lament wolf
#

Hello. I have a NPC (entityplayer), but when I try to set the yaw of the body, it almost looks like the body's yaw is random, would you know why?

        npc.setLocation(spawn.getX(), spawn.getY(), spawn.getZ(), 0, 0);

        try {
            Field field = npc.getClass().getField("yaw");
            field.set(npc,(byte) ((int)spawn.getYaw() * 0.71f));

        } catch (NoSuchFieldException | IllegalAccessException e) {
            e.printStackTrace();
        }```
tiny dagger
#

i'm pretty sure you said this already

#

i thought you fixed it by sending the entity rotation packet

pastel basin
#

why not use #setLocation(x, y, z, pitch, yaw)

tiny dagger
#

setlocationrotation?

lament wolf
#

No, my problem have evolved Fr33

tiny dagger
#

oh the body

#

you need to send a punch packet

lament wolf
#

Because it won't work @pastel basin

tiny dagger
#

body yaw is for sure client sided

lament wolf
#

Okay will try it

#

punch packet..

#

I can't found it

tiny dagger
#

connection.sendPacket(new PacketPlayOutAnimation(this, 0));

lament wolf
#

wut

#

why Animation ?

tiny dagger
#

it's an animation?

lament wolf
#

No

tiny dagger
#

you're punching

lament wolf
#

that's juste the body yaw

tiny dagger
#

trust me

#

just do it

#

you'll see what i mean

#

punch fixes client side body's yaw

lament wolf
#

@tiny dagger <3

#

But how did you learn that, I sought everywhere

subtle blade
#

There's an API method for this

lament wolf
#

?

lament wolf
#

Name ?

#

mm

tiny dagger
#

since when?

#

oh

subtle blade
#

1.15.2 iirc

pastel basin
#

but does it work for npc (fake entities)?

tiny dagger
#

but that's bukkit

subtle blade
#

Yea?

tiny dagger
#

he sends a fake npc

subtle blade
#

Oh. Well look at implementation then

#

EntityLiving#a(EnumHand, boolean)

#

(for 1.15 - names may vary on other versions - i don't really care lol)

#

Also note that 1.16 will rename it to swingHand

faint marsh
#

Hey, in my latest.log is only "logging-disabled" how can I enable it?

silk bane
#

You’re welcome by the way

#

I PRd that xD

subtle blade
#

^ aPES_HappyClap

#

Hero that sounds like a plugin because afaik there's no native option to disable that

frigid ember
#

how do i change my name

#

on spigot

subtle blade
#

Name changes are granted to donors

pastel basin
#

donate 10$

frigid ember
#

How do i donate lol

subtle blade
#

?donate

#

nice

#

1 sec lol

frigid ember
#

!donate

subtle blade
#

(right hand side - not too obvious)

tiny dagger
frigid ember
#

10 bucks?

tiny dagger
#

yeah

subtle blade
#

I mean we'd appreciate more but yea, $10 is the minimum

#

It's a free, open source project after all

frigid ember
#

dam greedy xD

subtle blade
#

Not really?

#

Again, free, open source project

#

The amount of effort that goes into this project is astounding

tiny dagger
#

imagine how much you would've spent on this project if it wasn't free

subtle blade
#

I'm not telling you that donating $10 is insignificant but some people see $10 and think "I'll donate the minimum just to get what I need" and see it as an inconvenience

#

So more is appreciated but you're fine if you don't want to PES_SadShrug

frigid ember
#

its been like 7 months the last time i used spigot

hallow surge
#
@EventHandler
public void onSugarCane(BlockBreakEvent e) {
    Block block = e.getBlock();
    if (block.getType() == Material.SUGAR_CANE) {
        int canes = 0;
        e.setCancelled(true);
        do {
            block.setType(Material.AIR);
            block = block.getRelative(BlockFace.UP, 1);
            canes++;
        } while (block.getType() == Material.SUGAR_CANE);
        e.getPlayer().getInventory().addItem(new ItemStack(Material.SUGAR_CANE, canes));

    }
}``` why isnt my code to gput sugar cane directly into the inventory working any ideas still sturggling with this problem.
subtle blade
#

Still having issues with that one?

hallow surge
#

yea

unreal hedge
#

I'm just glad "Sponsored plugins" and "Sponsored listings" in forums, etc aren't a thing. Spigot is great how it is :)

hallow surge
#

no helpfull resource i can really find

#

i inserted checks and it runns all the way through whitch is confusing me

subtle blade
#

Let me throw this into a test plugin and see what I can muster up because to me, that should work

tiny dagger
#

well it wouldn't choco

subtle blade
#

Oh you know what, I might know what's wrong

tiny dagger
#

it needs to be the reversed way

subtle blade
#

You're going from bottom to top

#

Yea

tiny dagger
#

it triggers phisics

subtle blade
#

If you set the bottom block to air, all the blocks above it are going to break

unreal hedge
#

You'll need to wait until you're manually given the badge @frigid ember

subtle blade
#

It's in your preferences though md has to manually assign the donation to your account first, Greg so expect 24 hours or so

#

He's still asleep atm

unreal hedge
#

Then you check the forums for the donator forum and change it there

subtle blade
#

If you donated with an email not associated with your account, create a thread in Donation Enquiries

unreal hedge
#

I can see why md is asleep, it's 3am here xD

hallow surge
#

I thought that is going top bottom is that not what BlockFace.UP, 1 does or am i using it wrong

subtle blade
#

No no, that gets relative

#

You're starting at the bottom block and going upwards from there

tiny dagger
#

use a deque list

subtle blade
#

^

tiny dagger
#

store them first

subtle blade
#

Calculate which blocks to break in a queue, poll through that queue

#

FILO is what you'll want. A Stack, actually

tiny dagger
#

doubt

subtle blade
#

Doubtful. Majority of those costs go towards running the forums, stash, etc.

tiny dagger
#

md5 is a slave 😦

hallow surge
#

could i see a possible example of what your offering I'm rather new to spigot would like to kinda see what i'm supposed to be doing

subtle blade
#

This is likely what you want to be using

#

Keep doing what you're doing but instead of setting them to air, push them to a stack

#

Once you've finished filling that stack (the while loop terminates), keep pop()ing that stack until it's empty

wraith grail
#

Ran into a new dilemma: Instead of creating a new world directly and running whatever code I would need to run to generate my structures, I was thinking of simply copying everything from a "base" world folder (aka all blocks, their states, their command blocks and so on) and creating a new one.

WorldCreator world = new WorldCreator("new name for copy"); world.blocksorwhatever.copy("Name of base worlds data I want to copy"); world.createNewWorld();

Basically I will have one world that acts as a template for every copy I make, the only thing I want to change in the "paste" world
is that it gets a new UUID and a new name.

#

Does anyone know or can point me in a direction to make this happen?

subtle blade
#

@hallow surge here's how I would approach this

    private static final Stack<Block> SUGAR_CANE_STACK = new Stack<>();

    @EventHandler
    public void onSugarCane(BlockBreakEvent e) {
        Block block = e.getBlock();
        if (block.getType() == Material.SUGAR_CANE) {
            int canes = 0;
            e.setCancelled(true);
            do {
                // Push the blocks to the stack from bottom to top
                SUGAR_CANE_STACK.push(block);
                block = block.getRelative(BlockFace.UP, 1);
                canes++;
            } while (block.getType() == Material.SUGAR_CANE);

            e.getPlayer().getInventory().addItem(new ItemStack(Material.SUGAR_CANE, canes));

            // Destroy the sugar cane from top to bottom
            while (!SUGAR_CANE_STACK.isEmpty()) {
                SUGAR_CANE_STACK.pop().setType(Material.AIR);
            }
        }
    }```
#

(how does forEach() work on a Stack, actually? Does it pop?)

tiny dagger
#

i can look

#

but i think it's like contains

subtle blade
#

Looks like it doesn't pop. It's implemented by Vector which does not

#

So, yea, this is the way to do it

tiny dagger
#

yup no poping

subtle blade
#

:((

#

Can't do SUGAR_CANE_STACK.forEach(b -> b.setType(Material.AIR)); Am sad

frigid ember
#

hello everyone i will find plugin like item lore stats who know plugin like this pl tell me thank

gusty crane
#

but its a place to look atleast

#

see if u find something of intrest

tiny dagger
#

why don't i have someone to recommend my minigames :[

dusty topaz
#

TIL Stack is a Vector

#

πŸ€”

subtle blade
#

It is, yes πŸ™‚

dusty topaz
#

i think java may have not followed their own is a rule with that one

subtle blade
#

Vector was pre-collections API

#

It stayed for forwards compat sake

#

Honestly at this point in time it's used mostly for synchronization but even then, it's sparingly used

bronze horizon
#

can someone help me with php json (again)?

#

this time it's actually valid json

frigid ember
#

I bought a plugin 6 hours ago and it hasn't been verified yet

hallow surge
#

@subtle blade thank you will take a look at it when im done playing my game πŸ™‚

#

also should probably get more background in java now that I'm getting to more complex code that I dont understand the java concepts of

subtle blade
#

It's alright. LIFO collections aren't super common. Stacks are handy in cases like this though!

hallow surge
#

I understand stacks kind of but not hugely

#

back to my java tutorials

#

πŸ™‚ thanks for dealing with my incompitance

keen compass
#

@bronze horizon would probably help if you showed what exactly you need help with

bronze horizon
#

i figured it out

#

sorry

#

notepad adding invisible characters -_-

subtle blade
#

LIFO and FIFO are a weird concept to grasp. They make sense but even I have to think twice about which ones I need

keen compass
#

lol

tiny dagger
#

or scrap and use deque

#

:d

subtle blade
#

I like to think of Stack like a literal stack of something. The objects keep piling up on top of one another but in order to get out that item you put in first, because it's at the bottom, you have to take off everything else on top of it first

#

The last thing that went in has to come out first. Hence, LIFO

keen compass
subtle blade
#

push() puts something on the stack, pop() takes it off

#

Yea! The pancake analogy!

#

the British refer to lines of people as a Queue
Does America not do this? o.o

keen compass
#

No, they just call them lines

subtle blade
#

We use that as a quick way to reference it but queue isn't uncommon

tiny dagger
#

really?

keen compass
#

I mean we know its really called a queue but we don't say we are going to hop into the queue

tiny dagger
#

americans are weird

subtle blade
#

Yea that's about how we see it, Frostalf

keen compass
#

yeah Americans are weird I would have to agree

#

one of these days I will visit other countries

subtle blade
#

Visit Canada PepeHeart

tiny dagger
#

they invented hotdogs

#

Hot DOGS

wraith thicket
#

Canada - the nicer USA?

subtle blade
#

Pretty much, yea

keen compass
#

yeah, I will probably visit the east side of Canada

#

West side of Canada seems to be more dangerous with them vanishing people on those highways to never be heard from again

wraith thicket
#

Do people who hang out here get anything done other than chatting here?

tiny dagger
#

no

keen compass
#

Kind of Choco's job to chat here o.O

subtle blade
#

Highly recommend Vancouver (it's west but super, SUPER nice). Otherwise, somewhere in the marine areas are really cool as well

#

Yea I get things done lol. I have a job I go to, though aside from that I'm usually programming in the background anyways

keen compass
#

yeah I get plenty done, except for the projects that are large

#

can't program for hours on end either

wraith thicket
#

I'm just saying - went away for like 20-30 minutes while a few people were chatting here. And come back to see the same people πŸ™‚

keen compass
#

that is just too much for me

subtle blade
#

That's about how it goes for me and the forums tbh lol. You'll see me everywhere I swear to God

keen compass
#

I usually spend a few hours in the morning on projects, then I take a break towards the afternoon and then towards the evening I do some more work on the project.

#

but I have other projects outside of MC too

wraith thicket
#

I try to do work for 8h a day. But I usually end up stumped with something and go to the forums to get my mind off of things

keen compass
#

maybe I should be like everyone else and create a fork too >>

#

that reminds me I need to clean out my spigot workspace so I can get ready to start on that pr

#

kind of a mess at the moment and I am sure MD wouldn't be happy if I pushed something and there is all kinds of merges needing to be done XD

subtle blade
#

I wouldn't be happy either :((

#

I don't wanna review things not part of the PR!

sturdy oar
#

So I finally made my dream into a thing

keen compass
#

o.O

sturdy oar
#

A list where you can iterate two elements at a time

keen compass
#

vector already did that if I recall

#

not that anyone uses vector these days considering its on the deprecated list lol

tiny dagger
#

looks cool :p

steep eagle
#

how to stop silverfish from hiding in blocks? Is there any event or attribute?

subtle blade
#

Oh from actually burrowing into blocks?

#

Ehm

steep eagle
#

yeah

subtle blade
#

Maybe EntityChangeBlockEvent?

steep eagle
#

found it: EntityChangeBlockEvent.

#

yeah

#

thanks

#

"hiding" was a wrong word

subtle blade
#

Ah I knew what you meant, I just misread at first

#

EntityChangeBlockEvent is a bit of an obscure event for that anyways

tiny dagger
#

it does make sense

steep eagle
#

i googled it first but there weren't any results. By changing hiding to burrow i found it

subtle blade
#

Really? lol

steep eagle
#

EntityChangeBlockEvent is a bit of an obscure event for that anyways
yeah

#

yep

subtle blade
#

There are perks to having British English nested into Canadian culture I guess lol

steep eagle
#

damn

#

English is my second language

upper hearth
#

I mean the event name makes sense to me, but idk what else would fire it? Endermen maybe? idk

steep eagle
#

Called when any Entity, excluding players, changes a block.

subtle blade
#

Farmer villagers

#

There are a number of entities that change blocks

sturdy oar
#

I hope silverfish will be removed from Minecraft

#

they're USELESS

upper hearth
#

thats not nice

subtle blade
#

They are not! :((

#

SHOW SOME RESPECT!

#

They're pesky lil' fuckers but they are useful! lol

steep eagle
#

idea is cool

sturdy oar
#

the endermite is their cool brother

subtle blade
#

(they do really need some better use in the game though)

#

Someone make a plugin to make them cooler

steep eagle
#

but 1.9 combat made them too hard to kill

upper hearth
#

How do we make them cooler

steep eagle
#

i'm using them as rats in a dungeon

subtle blade
#

Nah. Sweep attacks are great

steep eagle
#

and using them as Ore Bugs for renewable resources

sturdy oar
#

I'm hyped for 1.16 RGB

#

and UNICODE

#

text support

steep eagle
#

GAMING CHAT

frigid ember
boreal tiger
#

cool xD

subtle blade
#

That's creepy FearSweat

lusty vortex
#

When you have no friends, program some

#

πŸ‘Œ

frigid ember
#

Idk why I thought it was going to be so hard when it was just 10 lines

    @Override
    public void tick() {
    for (Entity ent : getBukkitEntity().getNearbyEntities(10, 10, 10)) {
        if (!(ent instanceof Player))
        continue;
        Location loc = ent.getLocation().clone();

        getBukkitEntity().teleport(loc);
        break;
    }
    }
tiny dagger
#

oh teleport

#

that's why it's looking funny

frigid ember
#

wdym

tiny dagger
#

the head looking the other way maybe?

frigid ember
#

I had this line

        setHeadRotation(ent.getLocation().getDirection().getBlockY());

but I took it out

tiny dagger
#

also

#

a nicer way would be to tp it to last location

frigid ember
#

I don't understand

tiny dagger
#

you know now it's gonna teleport where the player is

#

he should be nearby him

frigid ember
#

Anyone know how to download a worldedit for spigot

tiny dagger
#

therefore last player location

#

instead of the current location

frigid ember
#

Ok

subtle blade
#

I agree with that. That way it will also support teleportation and checking nearby entities every tick isn't the most performant thing

#

Keep track of where they were last and teleport there

steep eagle
#

@frigid ember just download .jar and put it into plugins folder?

frigid ember
#

I've done that

#

already

steep eagle
#

/rl

frigid ember
#

/r1

subtle blade
#

Then you're set to go. Start your server and it should work

steep eagle
#

any wierd stuff in console?

subtle blade
#

If not, you're likely using the wrong version of WorldEdit

steep eagle
#

hmm

frigid ember
#

oh ok

steep eagle
#

i'm making npc using packets but they disappear when you go far away or after some time. Is there any other way to prevent it from happening ||(other than checking is player is in range and spawning them again)||?

tiny dagger
#

you need a tracker

#

nvm i just read spoiler||good job btw||

#

you can't without checking if in range

steep eagle
#

well... making them wasn't easy... 5h on main part and 10-12h on skins

#

adding dependencies to maven is the hardest part

bronze marten
#

adding dependencies to maven is the hardest part
eh

frigid ember
#

Someone should make a good tutorial on 1.15 npcs, because it took me way too long to figure out as well, and there are still a lot of problems

subtle blade
#

You sound like the perfect candidate for that

#

Be the change you want to see!

tiny dagger
#

there is no big difference between 1.15 npcs and 1.12 for example

frigid ember
#

Well in general then, I can't find any custom EntityPlayer class tutorials

vernal spruce
#

Its more complicated than extending the class

steep eagle
#

What i can say from my expirience:

  • When sending packets to spawn npc, store id to later check which npc are you interacting
  • By God... head rotation is confusing
  • and skins...
vernal spruce
#

Yeah forgot how i fixed head rotation tbh

#

The biggest struggle was to actually keep the damn npc there when a player doesnt see it

tiny dagger
#

you should start adventuring into nms yourself btw @frigid ember

steep eagle
#

connection.sendPacket(new PacketPlayOutEntityHeadRotation(npc, (byte) (l.getYaw() * 256 / 360))); <- fixed rotation.

vernal spruce
#

Oh yeah was something among these lines

steep eagle
#

or this connection.sendPacket(new PacketPlayOutEntity.PacketPlayOutEntityLook(npc.getId(), (byte) (l.getYaw() * 256 / 360), (byte) (l.getPitch() * 256 / 360), true));

#

it just work at some time i'm scared to change it

manic island
#

Anyone know how to get a MapPallet color from a block?

frigid ember
#

Yeah @tiny dagger I've just started with nms a few days ago

steep eagle
#

Deprecated.

#

this should totally be an emote

sturdy oar
#

D e p r e c a t e d

frigid ember
#

Who needs Deprecated when you have the md_5 emote!

steep eagle
#

your suggestion is Deprecated..
Deprecated. is such a frightening word. I wanted to make custom crafting with custom items as input and BAM Deprecated. and few weeks spend on making my own system

hallow surge
#

Why is eclipse IDE exporting my Project in a folder calloed ExampleProjectName with a jar inside it called jar.jar instead of just exporting jar called ExampleProjectName

subtle blade
#

That's likely what you told it to export as lol

hallow surge
#

I selected export as jar

subtle blade
#

That's where you specify the name

hallow surge
#

omg

#

i figured it out

#

xD

dense rampart
#

For whatever reason, when I do player.AddPotionEffect for Jump Boost during the playerjoinevent, it gives then immediately takes it. it's only jump boost, and if i give it with a command for example it stays. why

subtle blade
#

How long are you giving it for?

#

The timing is in ticks

dense rampart
#

1000000000 for example, I give 3 other effects and they stay just fine

dusty topaz
#

show the code?

subtle blade
#

Run it a tick later. PlayerJoinEvent is super picky about that

dusty topaz
#

Integer.MAX_INT also nice

dense rampart
#

is there a pause in java? forgot

dusty topaz
#

instead of just putting a big number

subtle blade
#

Use Bukkit's scheduler

dense rampart
#

Integer.MAX_VALUE btw :p

subtle blade
#

It's a long afaik. Long.MAX_VALUE

#

oh it is an int

manic island
#

Is there any way to get the map color of a material?

dense rampart
#

is the "delay" in ticks?

subtle blade
#

Yes

#

Just 1 will be fine

#

Sorry I'm like half paying attention. Watching a buddy play in the Rocket League world championship PepeLOVEEEEEEE

dense rampart
#

yeah it works fine now with 40

hallow surge
#

the code you gave me isnt working for some reason? maybe its not being recognized?

#

need to insert my checks still

subtle blade
#

The one I sent earlier? I ran and tested it, it works 100%

#

So if it doesn't, you're missing something - registration or something

candid geyser
#

hmm so can i pay with paysafe ?

subtle blade
#

No. The resource system only allows for PayPal. Sorry

candid geyser
#

that so fucking dumb

#

i want to pay with paysafe

#

i dont want to get scammed

boreal tiger
#

Paypal is more safe than paysafe

candid geyser
#

yeah but i dont have paypal

boreal tiger
#

You could try contacting the developer

candid geyser
#

sure

boreal tiger
#

And asking if he would accept paysafe

candid geyser
#

thats so thicc

#

aight

hallow surge
#

@subtle blade its not working struggling to know whats going on here i put it in exactly

#

oh my god

subtle blade
#

And you're absolutely certain that's being registered? I can assure you, I tested it and it most definitely worked

hallow surge
#

the class is registered

#

almost deffinatly registered

subtle blade
#

Only other way that wouldn't work is if there's another event listener interfering

#

Got any other plugins?

hallow surge
#

yes i do but its just like world edit, voxel sniper, and askyblock rest are mine and have nothing to do with blocks

#

only other event I have is a sugarcane place event

#

i'll try removing alll the other plugins

subtle blade
#

Worth a shot, yea

#

I honestly don't know what to tell you at this point because it worked for me

hallow surge
#

might just make a seperate entity from my base plugin

#

if it doesnt work

#

and just use it in conjunction

#

still not working hmm ima make this its own plugin

keen compass
#

could try changing the priority of the event, but its quite possible that a plugin is cancelling it.

#

generally I check to make sure the event hasn't been cancelled if I really need that event to do something

manic island
#

Does anyone have any insight on how to get a color similar to a known block's color?

hallow surge
#

the only thing thats being cancelled in that plugin is the place event when the sugar cane is on top of sugarcane

#

gahhh

#

frustration

boreal tiger
#

you're not sending any messages

#

plugin.getConfig().getString("Global.no-perm"); this only gets the message from the config

#

it doesnt send it

#

Because you're not sending it

#

you're only loading it

subtle blade
#

Send the message. getString() won't do anything. It returns the value

#

player.sendMessage()

#

(can actually do sender.sendMessage())

#

Yep

alpine fable
#

man, i wish we could go back to the good ol' Bukkit days, back when there was an actual core team of developers

subtle blade
#

There's md

#

And contributors

candid geyser
#

nein

alpine fable
#

@subtle blade do you really believe the paper team is incompatible with spigot?

subtle blade
#

I think having a team really complicates things. Different people with different goals

#

Oh 1000%

tiny dagger
#

i feel like things move faster now than it used to before

alpine fable
#

both are trying to please their users

subtle blade
#

Of course but they're also shoving things down the pipe as quick as possible without thinking of future implications

#

They're also not as afraid to expose internals

dusty topaz
#

And are less afraid to change things I think

#

Drastically that is

alpine fable
#

so

#

spigot is the only server software without a core dev team that i've been a part of (in the community that is)

dusty topaz
#

and yet here we are

#

Β―_(ツ)_/Β―

boreal tiger
#

do they need to all operate in the same way?

alpine fable
#

i mean there's think sure, but he hasn't done anything for awhile

subtle blade
#

Think retired back in 1.8

alpine fable
#

well, is md afraid that paper will just screw things up?

boreal tiger
#

how would it screw things up?

subtle blade
#

Difference in opinions as to how Bukkit should progress

alpine fable
#

i mean the team

subtle blade
#

The teams wouldn't ever work together

#

Until you contribute to Spigot it's not a difference you can easily see

alpine fable
#

because ever since Bukkit was pushed into Spigot's hands, it's remained with a single core developer for the majority of the time

subtle blade
#

Vector, the project is open sourced. Contributions are more than welcome

tiny dagger
#

is Think still doing minecraft stuff?

hoary parcel
#

no

subtle blade
#

He's at Hytale

hoary parcel
#

hes in a better world now

tiny dagger
#

scary

hoary parcel
#

we can blame him if the server api is bad πŸ˜„

alpine fable
#

I can't post a screenshot of a pie chart in https://bstats.org/global/bukkit but Server Software has paper with a market share of 35.8%, which means that w/e they're doing, clearly they are pleasing their users

#

i just wanted to point that out

dusty topaz
#

Nobody said they aren't, nor did anyone say you have to use spigot lol

#

spigot isn't trying to be the only spigot server software used, it just happens to be

subtle blade
#

They make performance changes on an otherwise unperformant vanilla server

hoary parcel
#

if you only consider ppl who actually update, the marketshare is > 50%

#

I made that today πŸ˜„

subtle blade
#

Spigot avoids changes that may infringe on the vanilla server

hallow surge
#

Choco Idk whats wrong i dm'd you all of my code

keen compass
#

I think its worth noting, Bukkits core team wasn't that large either.

hoary parcel
#

spigot maintains the plugin api, paper makes it actually perform properly

alpine fable
#

well

keen compass
#

Most of the changes that were put into bukkit wasn't from the core team either

hoary parcel
#

both tasks are important

alpine fable
#

interesting page @hoary parcel

hoary parcel
#

it just fetches the 1.15.2 server on bukkit and the 1.15.2 servers on paper from bstats and does quick maths

#

I wrote it all in githubs editor πŸ˜„

alpine fable
#

has paper ever had major screwups in terms of preserving the API?

hoary parcel
#

oh sometimes stuff breaks and patches will be reverted

alpine fable
#

because I'm trying to follow where the actual issue is

hoary parcel
#

but like, that is noticed the day the patch is released

keen compass
#

actual issue of what o.O

alpine fable
#

issue of incompatibility between the paper devs and md

naive stratus
#

I need to store blocks in some sort of list/array where I can quickly access them with world, chunkX, chunkZ - Something like a["world"][1][1] - What would the best approach here be? Not sure if I need to use normal arrays or I can use ArrayLists. The tricky part for me is the first string key.

keen compass
#

There isn't any issues, just differing opinions on how to go about implementing stuff. Anyone can make a fork if they want.

subtle blade
#

Map<Map<Map<String, Integer>, Integer>, String> Kappa

#

(please don't do that)

boreal tiger
#

lmao

manic island
boreal tiger
#

would it be possible for paper and spigot to "unite" and work on bukkit together, while keeping their api's separate?

subtle blade
#

That's how things operate currently but Paper's patches hardly ever come upstream unless coincidence

keen compass
#

Doubt it, but it isn't unusual for something in paper to get accepted into spigot either

naive stratus
#

(please don't do that)
@subtle blade Please don't do that? Then what can I do? haha

boreal tiger
#

mhm

vernal spruce
#

Short answer noπŸ˜‚

alpine fable
#

i'm just amazed md hasn't reached out to other people

tiny dagger
#

mapception

hoary parcel
#

vector, I recommend you to not waste your time with that topic, lol

subtle blade
#

He mentioned some time ago that there's been nobody that's shown the ability to contribute competent code on first attempt

alpine fable
#

lol

#

competent

subtle blade
#

(paraphrasing)

keen compass
#

first attempt of what?

#

o.O

hoary parcel
#

I think both projects are happy with where they are at right now

subtle blade
#

Frostalf, being able to commit to master branch is a scary thing when it's auto deployed lol

alpine fable
#

well if md_5 is the authority on Bukkit.....

#

would he clarify that none of the actual Bukkit team are competent?

subtle blade
#

Bukkit team is dead. Forget they exist at this point

#

(sorry Frost lol)

vernal spruce
#

Only know timtower from bukkitπŸ˜‚

subtle blade
#

mbaxter pops in here occasionally

keen compass
#

I would clarify that some on the bukkit team were not, and even those that were sometimes implemented stupid things. For instance, the code that causes the server to crash because a corrupted chunk was encountered even though that isn't even vanilla behavior

#

which reminds me, maybe I should try PRing my fix for that

subtle blade
#

and that's what I mean. If you pay attention to the Spigot PR area, you will rarely find PRs merged without SOME change

alpine fable
#

i remember that happening to me before @keen compass , irritatingly annoying ><

subtle blade
#

I've had few be merged

hoary parcel
#

whats wrong with adjusting stuff after they have been deployed?

#

its a rolling release

subtle blade
#

because they've then be deployed

hoary parcel
#

ppl who update right away know they are on the bleeding edge

subtle blade
#

Mini, people still stay on out of date 1.8 versions lol

vernal spruce
#

Ikr

boreal tiger
#

people still use 1.15 >.>

subtle blade
#

^

boreal tiger
#

instead of 1.15.2

hoary parcel
#

is that your issue tho?

keen compass
#

The only reason that code exists is because they couldn't agree on how to handle it @alpine fable and I even tried to fix that while on the BukkitDev team and my PR was rejected because the just didn't want to implement it even though they agreed it was bad for it to do that.

hoary parcel
#

the only concern should be ppl on recent version

#

like max 10 builds behind

boreal tiger
#

it would be cool if buildtools gave you the option to choose "lts" or "bleeding edgee"

vernal spruce
#

Hopefully 1.16 is the point where alot of servers change

hoary parcel
#

lts is dum

hallow surge
#

I quit on this plugin - _ -

#

still not working

manic island
#

Could anyone give me a quick hand?

hoary parcel
#

thats just unnecessary work

inland depot
#

whats up @hallow surge

vernal spruce
#

Oh boy just noticed what section this is in

boreal tiger
#

I mean it would solve choco's concerns

#

I think

hallow surge
#
    public class BreakScane implements Listener {
        DragonsToken plugin; 
        public BreakScane(DragonsToken dragonsToken) {
            plugin = dragonsToken;
    
            }
    
        
        @EventHandler
        public void blockPlaced(BlockPlaceEvent event) {
        Block b = event.getBlock();
        Player p = event.getPlayer();
        Material m = b.getType();
        b.setMetadata("placedbyplayer", new FixedMetadataValue(this.plugin, "something"));
        if(m == Material.SUGAR_CANE_BLOCK) {
            if(b.getRelative(BlockFace.DOWN).getType() == Material.SUGAR_CANE_BLOCK) {
                event.setCancelled(true);
                p.sendMessage(ChatColor.RED + "You can't place that their wait for it to grow");
                b.removeMetadata("placedbyplayer", plugin);
                
            }else {
                event.setCancelled(false);
            }
        }
        
        }

    }``` perfectly functional code given to me by choco 
works for them not for me though
vernal spruce
#

No #offtopic reee

inland depot
#

once again

#

did you register the event?

hallow surge
#

yes

boreal tiger
#

are you reloading the server or restarting?

subtle blade
#

Is it the place event not working?

hallow surge
#

restarting

subtle blade
#

Is the breaking one working fine?

hallow surge
#

no choco its in its own plugin

#

the only plugin on the server

subtle blade
#

Ah

hallow surge
#
package me.y2k.dragonssugarcane;

import org.bukkit.plugin.java.JavaPlugin;

public class DragonsSugarCane extends JavaPlugin {
    public void onEnable() {
        getServer().getPluginManager().registerEvents(new SugarCaneToInv(), this);
    }
}``` my main class
keen compass
#

@vernal spruce offtopic would be #general

subtle blade
#

Yea but the class you sent above isn't relevant to that independent plugin

#

You sent a place event ;P

hallow surge
#

.

vernal spruce
#

Didnt i saw that problem on the forum too?πŸ€”

inland depot
#

the class that you registered is the SugarCaneToInv

hallow surge
#

no its block break event

boreal tiger
#

"SugarCaneToInv" this is not the same class you sent before

inland depot
#

the class with the method is BreakScane

boreal tiger
#

^

hallow surge
#

i changed it to another plugin

vernal spruce
#

Oh boy..

hallow surge
#

so its not the same class

vernal spruce
#

Then why arent you sending the actual plugins main?πŸ˜‚

#

And other plugin s one...

sturdy oar
#

the first argument is the plugin if I'm not wrong

hallow surge
#

bruh its an entirely different plugin now nothing to do with the old one completely seperated

#

getting no console errors

boreal tiger
#

just send us your actual code

vernal spruce
#

I need a head exploding emote

subtle blade
vernal spruce
#

Eclipse f2w

hallow surge
#

light mode - _ -

vernal spruce
#

I also use it so i dont get sleepi after couple hrs

tiny dagger
#

this dark mode tread wasn't here a few years ago

hallow surge
#

@subtle blade loaded a server with the exact same plugin didnt work no errors in console

subtle blade
#

???

#

What version are you on?

hallow surge
#

you on 1.15

subtle blade
#

Yes

#

What version are you on?

hallow surge
#

im using 1,8,8

subtle blade
#

Isn't it SUGAR_CANE_BLOCK?

hallow surge
#

but im getting no errors so same should work

subtle blade
#

No

#

It's REEDS

hallow surge
#

no its SUgar_cane_block i think

#

let me try it with that

subtle blade
#

I know for certain it's not SUGAR_CANE. That's the item

#

I think it's REEDS

hallow surge
#

umm let me look

#

if this plugin didnt require 1.8.8 i would not be using it rn - _ -

tiny dagger
#

materials in 1.8.8 are so confusing

hallow surge
#

its SUGAR_CANE_BLOCK

subtle blade
#

They were created in a time where they were at one point accurate

#

I still remember REEDS though PeepoThink

tiny dagger
#

yeah but it's outdated and missleading

subtle blade
#

Oh well. Whatever it is, you want the block not the item

hallow surge
#

i selected the block still not working hmmm i hate dis xD

tiny dagger
#

reeds then?

hallow surge
#

no

#

its sugar_cane_block

#

the code just still isnt executing

#

the Item is Sugar_Cane the block is Sugar_Cane_Block

inland depot
#

try adding a debug message before you check for the material just so you can confirm what's causing it

hallow surge
#

okay

#

ummm

#

i added the debug messages now it works...

#

that is strange...

inland depot
#

you added a debug message and now the block check works?

hallow surge
#

yea

#

let me try to remove now

#

not sure what i did or if i did anything! but it works

#

I'm happy thanks choco and everyone

hollow thorn
#

how would i make a minimap using the cartography table

manic island
#

I'd really appreciate it if someone could help me figure out how to find a Materials base color as used on maps.

#

Haven't been able to find anything in the javadocs for quite a while

hallow surge
#

@subtle blade got it all working thanks πŸ™‚

inland depot
#

Player#setHealth(double health)
i think

subtle blade
#

Don't assume 20. Max health isn't always 20

#

Set it to the value of their attribute

tiny dagger
#

yeah

#

unless you set maxhealth yourself

#

set the damagwe to 0

#

the damage

#

i mean

inland depot
#

LMAO

vernal spruce
#

try with the health first

inland depot
#

yeah just kill them, that'll help hahaha

tiny dagger
#

no

inland depot
#

ik what you were trying to say

tiny dagger
#

setting damage to 0 at event would just play the damage animation

#

no kill

inland depot
#

also just out of curiousity

#

is the old minecraft death sound somewhere in the api?

#

bc that'd be so nice to bring back for nostalgic purposes

tiny dagger
#

probabily thru string playsound

chilly eagle
#

Hey can someone help me with Death Messages prime?

tiny dagger
#

only if it's still present in client

vernal spruce
#

that is most likely inside the old texture pack

#

rather than api related

inland depot
#

ah ok

#

if its in neither would I just have to make my own playsound method and use that instead?

chilly eagle
#

welp ping me when you can help me thanks

inland depot
#

@chilly eagle you want to make custom death messages?

tiny dagger
#

there is Player#playSound(Location loc, String text, volume, pitch);

inland depot
#

i'll dig around there sometime and see if it's there somewhere

#

thanks

chilly eagle
#

@chilly eagle you want to make custom death messages?
@inland depot I want to make custom death message, and I understand the whole thing, but I want to also have the default death message

#

so when someone dies it should be like:

#

default death message

#

custom death message for that player

inland depot
#

just listen to the PlayerDeathEvent and broadcast your message

chilly eagle
#

ΒΏ??

#

whats that

#

its like a tutorial video?

boreal tiger
#

lmao

inland depot
#

you do know how to code java right?

chilly eagle
#

no

#

XDDD

inland depot
#

that's your first step

chilly eagle
#

Im in a wrong place or something

inland depot
#

there might be a plugin you can find

chilly eagle
#

nono

inland depot
#

search up custom death messages spigot

chilly eagle
#

there is a plugin

inland depot
#

then what's the problem?

chilly eagle
#

Cant configure it

inland depot
#

send a screenshot of the config.yml

#

might need to verify yourself first

#

idk

chilly eagle
#

past . it is better

#

is a very long config

#

or if you have the dscord of the plugin, maybe I can get quicker help there, idk

inland depot
#

no problem @frigid ember

#

@chilly eagle there should be some documentation from where you downloaded the plugin

#

try giving that a look

chilly eagle
#

let me check

#

nope, no discord in my view

inland depot
#

no like

#

usually on the resource page

#

there should be some instructions

pastel condor
#

is this a good way to get all the players online? Object[] playersObejct = Bukkit.getServer().getOnlinePlayers().toArray(); Player[] players = (Player[]) playersObejct; }

bronze marten
#

Why do you need an array

boreal tiger
#

my eyes are bleeding lmao

pastel condor
#

is it bad?

boreal tiger
#

you dont need to cast to an array

#

you should learn java before using the spigot api

pastel condor
#

but then it's an object array

bronze marten
#

Why do you need an array tho

pastel condor
#

then? Player[] playersObejct = (Player[]) Bukkit.getServer().getOnlinePlayers().toArray();

bronze marten
#

Why not use the collection provided?

pastel condor
#

I don't like collections

boreal tiger
#

lol

bronze marten
#

??

pastel condor
#

I like arrays and lists

inland depot
#

@pastel condor if you want to get the amount of players:

Bukkit.getServer().getOnlinePlayers().size();
If you want to get a list of online players:

for (Player p : Bukkit.getServer().getOnlinePlayers()){
players.add(p);
} ```
If you want to get each individual player:
```for (Player p : Bukkit.getServer().getOnlinePlayers()){
// do stuff
} ```
pastel condor
#

thanks

bronze marten
#

List is an implementation of collection

pastel condor
#

array lists are great

bronze marten
#

Eh

pastel condor
#

ty

boreal tiger
#

why are you adding players to a list

pastel condor
#

because I hate collections

boreal tiger
#

you shouldnt do that

#

you should use a Set with the player's uuid 90% of the time

pastel condor
#

yuck a set

boreal tiger
#

if you want to keep track of players

pastel condor
#

sorry, I'll stick with array list

bronze marten
#

I hope you’re joking

boreal tiger
#

you should probably learn java before doign anything because you clearly have no idea what youre doing

pastel condor
#

wdym?

inland depot
#

uuids also work well

pastel condor
#

I don't need uuids though

inland depot
#

the code i provided was just off the top of my head, there's a ton of better ways to do it

pastel condor
#

just the player object

#

kk I'll try to improve it

inland depot
#

in that case i'd use the for loop

boreal tiger
#

you're trying to guess the code

#

thats not how its done

pastel condor
#

I like to use while loop with a countrt

inland depot
#

me?

pastel condor
#

*counter

#

thanks

uncut reef
#

hey anyone can help me

#

??

pastel condor
#

anyone know the if there is a right click event?

inland depot
#

PlayerInteractEvent

pastel condor
#

oh yeah

inland depot
#

PlayerInteractEvent#getAction

pastel condor
#

what about left click? blockBreakEvent?

inland depot
#

same thing

pastel condor
#

oh okay

#

thanks

inland depot
#

you can check if the action is Action.RIGHT_CLICK_BLOCK, Action.RIGHT_CLICK_AIR, Action.LEFT_CLICK_BLOCK or Action.LEFT_CLICK_AIR

#

glad to help

dense rampart
inland depot
#

@uncut reef what do you need help with?

uncut reef
#

Plugin TAB

#

i have 2 db with the plugin luckyperms

#

and tab dont detect that and colapse

#

what can i do?

inland depot
#

not sure exactly what you're trying to do

#

maybe someone else can help you, sorry

#

good luck πŸ™‚

uncut reef
#

if you look Rango: cahnge between Owner and Admin

boreal tiger
#

@pastel condor

#

in your police plugin

#

you have to remove something from your pom.xml

uncut reef
#

i want in my lobby stay Onwer and in the other server stay Admin

pastel condor
#

wdym? @boreal tiger (also how did you know I have a police plugin xD)

frigid ember
#

he found it

pastel condor
#

ooof

boreal tiger
#

I looked up your name xD
You have to export it correctly

#

otherwise your plugin includes the spigot api

#

which you dont need to

pastel condor
#

oh thats why the jar was huge!

boreal tiger
#

yep

pastel condor
boreal tiger
#

mhm, nop the scope and the pom seems to be fine, my bad

#

I think its the way you're exporting it from eclipse

final verge
#

Better question

#

How did you build your jar

#

Did you use the export feature in eclipse

#

or did you run a maven command to build it

subtle blade
#

Your POM is fine. It's how you exported

#

If you have a Maven project, you should be building with Maven

pastel condor
#

I did mvn clean install

#

oh no

#

I did it with eclipse

#

oops

subtle blade
#

Yes but you also have the lib in your project

#

Which you don't need

#

Delete the lib folder

pastel condor
#

yeah

#

kk

subtle blade
#

(shouldn't need that on a public repository anyways - even without Maven)

pastel condor
#

yeah that was before maven

subtle blade
#

All your libraries and dependencies are handled and downloaded by Maven now πŸ™‚

pastel condor
#

anyways, just removed it

subtle blade
#

That's the beauty of a build system

pastel condor
#

πŸ™‚

subtle blade
#

Give 'er a recompile and you should be set

pastel condor
#

the only problem is I already posted my resource to spigot

#

should I post an update?

frigid ember
#

I bought a plugin and have been waiting for 15 hours to ask what is going on

final verge
#

easy enough of a mistake to make especially with starting out with maven.

And you didn't upload the actual server code so you are fine I believe fierceeo

pastel condor
#

I uploaded the huge jar though

frigid ember
#

just upload the new version

pastel condor
#

the one with the entire spigot library

#

kk

subtle blade
#

Yep! just an update is fine

frigid ember
#

I think you can delete the old ones?

subtle blade
#

You can delete the previous version too if you'd really like

#

Yes

pastel condor
#

k thanks

frigid ember
#

@subtle blade can you help me

#

?

subtle blade
#

In this case it's just the API, it's not the absolute worst thing in the world. You're not distributing the server jar. The API is GPLv3

#

If it's about your resource purchase not going through, I'd answered it earlier

#

@frigid ember lol. Stick to a single channel, damn it! That's why you missed my last answer! PES_HyperReee

uncut reef
subtle blade
#

Much better, fierceeo! πŸ˜„