#help-development

1 messages · Page 1393 of 1

wet breach
#

depending what you are doing, packets are more efficient in some cases. Like if you want custom entities without their actually being entities for the server to care about. You use packets to create fake entities, but the clients won't know any different.

eternal oxide
#

Why not just spawn it invisible with no collisions?

#

wron person

solemn shoal
#

ask party lol, not me

#

yeah

lean bone
#

The armorstand is used as a title which floats above the head of the player, but I don't want the player himself seeing the title

#

Just the other people around them

wet breach
#

however, while packets may be more efficient in some cases, it is actually more difficult coding wise because there is a lot more variables you need to handle yourself from that point and can't rely on the server for.

eternal oxide
#

is an armorstands custom title visible if you set the title visible but the stand invisible?

solemn shoal
#

yes

lean bone
#

Yes

solemn shoal
#

thats how HologramApi works

eternal oxide
#

Then no reason to use packets

wet breach
#

Yes that is how you make HoloGrams these days

solemn shoal
#

interactible holograms use horses

lean bone
#

I was trying to just spawn all the armorstands at 0,0, and only teleport them for the players that need to see them

#

But it might be a better idea to use something like that metadata packet I believe exists to hide the title for some players

wet breach
#

you are going to need to mess with like 2-3 packets then if I remember correctly as well as capture any packets that cause updates

solemn shoal
#

wait, cant armorstands be in teams?

#

coz i remember the option existing to hide names for specific teams

eternal oxide
#

Yes, just set it only visible to the team

lean bone
#

I'll try that out, thank you!

wet breach
#

that is a solution too, just good luck on the scoreboard stuff lol

eternal oxide
#

HIDE_FOR_OTHER_TEAMS

lean bone
eternal oxide
cold field
#

What it does?

quaint mantle
#

turns out it crashed my server by lagging it too much

#

and yes it was async

wet breach
#

depends how you coded it. If you are trying to modify the sign, can't do that async

eternal oxide
#

um, crashed server with Async? We're you calculating teh movement of every atom in the universe?

quaint mantle
cold field
#

mh, I need to dig it more

quaint mantle
#

read javadocs

#

likely it says what it returns

#

*what parameters mean

summer scroll
#

basically ignore level restriction.

quaint mantle
#

you just asked us what it means

eternal oxide
summer scroll
#

sharpness has max level which is 5 level

long portal
#

how can i delete a chunk?

long portal
summer scroll
#

if you want to enchant more than sharpness 5, use true

eternal oxide
long portal
#

how can i get every block in a chunk

#

?

#

i dont understand this with "Math.IDONTKNOW"

#

pleaseee i need help

quaint mantle
# long portal how can i get every block in a chunk
World w = event.getWorld();
            int cx = chunk.getX() << 4;
            int cz = chunk.getZ() << 4;
            for (int x = cx; x < cx + 16; x++) {
                for (int z = cz; z < cz + 16; z++) {
                    for (int y = 0; y < event.getWorld().getMaxHeight(); y++) {
                        Block block = w.getBlockAt(x, y, z);

                        if (block.getType().name().contains("SIGN")) {
                            System.out.println("a");
                            Sign sign = (Sign) block;

                            event.getWorld().getPlayers().forEach(player -> {
                                List<String> list = new ArrayList<>();

                                for (String str : sign.getLines()) {
                                    list.add(filter(player.getUniqueId(), str));
                                }

                                player.sendSignChange(block.getLocation(), list.toArray(new String[0]));
                            });
                        }
                    }
                }
            }
#

what i use atm

long portal
#

WTF

#

why "sendSignChange"

quaint mantle
#

just cut my own code

hybrid spoke
#

you just need the for loops

long portal
#

oh im dumb

#

xD

hybrid spoke
#

nothing else

long portal
#

yes i need the loop

#

and i dont know what in the loop

#

that was my question

#

but

#

thank you

#

@quaint mantle

#

for the help

hybrid spoke
#

            List<Block> blocks = new ArrayList<>();
            World w = event.getWorld();
            int cx = chunk.getX() << 4;
            int cz = chunk.getZ() << 4;
            for (int x = cx; x < cx + 16; x++) {
                for (int z = cz; z < cz + 16; z++) {
                    for (int y = 0; y < event.getWorld().getMaxHeight(); y++) {
                        Block block = w.getBlockAt(x, y, z);
                        blocks.add(block);
                    }
                }
            }
#

spoonfeed af, but there you would have a list with the blocks inside the chunk

long portal
#

wait

#

i'll send the error to you..

eternal oxide
#

If you are only interested in signs then use event.getChunk().getTileEntities() Then find the signs in that.

#

far less to check

long portal
#

and the code

cold field
#

Ok, I found it out

#

🙂

long portal
eternal oxide
#

there is no method getChunk() on player. Use a Proper IDE

long portal
#

yes there is

eternal oxide
#

how the heck did you even manage to compile that

long portal
quaint mantle
#

did someone say different server versions?

long portal
#

and i know that it works

eternal oxide
wet breach
long portal
#

bc i made another plugin with another function and p.getChunk is right

#

its in Paper btw

eternal oxide
#

The server you ran yoru plugin on has no player.getChunk()

long portal
#

YES

#

the server has

quaint mantle
#

well the server say it doesn't have it

long portal
#

wait

eternal oxide
#

again, read yoru own stacktrace error

long portal
#

nvm

wet breach
#

Paper might have it, but spigot doesn't

long portal
#

shit

#

so i need to change the server to paper?

wet breach
#

or code your plugin to handle differing fork's

quaint mantle
#

just go #getLocation().getChunk()

long portal
#

wait

eternal oxide
#

p.getLocation().getChunk() does exist on both though.

wet breach
#

yep it does

eternal oxide
#

This is why you code for the lowest denominator (Spigot) so you know it runs on everything.

quaint mantle
#

wait are signs even tile entities?

eternal oxide
#

They have a tile entity

long portal
#

IT WORKED

#

YES

#

I LOVE YOU

#

not really

blazing scarab
#

paper is awesome

