#help-development

1 messages ยท Page 229 of 1

echo basalt
#

lmao

#

ItemBuilder.fromSection(config.getConfigurationSection(path))

remote swallow
#

we dont question it

sterile token
# echo basalt lmao

Me:

ModuleAPI module = new ModuleLibrary().getAPI();

nLibrary library = (nLibrary) module.getModule("nLibrary");

YamlFile scoreboard = library.getFiles().newYaml("config.yml").default(true).path(new File(getDataFolder(), "providers").build();

ConfigSection section = scoreboard.getSection("Scoreboard.Lines");

echo basalt
#

yeah no

sterile token
#

In even more illness hahaha

echo basalt
#

the logic is a bit wonky

sterile token
#

Wonky?

echo basalt
#

yeah

#

like setting the file name and then the folder where it's at in separate args

sterile token
#

How would be that to impriove it

humble haven
#

Hi, I got problem with mcrealistic plugin I got a file and it's not rendering

sterile token
fallow violet
#

is there a way to use custom heads? Like letters on a head?

sterile token
#

Discord is really shity the se and laggy when I type

fallow violet
#

but how do big servers give u menus with heads? I mean there is no way that every player keeps their skin

sterile token
#

They do tho

#

Oh wa

#

They use an api Where they signed the head textures

fallow violet
#

nice that u told me this NOW

sterile token
#

Lmao i only trying to help and u swear

remote swallow
#
 public ItemBuilder skullTexture(String texture) {
        if (!(this.meta instanceof SkullMeta)) {
            return this;
        } else {
            PlayerProfile profile = Bukkit.createPlayerProfile(UUID.nameUUIDFromBytes(texture.getBytes()));
            PlayerTextures textures = profile.getTextures();

            try {
                textures.setSkin(new URL("http://textures.minecraft.net/texture/" + texture));
            } catch (MalformedURLException var5) {
                var5.printStackTrace();
            }

            profile.setTextures(textures);
            ((SkullMeta)this.meta).setOwnerProfile(profile);
            return this;
        }
    }
#

relative concept

fallow violet
sterile token
remote swallow
#

yeah

#

^^

remote swallow
sterile token
#

Epic

remote swallow
#

yo

sterile token
#

There is a problem with that api

fallow violet
sterile token
#

I have used it and when you more than 100 request in less than 1m their shity eat litle block you

fallow violet
remote swallow
#

custom thing

#

i can either give you the entire file or i can edit it for external use

echo basalt
#

you can remove the else

#

as you have a return

sterile token
#

Mojang texture has a lovely shity rate limit and if you more than 100 request in less than 1m they block you

echo basalt
#

that's... the whole point of the return

remote swallow
#

i just found it online and didnt really look at it lul

fallow violet
remote swallow
#

yeah

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.

sterile token
#

If you wont help just dont distufb

#

Idk why you do that

fallow violet
#

+1

sterile token
#

Doesnt look tho you mostly so that and they are not always the same player

fallow violet
# remote swallow yeah

could u just send me the code of the part that makes the texture on a head? Bcs i already have my own itembuilder

remote swallow
#

ah ye

#

might be a bit wrong since i cant test it

        PlayerProfile profile = Bukkit.createPlayerProfile(UUID.nameUUIDFromBytes(texture.getBytes()));
        PlayerTextures textures = profile.getTextures();
        try {
            textures.setSkin(new URL("http://textures.minecraft.net/texture/" + texture));
        } catch (MalformedURLException e) {
            e.printStackTrace();
        }

        profile.setTextures(textures);
        skullMeta.setOwnerProfile(profile);
                item.setItemMeta(skullmeta);
mighty pier
sterile token
#

I mean pff its like saying in tired

#

I dont know how you use it english tho

wet breach
sterile token
#

I mean idk why is to understand tha if you dont to help just ignore the message instead of being annoying

#

Because you are just disturbing while someone if getting hleped

#

I dont think you would like to be asking for help and someone come just to distufb

#

Ik that but is in the one who is helping๐Ÿ˜‚

fervent panther
#

Hi Iโ€™m trying to make an item that places a block and later creates an explosion at that block. I can get the location of the block when placed but canโ€™t figure out a good way to keep track of these blocks

vocal cloud
#

Does the tracking need to be persistent?

#

Cause if it doesn't need to be then you just need to use a HashMap

fervent panther
#

Would I have to use a database if I wanted it to be persistent?

orchid gazelle
#

No

fervent panther
#

How would I make it persistent?

orchid gazelle
#

Json

fervent panther
#

Ok. I don't think that's really necessary for my project

#

This might be a stupid question but how would I do this with a hashmap?

orchid gazelle
#

Uhm you just add the block to the hashmap(or only an ArrayList, depending on what you are doing)

fervent panther
#

I think I got it

orchid gazelle
#

Or if you mean that the block should explode like 10 seconds later, just use a timer

fervent panther
#

I'll just use the player uuid as the key and block position for value right

orchid gazelle
#

Idk what you are doing soo

fervent panther
#

I have a sword that creates a block and the next time I right click with the sword the block explodes

orchid gazelle
#

Ahh ok

#

Can it be playerbound or does it NEED to be itembound?

wet breach
#

?pdc

orchid gazelle
#

(Means if the player drops the sword to another player, does it need to have the same blocks?)

fervent panther
wet breach
#

chunks have pdc, which contain blocks

orchid gazelle
#

My suggestion to my question to you: if no, use a HashMap. If yes, use NBT)

#

Alf, why not just use NBT on the sword lol

remote swallow
#

nbt needs nms iirc and that just pointless

orchid gazelle
#

nms gud

#

I like pain

wet breach
#

nms isn't needed for this. That is just introducing unnecessary complexity

orchid gazelle
#

Its hella easy to use NBTTags

orchid gazelle
#

10x easier to use them than PDC imo

wet breach
#

that is your opinion, but that means now instead of a plugin that is version independent, it is now version dependent and the compiling has to be different to depend on the necessary jars

#

nms doesn't have an api, where as PDC does

orchid gazelle
#

