#help-development

1 messages · Page 52 of 1

echo basalt
glacial sphinx
#

No

tender shard
glacial sphinx
#

I haven't coped or pasted anything.

tender shard
#

and it goes on and on and on

worldly ingot
#

lord and saviour

glacial sphinx
#

Oh for that

tender shard
#

yeah, stop simping on choco

#

lol

worldly ingot
#

SAYS YOU

tender shard
#

i am allowed to say that

sterile token
vocal cloud
#

Chad Choco

tender shard
glacial sphinx
#

I don't see any problem with my code.

vocal cloud
#

Wait Choco can you remove someone's plugin cause it makes me upset that they can't code properly THONK

tender shard
tardy delta
#

what the

#

map lol?

echo basalt
#

nah that's amateur

vocal cloud
#

switch moment

echo basalt
#

I remember a guy making a plugin

#

that sent you a message depending on what version you were on

#

like a join message

tardy delta
#

🤔

echo basalt
#

well

#

he followed similar principles

glacial sphinx
#

It's a free plugin. Who cares

worldly ingot
#

You should. Free shouldn't mean bad

vocal cloud
worldly ingot
#

Well that's something

echo basalt
#

lmao

#

ok

tardy delta
echo basalt
#

wtf

tender shard
#

cringe

echo basalt
#

alex

#

it has a bungee mode too

#

open the bungee package

tardy delta
#

AH NOW I SEE

#

bruh its 300+ lines

echo basalt
#

at least the bungee package uses text components

tardy delta
#

🤓

ancient plank
#

wtf

severe oak
#

Wtf

#

Who wrote that

echo basalt
#

some dude called x9ico or something idk

#

that's 2020 code

tender shard
#

no idea what the purpose of that even is tbh

#

players know what version they use lol

glacial sphinx
#

What now.

crisp steeple
severe oak
tender shard
vocal cloud
#

You're running version: "you're mom"

echo basalt
#

"Hello ImIllusion, you're currently playing on: your pc"

vocal cloud
#

Here is your IP

#

and your Mac

tardy delta
#

127.0.0.1

cunning canopy
#

Home sweet home

tardy delta
#

lets now send that to a chinese server

echo basalt
#

we should try hosting a minecraft network on alibaba cloud

vocal cloud
echo basalt
#

and see how long it takes before anything weird happens

tender shard
#

yeah also the rules exactly explain what you may do and what not, so just read them

tardy delta
#

i thought my github repo was dead but a rando suddenly messaged me lol

echo basalt
glacial sphinx
vocal cloud
tender shard
echo basalt
#

I can't tell if that's a demeaning question or asking for a suggestion

tardy delta
#

what day is today even

echo basalt
#

tuesday

#

I think

tender shard
worldly ingot
#

Chewsdey innit?

echo basalt
#

I got charged for my data

tender shard
#

noone knows it lmao

echo basalt
#

so tuesday

tardy delta
#

fking win11 doesnt want to let me know

#

ah here it is

glacial sphinx
#

It is good. My friends like it.

echo basalt
#

I have an app on my phone that tells me if it's dark outside

tardy delta
#

AAH

tender shard
tardy delta
#

does it also tell you when its time to touch grass?

vocal cloud
#

If your answer to coding java is 2 years or something I've been doing it for 4-6 years and I've only recently been writing code that's anything close to okay

echo basalt
tardy delta
#

lol

echo basalt
tardy delta
#

and not in the good way ~ like alex would say

tender shard
#

yeah

#

it's important to mention this everytime

echo basalt
#

I'd say like

#

don't even try to work on premium plugins until you reach 3-4 years of experience

vocal cloud
# glacial sphinx It is less then that.

You have a lot to learn and that's okay. Focus hard on concepts. Learn as many as you can, use them in plugins, if you're writing a bunch of if()s find a concept that makes it easier. Eventually, you'll be able to write good code to write a good plugin to publish.

echo basalt
#

Then spend a whole year focusing on improving user interactivity

quiet ice
#

I've been a bit luckier. Been coding for 4 years (of that 3 years seriously) and I'd say my code is acceptable for a good year now. But then I also spend 40 hours a week coding stuff

echo basalt
#

Stuff like fancy, easy to use GUIs

glacial sphinx
#

I have plans for that.

ancient plank
#

if your code looks like ddlc code, you're doing something wrong

vocal cloud
rapid aspen
#

its good?

vocal cloud
#

Literally rent free in my head

tardy delta
#

dont parse it twice as we said

echo basalt
#

I'm breathing mega hard in antecipation

#

let's see what this is

#

why is the beer logo built-in to the jar

tender shard
echo basalt
#

nms code leaked

#

caught in 4k

tender shard
#

crunchy

vocal cloud
sterile token
# glacial sphinx It is less then that.

Dont wanna sound rude but your code looks really un profesional like if a child without experience trying to make a game. You should learn good practice before comming to complain

vocal cloud
#

Rent, free

rough drift
#

Why can't I cancel AsyncPlayerChatEvent?

glacial sphinx
#

I have a question. Can bungee cord servers or sponge or the others software that is not bukkit or paper or spigot run spigot plugins?

echo basalt
#

reminds me of my first plugin

tender shard
rough drift
#

but it ain't doin shit

glacial sphinx
#

Actually these 3 plugins are my first plugins and my first java code.

vocal cloud
#

Great, now learn concepts and improve them

tardy delta
vocal cloud
#

It's probably the best way to learn

tender shard
#

there are some hybrid forks but they all suck ass

rough drift
tender shard
#

e.g. catserver, mohist, all bullshit

rough drift
#

even in my ls plugin after updating to 1.19 it stopped cancelling stuff

#

for asynchat

#

only for that

echo basalt
rough drift
#

It's as if AsyncPlayerChatEvent doesn't properly cancel anymore

tardy delta
#

time to learn sqlite syntax now pff

echo basalt
#

it's mysql

#

but slightly different

rough drift
#

Not for me

tender shard
#

you must be doing sth wrong

tardy delta
#

throwing h2 out

tender shard
#

works fine for me using this code:

#
    @EventHandler
    public void onChat(AsyncPlayerChatEvent event) {
        Tasks.nextTick(() -> {
            Toast toast = new Toast(event.getMessage(), "Description", Material.DIAMOND, Toast.FrameType.GOAL);
            toast.send(event.getPlayer());
        });
        event.setCancelled(true);
    }
ancient plank
#

/relod !!!!

tardy delta
#

paper

ancient plank
#

cool toast

tender shard
#

spent like 2 hours getting this to work today lol

echo basalt
#

slightly inconsistent

tender shard
#

maybe they just like to give thumbs up to others

worldly ingot
#

I still like to hope that Mojang will do what they did in 1.8 with the /title command, and add a /toast command

rough drift
echo basalt
#

maybe they misread spigot as "facebook"

rough drift
#

yep it works

echo basalt
#

and started giving the thumbs up to every post

rough drift
#

it was another plugin

#

hm

eternal night
#

TAB ?

vocal cloud
eternal night
#

was like the greatest offender in that direction in the past few days

vocal cloud
eternal night
#

there goes your dream

vocal cloud
#

Yeah KEKWholdup

glacial sphinx
#

Do you guys like minigames?

tender shard
#

no

worldly ingot
#

As nice as that may be, sweeping Javadoc changes like that are not very likely to get merged. You could ask md directly, but I've a feeling his answer will be no

glacial sphinx
tender shard
#

all PR I ever did were javadocs related lmao

tender shard
worldly ingot
#

lol yeah, they were clarifications/corrections, yeah? Those are usually small enough to be worth merging in without issue

tardy delta
vocal cloud
#

Sad lol. It'd be nice to have

tender shard
#

but it'd be a shit ton of work

vocal cloud
#

I have no life.

tender shard
#

me neither

#

I'd also contribute to this

#

first thing i'd do

#

PersistentDataContainer @since("1.14.1")

glacial sphinx
ancient plank
#

most of my prs have been for grammar/spelling corrections

vocal cloud
#

Best way to ask the md_5

eternal night
#

open an issue maybe 🤔

worldly ingot
#

The largest sweeping change that was ever approved, and probably the only sweeping change that was ever approved, were the nullability annotations

#

At least in recent history that I can recall

tender shard
#

oh yeah IIRC in 1.8 there were no annotations yet

worldly ingot
#

Correct. I want to say it was 1.10 they were introduced?

vocal cloud
#

Well, it's docs comments not annotations

tender shard
#

bukkit uses javax annotations

worldly ingot
#

We use Jetbrains annotations

worldly ingot
tender shard
#

huh

#

I am pretty sure bukkit uses javax

#

because the jetbrains ones have this weird javadocs bug

worldly ingot
#

Nupe. JBA

tender shard
#

whut

vocal cloud
eternal night
#

smh you are wrong alex

worldly ingot
#

The Javadoc bug was actually present for a while until md and I figured out the issue was because of the annotation targets

#

Our fix was to backport. We're using JBA for Java 5

tender shard
#

I also always have this problem

#

that's why I used javax annotations because md5 told me they dont have this problem

#

thats also why I thought bukkit uses them lol

worldly ingot
#

I'll find you the commit. 1 sec

tender shard
#

that would be nice ❤️

tender shard
#

thx!

worldly ingot
#

I remember trying to figure out with md why what that was happening lol

vocal cloud
#

I'd be willing to do the work if I could get md_5 approval uwu

tender shard
#

ask him then

worldly ingot
#

Yeah I'd just give him an @ later in the day

#

Closer to 5pm EST is when he's around

vocal cloud
worldly ingot
#

I'll nudge in priv too

rough drift
#

getting md_5's approval is like asking a brick wall to move, change my mind

vocal cloud
#

Well, I have hope a dream

#

That one day, when giving help, I can finally know when a method was impl'd

rough drift
#

fuck