long portal
#

MAAAANNN

quaint mantle
#

imagine pinging a lot of people

long portal
#

I only said thank you D:

#

and pings..

eternal oxide
#

The bot said nope

quaint mantle
#

mod bots have no feelings

long portal
#

thats awful

rotund pond
#

Hello !
Sorry for pinging, I'd like to react to this message.

The "PersistentDataContainer" is part of API 1.14 if I understood correctly, how to do in an older API? (like 1.8 for example)

eternal oxide
#

Hard coded NMS tags

rotund pond
#

What does "NMS" means ?

quaint mantle
eternal oxide
#

Net Minecraft Server

#

the source code of minecraft

rotund pond
#

Oh okay thank you 😮

blazing scarab
#

stop using legacy versions btw

quaint mantle
#

^

eternal oxide
#

1.16 is so much nicer to work with

quaint mantle
#

true, but doesn't hypixel run 1.8?

eternal oxide
#

Are you Hypixel?

blazing scarab
#

They have own infrastructure, but this isnt a reason to stay on older versions

rotund pond
quaint mantle
eternal oxide
#

We really need to get a total server player count by version somehow

quaint mantle
#

somehow you have to be mass apealing. But i prefer coding for 1.16 exclusive too if i wanna use newer features.

blazing scarab
#

1.12 is lightweight, this is the main reason

eternal oxide
#

Old plugins I support do 1.8. Everything new I do 1.14+ as a minimum.

#

recently 1.16 only

blazing scarab
#

1.15/1.14 is absolutely useless just cuz 1.16 exists

quaint mantle
#

Hey

#

How could one detect when a Respawn Anchor blows up?

cerulean harbor
#

specifically blown up? or just destroyed/broken

quaint mantle
#

Blown up because you use it in a dimension that's not the nether

#

Like

#

Like a bed in the nether or end

eternal oxide
#

Block explode event I expect

quaint mantle
#

Oh okay, thanks

#

Also could I possibly have a list of all events?

eternal oxide
#

?jd

quaint mantle
#

Thank you

eternal oxide
#

Search box top right type event

quaint mantle
#

wow i just realized changing sign text on chunk load is a very bad idea

#

because other players can place signs while the chunk is already loaded

paper viper
#

I was wondering, is there any built in api to support rgb color in books?

dusty herald
#

does rgb not work in books

#

never tried

paper viper
#

pretty sure it does work

#

i found a plugin which can create colored books

#

let me see the code

#

it uses Main.java 🥲

#

it uses allman too

#

🥲 🥲

#

it seems actually pretty easy

#

nvm i found it. You just use BookMeta, get the contents and translate those into colors

quaint mantle
#

Signs are tile entities right? Because this packet doesn't seem to fire

paper viper
#

its a block entity

vapid oyster
#

Does anyone have suggestions for Libraries to use? Just wondering what common ones people use and might recommend 😄

paper viper
#

that will depend on what you are doing

quaint mantle
#

kyori adventure may be handy sometimes

paper viper
#

And also command frameworks such as Cloud or Brigadier

#

also handy too

vapid oyster
quaint mantle
#

theres also aikars commands library

paper viper
#

Yeah

quaint mantle
#

and that timings lib for custom timings

paper viper
#

Spark?

#

or nvm

#

thats different lmao

vapid oyster
#

I looked into Cloud and it seems intimidating to me, I started using Aikars instead

quaint mantle
#

hikari and maybe idb from aikar? If you are using databases

paper viper
#

I'm not the guy who likes a big ass builder either

quaint mantle
vapid oyster
#

I didn't look too deep into it, but I did see Aikar's IDB and looked interesting

quaint mantle
#

i think aikars uses hikari

hybrid spoke
#

why did i got pinged in here :o

vapid oyster
maiden briar
quaint mantle
maiden briar
#

What do I need to add then?

quaint mantle
#

either use a thrid party as codemc or put a spigot jar into a libs folder thats ignored

blazing scarab
#

run buildtools and add spigot as dependency

maiden briar
#

Ok thanks

quaint mantle
quaint mantle
#

well thats very case specific

blazing scarab
#

idk i hate working with nms packets directly

vapid oyster
#

It seems very interesting, but I have not dived into packets at all

#

When I do though, I'll have to check that out

vast dome
#

anyone know why when my armorstand is moving in an arc, it just starts to go straight down while descending

novel hornet
#

of topic but can someone send me Java version 1.8_191 because someone at oracle has monkey brain and cant make a normal account system

#

i have tried 50 different password and they all dont work

#

help

eternal oxide
#

use AdoptOpenJDK

paper viper
#

Yeah lol

#

Oracle made stoopid decisions

maiden briar
#

package ... does not exist

unreal wren
#

Hey, I have betterrtp

#

I want to change the name of the message when it sends

#

So whenever players do /rtp it shows [Betterrtp] Teleporting....

eternal oxide
unreal wren
#

How do I change the name of the betterrtp bit?

maiden briar
#

There you go

eternal oxide
#

You added a local library and didn;'t run BuildTools

maiden briar
#

I ran buildtools

eternal oxide
#

show yoru pom

maiden briar
#

But I added a local library indeed

eternal oxide
#

remove teh local library

maiden briar
#

Why? Then my whole Intellij gives errors

eternal oxide
#

in yoru pom change spigot-api to spigot

unreal wren
#

Can someone help me?

maiden briar
#

Contact the developer would I say

maiden briar
eternal oxide
#

now you can build with maven

maiden briar
#

Yes indeed

eternal oxide
#

But don;t use artifacts. Use the maven lifecycles in the right hand side

maiden briar
#

How?

eternal oxide
#

very right hand side of your IDE there is a maven tab

maiden briar
#

Yes

eternal oxide
#

in there find lifecycles

maiden briar
#

Oh I can't build, it shows the same error

maiden briar
eternal oxide
#

in the lifecycles run clean

maiden briar
#

Ok

eternal oxide
#

you shoudl be able to run package now

#

with no more error

maiden briar
#

I always run 'install and clean'