Yeah fair but not fair =(

#

I do not have a single medium sized project without nms lol

#

nms made coding fun for me again

kindred valley
#

Hello noobs

orchid gazelle
#

Hello

kindred valley
#

Where is Nuker

orchid gazelle
#

Yes

echo basalt
#

nms is nice

#

I think I got one project or two that don't use NMS

#

but they rely on other plugins of mine that use NMS so

kindred valley
#

I missed him saying hello noobs

#

@fluid river

echo basalt
orchid gazelle
#

I only do complicated things so I never do not use nms lol

echo basalt
#

mans tryna flex

fervent panther
#

What do you mean by using NMS?

orchid gazelle
remote swallow
#

but also inclding everything in net.minecraft

wet breach
# fervent panther What do you mean by using NMS?

NMS is where you directly invoke methods and such in the server code as opposed to using the API. I will say you can do a lot more that way, but you can also do a lot more wrong that way too. Also, there is generally no documentation for most things and even there was that documentation ends up being outdated within a version or two because method names and classes change between MC versions.

orchid gazelle
#

Jeez frost

#

(With the second part frostalf is basicly saying that often nobody can help you and you have to read the actual minecraft-code to find things)

fervent panther
#

Ah ok. What things can you not do using the API?

orchid gazelle
#

NBT for example

echo basalt
#

Querz/NBT on github, NBT-API are all apis that work

#

Anything regarding packets and fake blocks/entities, as well as more general block and entity logic can be answered by me

#

I don't know anything about custom biomes but I'm good enough at the rest

orchid gazelle
#

Basicly everything that is not intended to be done

#

lol

#

Lets not forget about Packets for nms

wet breach
#

well it isn't that is not intended to be done, just not everything can be a feature as the more things included into the API, the more code there is to maintain implementation wise

echo basalt
#

I'm writing a full nms course

wet breach
#

and well it all breaks and needs to be fixed by hand between versions lol

echo basalt
#

That has information tiers

#

So you can learn about nms packets, go deeper into tcp if you want

orchid gazelle
#

Overriding internals is also a lot of fun

wet breach
#

might help to learn TCP first

#

before messing with packets, but most seem to like learning the opposite way

#

and then wonder why they have problems they can't seem to understand ๐Ÿ˜›

orchid gazelle
#

Lmao

#

@wet breach I would personally mark the course to be only for advanced devs, newbies might try and fail miserably

echo basalt
#

My objective is to have a basic tier for most developers

wet breach
#

while true, it would be beneficial later down the road and even elsewhere outside of the game lol

echo basalt
#

And an advanced tier if you want to make your own server impl

#

And/or game

orchid gazelle
#

Oh sorry its you writing the course, not alf

#

I forgot

wet breach
#

like it would stop people from thinking that making it packet only would save on bandwidth when they don't realize all packets are padded out anyways to be the max size ๐Ÿ™‚

echo basalt
#

Yeah that

orchid gazelle
#

Oh guys

#

I forgot

#

I gotta do nms Packet stuff today LOL

#

That is gonna be FUN

fervent panther
#

Can I store a UUID in PDC or do I have to convert it to a string?

eternal night
#

not natively but it is very straight forward to write your own PDT for that

fervent panther
#

I'm new to Java so I have no idea how to do that lol

eternal night
#

I believe the javadocs even have an example ๐Ÿ˜…

winged anvil
#

AP CS Question

kindred valley
#

Pdc is strong af

#

And configurable

fervent panther
#

After coding for a while without testing everything is broken now XD

#

oh nevermind

fervent panther
kindred valley
#

You can do that in that way either

quiet ice
#

I mean, generally you'd want to use Object#equals - at worst (due to nullabillity) you'd use Objects#equals.
So either uuid1.equals(uuid2) or Objects.equals(uuid1, uuid2)

mighty pier
#

is there an event to see if an item was blown up?

fervent panther
#

I realized the way I made it won't work. Currently when the player right clicks with the sword it checks if the hashmap has the player's UUID as a key. If it does, then it creates an explosion at that block. if it doesn't, it creates a new falling block which gets added to the hashmap after it turns into a block. The problem is I can only keep track of one block at a time so if the player creates a new bomb before the last one becomes a block, they now have an extra block that doesn't behave as a bomb.

vocal cloud
#

Why not use a list of blocks and track the list?

#

You can store them in a Set

fervent panther
#

I need to store each block with the player's uuid and I don't know how to do that with a list

cyan trout
#

Tablist Sorting

remote swallow
#

https://paste.md-5.net/xequyujagi.cs my brain is refusing the let me see why this is A) running giveOrDropItem more than once and B) why the drop swapping isnt working on every drop (I have GRASS swapped to PINK_BANNER to test it but its giving me both)

wet breach
#

to get the UUID objects back

fervent panther
#

Oh ok thanks

wet breach
remote swallow
#

all of them?

wet breach
#

in general if you are wanting to compare the contents of an object and not if the objects are the same yes

remote swallow
#

ah

#

when swapping them to == and reloading it then doesnt give me any of swaps

quiet ice
#

Unless snakeyaml interns strings, but that is a dangerous assumption to do

fallow violet
#

guys wtf i have in my plugin yml my command: commands: and as a sub thingy i have yes:\n description: something here now... my plugin tells me that he cant find the yes plugin: java.lang.NullPointerException: null [...]
at de.fluffy.stonekid.modules.administration.commands.VoteYesCommand.<init>(VoteYesCommand.java:24)

But my code: Objects.requireNonNull(instance.getCommand("yes")).setExecutor(this);

remote swallow
#

?paste the full file

undone axleBOT
fallow violet
#

aighht

quiet ice
#

(plugin.yml and VoteYesCommand.java)

fallow violet
mighty pier
quiet ice
remote swallow
#

also #setExecutor includes tab completer

fallow violet
#

i created a module system

quiet ice
#

oh right lol, I am blind

hasty prawn
# mighty pier

Don't create an instance of the class that extends JavaPlugin

hasty prawn
#

i.e stop doing new RazerPlugin

fallow violet
#

i didnt? (ignore this (: )

mighty pier
#

i ddint

#

uh

remote swallow
hasty prawn
mighty pier
#

maybe 2 plugins with the same package name

fallow violet
mighty pier
#

cause im making my plugin and someone asked me to make a plugin

#

using the same test server

quaint mantle
#

This error seems like to happen when I click too fast

quiet ice
# mighty pier i ddint

You did.

      at me.frandma.razerplugin.RazerPlugin.<init>(RazerPlugin.java:6) ~[RazerPlugin-1.0.jar:?]
      at me.frandma.razerplugin.RazerPlugin.onEnable(RazerPlugin.java:10) ~[RazerPlugin-1.0.jar:?]
mighty pier
#

fucking

#

thank you

quiet ice
#

Reading stacktraces is an important skill here in java world

quaint mantle
quiet ice
#

Well I certainly don't like it, but it ought to be enough

#

At worst you'll see me doing a PR titled "Migrate to DataInput/OutputStream" in the future, but that is rather unlikely

hasty prawn
# quaint mantle How can I make it not null?

In your else if you're checking if it's not null or something using that thing, but if the first one fails that means it IS null, so the second one is probably where you're getting that NPE.

fallow violet
#

am i not able to use /yes?

#

or something

#

i mean its litterally in the plugin.yml

quaint mantle
hasty prawn
#

Just change it to event.getCurrentItem() == null || other thing

quaint mantle
#

this is what I had before

#

ah okay

hasty prawn
#

Wait

wet breach
quiet ice
#

Yeah, it was very untypical of you to suggest using == on Strings

hasty prawn
# quaint mantle this is what I had before

Use guard clauses, makes it way easier.

if(event.getCurrentItem() == null) return;
if(event.getCurrentItem().getType == Material.AIR) return;

event.setCancelled(true);
quaint mantle
#

The error only happens if I click the item too fast

quiet ice
#

Are you sure that it isn't caused by you clicking outside the inventory?

quaint mantle
#

nope

#

the thing I'm doing is preventing a item not to move/drop

#

its works fine

fallow violet
#

my plugin without my yes command: ๐Ÿ™‚

#

._.

quaint mantle
#

but if I click too fast it just gives this error, still works fine tho

quiet ice
#

You'd still would like to use item != null && item.whatever() though, otherwise it is guaranteed to throw

fallow violet
#

okay guys the thing: You cant use a command called yes idk why

hasty prawn
#

Or use guard clauses because that is superior

quaint mantle
#

ah okay

quiet ice
#

&& is basically fail-fast, that is the right-hand-expression will never get executed if the left-hand-expression yields false

remote swallow
wet breach
quiet ice
wet breach
#

if you make the null check its own check without the others, it shouldn't try to evaluate the rest of it

#

if it is null

quaint mantle
#

like this?

wet breach
#

well they don't all need to be separated, just the null check

hasty prawn
#

Should be == not !=

quaint mantle
#

my bad

#

this

#

I noticed lol

hasty prawn
#

Yeah that's right

wet breach
#

now it should solve your clicking to fast throwing NPE's

quaint mantle
#

whoa it worked... I suppose

wet breach
#

and you also learned why combining checks together might not always be a good thing since they will all get evaluated even if the first fails ๐Ÿ˜›

quaint mantle
wet breach
#

well, then they didn't know the caveat of doing so either

remote swallow
#

Code running methods more than it should, cant figure out why

fervent panther
#

Storing block locations

quiet ice
#

uh, have you worked with bitwise operators and I/O Streams before?

winged anvil
#

name classes with UpperCamelCase

sleek warren
#

hi! someone could advise me a good ORM for spigot with my pgsql database?

quiet ice
#

Well I guess It'd be enough experience for a little excursion:

public class MyContainer {
     public String name;
     public long x;
     public long y;
     public long u;
     public World world;
}

can easily be stored by doing

try(DataOutputStream dos = new DataOutputStream(Files.newOutputStream(this.getDataFolder().toPath().resolve("myFile.txt")))) {
    for (MyContainer m : myList) {
        dos.writeByte(1);
        dos.writeUTF(m.name);
        dos.writeLong(m.x);
        dos.writeLong(m.y);
        dos.writeLong(m.z);
        dos.writeLong(m.world.getUID().getMostSignificantBits());
        dos.writeLong(m.world.getUID().getLeastSignificantBits());
    }
} catch (IOException e) {
   throw new UncheckedIOException(e);
}
#

Reading would be equally easy:

try (DataInputStream din = new DataInputStream(Files.newInputStream(this.getDataFolder().toPath().resolve("myFile.txt")))) {
    while (din.readByte() == 1) {
       MyContainer m = new MyContainer();
       m.name = din.readUTF();
       m.x = din.readLong();
       m.x = din.readLong();
       m.x = din.readLong();
       m.world = Bukkit.getWorld(new UUID(din.readLong(), din.readLong());
       myList.add(m);
    }
} catch (IOException e) {
   throw new UncheckedIOException(e);
}
#

Now, you can do it in a more rational way, but to be frank I do not know the more rational way. ByteBuffers are everything to me

dry forum
#
    public void onBlockClick(PlayerInteractEvent e) {
        if (e.getAction() != Action.RIGHT_CLICK_BLOCK) {
            return;
        }

        Bukkit.broadcastMessage("clicked");``` im right clicking blocks and nothing is happening, yes its registered
quiet ice
#

?jd-s

undone axleBOT
orchid gazelle
#

or should I just spam it to every player?

#

(please notice that I am sending it every single tick for every single fallingblock)

quiet ice
undone axleBOT
#

The PlayerInteractEvent may be called once per hand. If you only want code to be executed once, you can check the result of https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/player/PlayerInteractEvent.html#getHand(), then decide functionality.

For example, only executing code if the main hand was used:

@EventHandler
public void onPlayerInteract(PlayerInteractEvent event) {
    if (event.getHand() != EquipmentSlot.HAND) { // * if the hand used is NOT the main hand:
        return; // do not progress past this point  |
    }
    // provide functionality
}
quiet ice
#

At first one would want to get it to register at all

fresh timber
#

I've been trying to use NMS and I am looking at many tutorials. All of them have objects and things that my plugin doesn't recognize... does anyone know how I can get this to work?

remote swallow
#

Have you ran build tools and does the dep say "spigot-api"

fresh timber
#

no I have not ran buildtools and dep is this

remote swallow
#

Run build tools and change artifact to just spigot

#

?bt

undone axleBOT
fresh timber
#

ok

#

I removed the -api and I got that error

#

also I have looked at that website many times and I dont see where I can get it for my plugin... can you tell me how

#

I looked up tutorials on how to get it on a plugin too and they were getting it to make servers

remote swallow
#

Run buildtools

dry forum
#
            Bukkit.broadcastMessage(key);``` why is it only broadcasting 1 key my config looks like this

```counter: 2
1-id:
  location:
    ==: org.bukkit.Location
    world: world
    x: -85.0
    y: 67.0
    z: -719.0
    pitch: 0.0
    yaw: 0.0```

it only broadcasts "counter"
#
                return true;
            }``` and the 2 locations are the exact same and its not returning true
humble tulip
#

Huh

covert nest
#

just asking, are plugins meant for april fools/cursed plugins allowed on spigot? (website)

lethal coral
#

How can I detect when a player damages a falling block?

ebon isle
#

Hello

covert nest
ebon isle
#

Otw m8 waitttt

#

Why does every time I write /land commands it's print out /land. I'm scrathing my head off, because I've check all my player.sendMessage but none return command name

lethal coral
#

๐Ÿ˜

eternal night
#

can you show the code for that command ?

ebon isle
#

Sure

#

A min

ebon isle
eternal night
#

Yea so

#

when you return false, bukkit believes the command was not successful

#

and prints the usage message

#

you always return false -> always the usage message

covert nest
eternal night
#

pretty sure any form of plugin is allowed as long as it follows the guideline

#

the concept and ability it provides shouldn't matter ?

covert nest
eternal night
#

I mean, mark the plugin as that

covert nest
#

currentley i have 1 that kicks everyone who moves not like a bot

#

and one that just kicks anything that moves

river oracle
#

๐Ÿ’€who would download that

eternal night
#

I presume that is fine as long as you properly state that ?

#

at least that is how I'd interpret it

covert nest
#

i just wanted to verify that

covert nest
ebon isle
#

Btw thanks @eternal night !

lethal coral
eternal night
#

no problem ๐Ÿ™‚

#

idk if spigot has API for that

covert nest
#

just checking that the 1.15 bukkit api works on spigot bukkit paper and bungee 1.19 etc?

eternal night
#

I mean bungee does not matter, bukkit itself is dead

#

it should work tho yea

covert nest
#

do spigot plugins work on bukkit?

#

as in using the spigot api

eternal night
#

bukkit is literally not maintained ๐Ÿ˜…

covert nest
#

and im guessing there is a more up to date spigot api

eternal night
#

the fork/whatever you want to call it that spigot has from it is

covert nest
#

alright then

#

time to swap ๐Ÿ˜ญ

eternal night
#

spigot-api is as low as you realistically get

#

bukkit api is just, please don't ๐Ÿ˜…

hard ether
#

yeah

#

bukkit is discontinued right?

covert nest
#

thats what i get from 11 year old tutorials

eternal night
#

rip ๐Ÿ˜ญ

hard ether
#

11???????

covert nest
#

yea

hard ether
#

oh my

#

do you have $10 to spend

covert nest
#

they are using eclipse and jetbrains just came out

covert nest
eternal night
hard ether
#

cuz theres this really great course on Udemy that is constantly updated

eternal night
#

lmfao

hard ether
#

๐Ÿ˜

eternal night
#

yea don't buy courses on this kekw

hard ether
#

no like

#

id give the link

covert nest
#

i have self taught js php html css python etc

#

i think im good

hard ether
#

oh wait u mean spigot api cources

trim creek
hard ether
#

hard

#

im trying to self teach spigot

covert nest
#

what are you talking about?

#

took me a week

hard ether
#

but its too hard

#

so i bought a course lol

covert nest
hard ether
#

yes

#

im talking about syntax

#

and

#

basic java

#

like the docs dont help me bc i know nothing about java

#

and how to structure things

undone axleBOT
covert nest
#

js != java

hard ether
#

ive tried all of those

#

doesnt really help

#

i need 1-on-1 instruction basically

#

๐Ÿ˜‚

trim creek
#

Docs? Never heard of that

hard ether
#

but im solving my problem

covert nest
eternal night
#

jetbrains academy also has free tiers

#

which are really good for plain java

covert nest
vocal cloud
#

Which you should learn before spigot

covert nest
hard ether
#

im learning java rn

#

in school

#

but i tried to do soigot

#

without full java knowledge

#

and its really hard

covert nest
#

tbh if you can learn to read errors

hard ether
#

but syntax makes no sense

#

or it didnt

#

but now it kinda does

covert nest
#

its not that hard

hard ether
#

like the basics of how to structure a method

#

or smth like that

#

made no sense to me

covert nest
#

its not brainfuck for gods sake

hard ether
#

it can be ๐Ÿฅฑ

covert nest
#

<<<<<++-+++--...>>[]

#

a bit of brainfuck code

#

can someone just send me the subscribe to event line rq

#

i keep forgetting it

ebon isle
# hard ether but syntax makes no sense

My friend, you need to code everyday. Learn the basics first master it a bit and then you can learn API.

If you master one thing transition to another going to be easy, I'd say I've master Unity 3D framework but it's a struggle for me for years to master it.
Now just 5 days a go I dive into Spigot and I can read docs cleanly and I'd say that I've not using java that much but I master C# so the transition is easier

#

push your self to create a somewhere complex console program and learn programming fundemental then dive into API

hard ether
#

i'm just going to try to learn java first

#

if that makes any sense

ebon isle
#

Yes, do console program first before you dive into API

hard ether
#

yea

covert nest
#

ty

dry forum
#
            for(int z = (int) e.getBlockPlaced().getZ() - 11; z <= (int) e.getBlockPlaced().getZ() + 11; z++) {
                e.getBlock().getWorld().getBlockAt(x, e.getBlock().getY() - 1, z).setType(Material.RED_WOOL);
            }
        }``` how would i make this make a border around a center location? rn it makes a square
covert nest
undone axleBOT
covert nest
#

oooohhhhhh

covert nest
#

im coming from the bukkit api mb

vocal cloud
#

Intellisense is not intelligence you can't rely on Intellij's error handling to blindly walk your way through coding YanSigh

covert nest
#

ik

river oracle
covert nest
eternal night
#

change the api-version in your plugin.yml

covert nest
#

ty for helping

eternal night
#

no problem ๐Ÿ˜…

covert nest
#

any way i can delay the code i run until the player has actually completed joining?

eternal night
#

what are you doing ๐Ÿ˜…

#

this seems like an xy problem

covert nest
tardy delta
#

please do that by api

eternal night
#

^

covert nest
#

?

eternal night
#

also, no slashes in console

covert nest
#

oh yea

eternal night
#

you can clear a players inventory using the API ?

#

you can also add an item stack to a players inventory using the API

#

just executing commands is not how you develop plugins

#

e.g.

@EventHandler
public void on(final PlayerJoinEvent event) {
    event.getPlayer().getInventory().clear();
}
tardy delta
#

public void on ๐Ÿ’€

eternal night
#

reads nice, leave me aloneeeee

tardy delta
#

i hate those people

#

using final too ;-;

civic wind
#

Yh.. wth is on

eternal night
#

I mean, what additional information is provided by a different method name

#

onPlayerJoin(final PlayerJoinEvent event) ?

civic wind
#

Loads, easy to read, better organisation

eternal night
#

what

tardy delta
#

public void onJoin(PlayerJoinEvent event)

pine island
#
public class hitEvent implements Listener {
    @EventHandler
    public void onHit(EntityDamageByEntityEvent e) {
        if (e.getEntity() instanceof Player && e.getDamager() instanceof Player) {
            Player targetEntity = (Player) e.getEntity();
            Player player = (Player) e.getDamager();
        }
    }
}
``` any way to change the knocback amount?
eternal night
#

the fact that I have to write a method in the first place is already annoying, I don't want a large method name ๐Ÿ˜‚

civic wind
eternal night
#

yea but onJoin communicates nothing to me

eternal night
#

that I don't already know from the method signature

civic wind
#

But on does?

eternal night
#

literally 0

#

I see a method annotated with the EventHandler annotation and I see the event type

tardy delta
#

smh we cant convince him

eternal night
#

onJoin adds nothing, I can directly see this is called on joining

tardy delta
#

whats a location class value

pine island
civic wind
#

If you worked for a company you would be told to name methods properly, itโ€™s standard practice

tardy delta
#

im thinking about ClassValue<Location> now

eternal night
tardy delta
#

not funny

civic wind
tardy delta
#

whats a location location

#

ya man talking shit

ebon isle
tardy delta
#

you can serialize a location yes

#

theres even a FileConfiguration::getLocation

#

what lol

eternal night
#

if the only identifier you think is valid is the name of the method

#

instead of its entire signature

tardy delta
#

my teacher programmer told me i was doing a good job uwu

frail gale
#

what's the best way to print colored messages in Console?

eternal night
#

that is a completely personal opinion

civic wind
#

Itโ€™s standard practice idk why youโ€™re trying to argue about it lol

frail gale
#

with ConsoleCommandSender it generates strange symbols in the log files

tardy delta
#

Bukkit.getCommandSender().sendMessage(ChatColor.RED + "boo")

#

no reason to send colored messages in console too

frail gale
frail gale
tardy delta
#

idk atleast not in console

#

step 1: dont print colored lines

covert nest
#

just asking on addItem() how do i set the item and make it send 500?

tardy delta
#

new ItemStack(Material.DIAMOND, 500)

#

๐Ÿฅ„

eternal night
#

of what

tardy delta
#

check the param type ๐Ÿ˜‰

eternal night
#

generally any of static constructor wrapper

#

yes

#

exactly

tardy delta
#

looks ugly tho

eternal night
#

almost like the parameter type is part of the method signature and actively contributes to the method identification

covert nest
tardy delta
#

yes, again check the docs

#

?jd-s

undone axleBOT
orchid gazelle
#

hi guys how do I fix the movement predictions of my custom fallingblocks? The client keeps predicting trash and therefore it looks weird
I have already tried sending PacketPlayOutEntityVelocity packets every tick but the issue remains

pine island
#
public class hitEvent implements Listener {
    @EventHandler
    public void changeHitKnockback(EntityDamageByEntityEvent event) {
        if (event.getEntity() instanceof Player && event.getDamager() instanceof Player) {
            Player targetEntity = (Player) event.getEntity();
            Player player = (Player) event.getDamager();
        }
    }
}
``` Okay imma drop this one again any way to change knock back amount on hit so for ex. when player x hits player y. player y gets moved 4 blocks. anyway to 50% the knock back amount so player y moves only 2 blocks away
tardy delta
#

where naming conventions

pine island
#

i forgot them

tardy delta
#

they will forget you too

pine island
#

well, too bad this is nothing serious i just need to chnage knockback and im done w this plugin

tardy delta
#

nobody cares whether its serious or not

#

just use the right naming conventions

#

smh should use copilot for css, it knows it better than me

vocal cloud
#

Get added to the Copilot lawsuit DancingDog

eternal night
#

๐Ÿ”ฅ

tardy delta
#

no more stackoverflow

eternal night
tardy delta
#

damn its smart too

pine island
eternal night
#

5head bot for sure

#

I guess if you infringe a shit load of copyright and licences you get smart 5Head

pine island
#

how would i get an entitys name?

#

so for ex:

Entity name = event.getEntity().<getName()?>
eternal night
#

are you referring to the custom name ?

pine island
#

nope, like sheep!

eternal night
#

that is the entity type

pine island
#

ahh alright-

#

so .getType() i suppose?

eternal night
#

yea

#

from there you are off with some more or less fun choices

#

while the server bundles the english translations

#

I don't think spigot exposes them

pine island
#

ahhh alright tysm!

charred blaze
#

how to code claims plugin?

orchid gazelle
pine island
orchid gazelle
#

I can't tell if they are joking or not

charred blaze
#

when you claim land

#

to prevent someone griefing it

vocal cloud
#

Use a database and store the data in it. When someone breaks a block check a cache of current claims to see if the block is within one and the current permissions applied

pine island
#

no offense but why would u wnna code a custom one? there is like a billion out there already and a good way to do it is store a player's name somewhere check for blockBreak using an even Listener pass the breakers name through an if statement if it returns false replace the block back, i would also add a health penalty

eternal night
#

yes

#

hasn't happened yet ๐Ÿ˜…

glossy venture
#

abstract class with static final values for the default types id guess

eternal night
#

iirc interface and static accessor

#

Yea

glossy venture
#

wouldnt abstract class be better for like namespaced key and shit

#

and built in methods

eternal night
#

hm ?

glossy venture
#

like storing the namespaced key

#

so the impl doesnt have to do that

#

because its common to all materials

eternal night
#

its a server side impl

glossy venture
#

yeah

eternal night
#

I don't see how that matters then

#

either you do it in the API or in the server

#

which, if possible, always server

glossy venture
#

oh yeah

sonic steppe
#

How can i fix a written book showing *invalid book tag*
in this code

private void givePlayerBook(String mcUUID){
        ItemStack book = new ItemStack(Material.WRITTEN_BOOK);
        BookMeta bookMeta = (BookMeta) book.getItemMeta();
        bookMeta.setAuthor("tr3xxx_");
        bookMeta.setTitle("Blank");
        bookMeta.addPage("test");
        Bukkit.getPlayer(UUID.fromString(mcUUID)).getInventory().addItem(book);
        Bukkit.getPlayer(UUID.fromString(mcUUID)).openBook(book);
    }
pine island
#

is there anyway to make a player jump?

#

oh shit i forgot i had this horendouss pfp on

glossy venture
#

lets fucking go

#

first try

#

lets see if it loads

#

YES

#

no way

atomic swift
#

would this send a console command Main.getInstance().getServer().getConsoleSender().sendRawMessage(command);

digital plinth
#

can you make a zombie sneak with packets?

glossy venture
#

no zombies dont have a sneak pose

#

99% sure

hazy parrot
tall dragon
atomic swift
tardy delta
glossy venture
#

fancy scoreboard without flickering finally

hazy parrot
atomic swift
#

will that work

digital plinth
#

does right clicking shields trigger playerarmswing

fallow violet
#

does PlayerInventory#getContents() returns everything with armor and offhand and this shit?

hybrid spoke
digital plinth
#

i think

#

it does with armor

#

i forgot with offhand

#

cool

fallow violet
#

thanks thats very nice

digital plinth
#

very very convenient

fallow violet
#

can i get an inventory of a double chest just with one chest?

digital plinth
#

what

#

you cant put a double chest worth of items in a single chest

fallow violet
#

am i able to get the inventory of this chest?

#

the double chest

fallow violet
#

can i cast 1 block to a double chest?

#

lol

#

like this?

#

why not

#

tell me :o

#

huh

#

so just getBlock()?

#

im confused

#

so i cast the block to a chest

#

and then get the doublechest from the holder?

#

you told me? wtf

#

thats what i said...

#

yes?

#

yes?

hasty prawn
fallow violet
#

tf?

#

i litterally repeated what u said because i want to get sure

#

tf

digital plinth
#

dont be rude

buoyant viper
#

?jd-s

undone axleBOT
buoyant viper
#

for myself

pine island
#

anyway to move the ballFiring event to the onPlayerMove event (ill fix the naming eventually )

public class doubleJump implements Listener {
    @EventHandler
    public void onPlayerMove(PlayerMoveEvent e) {
        Player player = e.getPlayer();
        Vector velocity = player.getVelocity();
        // Check if the player is moving "up"
        if (velocity.getY() > 0)  {
            // Default jump velocity
            double jumpVelocity = 0.42F; // Default jump velocity
            //check if player has potion effect of jump
            for (PotionEffect effect : player.getActivePotionEffects()) {
                if (effect.getType().equals(PotionEffectType.JUMP))
                    jumpVelocity += (float) (effect.getAmplifier() + 1) * 0.1F;
            }
            // Check if player is not on ladder a\nd if jump velocity calculated is equals to player Y velocity
            if ((player.getLocation().getBlock().getType() != Material.LADDER) && (Double.compare(velocity.getY(), jumpVelocity) == 0))
                player.sendMessage("You jumped");
        }
    }
    @EventHandler
    public void ballFiring(PlayerInteractEvent event) {
        Player player = event.getPlayer();
        Action action = event.getAction();
        if ((action == Action.PHYSICAL) || (event.getItem() == null) || (event.getItem().getType() == Material.STICK)) return;
    }

}
digital plinth
#

is there a way to make survival player float at a certain altitude but also able to walk and jump like theres ground

#

lemme try repeated tp and see if it stutters

quaint mantle
#

i recently did a fully reset of my pc with all files configuration

#

etc

#

i was wondering if there was any tutorials out there

#

on how to setup your workspace again

#

so intelliji

#

making it look nice

#

installing all the spigot stuff

#

all the java

#

just setting up the environment

#

if anybody knows of a tutorial for this

digital plinth
#

the giant's hitbox is non existent in the upper body

#

is bounding box the thing ur supposed to use to make custom hitboxes

steady rapids
#

Hello, does anyone know in what class does spigot handle players messages and commands?

undone axleBOT
#

The PlayerInteractEvent may be called once per hand. If you only want code to be executed once, you can check the result of https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/player/PlayerInteractEvent.html#getHand(), then decide functionality.

For example, only executing code if the main hand was used:

@EventHandler
public void onPlayerInteract(PlayerInteractEvent event) {
    if (event.getHand() != EquipmentSlot.HAND) { // * if the hand used is NOT the main hand:
        return; // do not progress past this point  |
    }
    // provide functionality
}
winged anvil
fresh timber
tardy delta
#

?bt

undone axleBOT
fresh timber
#

this does not tell me how ;-; ive already looked at this

#

where

subtle folio
#

anyone know how iโ€™d make a assist system without a hashmap<uuid list<uuid>> ?

fresh timber
#

it tells me how to make a server with buildtools not a plugin with it

#

he told me to get buildtools for my plugin im making to use nms ;-;

subtle folio
#

ty basbg

#

wai

#

tthats not mutable

#

im not making a new one each time

#

likle

desert loom
#

you could make another class to handle the List<UUID>

rough drift
#

Its actually pretty simple

subtle folio
#

i guess

rough drift
#

You can probs get away with some PDC shit

subtle folio
#

ooo thats smart

#

or even meta if im feeling risky

rough drift
#

like mark a player in their PDC

subtle folio
#

wait

rough drift
#

and after some time remove it

river oracle
#

Why are you obsessed with not using a hashmap lol

flint coyote
#

isn't pdc a map aswell?

rough drift
#

I gave an answer

#

so you know

worldly ingot
#

I'd personally make use of a Queue EmbarrasedAsk Think it makes a bit of sense here

rough drift
#

ah

worldly ingot
#

Map of queues that is

rough drift
#

So like

rough drift
#

Map<UUID, Queue<UUID>>?

#

I am dum

worldly ingot
#

Yes, though the smarter idea would be to hide that Queue<UUID> behind an object

#

^ this, but a Queue

rough drift
#

remove target

#

you want to use a map rather than looping over a list

#

and comparing target

#

its faster

vague stone
#

Can I cast somehow a PlayerInteractEvent to a PlayerInteractEntityEvent?

rough drift
#

I mean depends

#

It's the only fast way

#

I mean not quite

#

you could use a Long2ObjectHashMap

#

or how was the fastutil impl called

#

I mean

#

I wish they'd implement that shit in mc ๐Ÿ˜‚

#

MSPT--

vague stone
#

@worldly ingotuhh could u help me

rough drift
#

Don't ping choco, just ask a question

#

?ask

undone axleBOT
#

If you have a question, please just ask it. Don't look for staff or topic experts. Don't ask to ask or ask if people are awake or available. Just ask the question to the channel straight out, and wait patiently for a reply. Make sure you use the right channel regarding the topic of your question. Create a thread in case the channel is already in use!

vague stone
#

ah

#

I see

#

ty

#

Does someone know how to cast PlayerInteractEvent to PlayerInteractEntityEvent?

sullen marlin
#

an event is an event. If you want a particular event listen to that event

river oracle
#

^

vague stone
#

Uh then maybe ask detailed

I programmed a compass which has the ability when I rightclick it, that I get teleported to a spot. My problem is now that if I rightclick a citizens mob on the one world which has the ability to teleport me to another world, it teleports me back

sullen marlin
#

Ignore cancelled events

river oracle
#

If compass in hand and aiming at npc cancel

sullen marlin
#

If the citizens isn't cancelling the event that's probably a bug on them

vague stone
#

uh how can i do this with aiming to the npc?

sullen marlin
#

If event.iscancelled return

vague stone
#

The method isCancelled() from the type PlayerInteractEvent is deprecated should I ignore this?

eternal oxide
#

not on spigot it's not

#

oh it is

river oracle
#

Paper???

vague stone
vague stone
river oracle
#

๐Ÿ’€

#

Cope

vague stone
#

xDD

eternal oxide
#

read teh depreciation, it tells you

worldly ingot
#

mfw ignoreCancelled = true is being neglected sadge

vague stone
#

ah idc bout deprecated

#

it works so I'm fine with it :P

#

ty for your help โค๏ธ

fresh timber
#

How can I use NMS? Every time I try to do what tutorials say, my plugin doesn't recognize many of the objects.

shadow gazelle
#

What's the difference between the title and name of an inventory?

shadow gazelle
fresh timber
#

into my plugin?

shadow gazelle
#

no...

#

Set it as a provided or compileOnly

fresh timber
#

ok, where can I find the dependency to copy/paste

shadow gazelle
#

You can't just download it, that's illegal

fresh timber
#

bruh

shadow gazelle
#

you need to build it with build tools

river oracle
#

Build tools spigot version ur using than remove -api from the spigot dependency

#

Make sure u use --remapped

fresh timber
#

so I make a buildtools server then remove -api form spigot dependency?

shadow gazelle
fresh timber
#

omg

#

I've looked at this website a million times trying to get this answer already

#

it tells me how to make a server

#

I already have a server

shadow gazelle
#

It tells you how to use BuildTools if you would actually read it

fresh timber
#

I am trying to make it in my plugin to not have errors

river oracle
#

๐Ÿคฆ๐Ÿฝโ€โ™‚๏ธoh boy buddy

#

Gimme a minute

#

Your in above your head already but gimme a sec

fresh timber
#

okay...

shadow gazelle
#

Yeah, NMS is not fun

#

It's just painful

fresh timber
#

I need to set below name ;-;

#

everything I find to set it says nms is necessary

shadow gazelle
#

For packet manipulation?

#

Just use ProtocolLib if that's what you need it for

fresh timber
#

also I want to make it where u can have mining fatigue but ur arm doesnt move so slow

shadow gazelle
#

That's client-sided, there's nothing you can do about that

fresh timber
#

yea but hypixel does it

shadow gazelle
#

Uh, no

fresh timber
#

yes

shadow gazelle
#

Where

fresh timber
#

in skyblock dungeon hub

shadow gazelle
#

๐Ÿคฆโ€โ™‚๏ธ

river oracle
#

Here's nms have fun no one here can really help you with this stuff so you best beable to be independent

shadow gazelle
fresh timber
#

im pretty sure its not

#

bcus u can damage blocks

shadow gazelle
#

with flags dynamically set

fresh timber
#

but very slowly

river oracle
shadow gazelle
#

You can't give people miner fatigue and have it not render for the player, the client handles the arm slowdown

fresh timber
#

so if u have mining fatigue in adventure mode where you can break blocks somehow ur arm doesnt move slowly

shadow gazelle
#

You can not stop the player arm from moving slower without modifying the client

#

Which Dungeons hub?

fresh timber
#

go to skyblock in hypixel

#

then walk to nether portal in cave behind spawn

#

actually, you may have mining fatigue 1

#

but even with pickaxes it doesnt break

#

maybe they change the block hardness

river oracle
#

No they probably just cancelled the interact event lol

fresh timber
#

but I can add damage to block

#

very slowly

#

I did a few weeks ago

river oracle
#

Manipulating block damage event maybe

shadow gazelle
river oracle
#

Yea they are just manipulating block damage event lol

shadow gazelle
#

wait you do have mining fatigue

fresh timber
#

yep ig u cant anymore

shadow gazelle
#

wtf

fresh timber
#

thats what I said

shadow gazelle
#

That makes no sense

#

ohhh wait

#

negative mining fatigue

fresh timber
#

tf

#

why would they do that

shadow gazelle
#

yeah no clue

#

but negative stops you from breaking anything and doesn't cause the slowdown effect

alpine cairn
#

You can change the toughness of a block with a plugin?

summer scroll
shadow gazelle
#

I mean

#

you could

alpine cairn
#

Dang really?

fresh timber
#

I saw a spigot thread where someone said they did

shadow gazelle
#

my modifying packets

fresh timber
#

ye

river oracle
shadow gazelle
#

You could do pretty much anything by modifying packets

alpine cairn
#

So it is not easy then?

river oracle
#

Ni

shadow gazelle
#

but yeah, pretty sure this is negative mining fatigue

river oracle
#

You need nms

alpine cairn
#

nms is what?

shadow gazelle
#

or ProtocolLib if you don't want to hate yourself

river oracle
#

Protocol lib sucks

#

Nms is easier

shadow gazelle
#

what

river oracle
#

It's just objectively easier

shadow gazelle
#

Not really?

summer scroll
#

tru

river oracle
#

Remapped hell yea

humble tulip
#
public class Callback<T> {

    private final List<Consumer<T>> consumers = new ArrayList<>();
    private T result;
    private boolean results = false;

    /**
     * Ideally this method should be called from the main thread.
     *
     * @param result Result that is being proviaded to the callback.
     */
    public synchronized void setResult(T result) {
        if (this.hasResults())
            throw new IllegalStateException("Callback already has a result");
        this.result = result;
        this.results = true;

        if (this.consumers.size() == 0)
            return;

        for (Consumer<T> consumer : this.consumers) {
            consumer.accept(result);
        }
        this.consumers.clear();
    }

    public synchronized boolean hasResults() {
        return this.results;
    }

    public T getResult() {
        return result;
    }

    public static <T> Callback<T> withResult(T result) {
        Callback<T> callback = new Callback<>();
        callback.setResult(result);
        return callback;
    }

    public synchronized void whenComplete(Consumer<T> consumer) {
        if (this.hasResults())
            consumer.accept(this.result);
        else
            this.consumers.add(consumer);
    }
}

Should these methods be synchronized

river oracle
#

It's copy paste between versions 90% of the time and it's super easy to multi module

alpine cairn
#

If you were to edit the toughness of a block would it be every block of that type in a world for every player or could you make it only certain blocks in an area and only to certain players?

shadow gazelle
#

Well if you remap methods to be more than a, b, c, d, etc then I guess it would be

humble tulip
#

i'm not sure if i understand synchronized correctly

river oracle
#

It's all of the methods properly mapped

shadow gazelle
#

nice

#

Mojmaps though ๐Ÿ’€

river oracle
#

Mojang Remapped is like the best thing

shadow gazelle
#

Yarn >>> Mojmaps

river oracle
#

You even ever used mojang mappings

shadow gazelle
#

yes and they made me want to die

river oracle
#

I don't mind yarn but mojang names make a lot of sense lol

wary topaz
#

private final File file = plugin.getDataFolder();
^ How would I do this without getting null?

#

plugin is this.plugin

shadow gazelle
river oracle
#

createFile?

river oracle
shadow gazelle
#

Now to never go to Dungeons again

shadow gazelle
river oracle
#

Yea I know

river oracle
#

I already answered you

wary topaz
#

Oh you were talking to me?

#

Mb

river oracle
#

Mkdir tho not createfile

#

Something along those lines iirc

ivory sleet
river oracle
#

I believe in yoh

wary topaz
#

Unhandled exception: java.io.IOException

river oracle
#

Damn feels bad idk

ivory sleet
#

I liked yarn, but the maintainers used to love fucking with compat (dk if thats still the case)

river oracle
#

Maybe yoh don't have write perms

ivory sleet
#

like changing mappings at random (causing incompat on dev side)

wary topaz
river oracle
#

You might not have write perms to the directory

#

How is plugin null wtf

wary topaz
#

^

river oracle
#

Static moment???

wary topaz
#

oh

river oracle
#

Lmao

wary topaz
#

Non-static field 'plugin' cannot be referenced from a static context

#

Alr

#

I'll try

river oracle
#

Try not abusing static and just using DI

#

?di

undone axleBOT
shadow gazelle
river oracle
#

I dint think there is one

#

Idk what ur talking about tho

wary topaz
#

(No errors)

river oracle
#

InventoryView#getTitle is the only way to get title iirc

#

Also wtf

#

What is that

#

If any of that is null ur in trouble you don't even need to check as unless something fucks up with this it'd be completely irreversible

#

Your plugin is as good as broken

wary topaz
#

It works with that.

river oracle
#

Works

#

Is this an intellij thing

wary topaz
#

yea

river oracle
#

Intellij can be so stupid with its nitpicks sometimes lol

#

VSC ๐Ÿ’ช

#

I'm just hugr vscode Fan

wary topaz
river oracle
#

Don't mind me

wary topaz
#

oh thats my translatealternatecolorcodes thing

#

I just want it to make a yml file idk why it's so difficult

#

it shouldve been as easy as getconfig.save

#

so replace save with createnewfile?

#

file.createNewFile(file);?

#

Its erroring

#

You said change homes

#

Ohhh alr

#

Result of 'File.createNewFile()' is ignored

alpine cairn
#

What exactly is an NMS class?

wary topaz
#

Net.Minecraft.Server

#

How would I save it? Same way I did before?

#

How's that

#

Done ;D

hybrid spoke
#

sendHome lovely method

wary topaz
#

Still another error ๐Ÿ˜›

hybrid spoke
#

but i dont think that the commandexecutor is the right one to handle all of that

#

as well as you might wanna make your variables private final

#

yeah and if your player updates their home the plugin wont notice it

wary topaz
#

I like to have one class per command

hybrid spoke
#

it is java.lang.NullPointerException: Cannot invoke "String.startsWith(String)" because "msg" is null

wary topaz
#

How do I fix that?

undone kernel
hybrid spoke
#

HomeRepository

wary topaz
#

I'll put it in a different class later

hybrid spoke
#

f.e.

wary topaz
#

๐Ÿ˜›

hybrid spoke
#

nah

#

Controller and Manager is a way too overused suffix

wary topaz
hybrid spoke
#

Repository seems about right since it holds, manages, adds or aborts the whatever it is about

#

nah

wary topaz
#

https://github.com/EthanGarey/BetterServer/blob/master/src/main/java/BetterServer/Main.java#L52

#

https://github.com/EthanGarey/BetterServer/blob/master/src/main/java/BetterServer/commands/Homes.java

hybrid spoke
#

i always make use of the repository pattern

#

keeps me away from managers

#

and does what i need it to do

wary topaz
#

alr

hybrid spoke
#

tf is a plugwoman

remote swallow
#

plugman but better

wary topaz
#

I use it for localhosts

hybrid spoke
wary topaz
#

faster testing

#

but fucks with your plugin

remote swallow
hybrid spoke
#

just reload normally

remote swallow
#

unlike plugman

wary topaz
#

godcipher takes too long plugwomen is instant

hybrid spoke
#

too long

remote swallow
hybrid spoke
#

what toaster are you playing on

wary topaz
#

a small one ๐Ÿ˜›

#

thanks guys for helping me fix my plugin

ancient plank
#

My Samsung toaster

undone kernel
vocal cloud
#

Samsung roaster

remote swallow
#

wifi kettle

alpine cairn
#

Does the "sendTitle" method have to be deprecated?

remote swallow
#

on paper probably

wary topaz
#

Yeah nvm it keeps erroring ima just remake /home again

alpine cairn
#

"The method sendTitle(String, String) from the type Player is deprecated"

hybrid spoke
#

there is an alternative

remote swallow
#

use the other one

hybrid spoke
#

?jd-s

undone axleBOT
alpine cairn
#

With that one you need to include int values?

remote swallow
#

read the link

#

it tells you what they are

alpine cairn
#

Thank you

wet sparrow
#

hey

wary topaz
remote swallow
atomic swift
#

how would i go about calling a custom sound with Player#playSound(...)

wet sparrow
#

im have this error

#

to try download buildtools

remote swallow
#

buildtools+?

atomic swift
undone kernel
#

buildtools+?

wary topaz
#

buildtools+? Opt me in!

undone kernel
#

damn he edited it now it's just buildtools ๐Ÿ˜ฆ

wary topaz
#

sad

fresh timber
#

How can I use a Tab Completer in a bungeecord plugin? I found this constructor,

TabCompleteEventโ€‹(Connection sender, Connection receiver, String cursor, List<String> suggestions)

but I do not no what to do with it.

undone kernel
atomic swift
atomic swift
fresh timber
#

anyone?

remote swallow
undone kernel
leaden gust
fresh timber
#

ah ok

#

that is different from spigot

leaden gust
#

yep

fresh timber
#

how can I make it tabcomplete for different commands

#

soo... uhh, like this?

public class helpCompleater implements Listener {

    public void helpCompleater(TabCompleteEvent event) {}
    
    @EventHandler
    public void onTabComplete(TabCompleteEvent event) {
        helpCompleater(event);
    }
}
undone kernel
#

Compleater?

fresh timber
#

chill I typed it wrong when I made the class

undone kernel
#

Completer

fresh timber
#

ik ;-;

undone kernel
echo basalt
#

ehhh