rapid aspen
#
    @Override
    public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) {

        if(args.length == 1 && sender instanceof Player p && p.getGameMode() == GameMode.SURVIVAL) {
            int amount = Integer.parseInt(args[0]);

            if (p.getAttribute(Attribute.GENERIC_MAX_HEALTH).getBaseValue() <= Integer.parseInt(args[0]) * 2) return false;

            ItemStack heart = new ItemStack(Material.NETHER_STAR, amount);
            ItemMeta heartMeta = heart.getItemMeta();
            heartMeta.setDisplayName(ChatColor.RED + "Coração");
            heart.setItemMeta(heartMeta);
            if (amount*2 < (p.getAttribute(Attribute.GENERIC_MAX_HEALTH).getBaseValue()) && amount > 0) {
                p.getInventory().addItem(heart);

            double pHealth = p.getAttribute(Attribute.GENERIC_MAX_HEALTH).getBaseValue();

                  p.getAttribute(Attribute.GENERIC_MAX_HEALTH).setBaseValue(Bukkit.getServer().getPlayer(args[1]).getAttribute(Attribute.GENERIC_MAX_HEALTH).getValue() + amount * 2);
            }
        }
        return true;
    }```
#

is this good

#

?

tender shard
#

pls fix the formatting

#

otherwise it's very disturbing to read

vocal cloud
#

?paste it

undone axleBOT
rapid aspen
vocal cloud
#

so much better

tender shard
#

formatting is still messed up

#

lines 16 and 18 should be intented

tardy delta
#

bruh still parsing it twice

#

also not caching attribute

rapid aspen
#

if (p.getAttribute(Attribute.GENERIC_MAX_HEALTH).getBaseValue() <= amount * 2) return false;

tender shard
#

i'd put the whole itemstack stuff into its own method. also you must catch the NumberFormatException

tardy delta
#

handle cases where the player is null

tender shard
#

player can't be null

tardy delta
#

uhh

tender shard
#

but it can be only a consolecommandsender, yes

tardy delta
#

i mean the Bukkit.getPlayer

tender shard
#

or a commandblock

#

ooh havent even seen that

#

also whut

#

you do args[1]

#

after checking whether args.lengh is 1

#

so will never have args[1], only args[0]

rapid aspen
#

im fixing it

night copper
#

where the problem at ?

tender shard
#

and dont call Interger.parseInt twice for the same string

vocal cloud
#

You're not Santa don't need to parse it twice

tender shard
#

lmao whut

#

what song is that

ancient plank
#

he's checking his list

tardy delta
vocal cloud
#

Santa Claus is comin to town

tender shard
vocal cloud
#

I mean yeah, what do you expect from a fat guy watching you sleep

rapid aspen
#

better?

tardy delta
#

early returns

severe oak
tardy delta
#

no

#

you can

severe oak
#

I know but is it required?

tardy delta
quiet ice
tardy delta
tender shard
#

that's gay

rapid aspen
quiet ice
tender shard
# rapid aspen and how i use else
if(args.length == 0) {
  // Send error message
  return true;
}

if(player == null) {
  // Send other error message
  return true;
}

// Do the rest
severe oak
severe oak
#

Why?

tender shard
tardy delta
#

i didnt even learn that you could use return without returning smth

tender shard
#

and common sense told me too

quiet ice
tardy delta
#

using blueJ at school 🤓

ancient plank
quiet ice
tender shard
ancient plank
#

That's the one

rapid aspen
#

if (args.length == 1) return;

#

?

quiet ice
#

Do note that schools try to prepare you for enterprise code. Not solo dev code

tardy delta
#

probably send a messagr that ths user should specifiy a player

tender shard
tardy delta
#

smh i really cant type on this keyboard

tender shard
tardy delta
#

hit numblock twice by typing this

worldly ingot
tender shard
#

how is the size of the source code relevant

worldly ingot
#

It's a javadog bug as far as I'm concerned

tender shard
#

javadog

ancient plank
#

javadog, new mascot?

worldly ingot
#

doc

#

fuck

tardy delta
#

doge

quiet ice
#

No, it's a JBA issue

worldly ingot
#

Methods are anotatable because of return types

quiet ice
#

Eclipse has trouble dealing with it too

tender shard
#

eclipse also has some serious issues with itsef

worldly ingot
#

fwiw, javac might also have an identical bug

eternal night
#

or @Deprecated on a method ? 😅

tender shard
eternal night
#

:>

quiet ice
#

I just silently remove the extra annotations, but I guess I'll need to PR to eclipse eventually to fix that issue

severe oak
tender shard
#

thanks eclipse, really useful hint lol

severe oak
#

Not to mention most ides will highlight if statements closing and opening brackets

worldly ingot
#

Eclipse does that too PES_Think

tardy delta
#

lets cast a string

quiet ice
#

I myself use the arrow pattern quite a lot in really big (up to 2k lines) methods that cannot really be boiled down into many methods in a sensical manner

#
        for (Node block : new IterableNodeList(project.getChildNodes())) {
            if (!block.hasChildNodes() || !(block instanceof Element)) {
                continue;
            }
            Element blockElem = (Element) block;
            if (blockElem.getTagName().equals("properties")) {
                for (Node property : new IterableNodeList(blockElem.getChildNodes())) {
                    if (property instanceof Element) {
                        Element propertyElement = (Element) property;
                        out.putIfAbsent("${" + propertyElement.getTagName() + "}", propertyElement.getTextContent());
                    }
                }
            } else if (blockElem.getTagName().equals("parent")) {
                parentArtifactNode = blockElem;
            }
        }

Loops are also one cause of me using that pattern heh

worldly ingot
# tender shard thanks eclipse, really useful hint lol

Eclipse needs to step up its game in terms of quick fixes. I say that as an Eclipse user of 7 years. Though in this situation, what else is it meant to suggest? The only other option would be "Create method getName()" but it can't do that in a compiled class on the class path

#

It is adding some very, very useful quick fixes every update though

#

Ctrl + 1 is a life saver

quiet ice
#

what is that?

worldly ingot
#

Quick fixes

tender shard
paper bone
#

I've switched recently from eclipse

#

To vscode

tardy delta
#

F

night copper
#

switch to notepad

tardy delta
#

switch to nano

tender shard
#

intellij simply tells you "nope. not going to work"

tardy delta
#

ah shit i forgot to install linux this afternoon

ancient plank
#

I liked Ctrl+shift+o

tender shard
worldly ingot
quiet ice
#

F3 is my favourite shortcut

ancient plank
#

optimize imports

night copper
#

it imports everything u need

#

everything u used*

tender shard
worldly ingot
#
  • Adds new imports
  • Removes unused imports
  • Organizes your import order
#

I have that as a save action it's so useful lol

ancient plank
#

yuh

tender shard
#

ah ok, I have imports set to "on the fly"

ancient plank
#

I still press it in intellij

quiet ice
#

Doesn't quite like generics though if the type of the genericed type cannot be resolved

ancient plank
#

Even tho it's not the same keybind

worldly ingot
#

I think IJ has a similar button but you can rebind it to CSO

tardy delta
worldly ingot
#

At least if I recall correctly from my week or two using it

tender shard
ancient plank
#

Ye I have it set to remove unused imports on cso

#

In ij

tardy delta
#

hmm anyone knows if i need to manually create db when using hikaricp with sqlite?

#

i didnt have to wih h2

#

created the file automatically and created the database

tender shard
tardy delta
#

oh

quiet ice
#

Eclipse does that too provided you auto-complete the suggestion

tender shard
#

e.g. it's so annoying when doing List<String> list = ...

#

obviously I need java.util.List

#

and not some random other list thing

desert frigate
crisp steeple
#

i love javax.List

#

obviously what i needed

tender shard
desert frigate
#

click sound

#

or the volume buttopn

tardy delta
#

ij likes to give me a javax.xml.stream.Location instead of a bukkit one lol

desert frigate
#

it works for me

tender shard
#

oh it' sjust extremely silent

tardy delta
#

idk im listening music lol

tender shard
#

that sounds like some weird enderman thing lol

desert frigate
desert frigate
#

i cant tell the difference

quiet ice
tender shard
#

not sure, just try around with the /playsound command until you find it

desert frigate
#

oh yeah

#

that cmd

night copper
#

its enderman teleport

#

i think

desert frigate
#

its none of them

#

unless im using the cmd wrong

#

/playsound minecraft:entity.enderman.teleport hostile kobeeeef

#

they dont sound like it at all

tender shard
#

custom resource pack?

#

on hypixel

desert frigate
#

nope

#

it sounds like a portal

#

oh well its not portal either

tender shard
#

hm it's definitely something fro mthe end, I guess

desert frigate
#

yeah

echo basalt
#

ender pearl teleport

#

but low pitch

#

like a 0.13

desert frigate
#

oo

#

lemme try

tender shard
#

you can enable debug mode and check your client logs

#

it should print all sounds

tardy delta
#

sqlite not having uuid as datatype?

night copper
tender shard
tender shard
desert frigate
tardy delta
#

hmm im wondering cuz i couldnt find it for h2 either but it still worked

tender shard
#

maybe this helps, idk

tender shard
#

that's a good idea

desert frigate
#

how tf do they make a slowed down sound

worldly ice
#

they probably mean lower pitch

tender shard
#

changing the pitch also changes the speed

desert frigate
#

oh

#

no clue what pitch did

tender shard
#

it's how high the sound is

#

it's like when you play a vinyl record fster thn usual, than it's faster and the pitch is higher

#

if you play it slower, the pitch automatically gets lower

desert frigate
#

ay it worked

#

thanks <3

desert frigate
#

i thought pitch was another form of volume or smth lol

glossy lily
#

can locations have decimals

tender shard
#

sure

#

they use doubles

glossy lily
#

not working for me

#

i cant set a shulkers location to 0, 0.5, 0

tender shard
#

?notworking

undone axleBOT
#

"Does not working" is a useless statement. Please describe what exactly is not working, what you expect it to do, and what actually happens. If you get any console errors, also ?paste the entire stacktrace.

glossy lily
#

it just rounds down to 0, 0, 0

#

its not like

#

off the grid

#

which i want it to be

tender shard
glossy lily
#

no

#

shulker as in the entity

#

like

#

the shulker mob

#

without ai or gravity

tender shard
glossy lily
#

no

#

not a shulker box

#

a shulker

#

the mob

tender shard
#

oooh, just Shulker

#

yeh I get it now lol

tardy delta
#

pff why did school never learn me how to write good consistent database tables

tender shard
#

yeah they automatically use the next "actual" block pos

#

maybe there's some NMS stuff to avoid this

ancient plank
#

shulkers are basically blocks without being a block

tardy delta
#

tile entities?

crisp steeple
#

more like entities with the hitbox and collision of a block

#

it’s definitely possible to put them in non-whole block locations though since i had some command block thing a few years ago that made circles with them

cobalt tinsel
#

helpp

#

i have this in the pom

#

<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>minecraft-server</artifactId>
<version>1.8.8-SNAPSHOT</version>
<type>jar</type>
<scope>compile</scope>
</dependency>

#

but it's giving error

#

Unresolved dependency

tender shard
#

run buildtools

eternal oxide
#

wrong artifactId

tender shard
#

?bt

undone axleBOT
tender shard
#

and yeah normally you want to use craftbukkit or spigot instead of "minecraft-server"

worldly ingot
#

Wrong version too ;p

desert frigate
#

is there a method to await a message? or will i have to get it from the event

worldly ingot
#

type is also unnecessary. Really that whole dependency is wrong

cobalt tinsel
worldly ingot
#
<dependency>
  <groupId>org.spigotmc</groupId>
  <artifactId>spigot-api</artifactId> <!-- or use "spigot" if you want server internals -->
  <version>1.8.8-R0.1-SNAPSHOT</version>
  <scope>provided</scope>
</dependency>```
#