maiden briar
eternal oxide
#

never run install unless you really want it in yoru local .m2

maiden briar
#

Ok

eternal oxide
#

clean and package

#

if its still saying it doesn;t exist with your pom updated you need to reset yoru cache

maiden briar
#

clean is success, package fails

#

I updated my pom and clicked on the maven refresh logo

quaint mantle
#

yo

#

wait i forgot my question im kind astupid

#

just a sec

#

ye nvm

maiden briar
#

Nope not working, same error

#

Oh I can import nms from v1_16_R3, but no others

eternal oxide
#

then thats the version of spigot you built with BT

maiden briar
#

I want to use multiple nms from multiple versions

eternal oxide
#

you have to build every version you want to use

maiden briar
#

I want in one jar version support form 1.13 until latest

#

It worked without maven

eternal oxide
#

you still have to build every version

#

if you are using NMS its version specific

maiden briar
#

Yes that's the problem

#

I saw at the web something about modules

eternal oxide
#

Yes, so you build every version you want to support with BT

maiden briar
#

Yes

#

Already done

maiden briar
#

Ok I will look

#

Ah now I understand better

solemn shoal
#

i mean i have multiversion NMS

quaint mantle
#

if I have someone set the name of a command in the config, how do I write the command in the plugin.yml

#

or is it not possible

chrome beacon
#

You would have to mess with the command map or listen to the PreCommandProccessEvent

quaint mantle
#

which one is easier?

#

xd

chrome beacon
#

Event

quaint mantle
#

ok thx

quaint mantle
#

or this

#

PlayerCommandPreprocessEvent

chrome beacon
quaint mantle
#

ah ok

quaint mantle
chrome beacon
#

Yeah

quaint mantle
#

ok thx

narrow berry
quaint mantle
narrow berry
#

thx

quaint mantle
#

how can i use this PlayerCommandPreprocessEvent ? i need it to set a command name from config.yml

maiden briar
# solemn shoal

That is impossible: public class Sample extends ServerPing.Serializer

solemn shoal
#

?

cerulean harbor
#

i want to disable a player from being able to use a sword, would it be overly resource intensive for me to listen to the player movement event and check if the player is holding a sword?

maiden briar
#

You can never extend reflected classes

solemn shoal
#

im not extending it tho?

maiden briar
#

No, I am, and I want multiple version support so that is not possible for me

quaint mantle
quaint mantle
#

because if you use that way it would be /somecommandbutwithredcolor

#

you likely can even do plugincmd logic instead, but im not sure if that works with cmds that aren't declared anywhere

maiden briar
#

Setting a custom motd, hover, and playercount

quaint mantle
#

I think you will only get further here with some intelligent reflection

#

and reflective class initialization

cerulean harbor
quaint mantle
#

?jd

crisp iron
#

@cerulean harbor you could always use entitydamageentityevent? I think that’s what it is called if I remember correctly. Just check the item material in the damager’s hand

cerulean harbor
#

is there a material that checks for all swords? or do i have to || every one lol

crisp iron
#

Not that I know of

quaint mantle
#

i would in that case just do #getType().name().contains("SWORD")

crisp iron
#

Now that I think about it I’m pretty sure there is but I can’t exactly remember

quaint mantle
#

but be aware its not very secure

cerulean harbor
#

or something else

quaint mantle
#

in case the name of the material contains sword

#

material is also type

cerulean harbor
#

ah

