#help-development

1 messages · Page 1447 of 1

warm galleon
#

change

quaint mantle
#

kk

warm galleon
#

are they in same class

#

@digital plinth

#

the main and listener

quaint mantle
#

will that work?

sage swift
#

im saying it wont affect the outcome

#

lol

#

and no that will not work

digital plinth
warm galleon
#

getServer().getPluginManager().registerEvents() => this.getPluginManager().registerEvents(new <CLASS>, this)

quaint mantle
digital plinth
digital plinth
#

wdym

warm galleon
#

getServer().getPluginManager().registerEvents() => this.getPluginManager().registerEvents(new <CLASS>, this)

#

change it

digital plinth
#

are u makking acustom command

#

/kcik is already a thing

quaint mantle
warm galleon
#

hje

#

said

#

no

#

it will

#

not

#

work

quaint mantle
#

but i need the plugin one

#

not

#

vanila one

warm galleon
#

IT WILL NOT WORK

#

HE SAID IT WILL NOT WORK

quaint mantle
#

@digital plinth so will it work?

warm galleon
#

this person alr answred you

quaint mantle
#

yes

#

but player.kick is a vanila kick

#

else if (args.length == 1){

#

what about mute?

digital plinth
digital plinth
#

and cancel it

quaint mantle
#

bro

warm galleon
#

omfg

vagrant stratus
digital plinth
#

OI moderators what is this cooldown

warm galleon
#

over ride vanilla cmd then

quaint mantle
#
else if (args.length == 1){
Player target = Bukkit.getPlayer(args[0]);
// do stuff
}```
warm galleon
#

have you EVER used spigot at all

quaint mantle
#

is what u will need to kick a certain player.

#

YES

warm galleon
#

cause you dont act like it

#

YOU CAN OVERRIDE THE VANILLA BAN COMMAND AND JUST DO <player>.kick() ONG

#

you are killing my brain

digital plinth
#

listen

#

you are using a spigot server, not a vanilla one

#

so every command you use is NOT vanilla

warm galleon
#

im so dead

sand hinge
quaint mantle
#

yes i know

sand hinge
#

how to fix bug

quaint mantle
#

but for example i want it to mute someone on the 3th time spamming and on the 5th a kick how?

#

arraylist and add 1 when they do something, when it reaches 3 ban for spam or such

opal juniper
sand hinge
#

how to fix??

opal juniper
#

dont use the class or shade it

sand hinge
#

why??

opal juniper
# sand hinge why??

The server doesn't have the Apache commons class, which you have used when making the plugin. Either use a different class or shade it

sand hinge
#

ok

#

I'll be watching

quaint mantle
#

Hey Guys!

Just a quick question, i'm currently using itemnames to differentiate items.
But there is anyway better to do it? Since what if someone renames an item to said name

#

Or is that the best way currently?

opal juniper
quaint mantle
opal juniper
#

You should use a persistent data container

quaint mantle
#

alright thanks!

sand hinge
#

I have org.common already

sly bay
#

how do i load worlds?

#

And unload

#

Thanks

quaint mantle
#

if(event.getEntity().equals(EntityType.ZOMBIE)){

opal juniper
#

no it is saved

sly bay
lyric grove
#

i get this

opal juniper
#

it is persistent

opal juniper
lyric grove
#

but i dont have 2 spigots in my dependencies

sly bay
opal juniper
sly bay
#

Es que en nukkit, yo hago Server.getInstance (). GetLevelByName ("mundo")

opal juniper
#

For example:

new WorldCreator("arena").createWorld();
sly bay
sly bay
#

To verify that it is loaded is to obtain the world and see that it is not null, right?

opal juniper
#

Ummmmm, maybe. Idrk

sly bay
#

Or there is already a method to check if it is loaded?

opal juniper
#

no clue mate

sharp badge
#

I'm using a multimap to store a UUID (key) and materials (Values), in a command, I am looping over all of the materials associated with the key and adding them to the players inventory. However, when I update the multimap, how come it throws and null error and only allows for one block to be returned at a time?

Code:

Collection<Material> values = ChunkMiner.blocks.get(playerUUID);
                      for (Material mat : values) {
                         if (!isInventoryFull(player)) {
                             player.getInventory().addItem(new ItemStack(mat));
//                             ChunkMiner.blocks.remove(playerUUID, mat);
                         } ```
The commented line is the line creating the issue.
digital plinth
wraith rapids
#

what is the issue

digital plinth
#

code

#

code 2

wraith rapids
#

your if condition is probably just failing

quaint mantle
#
                punchBow.addEnchantment(Enchantment.VANISHING_CURSE, 1);
                
                event.getEntity().getEquipment().setItemInMainHand(punchBow);```
how would I set punchBow's chance to impossible?
digital plinth
wraith rapids
#

chance?

sage swift
#

that aint no punch bow

quaint mantle
#

drop chance

digital plinth
#

the entire method is not getting called

quaint mantle
#

yeah ik lol i copy pasted the code and didn't change le variable name

wraith rapids
#

and you have no way of knowing whether it is getting called or not

digital plinth
wraith rapids
#

then send that screenshot to begin with

#

what class is this method in

warm galleon
warm galleon
#

imo its cleaner

digital plinth
digital plinth
wraith rapids
#

that doesn't answer the question

#

iirc broadcast prints to console, but yeah use stout for debug

sage swift
#

what the hell is ISourceBlock and how can i get it

#

aaaaa

quaint mantle
#

wait so how would i set the drop chance

maiden cape
#

How do you send a title using base components to a player?

wraith rapids
#

probably block data for water und lava source blocks

sage swift
#

no it's used for DispenseBehaviorItem

#

i just need to get it to simulate dispensing of an item

digital plinth
wraith rapids
#

again, what class is this in

digital plinth
#

RightClickTP

maiden cape
digital plinth
#

huh i didn't change the name

quaint mantle
sage swift
#

whatever it is

#

whatever it requires

wraith rapids
#

does your plugin enable properly

maiden cape
#

is there any way to send hex colour through a title?

wraith rapids
#

use paper

sage swift
#

ChatColor.of

#

:)

digital plinth
#

bruh it didn't enable

#

adfb ererererererhvs

wraith rapids
#

that said, I don't think the legacy parsers used by sendTitle and co. parse hex color codes properly

maiden cape
#

how does that work, how would you convert a message with hex colour codes in, say from a config, into that format?

#

would that work on ChatColor.of("#fc0303 blah blah") if there was text after, or would I need to isolate the hex

wraith rapids
#

you'll need to isolate it

#

and again i don't think the string based methods handle hex colorcodes properly, even if you do append the string output of ChatColors to them

#

so unless you have a method that takes components, you're kind of screwed

sage swift
wraith rapids
#

block data is stored by the tile entity

lyric grove
#

its not a string

wraith rapids
#

it says it's a string

quaint mantle
#

ItemStack punchBow = new ItemStack(Material.DIAMOND_AXE);
punchBow.addEnchantment(Enchantment.VANISHING_CURSE, 1);

            event.getEntity().getEquipment().setItemInMainHand(punchBow);
wraith rapids
#

it's probably a string

lyric grove
#

what should i do?

wraith rapids
#

you should make getTimeLeft return a number

#

rather than text

quaint mantle
lyric grove
wraith rapids
#

you could try parsing the string into a number i guess but that's kind of gay

maiden cape
lyric grove
#

ok ill try thanks

wraith rapids
#

not really unless you find something to send the appropriate chat packet with

#

adventure is just for building and managing the components themselves, it doesn't send them

#

basically if you can't find a method for that, drop spigot support in favor of paper

#

and when people ask you why you don't support splögget

#

tell them to ping md69 about missing functionality

#

or just skip the bukkit/spigot api entirely and use nms to send a chat packet

warm galleon
#

wat

#

hol' uup

heady garden
#

hey whats the correct place to get the latest jar?

vagrant stratus
#

build tools

#

?buildtools

#

no?

queen dragonBOT
vagrant stratus
#

oh

somber hull
wraith rapids
#

are you sure your jar isn't fucked

somber hull
#

Thats probably it

#

But i redownlaoded it

#

gime one sec

wraith rapids
#

if you're using ftp, make sure to use binary transfer mode instead of ascii

wraith rapids
#

then you're probably not using ftp

quiet ice
#

you dont use it if you have no idea what it is

somber hull
#

Ok, well its still giving the same error

#

the jar i just redownloaded

crude hound
#

hi someone can help me to making working the PlayerInteractEntityEvent (when you right click on a villager) event?

#

early it is an event in the listener or in the main.java?

somber hull
#

Im sure there is smthng like it

crude hound
#

I checked and it's a player and the entity directly given

somber hull
#

¯_(ツ)_/¯

crude hound
#

it work in 1.8.9?

cold field
#

Guys. I have a big issue with displaying the second layer skin of a npc. I've set the datwatcher and the skin data with signature... What am I missing?

somber hull
#

@wraith rapids same error

wraith rapids
#

compare the checksum and filesize of the jar

#

see if it got fucked during the transfer

cinder thistle
#

Update smh

wraith rapids
#

ensure you actually restart the server instead of reloading or something

cinder thistle
#

As aikar likes to say, you’re on a rotting dinosaur. Get off it and get on a 🚀!

#

I don’t remember the exact phrasing but you get it

wraith rapids
#

a million flies like the smell of shit

wraith rapids
#

? is not a good question

somber hull
#

What do you mean?

wraith rapids
#

i mean compare the checksum and the filesize of the jar

#

to see if it got fucked during the transfer

somber hull
#

what transfer?

wraith rapids
#

the jar

somber hull
#

i just have it sitting there

wraith rapids
#

you are moving it from place a to place b yes

somber hull
#

and have my build path to that 1.16 jar

somber hull
#

it just sits there

wraith rapids
#

then why have you been talking about downloading all this time

somber hull
#

Cause when i looked it up it said it was a corrupt jar file. So i redownloaded it

#

And same error

wraith rapids
#

yes, so look at the checksum and filesize

#

to see if it got fucked during the download

somber hull
#

filesize is the same as my server.jar

wraith rapids
#

compare them to the checksum and the filesize at the source

#

server.jar? no, your fucking plugin.jar

somber hull
#

sorry im very confused

#

gime a sec

wraith rapids
#

i can see that

errant drift
#

look how big it should be compared to what it is

#

that's all he's saying

wraith rapids
#

me.silentprogram.safecheck.Main.onEnable(Main.java:19)
this plugin

#

this plugin is written by you

#

it is trying to load a class from the plugin jar

#

but the plugin jar is probably fucked

#

compare the checksum and size of the plugin jar and ensure they are correct and not fucked

somber hull
#

Compare it to what

wraith rapids
#

to what it should be

#

where are you getting the jar

somber hull
#

What should it be

wraith rapids
#

it should not be fucked

somber hull
#

Ok.. So the plugin.jar i just export from eclipse

granite stirrup
#

ok guys to win $100
please click the message box
press tab five times
press enter
type can i claim my $100
and press enter

somber hull
#

When i looked i u

#

It said my buildpath might be corrupted

#

so i redownloaded the 1.16.5 jar for my build path

granite stirrup
#

k then fix ur build path

#

maven good

#

use maven

somber hull
#

stfu

wraith rapids
#

ant

granite stirrup
#

then u dont have to download a new jar

#

maven best

granite stirrup
somber hull
#

idk what that means

granite stirrup
#

what

somber hull
#

I never understood what maven is

granite stirrup
#

just use maven its a compiler

somber hull
#

Is it another IDE?

wraith rapids
#

no

#

it is a thing that plugs into your ide

granite stirrup
wraith rapids
#

and manages your dependencies for you

#

like spigot

somber hull
wraith rapids
#

or whatever else you're depending on

granite stirrup
#

also dont use eclipse if u are

somber hull
#

How do i put it into eclipse

wraith rapids
#

are you sure you're not talking about classpath and not buildpath

somber hull
#

its dumb

granite stirrup
somber hull
#

Ill try it out at some point

#

Its too confusing to import everything form eclipse

granite stirrup
#

nah it isnt

somber hull
#

Just

foggy bough
#

no it isn

#

;t

somber hull
#

idk what this error is for

#

i get it on plugin startup

foggy bough
#

how do I start up a plugin?

granite stirrup
#

;-;

wraith rapids
#

it means that one of your jars is fucked

#

or that you're trying to reload the server with missing jars or some shit

granite stirrup
somber hull
#

So is the server messed up, or my plugin jar?

granite stirrup
#

ur plugin

somber hull
granite stirrup
#

u forgot plugin.yml

#

;-;

foggy bough
#

can someone provide a simple plugin that works I want to test on mc

wraith rapids
#

we don't know but probably your plugin jar

granite stirrup
wraith rapids
#

unzip all of the jars and see if any of them blow up

granite stirrup
#

it needs to be in a res folder if ur not in maven

somber hull
granite stirrup
#

no

#

res

#

or resources

#

i think

somber hull
#

his has been working the whole time

#

maybe i accidentally move the config and plugin.yml?

wraith rapids
#

a missing plugin yml won't make the classloader explode anyway

wraith rapids
#

it won't

clever sequoia
granite stirrup
#

cuz it wont find the main class

clever sequoia
#

guys i dont know why

wraith rapids
#

the only case it would blow up would be if it can't find the main class

#

me.silentprogram.safecheck.Main.onEnable(Main.java:19)

#

which it clearly can

clever sequoia
#

but it is not recognizing the getConnection() method

granite stirrup
#

it said it cant find the main class lmao

somber hull
#

new MainCommand(this);

granite stirrup
#

in the error

somber hull
#

this is line 19

wraith rapids
#

no it didn't

#

it said it can't load a class because the zip file is closed

granite stirrup
#

i thought it did lmao

wraith rapids
#

the main class is already loaded and initialized

granite stirrup
#

then its something wrong in the main class?

wraith rapids
#

something wrong with the main class wouldn't result in the classloader blowing up on the zip file either

#

there is something fucked with the underlying jar where the classes are

#

what is on line 19 of your main anyway

somber hull
#

new MainCommand(this);

granite stirrup
#

whats in that file

somber hull
#
    public MainCommand(Main plugin) {
        this.plugin = plugin;
        plugin.getCommand("safecheck").setExecutor(this);
}
#

its a command file

#

thats the constructor

granite stirrup
#

is there a executor?

somber hull
#

?

granite stirrup
#

u need the method that gets called when the command is run

somber hull
#

oh

#

yea

#

thats in there too

granite stirrup
#

it also need to implements CommandExecutor

somber hull
#

yea

#

i got all that

granite stirrup
#

can u show whats in it

somber hull
#

yea

#

dont yell at me, im gonna go through and fix anythign thats messy later

#
public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) {
    if (!(sender instanceof Player)) {
        sender.sendMessage("Only Players can access this command!");
        return true;
    } else {
        Player plr = (Player) sender;

        if (args.length == 0) {
            plr.sendMessage(ChatColor.translateAlternateColorCodes('&', plugin.getConfig().getString("helpmessage")));
            return true;
        }
        if (args[0].equalsIgnoreCase("reload")) {
            if(!(plr.hasPermission("safecheck.reload")))return true;
            plugin.reloadConfig();
            plr.sendMessage(ChatColor.translateAlternateColorCodes('&', plugin.getConfig().getString("reloadmessage")));
            return true;
        } else {
            if(args[0].equalsIgnoreCase("version")) {
                    plr.sendMessage(plugin.getDescription().getVersion());
                }
            }
        }

        return false;
    }

}
#

wich one

#

the plugin?

tribal holly
#

hi i'm trying to spawn entities with nms but they spawn and they are invisble (like they are here but not)

granite stirrup
#

this is why maven is better

#

;-;

somber hull
#

one sec

#

i might be absolutely dumb

#

give one sec

#

un momento

somber hull
#

yea, so im dumb

granite stirrup
#

why do u need a CraftWorld

tribal holly
#

it's required by the method

somber hull
#
    if(getConfig().getString("configversion") == null || (getConfig().getInt("configversion") != 1)) {
        getLogger().log(Level.WARNING, ChatColor.RED + "Config is outdated please delete the config and restart your server.");
        getLogger().log(Level.WARNING, ChatColor.RED + "Disabling Plugin...");
        this.getPluginLoader().disablePlugin(this);
        }
granite stirrup
#

what method?

somber hull
#

this is what is erroring

tribal holly
#

class sry

granite stirrup
#

what

#

???

#

isnt CraftWorld a nms thing

tribal holly
granite stirrup
#

i heard you shouldnt use nms

sage swift
#

lol

wraith rapids
#

craftworld is a cbo thing

foggy bough
#

will this code work? ```java
public class Main() {
public void onEnable() {
System.out.println("First plugin that probably won't work");
}
public void onDisable() {

}
}```

sage swift
#

you should do Bukkit.shutdown()

somber hull
#

is there a way to disable the plugin?

granite stirrup
sage swift
#

classes dont have arguments, @foggy bough.

granite stirrup
#

u forgot one thing tho

tribal holly
granite stirrup
sage swift
#

and don't call it Main for the love of god

young knoll
#

You shouldn't use NMS if you can avoid it

foggy bough
young knoll
#

Or if you don't know what you are doing

tribal holly
#

i need to modify entity before spawning it

wraith rapids
#

use World::spawnEntity

granite stirrup
tribal holly
#

i need to modify entity before spawning

wraith rapids
#

you can

#

use World::spawnEntity

somber hull
#

getPluginLoader().disablePlugin(this);
is this the proper way to disable the plugin?

wraith rapids
#

the api method allows you to pass a consumer that modifies the entity before spawning it

young knoll
#

*In modern versions

tribal holly
#

i saw everywere to create custom mob class

wraith rapids
#

new Consumer() { @Override public void accept(Entity entity) { entity.doStuff() }}

#

or (entity) -> { entity.doStuff }

young knoll
#

or this::consumerMethod

tribal holly
#

in parameter of spawnEntity ?

wraith rapids
#

yes

#

see the docs

granite stirrup
somber hull
tribal holly
#

well okay i try

somber hull
#

if it exists, or if it is different than 1

granite stirrup
#

wtf why would u do it like that?

somber hull
#

idk

young knoll
#

Don't use getString, use isSet

granite stirrup
#

.equals also

#

lmao

somber hull
#

that wasnt supposed ot be string

young knoll
#

Not for null

somber hull
#

thanks for pointing that out

granite stirrup
somber hull
#

iuts supposed to be Int

#

if(getConfig().isSet("configversion") || (getConfig().getInt("configversion") != 1))

granite stirrup
#

then why are u getting it as a string for the null bit?

crude hound
#

how can I set the villager profession to an nitwit with spigot 1.8.9?

granite stirrup
granite stirrup
#

why forge

#

why not fabric

#

smh

somber hull
#

hey does anyone wanna go through my code and make fun of me for how bad it is?

crude hound
#

fail

granite stirrup
#

its faster and more vanilla

somber hull
#

to help me make it better

granite stirrup
#

lmao

young knoll
#

Fabric is for modern versions, unless you include the backports

#

Also green robed villagers were removed in 1.8

somber hull
#

?paste

queen dragonBOT
young knoll
#

What?

tribal holly
granite stirrup
#

i thought u could do lower than 1.14 lol

#

i guess not

somber hull
#

anyone wanna help me make it better?

#

uh

somber hull
#

i just did shift+ tab

#

havent really worked on that yet

granite stirrup
#

why not just use tab

young knoll
#

Auto format it

somber hull
#

shift + tab auto formats

granite stirrup
#

oh

somber hull
#

that is the ato format

young knoll
#

Then get a better IDE

#

Because that is not proper formattting

granite stirrup
#

its ugly

#

like java doesnt care about formatting

#

BUT

#

COme on

#

its ugly without it

proper notch
#

humans care about formatting

granite stirrup
somber hull
#

BRUH

#

show me how to import

tribal holly
#

don't understand where do you find consumer

somber hull
#

from eclipse

#

into intellij

young knoll
#

Eclipse formatting works fine

torn oyster
#

is there a way to do Player#setCooldown(ItemStack, int)

#

cuz it is only material

young knoll
#

But it isn't shift tab

#

It's ctrl shift f

granite stirrup
torn oyster
#

would i have to use packets or something

young knoll
#

The client just doesn't support it

somber hull
#

and intellij just looks ugly

wraith rapids
#

yeah the client only supports cooldowns on a per-material basis

granite stirrup
somber hull
somber hull
#

Other errors

granite stirrup
#

u need to add every thing u had in eclipse for build path

#

i think

young knoll
#

This is why maven and gradle exist

granite stirrup
somber hull
#

hang on

#

leme try it again

noble spire
somber hull
#

why is intellij so fucking confusing

granite stirrup
#

omg the indentation

noble spire
#

it's great once you've understood it

#

just a pain to understand

granite stirrup
#

yeah it does Take a bit to learn it

tribal holly
#

agree

proper notch
#

you can go much further with intellij than any other java ide rn

#

there are just plugins for basically every useful integration

granite stirrup
#

yeah theres loads of plugins

#

i got a discord plugin

#

theres like a shop to get them lmao

#

they all free mostly tho

#

i think

young knoll
#

Eclipse also has a marketplace

unkempt peak
#

^

granite stirrup
#

i never seen it XD

young knoll
#

Since I started using it 8 years ago

unkempt peak
#

There is a plugin marketplace on eclipse

tribal holly
#

can't fu** understanding how to summon an entity with consumer things wanna kill my self

unkempt peak
#

I've only used it for dark theme but it does exist

granite stirrup
#

omg its alot of money to put a game on steam man

#

they also take a cut bruh

#

$100 fee should be lowered

#

;-;

unkempt peak
#

They have to make money too

granite stirrup
#

because they take a cut

granite stirrup
young knoll
#

$100 is not a large fee

noble spire
#

^

granite stirrup
unkempt peak
#

It's really not

granite stirrup
#

it is for me

noble spire
#

not really considering the cost of keeping a platform like that online

granite stirrup
#

lmao

somber hull
#

NO

#

fuck intellij

young knoll
#

Less than any of the textbooks they want me to buy

somber hull
#

i tried to open it in eclipse

#

and now my whole fucking project is fucked

#

what the fuck

granite stirrup
#

lmao ik but if you dont have $100 how are you gonna do it

granite stirrup
noble spire
#

@somber hull don't try transfering projects bad idea lol

somber hull
somber hull
granite stirrup
#

just use maven

unkempt peak
granite stirrup
#

gosh

granite stirrup
#

bUT if ur making a game and you spent all of your money on it and you cant put it on steam because you got no money the $100 fee is bad

noble spire
#

also a $100 fee prevents spam for example

unkempt peak
digital rain
#

any idea on how to hide_potion_effects without removing the lore?

somber hull
#

whatt he fuck is this????????????

#

why are there folders now???

eternal oxide
#

The idea of the $100 is to stop Steam being flooded with crap. If you are not willing to fork up $100 to host your game, you can;t be that confident in it selling.

granite stirrup
unkempt peak
noble spire
young knoll
digital rain
#

the nbt ids

young knoll
#

What

digital rain
#

this stuff

tribal holly
#

no one know how to spawn an entity with consumer ????

young knoll
#

That's not a potion effect

tribal holly
#

notlikethis

young knoll
#

world.spawnEntity(location, class, entity -> entity.whatever)

digital rain
tribal holly
#

what is class ?

young knoll
#

Entity class

#

I think you can also use the type now

tribal holly
#

and entity ?

granite stirrup
young knoll
#

entity is a variable for use in the consumer

granite stirrup
#

then they go homeless

tribal holly
#

and how to init it ?

noble spire
#

Someone who's not a kid and does it as a job (18+)

young knoll
#

That is how you init it

wraith rapids
#

w.spawnEntity(l, EntityType.ZOMBIE, CreatureSpawnEvent.SpawnReason.CUSTOM, (zombie) -> zombie.setCustomName("yourmom"));

unkempt peak
granite stirrup
tribal holly
#

okay thx a lot

wraith rapids
#

poor people don't get to sell shit

#

if poor people knew how to do things properly they wouldn't be poor

granite stirrup
#

i think its should be like a $10 fee

young knoll
#

You can't provide a spawn reason on spigot

unkempt peak
young knoll
#

Also it's spawn in this case, not spawnEntity

eternal oxide
wraith rapids
#

wasn't that merged ages ago

young knoll
#

Guess not

wraith rapids
#

it's been on paper for like over a year

granite stirrup
young knoll
#

Sureeeee they do

granite stirrup
#

so the crap wouldnt get accepted

wraith rapids
#

just pay the $100 goy

granite stirrup
unkempt peak
#

Also theres other platforms to post games

granite stirrup
#

but how do the free games get money

young knoll
#

Microtransactions

granite stirrup
tribal holly
torn oyster
#

how would i prevent a snowball/egg entity from breaking on impact

unkempt peak
torn oyster
#

and just let it phase through

granite stirrup
wraith rapids
#

cast it to the type you need

#

it gives you an Entity

granite stirrup
#

i seen some free pc games with no ads

#

and no in app purchases

wraith rapids
#

you'll need to cast the Entity to something that has those methods

#

like Vindicator

unkempt peak
young knoll
#

I think it just gives you the type you pass for the class

wraith rapids
#

imagine expecting to make money with a game

young knoll
#

Last I checked

wraith rapids
#

the most oversaturated market on earth just after youtube

#

spawnEntity doesn't

#

because the EntityType doesn't contain information about the class

young knoll
#

Ah

wraith rapids
#

so you can't use generics magick

#

i mean it does, but not at compile time

young knoll
#

I don't use that one since it's not available on spigot

granite stirrup
#

why do people download the jar and add it

#

its easier to do maven

#

since it updates

wraith rapids
#

because that's what the shit tier guide says

granite stirrup
#

when u refresh the maven

tribal holly
young knoll
#

You don't need to cast for half of those

wraith rapids
#

Vindicator vindicator = (Vindicator) entity;

tribal holly
#

only in lmabda expression ?

wraith rapids
#

vindicator.yourMom

unkempt peak
#

Lol

tribal holly
wraith rapids
#

sure you can

tribal holly
kind coral
#

why if i disable the plugin it still shows up in the /pl list?

wraith rapids
#

what are you even doing

young knoll
#

disable != unload

kind coral
#

i want it to disable and unload

dim bronze
#
Exception in thread "main" org.apache.commons.io.FileExistsException: Destination 'CraftBukkit/src/main/java/net' alreadyexists

with latest BuildTools from jenkins, is this a known issue? Running buildtools in a clean directory

kind coral
#

how would i do that?

tribal holly
young knoll
#

Yes use maven to run buildtools

#

Genius

granite stirrup
#

;-;

dim bronze
#

I need NMS

torn oyster
#

p.getPlayer().getPlayer().getPlayer().getPlayer().getPlayer().getPlayer();

#

what

young knoll
#

You still need to run buildtools for nms

granite stirrup
torn oyster
#

why does player have a getplayer method

weary geyser
dim bronze
#
        <dependency>
            <groupId>org.spigotmc</groupId>
            <artifactId>spigot</artifactId>
            <version>1.16.5-R0.1-SNAPSHOT</version>
            <scope>provided</scope>
        </dependency>
#

i am using maven 😉

young knoll
#

Because OfflinePlayer has a getPlayer method

granite stirrup
young knoll
#

Yes you do?

dim bronze
#

yes.. you do

young knoll
#

Where do you think it comes from

granite stirrup
#

k but why do u need nms

granite stirrup
dim bronze
#

nms code is minecraft server code

#

spigot can't distribute it

young knoll
#

Can't host NMS code online

granite stirrup
#

oh lol

dim bronze
#

anyways, any reason why latest build tools in a clean directory wouldn't run?

somber hull
#

getLogger().log(Level.WARN, "Config is outdated please delete the config and restart your server.");

granite stirrup
#

why would u need nms

somber hull
#

theres nothing wrong here right?

granite stirrup
#

your supposed to avoid using it really

somber hull
#

its saying .log() doesnt work there

dim bronze
#

no, not really

granite stirrup
#

unless u really have to

chrome beacon
#

If it generated

azure pulsar
#

how can I find out which scorebaord team a player is in?

granite stirrup
#

buildtools takes ages af

dim bronze
#

because it has to patch the jar

granite stirrup
#

anyway why do u need nms?

dim bronze
# chrome beacon Could you send the buildtools log?
Exception in thread "main" org.apache.commons.io.FileExistsException: Destination 'CraftBukkit/src/main/java/net' alreadyexists
    at org.apache.commons.io.FileUtils.moveDirectory(FileUtils.java:2923)
    at org.spigotmc.builder.Builder.main(Builder.java:567)
    at org.spigotmc.builder.Bootstrap.main(Bootstrap.java:27)

I believe that's all that's relevant, I can send the whole log if needed

chrome beacon
#

Yeah sounds like it isn't a clean directory

granite stirrup
#

n m s

young knoll
#

Correct

chrome beacon
#

._.

young knoll
#

Which is minecraft server code

granite stirrup
#

oh

dim bronze
#

can assure you it is

granite stirrup
#

i thought it was called net minecraft server

chrome beacon
#

It is

#

But it's still server code

granite stirrup
#

k

granite stirrup
#

its saying a directory already exists i think

dim bronze
#

yes, a directory that buildtools generated

#

that's the problem

granite stirrup
#

then remove it

#

and rerun

dim bronze
#

it starts in a empty dir

#

i can't delete the files it needs mid op

granite stirrup
#

¯_(ツ)_/¯

dim bronze
#
$ rm -rf spigot-build-tools/
$ take spigot-build-tools
$ wget https://hub.spigotmc.org/jenkins/job/BuildTools/lastSuccessfulBuild/artifact/target/BuildTools.jar
--2021-05-19 21:47:30--  https://hub.spigotmc.org/jenkins/job/BuildTools/lastSuccessfulBuild/artifact/target/BuildTools.jar
Loaded CA certificate '/etc/ssl/certs/ca-certificates.crt'
Resolving hub.spigotmc.org (hub.spigotmc.org)... 104.27.195.95, 104.27.196.95, 2606:4700:21::681b:c45f, ...
Connecting to hub.spigotmc.org (hub.spigotmc.org)|104.27.195.95|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 4153958 (4.0M) [application/java-archive]
Saving to: ‘BuildTools.jar’

BuildTools.jar                 100%[==================================================>]   3.96M  3.91MB/s    in 1.0s

2021-05-19 21:47:31 (3.91 MB/s) - ‘BuildTools.jar’ saved [4153958/4153958]

$ java -jar BuildTools.jar > output
Picked up _JAVA_OPTIONS: -Djdk.net.URLClassPath.disableClassPathURLCheck=true
Picked up _JAVA_OPTIONS: -Djdk.net.URLClassPath.disableClassPathURLCheck=true
Picked up _JAVA_OPTIONS: -Djdk.net.URLClassPath.disableClassPathURLCheck=true
Picked up _JAVA_OPTIONS: -Djdk.net.URLClassPath.disableClassPathURLCheck=true
Picked up _JAVA_OPTIONS: -Djdk.net.URLClassPath.disableClassPathURLCheck=true
Exception in thread "main" org.apache.commons.io.FileExistsException: Destination 'CraftBukkit/src/main/java/net' alreadyexists
    at org.apache.commons.io.FileUtils.moveDirectory(FileUtils.java:2923)
    at org.spigotmc.builder.Builder.main(Builder.java:567)
    at org.spigotmc.builder.Bootstrap.main(Bootstrap.java:27)
granite stirrup
#

BRUHHHH i got Banned on the ticket tool lounge :(

#

for 7 days

cold field
#

Hi guys, I need to call a method that retrieve the number of a world's players inside a playerJoinEvent. When a player joins the event is fired before the world can add the player to its list. Is there any method that can I use?

dim bronze
#

@chrome beacon ^^

chrome beacon
granite stirrup
#

i dont use linux

chrome beacon
#

Maybe the files didn't delete properly

#

or that you forgot to delete some of them

granite stirrup
cold field
#

PlayerWorldChangeEvent isn't fired so that isn't the one

granite stirrup
#

actually maybe not but theres ways to do it

dim bronze
#

will older build tools work?

granite stirrup
#

i dont know if theres a better

#

way

cold field
#

I will just add one

#

thanks anyway

young knoll
#

I don't think getOnlinePlayers includes the new player either

granite stirrup
#

yeah but that isnt accurate

young knoll
#

What? yes it is

granite stirrup
#

adding One?

young knoll
#

yes?

granite stirrup
#

it isnt accurate

young knoll
#

Sure it is

granite stirrup
#

cuz then u have to remove one if u leave

young knoll
#

How many players do you think join in a single join event

wraith rapids
#

lol

granite stirrup
#

it could bug out

young knoll
#

Yes java is famous for forgetting how to add 1

granite stirrup
#

maybe a game crashed didnt call on quit

young knoll
#

It does

wraith rapids
#

that still fires a disconnect event

#

the server doesn't care how you disconnect

granite stirrup
#

¯_(ツ)_/¯

wraith rapids
#

only that you disconnect

young knoll
#

Besides we are talking about the join event

#

Not the quit event

dim bronze
#

same happens on build #125 and #126 -_-

granite stirrup
#

if theres players online already and u enable the plugin it wont work

#

;-;

chrome beacon
young knoll
#

Okay but we aren't talking about that

#

We are talking about the join event

wraith rapids
#

we're talking about adding +1 to the number of players

#

not maintaining a separate tally of the number of players by listening to join/quit

granite stirrup
#

didnt they say they wanted to get players in a world

wraith rapids
#

yes

granite stirrup
#

on join

dusty herald
#

i hate the rm -rf command

wraith rapids
#

they did yes

dim bronze
#

has no one tested this on linux in like 2 months?

dusty herald
#

i'd like it better if it had output

wraith rapids
#

so get the players that already are in the world

granite stirrup
#

they probs want the current players online

wraith rapids
#

and add the joining player

#

and you have all of them

radiant aspen
#

Yo, Anyone know if entity metadata survives server restart?

wraith rapids
#

it doesn't

young knoll
#

No

dim bronze
#

rm -rfv @dusty herald

young knoll
#

PDC does

radiant aspen
#

kk thx

young knoll
#
int worldPlayers = event.getPlayer().getWorld().getPlayers().size() + 1;
#

Pretty simple

dim bronze
#

why do you doubt everything ahah

granite stirrup
#

i dont knOw never seen it before XD

young knoll
#

Forgot the size part

granite stirrup
#

oh it is a thing

#

lmao

young knoll
#

🙃

granite stirrup
#

i just never used it or seen it

#

lmao

#

i never needed to get player count XD

#

on a world

tribal holly
granite stirrup
#

because if ur casting something to LivingEntity i think it needs to be a instance of it

#

lmao

tribal holly
#

yep but entity is an LivingEntity

#

i spawn a vindicator

young knoll
#

Can I get that code in a paste

#

?paste

queen dragonBOT
granite stirrup
#

thats just hastebin

#

lmao

young knoll
#

And?

granite stirrup
young knoll
#

Dang you bot

tribal holly
granite stirrup
#

wtf is coffeescript

#

XD

tribal holly
#

don't know

#

it name it like this

upper vale
#

Does anyone know how i can properly force a swing animation

granite stirrup
#

packets

#

i think

chrome beacon
#

Yeah

granite stirrup
#

but dont really mess with packets

#

its really hard

#

i never tried it

upper vale
#

which packet

granite stirrup
#

but i bet its hard

chrome beacon
#

Not really

granite stirrup
upper vale
#

placketplayoutanimation #0 ignores the attack speed of the item the player is holding

granite stirrup
#

idk

#

you would have to do it urself lmao

tribal holly
granite stirrup
#

like call the actual packet

tribal holly
#

ctf+f -> swing

granite stirrup
#

im not sure

#

for packets

upper vale
#

as i said #0 ignores the attack speed of the weapon the player is holding

#

I need the animation to reflect the attack speed as well

granite stirrup
#

i think u have to give it the attack speed

#

the server isnt just gonna know what the attack speed is

#

if you dont give it anything its just gonna be default

tribal holly
granite stirrup
#

i think

upper vale
#

what

tribal holly
#

this code is to send totem use to a player

#

it should be the same with swing animation

#

or particle

granite stirrup
#

i think thats the thing

tribal holly
#

me too

#

try it

young knoll
#

I guess you could rename entity to vindicator to be more concise

tribal holly
#

hooo if it work i just love you

granite stirrup
#

the whole protocol of mc is written on the internet lmao

winged mica
#

yep

young knoll
#

Why wouldn't it be

tribal holly
#

yep i have friend trying to recreate spigot but in C# and full use it

granite stirrup
tribal holly
#

hahaha

opal juniper
#

Are you using nms or protocollib @granite stirrup

upper vale
#

wait why am i using a serverbound packet

#

shouldnt it be packet play out

opal juniper
#

Wait sorry wrong person

opal juniper
upper vale
#

yeah packetplayoutanimation doesnt compensate attack speed

opal juniper
#

Are you using nms or protocollib @upper vale

upper vale
#

protocollib

#

well

#

both?

granite stirrup
#

with that XD

opal juniper
granite stirrup
#

i mean it does have a animation for it

granite stirrup
#

XD

opal juniper
#

Use that method @upper vale

#

That coll posted

granite stirrup
#

why do packets if spigot can do it for u

#

XD

upper vale
#

but ill try the API method

opal juniper
#

Without nms

tribal holly
#

haaaaaaaaaaaaaaaa

#

i go jump from the first flour of my building

#

and come back to my computer with a broken legs

sage swift
#

can i detect cause of death from EntityDeathEvent, or do i have to use EntityDamageEvent and check for the health <= 0?

tribal holly
#

EntityDeathEvent

#

.getCause i think

sage swift
#

nope

dim bronze
#

does the entity have it?

sage swift
#

otherwise i wouldn't be asking

dim bronze
#

something like e.getEntity().getDeathCause()

sage swift
#

getLastDamageCause

#

yes

#

ty

tribal holly
#

or getLastDamageCause

#

yep to fast for me

dim bronze
#

that would be it, I'm not looking at the docs

sage swift
#

B)

upper vale
#

im assuming its because its not technically attacking or something

granite stirrup
opal juniper
granite stirrup
#

lol

young knoll
tribal holly
granite stirrup
granite stirrup
#

i think thats why people try and avoid nms

tribal holly
#

for information the entity is spawn in an not loaded by player chunk

tribal holly
#

but even if i getChunk.load() it still don't work

dim bronze
opal juniper
#

But you can use reflection

#

Yeah

young knoll
#

Or Modules

tribal holly
#

nothing else than FAWE

dim bronze
#

pretty sure most projects go down the route of using modules and writing the methods needed

#

because it's faster + easier to read

#

WOW

#

the jar compiled fine on centos 7

#

but not on arch

granite stirrup
#

maybe it doesnt support arch

tribal holly
# young knoll Or Modules

it work when i spawn it and i'm near them but when i try to spawn them in a location which any player are that gltich

young knoll
#

I'm not sure spawning entities outside loaded chunks really works

tribal holly
#

it's pre-generate chunk

#

so it could

young knoll
#

Doesn't mean it's loaded

granite stirrup
#

ye i dont think u can spawn entities out of loaded chunks

tribal holly
#

but if i .load()

#

it load it nop ?

wraith rapids
#

iirc it loads the chunk before spawning it but i could be wrong

tribal holly
#

what a ghost

#

his here but not here

wraith rapids
#

either way, good practice is to check whether the chunk is loaded and if it isn't, attempt to load it asynchronously via paperlib's async chunk api

granite stirrup
#

i dont know why do u need to spawn something out of players reach i think its possible since someone spawned a villager out of loaded chunks in a mod

wraith rapids
#

as trying to spawn shit in an unloaded chunk will either sync load it, which is bad, or fail entirely, which is also bad

hoary tiger
#

How do I run a command as all Creatures/Entities through a command like an event

tribal holly
#

the project is to pregenrate a labyrinth and summon Guardian Temple in it (mini-boss with abilities)

wraith rapids
#

make sure to set its removewhenfaraway and whatnot to false

tribal holly
#

every party generate a labyrinth of 1200x1200

#
 Entity guardianEntity = this.spawnLoc.getWorld().spawn(this.spawnLoc, Vindicator.class, entity -> {

            entity.setRemoveWhenFarAway(false);
            entity.setCustomName("§bGuardian");
            entity.setCustomNameVisible(true);
            entity.setMaxHealth(health);
            entity.setHealth(health);

            entity.getEquipment().setHelmet(Utils.EnchantedItemStack(Material.NETHERITE_HELMET, Enchantment.PROTECTION_ENVIRONMENTAL, 2));
            entity.getEquipment().setChestplate(Utils.EnchantedItemStack(Material.NETHERITE_CHESTPLATE, Enchantment.PROTECTION_ENVIRONMENTAL, 3));
            entity.getEquipment().setLeggings(Utils.EnchantedItemStack(Material.NETHERITE_LEGGINGS, Enchantment.PROTECTION_ENVIRONMENTAL, 2));
            entity.getEquipment().setBoots(Utils.EnchantedItemStack(Material.NETHERITE_BOOTS, Enchantment.PROTECTION_ENVIRONMENTAL, 2));
            entity.getEquipment().setItemInMainHand(Utils.EnchantedItemStack(Material.NETHERITE_AXE, Enchantment.DAMAGE_ALL, 5));
            entity.addPotionEffect(new PotionEffect(PotionEffectType.SPEED, 999999999, 1, false, false));
        });```
wraith rapids
#

make sure that mob spawning and shit is allowed in the world

granite stirrup
wraith rapids
#

that's a real man

tribal holly
#

hahah i got a paper on my desk with minecraft color

#

and slot chest number

tribal holly
#

he is doing all abilities but invisble

#

the boss bar is here

#

the spider on the screen is summon by him

young knoll
#

Choco would yell at you for using the color symbol :p

granite stirrup
#

tho using that is kinda lazy

young knoll
#

Maybe the client never gets sent the packet for the entity

tribal holly
#

i'm gonna be crazy with this that make 5 hours that i'm on it

granite stirrup
#

maybe it isnt finding the vindicator textures

young knoll
#

If you can find the entity and face it with F3

tribal holly
#

when i forced spawn next to me

young knoll
#

You can use F3 + I to get his data

#

or F3 + shift + I to get the client data

tribal holly
#

anythings

#

(it should be on the center of the capture)

granite stirrup
#

it has no hitboxes 👀

#

maybe try spawning it when the player gets near ?

young knoll
#

Try without optifine just to be sure

tribal holly
mystic tartan
#

how would I change a block to redstone dust?

granite stirrup
#

yeah but if u cant get it to work spawning out of chunks u just have to do that

young knoll
wraith rapids
#

in my dungeon setup i do what old console games do

mystic tartan
#

it needs blockdata, how do I use that?

tribal holly
wraith rapids
#

that is, assign rooms with neighbors and activation conditions

#

a deactivated room has no logic running for it and has no entities

tribal holly
wraith rapids
#

i check asynchronously every few ticks

#

the whole thing runs asynchronously save for all of the shit that needs to be thread safe with bukkit

#

the rooms are stored in an octree so it scales relatively well even for a large number of rooms and players

tribal holly
#

smart

#

you just run a Bukkit.getScheduler.runTaskAsyn() every tick of player move event or a schedul task doing things async ?

wraith rapids
#

no i have a dedicated thread for it

tribal holly
#

Runnable ?

wraith rapids
#

a single thread

young knoll
#

Huh

wraith rapids
#

extending thread and overriding run

young knoll
#

TIL about octrees

tribal holly
#

without using bukkit

#

i see

wraith rapids
#

bukkit is unnecessary as it isn't really a task

tribal holly
#

yep i see okay i will try to do somethings like this

#

thanks

wraith rapids
#

remember to use paperlib if you make it public

#

nobody wants a plugin that performs like shit

tribal holly
#

what a mess with this it will be nice to spawn them with no bug

tribal holly