Literally everything in your dependency except for "groupId" was incorrect lol

tender shard
#

haha

cobalt tinsel
#

i need the whole server

tender shard
#

erm

cobalt tinsel
#

to compile my spigot

tender shard
#

then use spigot

worldly ingot
#

<!-- or use "spigot" if you want server internals -->

tender shard
#

instead of spigot-api

worldly ingot
#

Oh... you're making a fork

cobalt tinsel
vocal cloud
#

👀

worldly ingot
#

Well, version of that dependency should still be 1.8.8-R0.1-SNAPSHOT iirc

cobalt tinsel
#

when i use that import

worldly ingot
#

but I'm going based on 7 year old information here

cobalt tinsel
#

it fucks up

#

all my deps

#

and gives errors

#

wtf

vocal cloud
#

Did you run buildtools for it?

quaint mantle
#

Im trying to set a receipe on a merchant but when i do merchant.setRecipe(1, recipe); or merchant.setRecipe(0, recipe); it just says its out of bound

cobalt tinsel
#

i never used that

#

how can i use it

vocal cloud
#

?bootstrap

undone axleBOT
#

Bootstrap Jar
The main spigot-1.18.jar is now a bootstrap jar which contains all libraries. You cannot directly depend on this jar. You should depend on Spigot/Spigot-API/target/spigot-api-1.18-R0.1-SNAPSHOT-shaded.jar, or the entire contents of the bundler directory from your server, or use a dependency manager such as Maven or Gradle to handle this automatically.

Please read the release notes for further information: https://www.spigotmc.org/threads/9-years-of-spigotmc-spigot-bungeecord-1-18-1-18-1-release.534760/#post-4305163

cobalt tinsel
#

java -jar BuildTools.jar --rev 1.8.8

#

where do i put that command

lost matrix
lost matrix
undone axleBOT
vocal cloud
quaint mantle
cobalt tinsel
#

okok

cobalt tinsel
vocal cloud
#

Then get it

tender shard
tender shard
undone axleBOT
lost matrix
quaint mantle
#

like that?

#

yee

#

work

#

thanks

cobalt tinsel
#

now what

#

it created sum folders nd shit

tardy delta
#

whats most acceptable?

class PlayerData {
  Map<String, Home> homesMap = new HashMap<>();

  PlayerData(Collection<Home> homes) {
    for (Home home : homes) {
      homesMap.put(home.name(), home);
    }  
  }
}```
or
```java
class PlayerData {
  Map<String, Home> homesMap = new HashMap<>();
  