quaint mantle
#
                        p.sendMessage(LinksMain.getInstance().getConfig().getString("command-1-message").replaceAll("&", "§"));
                    }```
#

oh wait

#

do you put booleans as char in a config

dusty herald
#

no? you save it as booleans

#

well it detects booleans and saved it as one

#

can i see your config? kekwhyper

quaint mantle
#

command-1-enabled: true

#

here is the entire command one sec

#

?paste

queen dragonBOT
dusty herald
#

yeah that should be working ig 🤷

quaint mantle
dusty herald
#

You shouldn't be handling commands like this, you should create separate classes for each command and register them instead of comparing labels, the only issue I'd see here though is if args[0] doesn't equal command-1-name, are you sure it's set?

solemn shoal
#

wait

dusty herald
#

that's awesome

#

I love the A

solemn shoal
#

yes

#

this happened just now

dusty herald
#

are you using the mc weird & thing?

solemn shoal
#

yyes

dusty herald
#

don't

eternal oxide
#

non UTF-8 encoding

solemn shoal
#

i just recompiled my plugin and this started happening

dusty herald
#

I suggest doing some debugging booked61, with command-1-name blobSip

quaint mantle
#

ok ty

dusty herald
#

im tired as shit but i have no idea what you mean

quaint mantle
#

why cant i hook into vault economy

#

in that main command it is /linkcommand but if I added another class, it would have to be the same command which you cant do. you cant have two commands that are the same thats why i wanted to use one class for commands

unreal quartz
#

do you really want to return null for all of these?

spare mason
#

How I can make what a mob spawn to all the players with a delay of 30minutes is for a plugin

quaint mantle
#

im just trying it out before i do something with it

unreal quartz
#
getServer().getServicesManager().register(EconomyHook.class, economyHook, this, ServicePriority.Highest);

you should register the vault interface Economy.class rather than your implementation

quaint mantle
quaint mantle
spare mason
#

yes i'am doing this

dusty herald
#

you are??

spare mason
#

but idk how can spawn a mob to the player position

quaint mantle
#

oh

spare mason
#

to all the platers

dusty herald
#

get the player's location, spawn a mob

spare mason
#

"players"

dusty herald
#

loop through all players, spawn a mob at their locations kekwhyper

spare mason
#

and how i can get the players position is my question

quaint mantle
#

player.getLocation()

dusty herald
#

Player#getLocation()

quaint mantle
#

ty @unreal quartz it works

unreal quartz
#

well you delete the world before unloading it

#

i'm pretty sure there also needs to be at least 1 world, otherwise players have nowhere to go

#

and also you can have your plugin load before the worlds get loaded for the first time, you can just delete the folders there

spare mason
#

I have a problem

quaint mantle
#

what problem

spare mason
#

with instance

#

package me.TheWood.org;

import org.bukkit.Bukkit;
import org.bukkit.plugin.java.JavaPlugin;

public class Main extends JavaPlugin {

@Override
public void onEnable() {
    Bukkit.getScheduler().runTaskLater(instance, new Runnable() {
        @Override
        public void run() {
            // do the code
        }
    }, 20 * 1800) // 1800 is 30 minutes
}


@Override
public void onDisable() {
    
}

}

#

what change

quaint mantle
#

replace instance with this

keen monolith
#

Well its for a manhunt server, and I want it to completely reset world after game end, without restarting the server. @unreal quartz

dusty herald
#

that would be impossible unless you have a buffer world to house players

spare mason
keen monolith
#

I kick the players before reset

quaint mantle
dusty herald
#

might still cause issues, not sure

spare mason
#

thanks

quaint mantle
#

yw

keen monolith
#

The problem is that it doesn't generate a new world

fading flume
#

is it you

quaint mantle
#

awesome did you call the world create?

fading flume
eternal oxide
#

You can;t delete world

unreal quartz
#

this.world = Bukkit.getWorld(""); ?

spare mason
#

How i can get what player reference to the player

#

player.getLocation();

unreal quartz
#

also !world.equals(null)

keen monolith
#

I once called: worldcreator.createWorld and I also called Bukkit.getServer().createWorld(worldcreator);

unreal quartz
#

print the actual outcome of this line Bukkit.getServer().unloadWorld(world, false);, it is likely it is failing

spare mason
eternal oxide
#

I'm betting your latest.log will have some interesting errors

spare mason
#

player isn't reference to nothing

quaint mantle
#

you need to create a player

spare mason
#

how

quaint mantle
#

like are you trying to get all players on server?

spare mason
#

yes

keen monolith
#

I think it works because there is a massive lagspike and a bunch of void chunchs for like a minute which only happens at world start or if the world isn't loaded (on my test server)

quaint mantle
spare mason
#

package me.TheWood.org;

import org.bukkit.Bukkit;
import org.bukkit.entity.Player;
import org.bukkit.plugin.java.JavaPlugin;

public class Main extends JavaPlugin {

@Override
public void onEnable() {
    Bukkit.getScheduler().runTaskLater(this, new Runnable() {
        @Override
        public void run() {
            for (Player player : getServer().getOnlinePlayers()) {

            }
            player.getLocation();
        }
    }, 20 * 1800);
}


@Override
public void onDisable() {
    
}

}

#

or I change any

solemn shoal
#

how can i overwrite a line in a scoreboard?

quaint mantle
#

you should basically learn java first before spigot

spare mason
#

yes i know

solemn shoal
#

how would i replace the scoreboard without making a new scoreboard?

quaint mantle
#

ig you could just do runnable?

solemn shoal
#

im already using a runnable

#

but you cant make scoreboards async

quaint mantle
#

thats weird

#

whats your code

solemn shoal
#
[19:34:13 FATAL]: Thread Craft Scheduler Thread - 55131 - EssentialTools failed thread check for reason: Asynchronous scoreboard creation```
eternal oxide
solemn shoal
#

??

unreal quartz
#

each line of the scoreboard is a team with a prefix and a suffix to make up the text of the scoreboard

solemn shoal
#

hold on lemme link code

eternal oxide
#

Team team = scoreboard.registerNewTeam("TEAM_" + index);

solemn shoal
eternal oxide
#

index being the line number on teh scoreboard

unreal quartz
#

each team has a name which you use to get them, I used to just use colour codes for them

solemn shoal
#

here's my code for the scoreboards

unreal quartz
#

at the end of the day you need to remember what the scoreboard actually is, a place to represent scores for teams not a place for information (it was never designed for that)

spare mason
#

package me.TheWood.org;

import org.bukkit.Bukkit;
import org.bukkit.Location;
import org.bukkit.entity.EntityType;
import org.bukkit.entity.Player;
import org.bukkit.plugin.java.JavaPlugin;

public class Main extends JavaPlugin {

@Override
public void onEnable() {
    Bukkit.getScheduler().runTaskLater(this, new Runnable() {
        @Override
        public void run() {
            for (Player player : getServer().getOnlinePlayers()) {
                player.getLocation();
                Location loc = player.getLocation();
                spawnCreature(loc, EntityType.SKELETON);
            }
            
        }

        private void spawnCreature(Location loc, EntityType creeper) {
            // TODO Auto-generated method stub
            
        }
    }, 20 * 1800);
}


@Override
public void onDisable() {
    
}

}

#

this are correct or change any

eternal oxide
#

code blocks

#

```java
//code goes here```

spare mason
#

spawn a mob in the player position with a delay

dense kestrel
#

Okay, well random question

#
player.getLocation();
#

whats that for?

#

that line

#

it does nothing

#

:/

spare mason
#

oh I forget to delete thisxD

dense kestrel
#

Also

#

why is it on the onEnable?

#

is it supposed to loop?

spare mason
#

yes

#

I need to change any ¿?

dense kestrel
#

then why are you using runTaskLater?

#

that will only run it once

spare mason
#

I want what the task repeat infinity times

cold field
#

Guys does anyone know a good command manager?

dusty herald
cold field
#

With stuff like auto completion argument parser etc...

dusty herald
#

scheduleSyncRepeatingTask

dusty herald
spare mason
#

how i can make what repeat more what one time

cold field
dusty herald
#

you can modify messages

cold field
#

Okk

#

I'm happy

dry beacon
#

Hey, I'm using java11 to compile but started the project with java14, any idea how to fix this?

mortal hare
#

so im wondering

#

nvm

#

fastest question response by myself ever lol

mortal hare
dry beacon
#

how can I do that in eclipse?

mortal hare
#

it uses Java 14 features thus it doesn't load in

unreal quartz
keen monolith
#

So it works

quiet ice
keen monolith
#

But not the new world generation

quiet ice
#

Eclipse JDT (please do NOT use that as your build system), Maven and Gradle all have different ways of specifying that

