#help-development

1 messages · Page 1875 of 1

sterile token
#

Explain what are you doing btw. If not its difficult to help

arctic moth
#

No I can't rn I ran out of time so I'll be back home at my PC in about 2 hrs

winter mesa
#

how to make this transition?

Block a = ;//;
        
        ...
        
        Chest c = ; // from Block a

Having block a cast it to Chest type

sterile token
arctic moth
winter mesa
eternal oxide
#

Chest c = (Chest) a.getState();

winter mesa
winter mesa
arctic moth
winter mesa
#

?

sterile token
#

Anyone who can explain me the difference?

winter mesa
arctic moth
#

Lol

#

Wait does it still exclude it if there's no space

winter mesa
#

dude

#

it's just a comment

arctic moth
#

Yeah

#

But why is it ;

winter mesa
#

it does not matter?

arctic moth
#

Lol

winter mesa
#

hello?

lavish hemlock
#

He's asking why you have a comment there

#

For what seems like no reason

winter mesa
#

no reason

lavish hemlock
#

Okay but why do you have it then

#

There's no point to it

winter mesa
#

bc of misstype?

#

; is near / on keyboard

radiant estuary
misty current
#

hey, i am listening for entity destroy packets to check when an entity gets out of render from the player and do something related to it, but the issue is that the packet only has the id. Is there another option else than looping all entities? It seems pretty inefficient to me

round finch
#

in an inventory or as a block placed in the world?

tiny wolf
#

How can I reference test in here, it's not a key as it's just the name of the list

eternal oxide
#

config.getList("Placed.test")

tulip owl
tiny wolf
eternal oxide
#

getKeys(false)

tiny wolf
#

getKeys doesnt work

#

that just returns null.

eternal oxide
#

config.get("Placed").getKeys(false)

tiny wolf
#

that wouldn't work, but I'll try what you mean

radiant estuary
brave sparrow
#

Show us the reduce durability method

radiant estuary
brave sparrow
#

You’re increasing the durability right there in the code

radiant estuary
#

you mean getDamage() +1?

#

thats how it works... becuase -1 would always repair it

brave sparrow
#

Right

#

So no matter what you either add extra damage to the item or do nothing

#

If you do nothing, assuming this is hooked up to some event listener, the damage will still be added to the item as normal

radiant estuary
#

i mean it works

#

it just dont works on fully repaired tools

sterile token
#

Hi i want to ask if it possible to inject a custom channel to the current Bungeecord Netty. So them use that channel with a custom wrapper on Bungee and Spigot side. For seding update packets?

tame iron
#

what is the correct name of this material now? LEGACY_FIREBALL

quaint mantle
#

FIRE_CHARGE

tame iron
#

thx!

rancid snow
#

if the InventoryAction is InventoryAction.COLLECT_TO_CURSOR is there a way to know what items were collected?

wide coyote
#

inventoryclickevent

rancid snow
#

I know the name of the event

#

I'm already listening to the event

#

once I know the event name is collect to cursor, how do I know what changed in the chest

sterile token
wide coyote
#

inventoryclickevent triggers when you collect an item

upper niche
#

so im trying to add a player to a team
the team says its registered, but adding the players name to the team doesnt seem to register them
is that not how you add a player to a team?
i see the deprecated method for adding a player but i didnt use that because its deprecated

sterile token
#

Like searching like this on google: "Spigotmc add player to a team"

upper niche
#

i did that and all i could find was people saying to use the deprecated method
is that really the only way to do it? if it is then its strange that its deprecated

sterile token
#

Ahh ok

wide coyote
#

addPlayer is deprecated due to "Teams can contain entries that aren't players"

#

you need to use addEntry i guess

upper niche
#

i tried that

#

team.addEntry(player.getName())

wide coyote
#

and?

upper niche
#

nothing happened

#

nametag is still white

#

even though its a red colored tean

wide coyote
#

maybe you are missing smth

#

send the full code

#

?paste

undone axleBOT
left swift
#

Is it possible to get vector from entity yRot?

#

I would like to replace entity direction with yRot

sterile token
#

hy do you want to use vectors?

eternal oxide
#

You need two values for a 3d Vector.

#

yRot will only be a double

wide coyote
#

Team#setPrefix

left swift
sterile token
#

Any idea of why my menu api its not adding the items to the menu? What could be?

wide coyote
upper niche
#

yep that worked thanks

eternal oxide
wide coyote
winter mesa
#

What is the proper way for Citizen NPC to wait? (or plugin-way to wait?)

left swift
# eternal oxide yRot is simply a rotation about an axis. you can not generate a vector without t...