  void addHome(Home home) {
    homesMap.put(home.name(), home);
  }```
#

im trying to avoid taking multiple maps as constructor parameters in my playerdata class

lost matrix
tardy delta
#

mmmh ye lets call methods then instead of calling the constructor when loading from database

tender shard
cobalt tinsel
#

:C

tender shard
#

which error exactly?

cobalt tinsel
#

cannot resolve org:spigotmc:spigot:1.8.8-R0.1-SNAPSHOT

iron glade
#

why use 1.8.8

tender shard
#

click on the maven reload button in intellij

lost matrix
cobalt tinsel
#

for my fork

cobalt tinsel
ancient plank
#

If you think about it

tender shard
# cobalt tinsel same error

what's the output of this

mvn dependency:get -DartifactId=spigot -DgroupId=org.spigotmc -Dversion=1.8.8-R0.1-SNAPSHOT
#

it should print this

gleaming grove
#

public static String square = "■" does somebody has this emoticon with outline border and transparent body?

crimson relic
#

gleaming grove
#

thx

cobalt tinsel
tender shard
#

what what?

tardy delta
#

what what what?

quaint mantle
#

is there a way to unregister events

#

what if i want it to shut the fuckjuup

tardy delta
#

HandlerList.unregisterAll(listener) or smth

#

ugly asf 💀

#

i hate exposing collections for serialisation

frank kettle
#

Hello, is it possible to have a firework not play the explosion effect?

#

but still want the particles after explosion effects going out, just dont want the "EXPLOSION_HUGE" particle alike happening because takes away the beauty of a firework.

rough drift
#

It allows you to make events without a class, and also stop the events

quaint mantle
#

is NMS EntityHorse now just net.minecraft.world.entity.animal.horse.Horse ?

tardy delta
#

oeh i wish i had discovered this earlier

winter pagoda
#

Is it possible to listen for when a block created by sendBlockChange is broke?

desert frigate
#

How would I force load a spawner? Basically make a spawner still work even if a player is farther then 16 blocks away

fiery prairie
#

is passing an instance of the main class any different in bungeecord than spigot?

fiery prairie
severe oak
#

Oh you’re attempting to make a singleton?

tardy delta
quaint mantle
#

kk

#

ty

winter pagoda
#

Is it possible to listen for when a block created by sendBlockChange is broke?

fiery prairie
#

i just want to be able to use things like configuration.getString etc

severe oak
#

It means you store a static instance of the class. And only allow one instance to ever be created

civic wind
#

Creating a staffmode plugin, (Im new to java) just wondering why it won't give me the itemstack (compass) everything else is working perfectly

fiery prairie
tardy delta
#

?di

undone axleBOT
severe oak
#

Use Di

#

^

fiery prairie
#

does that work the same for bungeecord ?

tardy delta
#

let your condition be if (staff.remove) {} else {}

tender shard
tardy delta
#

no need to check contains before removing

severe oak
civic wind
fiery prairie
severe oak
#

You need to read the documentation first

fiery prairie
#

Ohh yea I got it, thanks!

vast raven
#

Why I keep getting the same error when I import VaultAPI even if I have the plugin is enabled, this is the code to setup the plugin:

tardy delta
#

no vault or economy plugin installed?

quiet ice
#

Oh god

#

Almost def. latter

quaint mantle
#

how to unregister listener class

tardy delta
#

i just told you

vast raven
quiet ice
#

Sure?

vast raven
quiet ice
#

And the economy plugin?

vast raven
quiet ice
#

Vault does not provide an economy by default

quaint mantle
tardy delta
#

hmm i will

quaint mantle
#

oops

#

thought you was a different person

#

thanks man

quiet ice
#

Okay, do you initialize your vault integration lazily (i.e. definitely after the economy plugin loaded)?

ancient plank
#

💀

quiet ice
#

and there we have it. Your eco plugin loads after your plugin

vast raven
quiet ice
#

Load the integration as late as possible (the first tick at the very earliest)

river oracle
#

dependencies

quiet ice
river oracle
severe oak
#

or just load ur plugin last 🙂

quiet ice
severe oak
quiet ice
vast raven
#

With bukkit scheduler?

quiet ice
#

Yeah

vast raven
#

1 tick should be enough

quiet ice
#

Otherwise listen for the Service registration events

fiery prairie
#

are we actually allowed to ask for support with Bungeecord here too?

fiery prairie
#

Oh yea

river oracle
#

yes though I feel like bungeecord devs are much less common

#

so you might have to wait a bit

fiery prairie
quiet ice
#

Did you mistype something in the plugin.yml perchance?

#

Actually you did there is no mistake to be made here

fiery prairie
#

there's no plugin.yml, there is a bungee.yml though

#

is that what you mean?

quiet ice
#

Perhaps?

#

Both are allowed most likely

ancient plank
#

class that doesnt have a life and does problems

fiery prairie
#

Ohh yea, I earlier misspelled my plugin name when creating it, and I forgot to fix it, thanks

fiery prairie
ancient plank
#

saffchat

fiery prairie
#

ye

ancient plank
#

Who would've thought

quiet ice
#

You should read error messages more frequently

ancient plank
#

reading is useful

fiery prairie
#

yea umm now how do I rename a package, i dont seem to have an option for that

quiet ice
#

Java is not like C/C++ where the error message is basically just "Recieved SIGSEG: Core dumped"

fiery prairie
#

or c#

fiery prairie
fiery prairie
#

still the same error though

prime sandal
#

Hello, I'm trying to create custom items in spigot (with custom texture), I need to know if it is possible to add a texture to a placed block with spigot 1.8.8?

#

I already use this for my items

fiery prairie
#

you cant add custom texture with spigot

prime sandal
#

No problem, thanks 🙂

fiery prairie
#

thats forge or other mod loaders

prime sandal
#

No no

#

Check

quiet ice
#

You can define resource packs

vast raven
prime sandal
#

That's the same block

vast raven
#

Even delaying it with 1 tick that works

prime sandal
#

But the blue bedrock has an custom nbt tag

prime sandal
latent dew
#

hello, I wanted to know how I can create a skript using the Skript Spigot plugin, to make a system that leaves items scattered around the map inside chests and that these items automatically reset within a certain time, how can I do that?

prime sandal
quiet ice
#

You use the custom model id

prime sandal
#

Because when I pass it, the block loses its nbt (I use meta data instead) but I lose my blue texture

quiet ice
#

You probably need to work with tileentities/tilestates there, but idk. This whole topic was always far beyond my comprehension

civic wind
#

Anyone tell me why it doesn't like it

#

lol

quiet ice
civic wind
#

Ignore the space ive amended that. still an issue

latent dew
#

hello, I wanted to know how I can create a skript using the Skript Spigot plugin, to make a system that leaves items scattered around the map inside chests and that these items automatically reset within a certain time, how can I do that?

civic wind
quiet ice
quiet ice
ancient plank
#

mmethodethod

#

see it doesn't work

fiery prairie
civic wind
#

But I have the correct amount of brackets between each method no?

prime sandal
ancient plank
#

it's quite easy to see the error

#

look at the indentation

quiet ice
#

(you open your if statements with two brackets)

civic wind
#

I've added added another

quiet ice
#

wha

civic wind
#

ahh yeah

#

It's fine now

rapid aspen
#

someone know why this error?

fiery prairie
#

wrong version of java

severe oak
#

the java version on your local pc is too high

ancient plank
#

me/goldgamerpt/goldplugin/Main has been compiled by a more recent version of the Java Runtime (class file version 62.0), this version of the Java Runtime only recognizes class file versions up to 61.0

eternal night
#

running your server with java 17 while compiling to java 18 will break

rapid aspen
#

ok

#

<java.version>18</java.version>

#

just change it to 17

#

right?

fiery prairie
#

tho if youre making a public plugin id recommend putting 1.8 unless your plugin requires a high version which i doubt

#

1.8 is not a minecraft version here, its java 8

#

not sure tho

eternal night
#

only really makes sense if you also depend on a api version under 1.16.5

fiery prairie
#

yea

quiet ice
#

Java 11 is the minimum java version I'd ever go for

fiery prairie
#

1.7-1.16.5 be sad now

#

tho i think 11+ works on these version too

desert frigate
ancient plank
#

I'm ngl I tried using java 8 recently, painful

fiery prairie
#

well then there's me

#

who doesnt know any difference

quiet ice
#

To be blunt: Then you are stupid

fiery prairie
#

yes

#

i agree

severe oak
quiet ice
#

Though to be fair I do a lot of classloading / IO shenanigans, where features implemented in Java 9 to Java 11 are very much needed, other people will probably not need those APIs as much

severe oak
#

cast it

rapid aspen
atomic swift
#

i am staff over at command panels and one of my users are getting this error they have no tab spaces i need to know why they are getting this error

severe oak
atomic swift
#

oops

rapid aspen
#

when i do /withdraw give me the heart item but dont remove me a heart

fiery prairie
#

ig

ornate mantle
#

if I'm making an exact copy of Hypixel skyblock do I make it in a single plugin or multiple different projects?

#

for simplicity and maintainability purposes

rapid aspen
lost matrix
cobalt tinsel
#

het

lost matrix
cobalt tinsel
#

hey*

cobalt tinsel
#

cannot find symbol on CraftGuardian

#

anyone knows why?

rapid aspen
cobalt tinsel
#

like there's no error

#

but when i compile

#

yes

lost matrix
#

Are you using maven?
@cobalt tinsel

lost matrix
rapid aspen
#

ok thx

cobalt tinsel
lost matrix
cobalt tinsel
#

mvn clean install

lost matrix
lost matrix
cobalt tinsel
#

nope

lost matrix
#

Then show your pom pls

cobalt tinsel
#

ok

rapid aspen
ornate mantle
#

ok 7smile7 which project structure would YOU choose

#

if you wanted to make a complete replica of Hypixel skyblock

#

one core project or many

lost matrix
# cobalt tinsel https://pastebin.pl/view/b69e51f2

Oh 1.8... Support for that version was dropped years ago. You are on your own if you want to use such an
ancient piece of software. Maybe there are some forum posts from half a decade ago in the forums.

lost matrix
ornate mantle
#

can you elaborate just a spoonful

lost matrix
# rapid aspen no

So you want to basically set the health of the command sender to the health of another player + amount * 2?

civic wind
#

Anyone give me guidance? I have a command class which has an arraylist in it, im wanting to also use this arraylist in my listener class, how can i get access to it?

ornate mantle
#

and use that arraylist in the command and listener classes

#

or wherever else

lost matrix
# ornate mantle can you elaborate just a spoonful

I usually have a core library that provides common functionality that can be used for any type of plugin/server.
So guis, holograms, item builder block data and so on. And then one project which depends on the library and
has the actual feature implementation. Btw you should do an estimate for your project.
If you are really dedicated then you can get about 15 - 20% done per year. So expect this to be a 5 to 6 year long process if you are alone.

civic wind
#

How do i initialise , the way i am doing it is wrong

civic wind
#

I did it here and didn't need to do anything, it just found it

ornate mantle
lost matrix
ornate mantle
#

the list is uppercase

lost matrix
#

And do NOT use static for that

ornate mantle
#

and what do you want to store in the list?

civic wind
ornate mantle
#

um

sacred mountain
#

is it possible to make placeholderapi listen to messages outputted by another plugin that didn't add support for it?

#

or if i can code something to do so

#

to catch the message and then add placeholders

lost matrix
#

?paste

undone axleBOT
sacred mountain
#

wht

lost matrix
compact haven
#

technically you can, but it'd be extremely hacky~ i.e. intercepting packets and replacing placeholders in them before they reach any clients

#

and even then

#

you'd not get full capabilities if there's no player context in the packet

lost matrix
fiery prairie
#
    @Override
    public void execute(CommandSender commandSender, String[] strings) {
        if (commandSender instanceof ProxiedPlayer) {
            ProxiedPlayer p = (ProxiedPlayer) commandSender;
            System.out.println("yo yo yo my dudes4324");
            if (p.hasPermission("staffchatbungee.use")) {
                System.out.println("yo yo yo my dudes134");
                for (ProxiedPlayer all : ProxyServer.getInstance().getPlayers()) {
                    System.out.println("yo yo yo my dudes431");
                    if (all.hasPermission("staffchatbungee.use")) {
                        all.sendMessage(new TextComponent(ChatColor.translateAlternateColorCodes('&', "&cTestmsg")));
                        System.out.println("yo yo yo my dudes");
                    }
                }
            }
        }
        return;
    }```


so basically even tho i am op, it still only prints `yo yo yo my dudes4324` which means i dont have perms???
#

bungeecord ^

compact haven
#

like you can't parse a target placeholder without the target player in the outbound packet

compact haven
lost matrix
#

Ah i see

compact haven
#

if you put %blah% into the config, and it sends "%blah%" to the client, you can replace that in packets

lost matrix
fiery prairie
#

uh does luckperms do the job? or in config.yml

#

of bungee

lost matrix
#

Either of those will do

compact haven
#

(as long as luckperms is on the bungee as well)

fiery prairie
#

yea

#

Ok so umm it works, thanks!

#

i didnt ever use bungeecord i have no idea how to use this

wintry swan
#

Does someone know if biome updating with spigot doesn't need the player to reconnent on newer minecraft versions such as 1.18 & 1.19?

radiant aspen
#

Yo, noob question, whats the method to get the dimension type from a world? (e.g. nether end overworld)

lost matrix
#

getEnvironment or something like that

radiant aspen
#

Ah, yeah Thanks

urban kernel
#

how easy would it be to make a player completley invis when they chug an invis pot
like is there an event for it

lost matrix
wintry swan
urban kernel
#

116

#

i was planning on using livingEntity#setInvisible

lost matrix
#

Well then you just listen for the EntityPotionEffectEvent and hide him from all other players using the hide method.
setInvisible might also work.

urban kernel
#

does setInvisible hide the nametag

lost matrix
#

Yes. Its as if the entity does not exist for players.

urban kernel
#

alr

#

does it hide fm tab too

lost matrix
#

If you use the hide() method then yes

#

Not sure for setInvisble

urban kernel
#

playerEntity#hide

#

?

lost matrix
#

Player#hidePlayer()

urban kernel
#

alr

#

im guessing there is an event for the exiration

rapid aspen
#

can someone help me test something please?

rain mason
#

how would I use JDA in my plugin?

opal juniper
#

shade it

rain mason
#

okay literally have no idea what that means imma google it

crisp steeple
#

include the library in your plugin’s jar

worldly ingot
#

You can shade it, or use Spigot's library feature

#

I'd opt for the latter. If you can use it as a library, you should

lost matrix
wintry swan
fiery prairie
#

why does it generate the file in the /plugins/ folder instead of /plugins/mypluginname/ ?

compact haven
#

because that's probably what getPluginsFolder() returns xd

#

just ../plugins

fiery prairie
#

so would that work?

lost matrix
# fiery prairie

ProxyServer = the bungeecord server
its plugins forlder = bungeecord/plugins
adding a config to this folder = bungeecord/plugins/config.yml

fiery prairie
dusk flicker
#

?tas

undone axleBOT
lost matrix
#

So no

#

Its the same as in spigot

fiery prairie
#

so file = new File(Plugin.getDataFolder(), "/config.yml");?

fiery prairie
# dusk flicker ?tas

I don't see the point of that, if there are "experts" here that can tell if something would work, I don't need to risk wasting my time

lost matrix
#
new File(yourPlugin.getDataFolder(), "config.yml");
urban kernel
#

or use ./bungeecord/plugins/plugname/config.yml

sand raven
#

so for some reason, my event listener is being not called but only some of the time

#

the rest of the time it's called and works fine

lost matrix
#

Context

sand raven
#
@EventHandler
    public void onPlayerDoorOpen(PlayerInteractEvent event) 
``` here's the signature of the event handler if that helps at all
#

it's to catch a door being opened

#
  if((action == Action.RIGHT_CLICK_BLOCK)) {
            assert clicked != null;
            if (isDoor(clicked.getType()) && /* ignore this */ Bizzare.tolls.containsKey(clicked.getLocation())) {
#

here's how i check it's a door

#

isDoor is just a function that switched on Material enum

lost matrix
#

Full method and spigot version pls

sand raven
#

so it's deterministic and isnt' the problem

sand raven
# lost matrix Full method and spigot version pls
    @EventHandler
    public void onPlayerDoorOpen(PlayerInteractEvent event) {
        Action action = event.getAction();
        Block clicked = event.getClickedBlock();

        if((action == Action.RIGHT_CLICK_BLOCK)) {
            assert clicked != null;
            if (isDoor(clicked.getType()) && Bizzare.tolls.containsKey(clicked.getLocation())) {
                Toll toll = Bizzare.tolls.get(clicked.getLocation());
                if (toll.currentPlayers.contains(event.getPlayer())) {
                    event.getPlayer().sendMessage("Door opened.");
                } else if (toll.onePerson && !toll.inUse) {
                    event.getPlayer().sendMessage(String.format("Purchasing door until %d for %f", toll.resetTime, toll.price));
                    EconomyResponse response = Bizzare.econ.withdrawPlayer(event.getPlayer(), toll.price);
                    if (!response.transactionSuccess()) {
                        event.getPlayer().sendMessage("You don't have enough balance to pay the toll.");
                        event.setCancelled(true);
                    } else {
                        toll.currentPlayers.add(event.getPlayer());
                        toll.inUse = true;
                    }
                } else if (toll.onePerson) {
                    event.getPlayer().sendMessage(String.format("This door is already in use by %s.", toll.currentPlayers.get(0).getDisplayName()));
                    event.setCancelled(true);
                } else {
                    event.getPlayer().sendMessage(String.format("Purchasing door until %d for %f", toll.resetTime, toll.price));
                    EconomyResponse response = Bizzare.econ.withdrawPlayer(event.getPlayer(), toll.price);
                    if (!response.transactionSuccess()) {
                        event.getPlayer().sendMessage("You don't have enough balance to pay the toll.");
                        event.setCancelled(true);
                    } else {
                        toll.currentPlayers.add(event.getPlayer());
                    }
                }
            }
        }
    }
lost matrix
#

First

((action == Action.RIGHT_CLICK_BLOCK))

to

(action == Action.RIGHT_CLICK_BLOCK)
lost matrix
crisp steeple
sand raven
# lost matrix Debug if this returns true. ```java Bizzare.tolls.containsKey(clicked.getLocatio...

spigot 1.19 and ```java
public static boolean isDoor(Material mat) {
switch (mat) {
case DARK_OAK_DOOR:
case ACACIA_DOOR:
case BIRCH_DOOR:
case CRIMSON_DOOR:
case IRON_DOOR:
case JUNGLE_DOOR:
case MANGROVE_DOOR:
case OAK_DOOR:
case SPRUCE_DOOR:
case WARPED_DOOR:
case ACACIA_FENCE_GATE:
case BIRCH_FENCE_GATE:
case CRIMSON_FENCE_GATE:
case DARK_OAK_FENCE_GATE:
case JUNGLE_FENCE_GATE:
case MANGROVE_FENCE_GATE:
case OAK_FENCE_GATE:
case SPRUCE_FENCE_GATE:
case WARPED_FENCE_GATE:
return true;
default:
return false;
}
}

lost matrix
#

lol

sand raven
sand raven
lost matrix
#

Either use a Set<Material> or simply use Tag.WOODEN_DOOR.isTagged(Material)

quaint mantle
#

I have a question. because when I put a negative coordinate with the ZNPCS, it tells me Player not found.
What do I have to do to solve it?

sand raven
quaint mantle
#

spanish

#

/znpcs action add 1 cmd tp -19 85 94

#

it tells me player not found

lost matrix
sacred mountain
lost matrix
quaint mantle
quaint mantle
lost matrix
sacred mountain
#

it's a /message, but it's not opensource so i'm not sure about how it's done

sand raven
#

The top half of the door doesn't trigger the event

#

But the bottom one does

lost matrix
#

Thats what i thought

sand raven
#

how would I work around that?

lost matrix
#

The Tag should solve that

sacred mountain
#

or in general, if a player sends a message and i want to edit it, maybe add asterisks where a player swears.

sand raven
sacred mountain
#

i was thinking just cancelling the asyncchatevent and then resending to all recipients

#

but it doesnt even seem to be firing the event when i type in chat or run the command

lost matrix
sand raven
sacred mountain
#

woops

#

set it to highest, i thought it would be best to modify afterwards no?

lost matrix
#

On the vault plugin page

sacred mountain
lost matrix
sacred mountain
#

isn't that what i want though

#

after everyhting has modified it, it will change the placeholders

lost matrix
#

Not if you want to replace the placeholders. Otherwise the main plugin will replace them first.

#

And then you have no placeholders to detect

sacred mountain
#

wdym 'replace them first'

#

these placeholders are my own and not the plugins

lost matrix
#

Should work

sacred mountain
#

so the plugin won't even replace them hence why it's just the plain text in the screenshot i sent

#

that version work

#

s

#

vault isn't really dependent on server version too much

#

yes

lost matrix
#

Ok so the other plugin has placeholders but you dont want to use them. You would rather register your own placeholders
using papi?

sacred mountain
#

the other plugin doesn't support placeholders. I've already made my own expansion

#

they work

#

incase you were gonna ask

#

/papi parse me

lost matrix
#

Well nice. Whats the problem then?

waxen plinth
#

If you attach some data to a shulker box item through PDC, then place it and pick it back up, will it still have the metadata?

sacred mountain
lost matrix
sacred mountain
#

the plugin sending the message has no placeholder support and i'm trying to add my own placeholders, or any placeholders for that matter, and edit that message

waxen plinth
lost matrix
sacred mountain
#

check my screenshot

lost matrix
sacred mountain
#

they have their own placeholder - <target> and <sender> which i presume returns the player name

#

i can grab that and maybe use it in the placeholderapi setplaceholders method

#

when editing the message

compact haven
#

PDC on block state persist

waxen plinth
#

Nice

#

That's gonna be handy

compact haven
#

every PersistentDataHolder has an NBT compound, and all PDC data goes into that

lost matrix
sacred mountain
#

nvm it returns the rank and the name, but i can strip that off easily

compact haven
#

There’s a resource here that abuses the chunk PDC to store PDC in every block tho

#

Not just ones with a BlockState like tile entities

waxen plinth
#

That's my resource

#

And it's not abuse

compact haven
#

oh

compact haven
#

abuse wasn’t negative btw

waxen plinth
#

lol

compact haven
#

it was an explanation xd

waxen plinth
#

I'm sure there are multiple resources that do that

#

Mine is just one of them I suppose

compact haven
#

I was taking about one from mfnalex, I didn’t know u had one as well tho

lost matrix
#

If the ItemMeta is an instance of BlockStateMeta then there are two separate pdcs

sacred mountain
lost matrix
#
ItemMeta {
  PDC {
  },
  BlockState {
    PDC {
    }
  }
}

Something like that

lost matrix
sacred mountain
#

what kind of packet is it

#

nvm

obsidian drift
#

does World#getEntities return entities in unloaded chunks?

eternal oxide
#

no

lost matrix
#

Would be funny. Imagine having a huge world from years of play and every time some plugin
calls this method the server crashes with an OutOfMemoryException

obsidian drift
#

Yeah now that I think about it that's abit stupid lol

waxen plinth
#

Where is World#loadAllChunks()?

obsidian drift
#

I'm trying to find a way to remove all entities on startup that are not armor stands or item frames

#

even in chunks that are not loaded

sacred mountain
lost matrix
waxen plinth
#

Bukkit.getWorlds().stream().flatMap(w -> w.getEntities().stream()).filter(e -> !Set.of(EntityType.ARMOR_STAND, EntityType.ITEM_FRAME).contains(e.getType())).forEach(Entity::remove)

#

👍

sacred mountain
#

xy maybe

lost matrix
waxen plinth
#

Don't think so

rain mason
ivory sleet
#

Nope

lost matrix
#

Damn... Was still on kotlin in my mind

ivory sleet
#

🥲

waxen plinth
#

It's a minor thing but would be nice to have

compact haven