quaint mantle
dry beacon
#

well I'm using eclipse jdt

quiet ice
#

Oh no

unreal quartz
keen monolith
#

I guess

quiet ice
#

Project properties -> java compiler -> Set the compiler version to a lower version

quaint mantle
dry beacon
#

Right, though I already switched from java 14 to java 11, the class file version is too high though,

quiet ice
#

Don't move to gradle randomly

quaint mantle
unreal quartz
# keen monolith I guess

look for errors, check the outcome of the line Bukkit.getServer().unloadWorld(world, false); (it returns a boolean), because I doubt that is actually doing anything since this is how you get the world this.world = Bukkit.getWorld("");

quaint mantle
#

but learning how build systems work in general

#

and get a idea of how to use them

keen monolith
#

Okay will try, will send results in abit

#

So it returns false

#

For the overworld

#

But true for the nether

unreal quartz
#

well you probably cannot unload the world then

#

unless you create a new one, before unloading it

keen monolith
#

Hmpf

#

So I have to do what exactly

keen monolith
open vapor
#

enchantglint for blocks. any way?

keen monolith
#

Nbt Tags?

open vapor
#

oops, that was badly worded. i meant physical blocks

#

not items

keen monolith
#

Which enchantments?

open vapor
#

any enchantment

keen monolith
#

But like whats the point exactly

#

I guess thorns

tranquil ore
#

why my DAmage Indicator doesnt work? can anybody help me?

keen monolith
#

sry bro, no clue what DAmage ist

#

oh damage

#

I thought like DAimage or smth

#

Where??

tranquil ore
#

what? xD

keen monolith
#

Like where doesn't it work

keen monolith
tranquil ore
#

f.x with mythic mobs

keen monolith
#

what is f.x ?

tranquil ore
#

XD for example

keen monolith
#

?

tranquil ore
#

it means

#

for example

keen monolith
#

oh

#

Did you add the event listener

#

Have you registered the mob?

spare mason
#

How i can make what this repeat more than one time

quaint mantle
#

i have a question what does the true or false does in the onCommand class?

spare mason
#

package me.TheWood.org;

import org.bukkit.Bukkit;
import org.bukkit.Location;
import org.bukkit.entity.EntityType;
import org.bukkit.entity.Player;
import org.bukkit.plugin.java.JavaPlugin;

public class Main extends JavaPlugin {

@Override
public void onEnable() {
    Bukkit.getScheduler().runTaskLater(this, new Runnable() {
        @Override
        public void run() {
            for (Player player : getServer().getOnlinePlayers()) {
            
                Location loc = player.getLocation();
                 spawnCreature(loc, EntityType.WITHER_SKELETON);
        
            }
            
        }

        private void spawnCreature(Location loc, EntityType creeper) {
            
        }
    }, 20 * 1800);
}


@Override
public void onDisable() {
    
}

}

keen monolith
#

True return blank in game chat, False returns the defined command syntax

chrome beacon
#

?paste

queen dragonBOT
quaint mantle
keen monolith
spare mason
#

I want what repeat infinity times

#

for a skeleton spawn in the player position with 30minutes of delay

keen monolith
#

I mean whatever gets I guess

quaint mantle
spare mason
#

what never finish

keen monolith
#

I am not sure but it looks like it will execute every game tick just saying...

quaint mantle
#

it will not

#

its 20 * 1800

keen monolith
#

Oh my bad

quaint mantle
#

1800 is like 30 minutes

#

its ok

keen monolith
#

Didn't see that part

quaint mantle
#

its sokay

#

xd

quaint mantle
keen monolith
#

So then whats the problem

quaint mantle
#

i dont really get it

spare mason
#

what allways a skeleton spawn in the player position with a delay of 30m

keen monolith
#

Oh the skeleton is supposed to spawn 30 min later?

#

Based on the position of player 30 minago

quaint mantle
#

you are spawning wither skeleton after 30 minutes for every player

keen monolith
#

Does anybody still have any idea how to make UnloadWorld not return false?

quaint mantle
#

show code

quaint mantle
#

im gonna try it

keen monolith
#

Thx 🙂

keen monolith
#

Out of curiosity why?

spare mason
#

Why I can

keen monolith
#

10/10 passed

#

Anyway, what is the problem still don't get it

quaint mantle
#

yeah

dusk flicker
spare mason
#

oh i solved my proble

keen monolith
#

yay

dusk flicker
#

Alright then, saves me from typing lol

keen monolith
#

If you want to I still have an issue 😦

dusk flicker
#

I'm looking at yours now

keen monolith
#

Thx

dusk flicker
#

Try calling the unload before your delete world function

keen monolith
#

okay

#

will report result

dusk flicker
#

If that doesn't work, after wc.createWorld call Bukkit.createWorld("world");

keen monolith
#

Okay

quaint mantle
#

@keen monolith sry i am still working on it

keen monolith
#

No worries

cold field
#

Guys, quick question, is there any down side to make my custom commandManager on top of spigot CommandExecutor?

keen monolith
#

But wait still doesn't fix the unload world issue

dense goblet
#

hey, I'm new to plugin dev but I have developed forge mods before and have a lot of experience with C#. I'm wondering if spigot allows the creation of custom TileEntities?

keen monolith
#

Nothing works

#

any Idea on how to make the world unload???

quaint mantle
#

imma take a wild guess

cold field
quaint mantle
#

World#setLoaded(false);

#

?jds

#

?jd

keen monolith
#

I know but it returns false

quaint mantle
#

what

keen monolith
quaint mantle
#

are you giving the right world name?

keen monolith
#

yep

#

world object is valid

#

it just doesn't unload it

cold field
#

does anyone know how brigadier implements command completion?

timber crescent
#

What would be a good way to ovveride the /about commands and such? would I need to do a plugin or edit the spigot itself?

quaint mantle
keen monolith
#

Okay thx

#

So much

dense goblet
karmic sapphire
#

Hey everyone, was ondering if any ome can give me a indication how can i see via code what form a fence has?