so otherwise

        Vector dir = getBukkitEntity().getLocation().getDirection().multiply(1);
        dir.setY(0.0);

        Location loc = getBukkitEntity().getLocation();
        
        Vector f = dir.multiply(-1);
        Location locF = loc.clone().subtract(f.multiply(0.64));

        Location locB = loc.clone().subtract(f.multiply(-1).multiply(1.54));

        front.setYRot(getYRot());
        Utils.teleportWithPackets(front, locF.getX(), loc.getY()+getDisplacement()-.016, locF.getZ());```I am currently teleporting the armorstand in front of the main entity, I use the direction for this, so the entity is teleported to where the main entity is looking, I would like the armorstand not to be teleported to where it is looking, but in the same direction as the main entity yRot.
sterile token
#

Oh nice the code link never been posted

eternal oxide
wide coyote
sterile token
#

Wait i will post again my code

sage patio
#

Some body can tell me where I can read about this stuffs or tell me what is cx, cz, tl, v and d ???

#

thanks

sterile token
sterile token
sterile token
#

The problem is that the items never appear

wide coyote
#

yeah i dont think toString is affected by obfuscation

sterile token
wide coyote
sterile token
#

Like it doesnt put the buttons in the menu

wide coyote
#

check the link you sent lol

sterile token
#

Ahh sorry

#

Im an idiot

wide coyote
#

use setButon before the build

sterile token
#

I used after?

wide coyote
#

yes

sterile token
#

Oh im an idiot

graceful turret
#

how to add something like 1d3min (1 day 3 minutes) to current date? I mean the input can be different for example 349094d 9039min

quaint mantle
#

getName() or getCustomName() or getDisplayName() ... I have a player instance returned by Server.getPlayer() ... what do i use to get the correct username?

wide coyote
#

getName is player's username

sterile token
#

But it doesnt support multiple

winter mesa
#

why when i am using

Position pos = //my position
pos.getBlock().setType(Material.OAK_SIGN);
Sign sign = (Sign)pos.getBlock().getState();
sign.setLine(0, "my string");
sign.setLine(1, "another");

It places a sign but it's empty? anyone have idea?

sterile token
#

Now it doesnt execute the commands and i let me take the item from the inventory

sage patio
#

Somebody know how I can set a FISHING_HOOK on Player's head on my plugin, like this photo?

sage patio
#

Blockstate sign = (Sign) pos.getBlock().getState();

#

@winter mesa

#

I remember this for some of my plugins, maybe works

winter mesa
#

Okay and how to set lines on this BlockState?

sage patio
#

always play with codes, 99% you find the problem

winter mesa
#

oh okay i found the problem my solution was ok just to

sign.update();

after setLine

#

Thanks for help

woeful moon
sage patio
#

👍

vocal cloud
woeful moon
#

Bukkit's logger or JavaPlugin's logger?

sage patio
vocal cloud
#

Well it's sl4j

sage patio
#

Java

woeful moon
#

this.getLogger().info("test"); then?

vocal cloud
#

That's the java.util.logger yeah that works too

#

Don't reinvent the wheel unless you need to.

sage patio
sharp bough
#

is it possible to know the list of mods a player is using from the server side?

quaint mantle
#

System.out.println SUCK

woeful moon
sharp bough
#

like make a plugin that reads the player's loaded mods

quaint mantle
#

Better, pass the Logger depenency everywhere

woeful moon
spiral light
sage patio
sage patio
spiral light
#

what with
setHookedEntity(Entity entity) ?

woeful moon
#

Ok

vocal cloud
sage patio
blazing scarab
#

why do you care about pronouns btw. Like, almost everyone in minecraft development are male, otherwise they'll have pronouns in bio or smth

sage patio
#

thanks

woeful moon
rough drift
#

is there a way to use hex in a string message? (like with ChatColor.translateAlternateColorCodes you can use the &# codes), and also does something like &c&3 work to combine the colors?

blazing scarab
#

Nope

rough drift
#

in a text component?

vocal cloud
#

You can't combine colors using codes because one just overwrites the other.

rough drift
vocal cloud
#

Does it work?

rough drift
#

I assume that with the picture they sent it should work

lethal coral
#

why is my event not registering

vocal cloud
#

What do you mean by not registering? As in it's not firing?

chrome beacon
#

Looks fine

#

How do you know it's not working

vocal cloud
#

p.getInventory().getItemInMainHand().displayName().equals(Component.text("§5§lMines Selection Tool")) I imagine it's this statement that is never true and thus nothing in the event is actually activating. Try adding an else and sending the player a "you need to be holding the right item" message

#

Or use logging 🤷‍♂️

lethal coral
vocal cloud
blazing scarab
#

Do not use display name/lore to store data or compare items. Use persistent data API instead

chrome beacon
#

?pdc

mellow edge
#

with which event can I detect if boat was placed and cancel it

lethal coral
#

guess I forgot

#

I'll test it out rn, thanks

mellow edge
#

because block place event won't work because it isn't entity

blazing scarab
#

Simply because it wasnt meant to be used like this. Thats just decorations, and can be easily changed by player / other plugins

vocal cloud
#

Well for multiple reasons. The #1 reason is because if you use persistentdataholder you can modify lore/name etc without worrying about anything code related being affected. It's tucked away in it's own little world.

chrome beacon
mellow edge
#

so

#
    public void onEntitySpawn(EntityPlaceEvent e) {
        if(e.getEntity().getType() == EntityType.BOAT) {
            new BukkitRunnable() {
                @Override
                public void run() {
                    e.setCancelled(true);
                }
            }.runTaskLater(Bedwars.getInstance(), 60L);
        }
    }``` should work?
chrome beacon
#

Why do you want to cancel it 60 ticks later

#