dense goblet
#

I imagine the biggest issues are saving the state and detecting when the block is destroyed (esp. with worldedit etc). That might be possible to do with NBT though I feel like there are better options

dusty herald
karmic sapphire
eternal oxide
keen monolith
#

So then what do I do?????

eternal oxide
#

You ignore teh main world and use your own

keen monolith
#

First let's try Pavlyi solution

#

Thats his solution...

eternal oxide
#

Its the only solution. I just checked the Source to see if unloading the main was possible. I had a feeling it wasn't as world index zero is alwasy the main overworld

quaint mantle
#

yeah i think the overworld isnt possible too

#

so i think you should do something like change the world name to something else in server.properties and then like teleport players always to the an new world

eternal oxide
#

If the world name is null, its not loaded or is the overworld it aborts

timber crescent
#

how do i ovveride a command like /about?

quaint mantle
#

yeah

#

just register the command

spare mason
#

how I can edit the stats of the mobs ¿?

mortal hare
timber crescent
#

Alright ill do reflections

spare mason
#

How I can edit the mob stats ¿?

quaint mantle
#

wdym by stats

spare mason
#

what ¿?

quaint mantle
#

wdym by mob stats

dusty herald
#

what is your pfp from

#

is that naruto?

quaint mantle
#

mine?

keen monolith
#

@quaint mantle fixed one world gen error, delete world change it world != null

dusty herald
#

yes Pavlyi

#

i reconize naruto anywhere

quaint mantle
#

its from boku no hero academia its izuku

dusty herald
keen monolith
#

public void deleteWorld(World world) {
if(world != null) {
Bukkit.getServer().unloadWorld(world, false);
Bukkit.getServer().unloadWorld(world, true);
}
}

quaint mantle
#

i have this

spare mason
quaint mantle
#

listen for the entitydamageevent and get the damage then double it and set it to the entity

#

@keen monolith ig i fixed it

#

just doing some bit of fixes and things

spare mason
quaint mantle
#

yes

#

i dont wanna be mean or smth but learn java and then watch tutorials for the spigot plugins

#

if you dont know that you can listen for an event in your main class you should really do tutorials first

spare mason
#

can you plz send me a list of videos for Learn java

#

djedje

#

Learn

quaint mantle
spare mason
#

thanks

woven flume
#

Is anyone here familiar with mcmmo

keen monolith
#

no

quaint mantle
lost matrix
quaint mantle
#

try this

woven flume
#

I am trying to see if it’s possible to add custom items to the mcmmo treasure table

#

Ik how to configure it to use vanilla items but I want to add things like crate keys

keen monolith
#

thx

quaint mantle
lost matrix
#

You can hook into this event

woven flume
#

I’m not sure what you mean by the api, I was directly editing the source code

lost matrix
keen monolith
quaint mantle
#

okay

keen monolith
#

It throws: Cannot create additional worlds on STARTUP initializing

#

OnEnable?

woven flume
quaint mantle
#

did you add load: STARTUP to plugin.yml

keen monolith
#

no

quaint mantle
#

try

keen monolith
#

Guess that is kinda important

quaint mantle
#

i added it to mine

keen monolith
#

Kk

#

Pretty sure I just crashed my VM, had like 30 thread dumps and 5 hard crashes going

quaint mantle
#

weird

keen monolith
#

No worries, the host sucks

quaint mantle
#

ohh

keen monolith
#

Like its a crummy laptop from like 2016 with like -500Gb Ram and a non-existent processor

quaint mantle
#

we've all been there

keen monolith
#

its nearly done booting

#

@quaint mantle still throws that error

#

😩

#

Why oh why oh why

keen monolith
lost matrix
keen monolith
#

Will Pavlyi wrote a cracked class

keen monolith
#

And it doesn't work on startup

lost matrix
#

Yes. You cant create worlds on STARTUP. Any reason why you dont load POSTWORLD?

keen monolith
#

Idk

#

I thought of that too, but I thought there might a method to the madness

lost matrix
#