(it's not going to work)

mellow edge
#

I want to delte boat after boat clutch

chrome beacon
#

If you want to remove the boat use the remove method

vocal cloud
#

Pass the placed entity into the runnable then delete it. An event can only be canceled before it's executed

rough drift
#

So you can do

net.md_5.bungee.api.ChatColor.of("#1f85de")
```However I do not know where to go from here, what do i do with the given chat color?
chrome beacon
#

What do you want to do with it

rough drift
rough drift
karmic stirrup
#

what is the equivalent of getServer#getMinecraftVersion ( from Paper) for Spigot? I have tried getVersion and getBukkitVersion, neither return only the version.

mellow edge
#
    public void onEntitySpawn(EntityPlaceEvent e) {
        if(e.getEntity().getType() == EntityType.BOAT) {
            Entity entity = e.getEntity();
            new BukkitRunnable() {
                @Override
                public void run() {
                    entity.remove();
                }
            }.runTaskLater(Bedwars.getInstance(), 60L);
        }
    }``` like that?
chrome beacon
vocal cloud
karmic stirrup
mellow edge
#

gg it works thanks

karmic stirrup
#

Thank you. I will try that!

modern vigil
#

I have one BlockPlaceEvent

mellow edge
#

I have another question, I don't know how I can make floating text

#

like that:

#

I can't paste images, but how I can make a floating text like on this website but with spigot

modern vigil
modern vigil
#

an invisible armor stand w/ a custom display name ig

mellow edge
#

so same as in vannila

#

with commands

#

ok I will

modern vigil
#

and btw

#

make it invulnerable and have no gravity

vocal cloud
#

Personally I use the holographic displays API to do my tags cause they've got such a rich API for it

modern vigil
wicked lake
#

Certain events sometimes run twice, such as inventoryclickevent

#

You can avoid this by setting up a cooldown on a timer with a runnable

blazing scarab
#

Sounds more like a workaround

wicked lake
#

That as well

#

I have a cooldown of 5 ticks on my inventoryclickevents where it's needed

modern vigil
#

Nvm i have an idea

#

Copy the block type

#

Cancel the event before adding the block

#

Or just cancelling after

#

I'll just experimebt

dense heath
dense heath
wicked lake
dense heath
mellow edge
#

I created a spigotmc account in a few seconds and I am now verified!

wicked lake
#

Commented out my timer so it has no bearing on the code

keen lake
blazing scarab
keen lake
#

don't answer if you don't know, thanks

subtle folio
#

Im trying to use protocolLib to send packets to edit the player's "over head" nametag. Does anyone know how to actually edit the packet for that? ```java
PacketContainer packet = protocolManager.createPacket(PacketType.Play.Server.PLAYER_INFO);

    packet.set // where im trying to edit packet

    try {
        protocolManager.sendServerPacket(p, packet);
    } catch (InvocationTargetException e) {
        e.printStackTrace();
    }```
blazing scarab
round elbow
#
    file = new File(plugin.getDataFolder(), name + ".json");
    public <T> T getJsonValue(Class<T> clazz) {
        try {
            return mapper.readValue(file, clazz);
        } catch (IOException e) {
            return null;
        }
    }

so I have this method in my JsonManager class and when i start the server it starts correctly and creates json file, writes values etc
but once i restart again after first creation of json file, it clears it on next startup
anyone got any idea why?

sullen marlin
#

why do people want to use json when the API has a huge yaml api

blazing scarab
#

yaml is ugly

sullen marlin
#

but once i restart again after first creation of json file, it clears it on next startup
Probably because you dont load the old data

blazing scarab
#

there's built in gson tho

round elbow
subtle folio
#

yaml is god

sullen marlin
#

well youre just storing your new data without actual loading the old .json file

#

reading

round elbow
round elbow
sullen marlin
#

presumably youre putting stuff in json for a reason

#

so presumably you want to actually do something with that json lol

round finch
#

i thought people used JSON in plugins to use it on websites

round elbow
sullen marlin
#

because you're obviously writing to the file again

round elbow
#

???

#

wtf

#

the method is to get value not to write

sullen marlin
#

you have a write method somewhere and are probably calling it

#

also who knows what mapper is

#

you're not really providing much context

proud basin
#

So why is having a option to auto update a bad idea?

round elbow
#
    mapper = new ObjectMapper();
    file = new File(plugin.getDataFolder(), name + ".json");
    writer = new FileWriter(file); // this had try catch but removed for space ;-;
    public <T> T getJsonValue(Class<T> clazz) {
        try {
            return mapper.readValue(file, clazz);
        } catch (IOException e) {
            return null;
        }
    }

    public <T> void setJsonValue(T t) {
        try {
            writer.write(mapper.writeValueAsString(t));
            writer.flush();
            writer.close();
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
#

this is my settter and getter

sullen marlin
#

that code is trash

round elbow
#

well yes, expected

#

i am pretty new at java

#

but is there a better way than the trash one?

sullen marlin
#

nothing in it is correct

round elbow
#

wait what

proud basin
#

copy and pasta?

sullen marlin
#

I would suggest familiarising yourself with the yaml config API to begin with https://bukkit.fandom.com/wiki/Configuration_API_Reference

BukkitWiki

The Configuration API is a set of tools to help developers quickly parse and emit configuration files that are human readable and editable. Despite the name, the API can easily be used to store plugin data in addition to plugin configuration. Presently only YAML configurations can be used. The API however was designed to be extensible and allow ...

round elbow
#

i do not see anything that has something to do with json on that website

round finch
#

it is yaml

sullen marlin
#

well I'm not teaching you json and don't have a tutorial handy

#

so you're on your own

#

why do you need json

round elbow
#

i am asked to use it so

sullen marlin
#

why are you asked to use it

round elbow
#

for a trial thing

#

anyway

#

do u have any site that would help

sullen marlin
#

a trial?

#

so you're asking us for help on your job interview?

round elbow
#

no wtf

#

its not a job

sullen marlin
#

why do you need json

proud basin
#

"To make an api"

round elbow
#

i need json because i am bored of yml and trying something new

#

also you can parse json to java class

#

you cant do that in yml

#

or at least i haven't tried it yet

blazing scarab
#

🤢

proud basin
#

How can you inject a plugin from another plugin without the plugin that you injected showing?

#

don't know if that makes sense to yall but it does to me

jagged monolith
proud basin
#

no

#

like a plugin that can inject another plugin classes and load it

kind hatch
#

Sounds like malware to me .-.

proud basin
#

how so?

#

Many premium plugins do this

kind hatch
#

Well the way you phrased it before you edited your message, sounded a lot like what malware does.

#

Do you have an example of what you want to inject?

proud basin
#

I want to inject a whole different plugin that is stored somewhere

jagged monolith
#

You'd need to add it as a dependency to your plugin and compile it into your plugin

proud basin
#

no

sterile token
proud basin
#

ok

#

but why not here?

sterile token
#

I have a loader that download a plugin from a website and inject it via reflections to the server

#

Because its a private loader i have done

proud basin
#

oh ok

sterile token
#

That its what you are looking for?

proud basin
#

yea

sterile token
#

Allright let me search the code

proud basin
#

It injects the classes and all so it can run without the actual plugin being there

young knoll
#

Why would you need that

proud basin
#

why wouldn't you

young knoll
#

Because you can just load the plugin from the jar

sterile token
#

But i have realized it is not finished

jade zealot
sterile token
#

Or what do you need jtx?

#

Can you explain via dm

proud basin
sterile token
proud basin
#

the loader?

sterile token
#

the jar you want to load

proud basin
#

the jar I want to load isn't there

#

its stored somewhere such as a web server

sterile token
#

AHh yeah

#

So probably you want to do a custom loader

#

They are used for security reasons

onyx fjord
#

That isn't rly safe

proud basin
#

yea

sterile token
proud basin
#

not sure how I would go about injecting the classes and all

sterile token
proud basin
#

sure

sterile token
#

from the code i dont know if it works

winter mesa
#

Hello, how to use scheduler properly? f.e. to wait some seconds or make a list of tasks

dusk flicker
fleet imp
#

how do i convert a double to a string

wicked lake
#

String.valueOf()

young knoll
#

Double.toString

forest edge
#

Does anyone have an established class to allow for stacking items with different lores and to change that lore upon them stacking? Currently trying to do so with currency items and displaying the total worth in the lore. I'll be able to figure it out myself (but there are a lot of cases to cover!)

young knoll
#

I would probably do the worth lore via packets

proud basin
winter mesa
#

How to check whether the citizen NPC can see the block? ( for example chest to open )

left swift
#

Hey, i have a problem, I must implement methods but... how can i make that? x() from entity insetient clashes with x() in entity living. (its nms 1.18.1) both methods have different return types, how is this possible? (implement methods do nothing D:)

golden turret
#

when i join

#

it is supposed to load the chunk im in

#

so

#

in the chunkload event

#

will the chunk.getEntities contains me?

sterile token
#

Hey people. Please i need help

#

Since i sent the message today. I cannot solve why i cant take the items from the menu. And it doesnt execute the action i have assigned

wicked lake
left swift
wicked lake
#

It'll remap everything so it's readable and should fix the issue

left swift
wicked lake
#

Are you using maven?

left swift
#

yeah

wicked lake
#

Can I see your pom?

left swift
#
    <repositories>
        <repository>
            <id>spigotmc-repo</id>
            <url>https://hub.spigotmc.org/nexus/content/repositories/snapshots/</url>
        </repository>
        <repository>
            <id>sonatype</id>
            <url>https://oss.sonatype.org/content/groups/public/</url>
        </repository>
    </repositories>

    <dependencies>
        <dependency>
            <groupId>org.spigotmc</groupId>
            <artifactId>spigot</artifactId>
            <version>1.18.1-R0.1-SNAPSHOT</version>
            <scope>provided</scope>
        </dependency>
    </dependencies>```
wicked lake
#

I don't see anything wrong there, but mostly I was asking if you had the net.md-5 plugin set up

left swift
sweet creek
#

im trying to make a simple command

my plugin.yml: https://paste.developerden.net/abodofewep.yaml
my DeconstructCommand.java: https://paste.developerden.net/hawajuviki.typescript
my Deconstructor.java: https://paste.developerden.net/imyzawisav.java

i get the following error: java.lang.NullPointerException: Cannot invoke "org.bukkit.command.PluginCommand.setExecutor(org.bukkit.command.CommandExecutor)" because the return value of "me.hextanium.deconstructor.Deconstructor.getCommand(String)" is null

i've checked my plugin.yml for spelling errors but couldn't find any

kind hatch
#

Looks like you are doing it correctly. Try recompiling and uploading to the server again. Could just be a weird mismatch if you copy files quickly and reload directly after.

sweet creek
#

i get the same error

#

i have made sure the new code is being compiled by deleting the old jar that was in the output directory and the recompiling

kind hatch
#

A couple more things to verify are, did you put the plugin in the right server folder? I've made that mistake before.
Have you verified the contents of your jar? Make sure the plugin.yml contains the commands.

sweet creek
#

ill check the contents of my jar now

#

1 second please

#

my jar file seems to have all the classes and it has the plugin.yml

kind hatch
#

Double check the contents of the plugin.yml that's in the jar?

sweet creek
#

oh

#

it hasn't updated

#

well actually

#

it's different from my plugin yml completely

#
name: Deconstructor
version: '1.0-SNAPSHOT'
main: me.hextanium.deconstructor.Deconstructor
api-version: 1.18
authors: [ Hextanium ]
description: A plugin that deconstructs tools to their raw material based on their durability.
kind hatch
#

That's what I thought it might be.

#

Are you using maven?

sweet creek
#

im building artifacts with intellji

kind hatch
#

Oh, well I was going to suggest checking your resource filtering parameters with maven, but I'm not too sure about artifacts.

sweet creek
#

i just realized where my mistake was

#

i already had a plugin.yml in the resources directory that i didn't see beforehand

#

my plugin.yml is the one in root

sterile token
#

Oh

#

That happen to me many times

sweet creek
#

aaand it works now\

#

im sorry for wasting all of your times with my stupidity 😭

#

thank you all for helping!

lethal coral
#

is there an easy way to use a custom object in a yml file

forest edge
#

Getting some sort of weird bug here.... Currently trying to debug inventory click event actions and it seems that when I am in my own (player) inventory, no chest or external inventory open, every event action is PLACE_ALL, however if I open a chest the actions are correct, any ideas?

sullen marlin
sterile token
quaint mantle
#

implement ConfigurationSerializable then make 2 methods call serialize and deserialize

#

in the serialize method return a map<string, string>

#

for example a location

#
  x: 123
  y: 12
  z: 123```
#

i think i forgot to put the class in

#

but who cares

#

in the map it should be like

#

map.put("x", 123)
map.put("y", 12)
map.put("z", 123)

#

or just this.x, this.y, this.z

#

about deserialize

#

i forgot

#

dunno go see location class

lavish hemlock
#

It's begun.

#

I added a redirect for it

#

Although redirects don't work great with Namecheap tbh

#

so it's actually libs.maow.xyz

#

I'm slowly starting to realize that URL redirects are dumb

ancient plank
#

Yup

sterile token
#

Any difference between InventoryInteractEvent and InventoryClickEvent?

#

Because my inventory gui is having 2 problems. 1- It let me move/take out the button from the inventory. 2- The action on my buttons never get executed. Here is the source code. https://paste.md-5.net/giyasiwiwu.java

lethal coral
quaint mantle
#

the deserialize will call right after you take that from the yml, bukkit handles it for you, you only need to retrieve it

#

i think like take it with a list

#

maybe'

#

then put it in the object

#

this.x = the object x

lethal coral
#

the deserialize method isn't part of implements ConfigurationSerializable

quaint mantle
#

well, beacause the implementation is serialize only, i forgot that to implement it you only need the serialize method

hardy swan
#

I just saw a hole filler mod on youtube, and finally understood the real difference between cave air and air.

young knoll
quaint mantle
#

inventoryinteract is a abstract i think?

young knoll
#

yes

sterile token
sullen marlin
#

You should have the method anyway, or a constructor that takes a map

#

The javadocs should state this

sterile token
lethal coral
#

any ideas on how I should serialize this?

quaint mantle
#

what is it

lethal coral
#

Material

quaint mantle
lethal coral
#

It's an object in the hashmap that I'm saving

#

So should I just put String as the object and convert to a material where I need to?

quaint mantle
#

you can make a custom serializable

lethal coral
#

Then I would have to create a custom object, yes?

quaint mantle
#

is it the normal Material
?

lethal coral
#

yes

quaint mantle
#

why not just Material#name()

#

then Material.matchMaterial(config.get("material"))

lethal coral
#

I see.

#

Thank you

tidal hollow
#

How can I get a player to spawn in the place he died?

quaint mantle
#

event.getEntity().getLocation()

#

Map<UUID, Location>

#

if the player leaves remove them from the map

#

when they respawn set their location to the stored location

lone sandal
#

Hi I'd like to have cross-server support for one of my plugins. In particular, I would need to receive/broadcast data among my servers. Is a custom plugin messaging channel the right way to go?

analog prairie
#
[11:44:25] [Timer-11/WARN]: Exception in thread "Timer-11" java.lang.IllegalStateException: Asynchronous player kick!
[11:44:25] [Timer-11/WARN]:     at org.spigotmc.AsyncCatcher.catchOp(AsyncCatcher.java:14)
[11:44:25] [Timer-11/WARN]:     at org.bukkit.craftbukkit.v1_18_R1.entity.CraftPlayer.kickPlayer(CraftPlayer.java:346)
[11:44:25] [Timer-11/WARN]:     at handle.post.Post(post.java:102)
[11:44:25] [Timer-11/WARN]:     at Spigot_ExpTech_whes1015.whes1015.DataUpdate(whes1015.java:236)
[11:44:25] [Timer-11/WARN]:     at handle.timer.run(timer.java:11)
[11:44:25] [Timer-11/WARN]:     at java.base/java.util.TimerThread.mainLoop(Timer.java:566)
[11:44:25] [Timer-11/WARN]:     at java.base/java.util.TimerThread.run(Timer.java:516)
young knoll
#

Don't kick players async

analog prairie
# young knoll Don't kick players async
public static void kickplayer(String player){
        Objects.requireNonNull(Bukkit.getPlayer(player)).kickPlayer("\u6578\u64da\u7570\u5e38\u8acb\u91cd\u65b0\u52a0\u5165\u4f3a\u670d\u5668");
    }
#

Is this async?

young knoll
#

And where are you calling that

analog prairie
#

after http post

#

kickplayer(response.toString);

young knoll
#

That's probably async

lavish hemlock
#

you'll need to do the HTTP request in async and then do the kick in sync

analog prairie
#

How can I do kick in sync?

young knoll
#

Bukkit#getScheduler#runTask

analog prairie
#

😣

#
Plugin plugin=Bukkit.getPluginManager().getPlugin("Spigot-ExpTech");
assert plugin != null;
 Bukkit.getScheduler().runTask(plugin, Objects.requireNonNull(kickplayer(jsonObject.get("response").getAsString())));

public static Runnable kickplayer(String player){     Objects.requireNonNull(Bukkit.getPlayer(player)).kickPlayer("\u6578\u64da\u7570\u5e38\u8acb\u91cd\u65b0\u52a0\u5165\u4f3a\u670d\u5668");
        return null;
    }
lethal coral
lethal coral
#
    public static Mine deserialize(Map<String, Object> decrypt){
        HashMap<Material, Double> deserializedMap = new HashMap<>();
        HashMap<String, Double> serializedMap = (HashMap<String, Double>) decrypt.get("mine");
        serializedMap.forEach((a, b) -> deserializedMap.put(Material.getMaterial(a), b));
        return new Mine(deserializedMap, (String) decrypt.get("name"), new Location(Bukkit.getWorld((String) decrypt.get("world")),  ((double) decrypt.get("x1")), (double) decrypt.get("y1"), (double) decrypt.get("z1")), new Location(Bukkit.getWorld((String) decrypt.get("world")), (double) decrypt.get("x2"), (double) decrypt.get("y2"), (double) decrypt.get("z2")));
    }
#

so it appears the problem has been found, just not a fix. the deserialize method is being called before the plugin load event which is breaking my custom config since the custom config is loaded in the plugin load event

sterile token
#

Its not possible to create an interface or abstract class with static methods? Why?

lethal coral
# lethal coral

updated error:
and after this is like 30 errors of the 2nd screenshot

somber hull
#

ObjConfig line 17*

#

my bad

lethal coral
#

which goes back to my issue of the deserialize method being called before I can initialize the config where it's being deserialized

somber hull
# lethal coral

Your issue is that YamlCOnfiguration.loadConfiguration(); is returning null

somber hull
lethal coral
#

bukkit itself is calling my deserialize method before the onEnable method

somber hull
#

Why...

lethal coral
#

I have received a genius idea

somber hull
#

Is there something im missing here

#

thatl work

lethal coral
somber hull
#

So are you making a custom config system?

lethal coral
#

yes

#

it's my storage system

somber hull
#

y?

#

if your gonna use yaml why not just use the default bukkit one

lethal coral
#

I don't have a good reason

somber hull
#

...

lethal coral
#

no custom emojis

somber hull
#

Also is it for storing data?

#

if so you should use Json

lethal coral
lethal coral
lavish hemlock
#

Here's a solution:
Don't use YAML. Ever.

somber hull
somber hull
lethal coral
#

aaand this is when I'll be leaving

somber hull
lavish hemlock
#

No, not even for config.

#

Never use YAML.

somber hull
lethal coral
#

I have already been helped, thank you

somber hull
lavish hemlock
#

Literally anything else

#

Personal preference? TOML.

somber hull
#

thats dumb

#

and probably slower than yaml

lethal coral
#

hi there

#

I'm back again

#

putting the initialize method in the deserialize method didn't work

somber hull
#

Im not helping you

lethal coral
somber hull
#

Hexic dragon

somber hull
#
  1. Dont refuse helpful advice and then proceed to ask for help
  2. Dont use yaml for data storage
  3. Idk im, salty
somber hull
lethal coral
somber hull
#

sometimes its ok to accept defeat after working for hours

somber hull
lavish hemlock
somber hull
#

Python

#

Im just nitpicking lol

somber hull
lavish hemlock
#

Python can still read XML faster than YAML.

somber hull
#

Its so incredibly easy to use

lavish hemlock
#

Eh I prefer Gson over Jackson.

somber hull
lavish hemlock
#

It's faster (Jackson is one of the slowest Java JSON libs) and easier to use, also Minecraft imports it.

night patrol
#

help please

    
    @EventHandler
    
    public void onPunch(PlayerInteractEvent event) {
        Player player = event.getPlayer();
        c1.giveItem(player);

this is my code to add the custom item when i punch but it doesn' t give me ItemStack with meta

        
        
        ItemStack item = new ItemStack(Material.WOOD_PICKAXE, 1);
        ItemMeta meta = item.getItemMeta();
        meta.setDisplayName(ChatColor.GRAY + "Wooden Hammer");
        ArrayList<String> lore = new ArrayList<>();
        lore.add("hammer!");
        meta.setLore(lore);
        player.getInventory().addItem(item);
        item.setItemMeta(meta);
        
    }

this is my customitem

proud basin
#

So.... Anyone know how I could make a custom loader?

night patrol
lavish hemlock
young knoll
#

You add the item before setting the meta

lavish hemlock
#

The Norway Problem

night patrol
somber hull
#

Im sure you can google it 😉

night patrol
lavish hemlock
somber hull
somber hull
lavish hemlock
#

Gson is used in a lot of places in Minecraft

somber hull
#

I dont have to add gson as a dependency?

lavish hemlock
#

Yep

somber hull
#

Wait but is it a class deserializer like jackson?

lavish hemlock
#

Yes

somber hull
#

Hmmmm

lavish hemlock
#

new Gson().fromJson(reader, MyClass.class)

somber hull
#

If you can convert this

package me.silentprogram.betterbounties.jacksondata;

import com.fasterxml.jackson.databind.ObjectMapper;
import me.silentprogram.betterbounties.BetterBounties;
import me.silentprogram.betterbounties.jacksondata.files.Data;

import java.io.File;
import java.io.IOException;

public class DataManager {
    Data config;
    BetterBounties plugin;
    File configFile;
    ObjectMapper om = new ObjectMapper();
    
    public DataManager(BetterBounties plugin){
        this.plugin = plugin;
        configFile = new File(plugin.getDataFolder(), "data.json");
    }
    
    public Data initializeConfig() {
        try {
            if (!configFile.exists()) {
                om.writeValue(configFile, new Data());
            }
            config = om.readValue(configFile, Data.class);
        } catch (IOException e) {
            e.printStackTrace();
        }
        return config;
    }
    
    public void saveConfig(){
        try{
            om.writeValue(configFile, config);
        }catch (IOException e){
            e.printStackTrace();
        }
    }
    
    public Data getConfig() {
        return config;
    }
}

Into Gson then ill switch over

somber hull
#

I probably cant help cause that sounds complicated

#

But

#

What?

lavish hemlock
#

You mean a custom plugin loader or classloader or what?

somber hull
proud basin
#

It loads classes from another jar

lavish hemlock
#

Look into jar IO and classloaders, you'll figure it out quickly.

proud basin
#

trying to make it so the plugin isnt actually shown and its just the loader

lavish hemlock
vale cradle
lavish hemlock
night patrol
#
    @SuppressWarnings({ "deprecation", "unlikely-arg-type" })
    public void onBlockBreak(BlockBreakEvent event) {
        Block b = event.getBlock();
        Player player = (Player) event.getPlayer();
        World world = player.getWorld();
        Block block = event.getBlock();
        if (b.getType() == Material.COBBLESTONE) {
            player.sendMessage("break cobblestone");
            
       if (player.getItemInHand().equals(c1)) {
           player.sendMessage("da dung c1 dap cobblestone");
                        ItemStack is = new ItemStack(Material.QUARTZ, 4);
                        
                        event.setDropItems(false);
                        block.getDrops(is).clear();

                        world.dropItemNaturally(event.getBlock().getLocation(), is);
                       
                    }
                }
            }

hello i want to make custom item by Itemstack to break cobblestone drop quatz but not working can some one help?

vale cradle
lavish hemlock
#

?paste

undone axleBOT
lavish hemlock
#

please

somber hull
#

Ill help

#

Why dont people use threads

night patrol
somber hull
#

Help

proud basin
#

That defeats the purpose

somber hull
vale cradle
night patrol
lavish hemlock
#

Yeah it stops being drag-and-drop

proud basin
vale cradle
#

jars are meant to hold compiled class files, which can be always decompiled

proud basin
#

All the files are gonna be held in a web server

vale cradle
#

perhaps you're trying to load your classes directly using a custom classloader instead of holding them in a jar

sullen marlin
#

Lol

#

So then someone decompiling will just download them off the webserver

#

Stop wasting time and energy on thsi

#

You can’t post such a plugin to SpigotMC,org anyway

proud basin
#

No

#

they won't

#

and It's fine if i can't post it on spigotmc

hasty prawn
proud basin
#

I mean of course they can but it won't be easy for them

#

as long they have the knowledge to be able to bypass it then they can

#

otherwise they can't

sullen marlin
#

Or they can just dump all loaded classes with a 3 line java agent

vale cradle
proud basin
#

no and yes

vale cradle
#

do you make custom plugins, like, for people?

proud basin
#

no

vale cradle
#

then I don't really see it worth the effort tbh, there will be a delay whenever you're getting the information from the web server when you (try to) load a class

proud basin
#

That's fine

vale cradle
#

well I hope you at least make something cool 😄

proud basin
#

At the end of the day it's experience

vale cradle
dense heath
vale cradle
#

however, that's not the same as implementing it

proud basin
#

right I understand that

vale cradle
#

which in plataforms like bukkit is a pretty big headache

dense heath
proud basin
#

how is it next to nothing

dense heath
#

I could download and compile this right now in less than 20 seconds and then start dumping classes

proud basin
#

go for it

dense heath
#

Granted, this would only be able to dump loaded classes

lavish hemlock
#

To sum it up: Quit it.

proud basin
#

Nope

#

I’m doing it and yall can’t stop me

dense heath
#

Just compiled it

dense heath
lavish hemlock
#

Oh yeah you could modify the original plugin to dump the bytecode of the classes it loads.

dense heath
lavish hemlock
#

I could literally do that in just an hour.

#

Maybe even less.

vale cradle
# lavish hemlock To sum it up: Quit it.

I'm one of those guys which likes to try new (mostly crazy) stuff things. Just to test. So I'd say him to go for it. Will be useless, mostly, but you will learn new things in the process

dense heath
lavish hemlock
vale cradle
#

And in RE for the Java Agent dumper: meh, you can already do that with or without his implementation and yet, you will need to manage to run it on his machines

vale cradle
dense heath
vale cradle
dense heath
vale cradle
#

ok so, can you do the same for hypixel or cubecraft, and get their commercial secrets as well?

#

anyways, fighting for that is pointless lol

#

I think you got my point

dense heath
lethal coral
#
    public Mine(HashMap<Material, Double> chancepermat, String name, Location point1, Location point2, Boolean bool){
        this.mine = chancepermat;
        this.name = name;
        this.x1 = (int) point1.getX();
        this.y1 = (int) point1.getY();
        this.z1 = (int) point1.getZ();
        this.x2 = (int) point2.getX();
        this.y2 = (int) point2.getY();
        this.z2 = (int) point2.getZ();
        this.world = point1.getWorld().getName();
        this.box = new BoundingBox(x1, y1, z1, x2, y2, z2);
        for(Map.Entry<Material, Double> entry : this.mine.entrySet()){
            this.tree.put(this.count, entry.getKey());
            this.count += entry.getValue();
        }
    }

    public Mine(HashMap<Material, Double> chancepermat, String name, Location point1, Location point2){
        new Mine(chancepermat, name, point1, point2, true);
        Mines.addMine(name, this);
    }

is this allowed? because when I do this this.mine returns null

#

(when I use the 2nd public Mine)

young knoll
#

new Mine(chancepermat, name, point1, point2, true); ->
this(chancepermat, name, point1, point2, true);

muted sand
#

can having a lot of async bukkit tasks cause lag? (a sync task scheduled to place blocks over another block)

faint sage
blazing scarab
tacit drift
#

and look into NMS for crazy amounta of efficiency

blazing scarab
#

😐 and breaking every version

granite burrow
#

How can I stop my plugin from running without any errors in console?

#

I tried this but it didn't work:

getServer().getPluginManager().disablePlugin(this);
blazing scarab
#

why so

#

what error did it threw

granite burrow
#

ah wait it could be because I didnt return give me one second

#

Yeah I fixed it, I accidently had it so that it wouldn't return thats all fixed now 😄

mystic scaffold
#

Bro Grief Prevention Plugin Trust Not Working. How can i Fix That??

blazing scarab
#

i have no clue

granite burrow
#

Hey does anyone know how to register an economy plugin to vault?

lilac dagger
#

Hello

#

does anyone have a plugin to link a minecraft UUID to a website with /link ingame?

#

i can pay for it

vocal cloud
lilac dagger
#

Yep

#

like mineplex

#

@vocal cloud

vocal cloud
#

Unless you're forking out major cash for it I imagine most people just use Enjin.

lilac dagger
#

im down to pay for it

#

good money

vocal cloud
lost matrix
lost matrix
spiral light
#

there is Queue and Deque .... what is better ?

#

or the difference

lost matrix
spiral light
#

idk just started using Queue some time ago ... now i see there is Deque too

granite burrow
lost matrix
spiral light
#

oh interesting ^^

lost matrix
spiral light
#

man your good at tutorials ^^ now you need to write a tutorial for ChunkGenerator too

granite burrow
# lost matrix Did you register a service provider?

Yeah I did this:

    public void hook() {
       Economy provider = plugin.economyImplementer;
        Bukkit.getServicesManager().register(Economy.class, provider, plugin, ServicePriority.Highest);
        Bukkit.getLogger().info((plugin.utils.chatColor("&a&lSUCCESS: VaultAPI hooked into &b"+plugin.getName())));
    }
#

The weird thing is my plugin shows up in the Economy section when I type /vault-info but other plugins can't access it with

RegisteredServiceProvider<Economy> rsp = getServer().getServicesManager().getRegistration(Economy.class);

because if I'm not mistaken that is what makes plugins able to use the registered economy, so I'm not too sure what's happening

night patrol
#

hi

#
            ItemStack item = new ItemStack(Material.WOOD_PICKAXE, 1);
            ItemMeta meta = item.getItemMeta();
            meta.setDisplayName(ChatColor.GRAY + "Wooden Hammer");
            ArrayList<String> lore = new ArrayList<>();
            lore.add("hammer!");
            meta.setLore(lore);
            item.setItemMeta(meta);
            
       if (player.getItemInHand().equals(item)) {
           player.sendMessage("da dung c1 dap cobblestone");
                        ItemStack is = new ItemStack(Material.QUARTZ, 4);
                        
                        event.setDropItems(false);
                        block.getDrops(is).clear();

                        world.dropItemNaturally(event.getBlock().getLocation(), is);
                       
                    }```

i have created item stack a new pickaxe everyworking well but when If the pickaxe has decreased durability, it is no longer available euals item how to fix this
dense heath
faint sage
#

😔

dense heath
#

Gaming!

summer scroll
#

All I can think is using ItemStack#isSimiliar but that only ignores the amount, so it won't work.

#

Or you can use PDC

granite burrow
night patrol
blazing scarab
#

pdc is definetly better

red sedge
#

I mean does it matter?

blazing scarab
echo saddle
#

noonan

visual tide
#

if a player goes offline, is the player object obtained when the players was online still valid when the player comes back online later``

eternal oxide
#

no

visual tide
#

ah great

quaint mantle
visual tide
#

bruh

#

this api sucks

quaint mantle
#

move to spong

visual tide
#

ok it doesnt suck that much

spiral light
visual tide
#

what would be the best way to format seconds to HH:mm:ss without having to frick around with timezones
i need it to display a duration of something, not an actual time

vocal cloud
ivory sleet
#

I mean why not use the date/time format api from Java

#

You can just use the root locale I believe

lost matrix
# visual tide what would be the best way to format seconds to HH:mm:ss without having to frick...

spigot provides apache so you can just do this:

    long timeInMillis = 10000;
    boolean padWithZeros = true;
    String formatted = DurationFormatUtils.formatDuration(timeInMillis, "[H:mm:ss]", padWithZeros);

or

    long timeInMillis = Duration.of(5, ChronoUnit.MINUTES).toMillis();
    boolean padWithZeros = true;
    String formatted = DurationFormatUtils.formatDuration(timeInMillis, "[H:mm:ss]", padWithZeros);
night patrol
#

hello

#

how to make a block replace like when we put the grass block near the dirt block then dirt block change to grass?

lost matrix
night patrol
lost matrix
lost matrix
#

Ask specific questions if you have problems with one of the steps

night patrol
lost matrix
# night patrol i think i have a problem with stept 3
    Block middleBlock = ...;
    
    for (int deltaX = -3; deltaX <= 3; deltaX++) {
      for (int deltaY = -3; deltaY <= 3; deltaY++) {
        for (int deltaZ = -3; deltaZ <= 3; deltaZ++) {
          Block relativeBlock = middleBlock.getRelative(deltaX, deltaY, deltaZ);
        }
      }
    }
#

This gets all Blocks around the middle Block with a radius of 3

ivory sleet
kindred path
#

How can I use bukkit.dispatchcommand and get response to output?

lost matrix
lost matrix
kindred path
lost matrix
grim ice
#

Why is there player.isAlive() then

#

Also it's valid even when he leaves, and rejoins iirc

#

I'm not sure but it doesn't make sense if what i said is false

lost matrix
grim ice
#

Oh

#

But like if I store a variable of a player by getting his uuis

#

Uuid*

#

It'll always be valid

#

Right?

kindred path
grim ice
#

@kindred path not clicking that

#

?paste

undone axleBOT
lost matrix
#

Sure the UUID never changes for a player

night patrol
lost matrix
grim ice
#

Not /help

#

It's just help

lost matrix
#

thx

lost matrix
#
  1. Listen for the BlockPlaceEvent
  2. Check if placed Block is of type GRASS_BLOCK
  3. Make 3 nested for loops regarding x, y and z
  4. Get all relative Blocks to the placed Block
  5. Replace every relative Block of type DIRT
night patrol
grim ice
#

He means "can you help me with an example please?"

lost matrix
exotic scroll
#

Hey , what is the event for a player feeding an animal?

lost matrix
#

Probably PlayerInteractEvent and/or PlayerInteractAtEntityEvent
If you want to detect breeding of two entities listen for the EntityBreedEvent

exotic scroll
#

okok

mystic scaffold
quaint mantle
#

dunno

#

go on their spigot page

#

why would you ask us that question?

#

this is NOT for server admin

visual tide
opal juniper
visual tide
#

would be slaughtered for saying that in paper

quiet ice
#

Well even spigotists aren't all too happy about 1.8

fleet imp
#

I’m running a plugin I made on a 1.17 server running on my laptop. Every time it enables the plugin, it gives me some err about legacy stuff. Idk if it thinks my plugin for legacy versions or what, but I didn’t do anything that would make my plugin “legacy”

visual tide
visual tide
fleet imp
#

Oh, thx

fleet imp
visual tide
#

no

#

just 1.17

manic furnace
#

How can i use ${project.version} in my plugin.yml?

neat laurel
#

Can someone tell me how would be the code to appear a message in the chat when someone breaks a certain block?

neat laurel
spiral light
#

learn api

manic furnace
#

Check If the broken Block was Diamond ore

hardy swan
manic furnace
#

Than when the Plugin ist loaded IT Displays ${plugin.versiob} as version

hardy swan
#

make sure the version in specified in your pom.xml

#

if you are use maven

manic furnace
neat laurel
#

like this? @EventHandler
public void BlockBreakEvent(Block DIAMOND_ORE, Player player) {

hardy swan
neat laurel
#

brr

hardy swan
#

the method takes in the event

#

event has the details of the, well, event

manic furnace
hardy swan
neat laurel
#

thx for your help guys

manic furnace
hardy swan
#

yes

manic furnace
gleaming grove
#

Hi, When PluginDisableEvent triggers Bukkit removes a plugin object from plugins array. Does it mean plugin object and objects used in plugin will be deleted from memory by Java garbage collector?

manic furnace
wanton remnant
hardy swan
manic furnace
hardy swan
#

is chestcommands part of your plugin?

#

then you should see whther chestcommands provides the event for opening their guis

vestal moat
#

on bungee, when is the best to send a plugin message on join

modern vigil
#

what's a good formula for fortune

quaint mantle
#

When the player Object is accessible

left swift
#

@wicked lake hi, i have one question about that nms, it works with mojang remapped, but should i always use mojang remapped nms when i use them?

left swift
chrome beacon
#

Use what you prefer

#

Mojang mapped is easier

left swift
glossy venture
white olive
#

wow sorry!!

marble granite
#

I am setting an item in an inventory. when i create a new itemstack of, say, stone it works. but when i get the itemstack with a method i made, the slot just turns to air (the inventory was filled with glass). this is strange because i know that it is not material.AIR nor null

#

This is the code:

    public void open(DeliveryPlayer player){
        Inventory inv = Bukkit.createInventory(null, rows * 9, ChatUtils.translate(title, player.getPlayer()));
        for (int i = 0; i < inv.getSize(); i++) inv.setItem(i, fillIs);

        rewardSlot.forEach((rewardName, slot) -> {
            Reward r = RewardManager.getInstance().getReward(rewardName);
            System.out.println(r.id);
            if (r == null) System.out.println("REWARD IS NULL!");
            ItemStack is = r.getItemByPlayer(player);
            System.out.println(is.getType().name()); // prints the material name just fine
            inv.setItem(slot, is); // sets the slot to air for some reason
        });

        viewers.put(player.getPlayer(), inv);
        player.getPlayer().openInventory(inv);
        System.out.println("Opening menu!");
    }
``` for the menu opening
#

and for getting the item:

    public ItemStack getItemByPlayer(DeliveryPlayer player){
        ClaimableState state = player.getClaimableState(this);
        if (state == ClaimableState.AVAILABLE){
            ItemStack is = new ItemStack(Material.GREEN_STAINED_GLASS);
            is.setAmount(claimableAmount);
            ItemMeta meta = is.getItemMeta();
            meta.setLore(ChatUtils.translateAll(player.getPlayer(), claimableLore));
            meta.setDisplayName(ChatUtils.translate(claimableDisplayName, player.getPlayer()));
            is.setItemMeta(meta);
            return is;
        }else if (state == ClaimableState.ALREADY_CLAIMED){
            long secs = this.cooldown - (System.currentTimeMillis() * 1000);
            long p1 = secs % 60;
            long p2 = secs / 60;
            long p3 = p2 % 60;
            p2 = p2 / 60;
            String seconds = p2 + ":" + p3 + ":" + p1;
            //{claim_next_remain}
            ItemStack is = new ItemStack(Material.RED_STAINED_GLASS);
            is.setAmount(claimedAmount);
            ItemMeta meta = is.getItemMeta();

            ArrayList<String> parsed = new ArrayList<>();

            for (String s : claimedLore) parsed.add(s.replace("{claim_next_remain}", seconds));

            meta.setLore(ChatUtils.translateAll(player.getPlayer(), parsed));
            meta.setDisplayName(ChatUtils.translate(claimedDisplayName.replace("{claim_next_remain}", seconds), player.getPlayer()));
            is.setItemMeta(meta);
            return is;
        }else{
            ItemStack is = new ItemStack(Material.STONE);
            is.setAmount(notAvailableAmount);
            ItemMeta meta = is.getItemMeta();
            meta.setLore(ChatUtils.translateAll(player.getPlayer(), notAvailableLore));
            meta.setDisplayName(ChatUtils.translate(notAvailableDisplayName, player.getPlayer()));
            is.setItemMeta(meta);
            return is;
        }
    }
left swift
chrome beacon
#

Why do you want to avoid mappings

marble granite
#

appearantly it was, but it was not in the config..

#

but ya, i fixed it now i guess

#

Thanks for wanting to help tough :)

glossy marsh
#

Hello!
I've got a quick couple of questions:
Does anyone know if a player uses a smithing table; does the game play the sound BLOCK_SMITHING_TABLE_USE or does it play the effect SMITHING_TABLE_USE, or does it play both?
And does it play these for only the player that uses the table or does it play it for the world (so everyone near can hear it)?
Then I'm also wondering what's the difference between a sound and an effect and I'm wondering if there is an easy way to find things like this out by myself (like is it possible to look at the source code to find this out quickly and how would I go about doing this)

quaint mantle
#

hello, is there anyway to change the CHAT tab completion ?
im trying to code a nickname plugin

#

1.8.8

left swift
summer scroll
#

Does anyone know how to specify gradle installation path on IntelliJ IDEA project? For some reason I'm not using Gradle version 7.0+ even tho I installed Gradle 7.2 and confirm it too by using gradle -v command.

candid galleon
#

@glossy marsh effects can be both sounds and particles

#

it’s mostly reading/testing to figure out which is which

#

@quaint mantle no

#

@summer scroll might be in your project settings?

summer scroll
#

Can't find it.

glossy marsh
candid galleon
#

An effect can BE a sound

quaint mantle
glossy marsh
candid galleon
#

You could try using the /playsound command to listen to each one

candid galleon
quaint mantle
#

i was reading the forums

summer scroll
quaint mantle
#

it said that it is not possible in 1.13+ cause client changes

#

but in 1.8 it is

candid galleon
#

Bruh

#

I don’t get people like you

#

Can I do X?

#

No

#

Yes I can, someone said so

#

Why tf do you come in asking if you can do it if you already know

quaint mantle
#

i dont know how to

#

1.8 cringe!

gleaming grove
#

hi, i need to get all classes loaded in my plugin, is some more clear way than that?

quaint mantle
#

ugh

#

Whats the xy here

gleaming grove
#

xy?

quaint mantle
#

What are you trying to do

gleaming grove
#

get all classes that i use in my plugin project

chrome beacon
undone axleBOT
quaint mantle
#

Why would you want it

gleaming grove
#

for finding all classes that use custom my addnotations

left swift
#

Anw with mappings the difference is only in the names? @chrome beacon

quaint mantle
#

Annotations you mean? What does your annotation do

gleaming grove
#

yes Annotations, but what they does it's not the case

chrome beacon
quaint mantle
#

sorry for ping though

left swift
chrome beacon
left swift
#

and 1.18.1?

quaint mantle
#

Mini Mappings viewer is abandoned

chrome beacon
#

Actually nvm it's broken

#

Use what manya said

modern vigil
#

For some reason this code just times out the server at the Thread#sleep call.

#

Can someone explain why this is happening?

#

It only triggers once

#

and yes, the block-decay.time config field is set

#

lemme try something

gleaming zenith
#

Hello,
I'm running spigot + bungeecord:
Bungee Server
|-> Lobby
| |-> MyPlugin
|-> Server1
|

Now i want to redirect users in my Lobby to Server1 (e.g. with a gui).
My current code:

if(e.getRawSlot() == 3){
            p.playSound(p.getLocation(),  Sound.BLOCK_NOTE_BLOCK_BELL,0.2f,1.2f);
            // Redirect Player p to Server1
}
ivory sleet
#

It freezes the server thread for said amount of time

#

?scheduling is the way to go

undone axleBOT
modern vigil
#

alr ty

#

i didnt read the docs right

#

so Bukkit.getScheduler().runTaskLater(callback, time) right

ivory sleet
#

Myes

modern vigil
#

nvm its with plugin as the first param

modern vigil
#

and set the first param to your world

#

make sure the parameter is a World and not the name of the world

gleaming zenith
#

ehh world = port?

modern vigil
#

then use Player#teleport and pass in the Location instance

gleaming zenith
#

or the name from the bungee config?

modern vigil
gleaming zenith
#

i run bungeecord

modern vigil
#

world_nether for the nether

gleaming zenith
#

@modern vigil and what's the name of a new Server?

modern vigil
#

wym

gleaming zenith
#

Bungee Server
|-> Lobby
| |-> MyPlugin
|-> Server1
|

#

i want to connect to server1

modern vigil
#

idk much about bungeecord

#

you could ask someone else

gleaming zenith
#

ok

#

Hello,
I'm running spigot + bungeecord:
Bungee Server
|-> Lobby
| |-> MyPlugin
|-> Server1
|

Now i want to redirect users in my Lobby to Server1 (e.g. with a gui).
My current code:

if(e.getRawSlot() == 3){
            p.playSound(p.getLocation(),  Sound.BLOCK_NOTE_BLOCK_BELL,0.2f,1.2f);
            // Redirect Player p to Server1
}
modern vigil
#

also

#

What's the event for a grass block turning into dirt when a block is above it

#

I've tried multiple ones but they don't seem to work

spiral light
#

well there are a lot

#

did you try BlockFromToEvent ?

left swift
#

but i have it

spiral light
#

still need remapping ?

#

ah ok

left swift
spiral light
#

dont like that page ^^

left swift
#

why?

spiral light
#

does not contain everything at 1 page 😄

ancient plank
left swift
#

(but for me works good, i need only names of classes)

spiral light
spiral light
left swift
quaint mantle
#

How long can a string from the Scoreboard Team prefix be?

#

Iirc it is unlimited in 1.18

royal vale
#

How to cancel blocks getting removed from an explosion?

quaint mantle
#

imma do a scoreboard lib then