Bwt } catch (NullPointerException ex) { <- This here is a big fat no go.
You want to prevent try catch blocks at most costs. Only use them if you are absolutely forced to. IOExceptions for example.
This here can just cripple your code and hide really important errors.
NullPointerExceptions should never be catched but always be resolved.

quaint mantle
#

umm 'System.out.println("MapHunt world doesnt exist!");'?

paper viper
#

use conditionals if you want to check for null

keen monolith
#

I guess

#

Just wanted to say thank to @quaint mantle you are a legend

quaint mantle
#

oh um ty idk why it didnt fix your problems

keen monolith
#

But it helped

quaint mantle
#

oh thats nice

timber crescent
#

Does someone have an good anticheat base?

keen monolith
#

alice

lost matrix
#

Next thing:
Dont access any Spigot API in onLoad this is called way before anything bukkit related is even initialized.

keen monolith
#

ah

#

that does seem important

quaint mantle
#

Hey

#

How can I shade MongoDB with maven?

#
    <build>
        <plugins>
            <plugin>
                <artifactId>maven-shade-plugin</artifactId>
                <version>3.2.2</version>
                <configuration>
                </configuration>
                <executions>
                    <execution>
                        <phase>deploy</phase>
                        <goals>
                            <goal>shade</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
        <dependency>
            <groupId>org.mongodb</groupId>
            <artifactId>mongodb-driver-sync</artifactId>
            <version>4.0.1</version>
            <scope>compile</scope>
        </dependency>
#

I have this

#

except it throws me this error "cannot find symbol"

#
    private DB clanwarsdb;
    private static DBCollection players;
    private MongoClient client;
#

here

dusk flicker
#

Is that the exact err code?

quaint mantle
#

Sorry, it's find

#

my bad

dusk flicker
#

Does it say what symbol it can't find or any more detail?

eternal oxide
#

Using Eclipse or Intelij?

quaint mantle
#

IntelliJ

eternal oxide
#

Using Artifacts to build?

quaint mantle
#

Yes

eternal oxide
#

Don't

quaint mantle
#

I'm using maven now

eternal oxide
#

Right hand side, Maven tab, Lifecycles clean pacakage

quaint mantle
#

I know

#

That's what I'm doing

#

I thought you were asking if I was, not anymore

eternal oxide
#

then it will be shaded

quaint mantle
#

What will?

eternal oxide
#

Open your jar with any zip explorer and check teh mongo is in there

#

Also make sure you are using the correct jar. The one in teh target folder

quaint mantle
#

what jar

#

It's not giving me anything

#

That's the issue

eternal oxide
#

your plugin jar

#

if the build itself failing?

quaint mantle
#

while compiling it doesn't output anything cuz of the error

#

Yes

eternal oxide
#

?paste the full build log

queen dragonBOT
quaint mantle
#

k

eternal oxide
#

then build again using the lifecycle clean package

#

if that fails, shoudl you be using mongo sync and not mongo core?

lost matrix
keen monolith
#

it worked now

round finch
#

idk how to make a working furanceInventory there smelt Default repeices, i'm really lost

keen monolith
#

but I will adopt the cleaned up code

quaint mantle
#

🤔 could this be a source of the error

eternal oxide
#

those are not maven imports

#

sec

quaint mantle
#

How do y'all test and program at "same" time I find it very inefficient to always run git to build copy paste jars and restart/reload server. Any better ways to do this ?

eternal oxide
#

<version>4.3.0-beta1</version>

quaint mantle
#

oh yeah

eternal oxide
#

you shoudl remove your static imports too.

#

Maven will provide them

quaint mantle
#

wdym static imports

eternal oxide
#

no manually added libs

quaint mantle
#

o

#

okay

eternal oxide
#

both of those look like manually added and not maven

gaunt eagle
#

basic question:
ChatColor.GREEN + "" + ChatColor.BOLD+"Test Menu"
is that enough to make a text bold?

eternal oxide
#

You don;t need the + ""

quaint mantle
#

you dont need the +""

#

yeah

#

^^

gaunt eagle
eternal oxide
#

It doesn;t know you want a string

#

so prefix it all with "" +

outer sorrel
#

im getting an error with my scoreboard plugin when running 1.12.2, how would i make it compatible with 1.12.2?
java.lang.NoSuchMethodError: org.bukkit.scoreboard.Scoreboard.registerNewObjective

eternal oxide
#

Did scoreboards exist in 1.12?

outer sorrel
#

yes

#

and 1.8

#

they were added in 1.5

#

also the error was pointing to this line
Objective obj = board.registerNewObjective("scoreboard", "dummy", title);

eternal oxide
#

ok, in 1.12 the method is registerNewObjective​(java.lang.String name, java.lang.String criteria)

outer sorrel
#

ill try that, how would i set the title though?

eternal oxide
#

There seems to be no title in 1.12

outer sorrel
quaint mantle
#

hey

outer sorrel
#

i think its the 16 character limit

#

so ill have to do some magic

#

with suffixes i think

quaint mantle
#

hey umm

#

ohh i just realized my code is outdated.

#

ok.

keen monolith
dusty herald
#

what u could do is ditch the Java aspect, make a script that deletes the world folders each time you start the server and have spigot run it each /restart

keen monolith
#

i know but I don't want that

#

cause that could cause more security leaks

dusty herald
#

FeelsThinkingMan ok but how

keen monolith
#

There is an exploit...

wraith rapids
#

mm yes

dusty herald
#

explain pls

wraith rapids
#

the well known script exploit

keen monolith
#

Let's just I do things other than Java (Hacking=

wraith rapids
#

that lets someone tracert ddos your mac address

dusty herald
#

can u explain this script exploit

keen monolith
#

no

dusty herald
#

Im curious now

unreal quartz
#

he's a l33t hax0r man

keen monolith
#

Cause legal stuff

unreal quartz
#

we cannot comprehend such hacks

dusty herald
#

what?

#

I think you're bsing me now lmao

keen monolith
#

No

dusty herald
#

🤷‍♂️

wraith rapids
#

my guess is that he's on a shared host and they don't let him upload batch/bash files through ftp

keen monolith
#

It's just I don't know any of u

dusty herald
wraith rapids
#

there isn't

#

there is no such thing as "script exploit"

dusty herald
#

figured

wraith rapids
#

like yes, you can make the script open all ports and nuke your server

#

but that's you exploiting yourself

#

not someone exploiting you having a script

dusty herald
#

I was thinking a simple bash script that nukes the world folders between startup lmao Sadge

#

because I think that's something that they want to do I'm kinda confused, they've been trying to achieve it for the past few hours

wraith rapids
#

they seem kind of dum

keen monolith
#

Thx, noted 🙂

dusty herald
#

also I remember you from a couple years ago in Shockbyte chat

wraith rapids
#

there, of all places

#

smh

dusty herald
#

I used to work for them

wraith rapids
#

well

dusty herald
wraith rapids
#

they haven't stopped sucking since

#

so you probably weren't the one at fault

round finch
#
FurnaceInventory invfur  = Bukkit.createInventory(p,InventoryType.FURNACE,"")
player.openInventory(fur);

why is it not smelting?

silent hound
#

how do i set which half a door block is ?

wraith rapids
#

it's controlled either by Bisected or the Door interface

#

i don't remember which

eternal oxide
#

BiSected TOP and BOTTOM

dusty herald
#

can you explain your username ive always been curious

wraith rapids
#

the case of the first 4 characters is hand picked, everything else is random

unreal quartz
#

its his pw

wraith rapids
#

i don't use a password

#

i use an auth token

#

ripcord master race

dusty herald
#

I use random unicorn characters for my passwords

#

unicode

#

fuck u auto correct

quaint mantle
#

I want to have something like

    p.sendMessage("blah");```
I have this:
```if (LinksMain.getInstance().getConfig().getBoolean("discord-enabled"))```
but i dont  know how to set it so i can see if it is false.
dusty herald
#

why not

wraith rapids
#

prefix with ! to invert it

dusty herald
#

if(!blab)

wraith rapids
#

if blah = true, then !blah is false

quaint mantle
#

oh shit ur right i forgot

dusty herald
#

are u ok

wraith rapids
#

real men xor with true

eternal oxide
wraith rapids
#

and yeah

quaint mantle
#

oh wait since its boolean i need like a .equals or smth i can't use !

wraith rapids
#

hmmm

eternal oxide
#

no. Thats all teh code you need, is what you already have

wraith rapids
#

equals is a method

#

only objects have methods

#

booleans are not objects

bright jasper
#

Should i use placeholderAPI if i am only using my own proprietary plugin, aka scoreboards controlled by my plugin due to different boards showing at times, and most likely me also implementing a board header myself

eternal oxide
#
if (LinksMain.getInstance().getConfig().getBoolean("discord-enabled")) {
//code
}```
quaint mantle
#

i already have that but that only works if its set to true

wraith rapids
#

yes, use a ! to invert it

#
if (!LinksMain.getInstance().getConfig().getBoolean("discord-enabled")) {
//code
}```
quaint mantle
#

hmm ok ill try

round finch
#

i'm trying to open a furanceInventory to smelt items
but idk how to do it sense it doesn't work for me

wraith rapids
#

the code you pasted before was nonsensical

#

at any rate, i'm not sure if a detached furnace inventory without a backing furnace tile entity is going to do anything

#

the actual smelting that happens is a result of the tile entity being ticked

lost matrix
wraith rapids
#

you could make it smelt manually though i guess

lost matrix
#

The smelting is applied in the TileEntityFurnace class. The inventory itself does nothing.

wraith rapids
#

yeah, you would need to do the smelting logic yourself

#

not sure if that's possible without protocol fucknuggetry though, idr if the furnace inventory has methods to set stuff like smelting progress and whatnot

round finch
#

i'm trying to make quick furanceInv

#

without any blocks

lost matrix
#

If you are willing to use NMS then you could actually just create an instance of TileEntityFurnaceFurnace
as it has a no args constructor

round finch
#

yeah i'm not that good at coding and
i'm kinda not great at NMS

wraith rapids
#

look @ the furnace inventory interface then I suppose, and reimplement smelting yourself

#

those are your 2 options basically

#

apart from giving up

round finch
#

thank you for leting me know

#

atless i know now 🙂
much appricated

#

is protocol easy to use?

#

i'm kinda basic

lost matrix
round finch
eternal oxide
#

You could just create a furnace at Y level 0 in teh nether, then change it back to bedrock once finished

wraith rapids
#

you could

lost matrix
wraith rapids
#

brilliant

lost matrix
#

For misusing your gui

eternal oxide
#

Or just increment its placement as each player opens it

round finch
#

or cancel open furance at 0 0 0
if they tries

wraith rapids
#

what if there are more players using the gui than you can fit furnaces into loaded chunks?

eternal oxide
#

ad the location to a map so you can easily replace the block/remove the entry

wraith rapids
#

i guess you could force load chunks with plugin tickets 👀

eternal oxide
#

That would be a LOT of players

lost matrix
#

16x16 = 256
So thats for one chunk

wraith rapids
#

what is my nether only has 1 block thick bedrock floor

round finch
#

or get player location get y 0

eternal oxide
#

yep

round finch
#

but how would i replied instance?

eternal oxide
#

you store teh location when you open the furnace.

#

when the furnace is closed you get teh location from teh map, set the block back to bedrock

lost matrix
wraith rapids
#

just create a new world for your furnaces

lost matrix
wraith rapids
#

that way it doesn't fuck with the gameplay and assume things about the server

eternal oxide
#

yep, easy to create a small world

round finch
wraith rapids
#

that said it is still a pretty dumb idea

eternal oxide
#

one no one can ever goto

wraith rapids
#

absolutely haram

#

beyond bad practice

round finch
#

😂

round finch
wraith rapids
#

like, granted, I don't really see any other way for you to reasonably do it if you can't do protocol nor nms

#

but it's still super tacky

round finch
#

true

#

it gonna take time to learn 🙂

eternal oxide
#

Many games use a storage world for things like this.

wraith rapids
#

such as

eternal oxide
#

an instance no one has acces to to put things you game needs

#

Asherons call (an MMO) did it

wraith rapids
#

neverheard

#

what did they store

eternal oxide
#

You won;t it no no longer exists

#

Admin stuff mostly

wraith rapids
#

use world/chunk pdc for arbitrary data

round finch
#

this make me think of Minecraft vanilla maps

wraith rapids
#

schematics for block data

#

and just raw db/flatfile for data that isn't bound to a location

#

the only excusable case of creating a world and fucking with blox that I've seen to date is worldedit's chunk regen, which uses a temporary world to generate fresh chunks

nova lotus
#

Hello!

gaunt eagle
#

Why I'm getting this error. I couldn't see a mistake (version 1.16.5)

nova lotus
#

I just dont know anymore

gaunt eagle
nova lotus
#

While trying to use buildtools

#

to install Spigot

#

It tells me Build Successful but the Buildtools folder is empty and no Spigot Jar is to be found

wraith rapids
#

Inventory::contains takes an ItemStack

#

you are giving it a String

#

ItemStack::getType will never return null; your != null condition is redundant

eternal oxide
sleek pond
nova lotus
gaunt eagle
#

i cant found a inventory.getTitle

nova lotus
wraith rapids
#

an inventory no longer has a title

#

you need to get the inventory view

nova lotus
#

And Yes I Checked the directory

#

Ran it as administrator

wraith rapids
#

you can get it from the inventory related event

#

and then get the title from the view

#

md5 in his infinite fucking wisdom has decided that inventories do not have titles

nova lotus
#

I still have messages like this
that curl isnt a recognized command (mostly fixed)
java exceptions
and stuff like that

eternal oxide
#

ok thats why then

gaunt eagle
#

getView?

#

How am I supposed to fix it xD?

wraith rapids
#

get the InventoryView from the Event

wraith rapids
#

then get the inventory view's title from the InventoryView

eternal oxide
gaunt eagle
wraith rapids
#

e.getView