#help-development

1 messages · Page 1389 of 1

paper viper
#

you dont have to use the jar that way

eternal night
#

this will also install a dependency locally with the artifact-id spigot instead of spigot-api

#

ooof

#

speed

paper viper
#

lmao

eternal oxide
#

Then play with things. remove your relocations and see if it exports with hikari then. You don;t need to start the jar, just look inside for com.zaxxer

#

theres nothing wrong with the artifactset as it shades just fine here.

gaunt eagle
#

okey le me try for buildtools

bright jasper
#

same thing

eternal oxide
#

You have somethign funky going on then

bright jasper
#

Yeah i got no idea

eternal oxide
#

I'm using Eclipse but that shoudl make no difference

bright jasper
#

i could hop in a vc and screenshare maybe but idk if that would take up too much of your time

gaunt eagle
#

Should I wait on this screen or turn it off?

#

Sorry, this is the first time I've used it xD

eternal oxide
gaunt eagle
#

ah, it's being installed

bright jasper
#

no worries

eternal night
#

@bright jasper how are you defining the includes for your shade plugin ?

#

maybe it is a formatting issue

cerulean harbor
#

is there a way to restore a percentage of health and not a hard value?

cold pawn
#

So when I create a pex group what do I do to make this work, sorry for the trouble but this is an old plugin and I want it to work again

bright jasper
#
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-shade-plugin</artifactId>
                <version>3.2.4</version>
                <configuration>
                    <artifactSet>
                        <includes>
                            <include>com.zaxxer:HikariCP:*:*</include>
                        </includes>
                    </artifactSet>
                </configuration>
                <executions>
                    <execution>
                        <phase>package</phase>
                        <goals>
                            <goal>shade</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
eternal night
#

yeah ehm. that is not how you define an include is it

eternal oxide
#

^ that works fine

eternal night
#

still useless hto

eternal oxide
#

its to include a whole or partial package

eternal night
#
*:*
```at the end is completely useless
#

who ever included a partial package xD

eternal oxide
#

That defines what is included

eternal night
#

but it isn't needed

#

lol

eternal oxide
#

I do

#

I import just the config code from Bungee for a project

eternal night
#

you know there is minimizeJar for that

eternal oxide
#

Not needed when you have ArtifactSets

eternal night
#

which removes the packages and classes not referenced in your code base

#

😂

#

must be one hassel to maintain

#

did you guys check the mvn package output ?

eternal oxide
#

Yes, but teh artifactSet allows inclusing of Bungee config to use in Spigot.

#

Single config code base

eternal night
#

okay, but answer le question please xd

#

did you guys look at the mvn package output

eternal oxide
#

No clue, not my issue

eternal night
#

oh you were helping earlier

#

so I figured, you'd know

eternal oxide
#

He checked the jar and says its not in there so I guess its not

gaunt eagle
#

@eternal night

eternal night
#

Welp @bright jasper does your mvn package output a) show that the shade plugin is called and b) show that the respective artifact is included

eternal oxide
#

I didn;t get to logs. I just finished testing it worked here

gaunt eagle
#

I installed buildtools, and it closed after a long cmd screen. What do I start the server with xD

eternal night
#

the folder should now contain a spigot jar

bright jasper
hushed crescent
#

How can I get someones username

#

Bukkit.getName();?

gaunt eagle
eternal night
#

omg did you run that in your sever folder

gaunt eagle
#

yeah.. why

#

xD

bright jasper
#

ok so actually

wispy fossil
bright jasper
#

when i run package on myriadcommon it works

#

but in the plugin its not found

#

does not make sense

eternal oxide
#

are you looking at the correct jar?

gaunt eagle
#

minecraft_server-1.16.5?

eternal night
#

^ yeah would be have been my next guess

#

maybe the jar is not correctly copied or something

#

@gaunt eagle the file should live in your server folder then I guess xD

gaunt eagle
#

sht

eternal night
#

tho I would suggest cleaning up the files generated by build tools

gaunt eagle
#

doesnt metter

#

just a test server

#

xD

bright jasper
#

oh lul wait

#

that wasnt meant for me sorry

eternal night
#

it was riku

gaunt eagle
#

I'll copy it from there, shouldn't I put it in the server folder?

eternal night
#

yes

#

xD

#

idk man, build tools creates a spigot-1.16.5.jar or something

#

when you run it

#

it should now be in the folder you ran it in

gaunt eagle
#

Can I completely delete it and start it in a different folder xD?

bright jasper
#

Something SUS is going on here

#

sorry for sayinng that but it is

eternal night
#

probably furkan xD

bright jasper
#

but uh so i looked into the jar generated by mvn package and it works

bright jasper
#

but then in intellij i click run and it builds the jar and debugs it

eternal night
#

I

bright jasper
#

the jar it builds tho doesnt contain it

#

makes zero sense

eternal night
#

it makes perfect sense

#

oof, lets hope elgar is asleep xD

#

poor dude spend so much time

#

just for this to be the issue

#

IntelliJ is not Maven

bright jasper
#

what is the issue though

eternal night
#

(unless configured as such)

bright jasper
#

its configured as such

eternal night
#

building your jar in IntelliJ

#

are you delegating the runner activity to maven ?

bright jasper
#

So basically

gaunt eagle
bright jasper
#

i have a maven thing like Spigot build

eternal night
#

ah

bright jasper
#

Spigot Debug calls it

#

and copies the jar over

#

and runs the server jar

eternal night
#

so your issue is most likely in that workflow

#

not at all in your pom specifications

#

concerning that mvn package produces a correct jar

bright jasper
#

clean package

#

is the command line for it

eternal night
#

what jar are you copying ?

#

to your server

#

output/something.jar ?

bright jasper
#

yep

eternal night
#

yah

#

there you go

#

that is your issue xD

bright jasper
#

im copying

#

target/MyriadSpigot.jar

eternal night
#

welp

#

that is not your issue thn

#

XD

bright jasper
#

yeh

gaunt eagle
#

@eternal night

#

same shit

eternal night
#

check the error log

gaunt eagle
#

different folder on my desktop

eternal night
#

@bright jasper so, mvn package produces a target/MyriadSpigot.jar jar that contains the hikaricp package but the workflow you use through intellij does not.

bright jasper
#

yeah it makes no sense

#

unless its copying the wrong thing

#

perhaps actually

#

its caching the maven result or something so it stores what the dependencies are in a list and doesnt update then

#

that would... make sense actually holup

#

this is why i stopped using intellij before lmao

eternal night
#

👀

bright jasper
#

👏 works

#

but also fuck intellij

eternal night
#

Ah

#

sure

gaunt eagle
#

@eternal night is that correct now xD?

eternal night
#

yus

#

there is your jar

#

btw @eternal oxide I know you went to sleep just wanted to apologise for saying your partial package include was useless! Didn't know the syntax before and got a bit defensive, hope it didn't hit too personal! After thinking a bit over it I can definitely see the use case. Might also work well with like apache commons!

drowsy helm
#

?bt

queen dragonBOT
drowsy helm
#

soz cbf googling it lol

#

interesting how some windows commands dont work from other drives

eternal night
#

ah just plug it all into wsl for fun 😂

#

windows commands are overrated

drowsy helm
#

very

#

I have 1Gb on my main drive

#

so i cant run bts on it

#

and BT doesnt work on other drives

#

so i msorta stuck lol

#

maybe I'll manually import the jar with mvn

stone sinew
#

Does PlayerFishEvent.getHook().getLocation() return the block where the hook is in or the block its "attached" to?

gaunt eagle
#

I replaced the file with the original, but I still got this error -_-

drowsy helm
stone sinew
eternal night
#

now you gotta actually fix your dependency

#

so instead of your system path bs

gaunt eagle
eternal night
#

you just plug in:

<dependency>
    <groupId>org.spigotmc</groupId>
    <artifactId>spigot</artifactId>
    <version>1.16.5-R0.1-SNAPSHOT</version>
    <scope>provided</scope>
</dependency>
gaunt eagle
#

le me try

#

same error -_-

eternal night
#

well yes

gaunt eagle
#

my brain is burning

eternal night
#

but now the compile warning should be gone

#

lol

#

that was the entire point

#

none of what we did had anything to do with the error

gaunt eagle
eternal night
#

Well, I guess back to the question: "Why remove the textures properties like that"

gaunt eagle
#

you upset me

eternal night
#

you could just use PropertiesMap#removeAll("textures")

gaunt eagle
eternal night
#

¯_(ツ)_/¯

#

try it xD

gaunt eagle
eternal night
#

oh like

gaunt eagle
#

I'm new at this sorry

eternal night
#

String#toUpperCase basically just means I want you to use the toUpperCase method on a string instance

#

it is the notation for javadoc references

#

so you in your case I was suggesting to use the removeAll method

woeful crescent
#

Yeah, # separates static methods from instance methods in code examples

gaunt eagle
#

but problem is in line 32

#

you talk about 33

eternal night
#

not really,

#

lines 32 and 33 can be replaced with a single PropertyMap#removeAll

gaunt eagle
#

basics+

eternal night
#

the only reason you need line 32 is to pass the property into line 33

gaunt eagle
#

right?

eternal night
#

ye

drowsy helm
#

anyone got a quick util to get UUID from name and vice versa from mojang api

eternal night
#

google

gaunt eagle
#

yeap, but it's good to get video training

#

udemy the best

#

actually

#

wait

eternal night
#

Jetbrains Academy rains supreme

gaunt eagle
#

@ripe marlin This training is included in java basics

#

one time

#

So I recommend this course

eternal night
#

^^ alternative

subtle sierra
#

Is there a way with Bungeecord to disable forwarding component messages from the game server to the client? I am trying to make a system that "hides" that "isolates" a player while they're interacting with it.

gaunt eagle
#

If I remember correctly, the price should be $ 4

eternal night
stone sinew
#

.teleport(<Location>) teleports at feet location right?

eternal night
#

yes

stone sinew
#

👍

subtle sierra
gaunt eagle
#

@eternal night hi xD

#

like i said

#

problem was in 32

eternal night
#

well yes

#

you now remove that line

#

because it is useless xD

#

that was the entire point of this lol

gaunt eagle
#

WUT

#

that line sets the skin of all players

#

xD

eternal night
#

32 ??

gaunt eagle
#

The most important line is

eternal night
#

try jetbrains academy then :>

#

30 free trial or generally free if you have a student account

#

which you can apply for with basically any school email address

gaunt eagle
#

I think Udemy had a general discount when I bought it

eternal night
#

You get the entire jetbrains product line up for free

#

if you get their student licence

gaunt eagle
#

Or because I live in Turkey, he may have done the pricing according to that

#

xD

eternal night
#

I mean, huge difference between java basics and anything like a game

eternal night
gaunt eagle
#

In our country, the state has published a website called BTK Academy, and on this website, all kinds of training kits related to technology are provided free of charge. I learned from there

#

Is there no such thing in your country?

eternal night
#

|| just go with Jetbrains Academy, it is lit and in the best IDE on the market ||

gaunt eagle
#

@eternal night did you remember??

eternal night
#

remember what

#

xD

gaunt eagle
#

We had an unsolved problem xD

eternal night
#

yes.

#

remove line 32

#

trust meee

gaunt eagle
#

How to sets skins xD?

eternal night
#

your line 32 is literally just Property property = propertyMap.getProperties("values").iterator().next() no ?

gaunt eagle
#

oh

eternal night
#

my my

#

that isn't line 32 tho

#

👀

gaunt eagle
#

propertyMap.put("textures", new Property("textures", "x", "x"));

eternal night
#

180 hours is a pretty strong assumption xD just give it a go

gaunt eagle
#

x x =

eternal night
#

just remove the line I pasted above

#

xD

#

like the iterator().next() line

#

this one (marked as line 32 on the screenshot you sent)

gaunt eagle
#

Do you really want me to put this away?

eternal night
#

😭 yes

#

remove the damn line

gaunt eagle
#

asdoasdğadasd

eternal night
#

intellij even tells you the variable isn't used

gaunt eagle
#

wait, i will explain the code

#

are u ready xD:?

eternal night
#

it is 02:52 for me XD

#

as ready as you are

gaunt eagle
#

xD

eternal night
#

your fault for being on hour ahead xD

gaunt eagle
#

The code briefly deletes players ' existing skins and replaces them with the specified skin

eternal night
#

yes I get that

gaunt eagle
#

xD

eternal night
#

Can you paste the current sample

#

of your method

#

just what you currently have

#

and please not as a screenshot xD

gaunt eagle
eternal night
#

yah

#

okay

#

perfect

#

give it a whirl

#

try it

gaunt eagle
#

I have to fast for Ramadan, eat and be right back. XD stay here for 10 minutes ^^

#

WAIT

eternal night
#

yeah no worries xD I understand that feeling xD

gaunt eagle
#

ITS WORKED

eternal night
#

🥳

gaunt eagle
#

ASNDPAODA

#

thanks really ❤️

eternal night
#

no problem xD just know that this change only works because it is in the onJoin

#

after that when the client is all initialised you would need quite a bit more code to make it work and sync the clients

#

but for now, enjoy your drinks and food while the night is still young

deft sedge
#

Hi, how do i get the matrix from PrepareItemCraftEvent

#

event.getmatrix isn't a thing

eternal night
#

PrepareItemCraftEvent#getInventory()#getMatrix()

hushed crescent
#

I am trying to add EssentialsX as a dependency

eternal night
#

what specific addition to the pom.xml are you making ?

hushed crescent
#

<repository> <id>ess-repo</id> <url>https://ci.ender.zone/plugin/repository/everything/</url> </repository> <repository> <id>paper-repo</id> <url>https://papermc.io/repo/repository/maven-public/</url> </repository>

#

and

#

<dependency> <groupId>net.ess3</groupId> <artifactId>EssentialsX</artifactId> <version>2.17.2</version> <scope>provided</scope> </dependency>

deft sedge
#

How do i set the result of PrepareItemCraftEvent to null

#

?

young knoll
#

Should just take null

deft sedge
#

or the outcome

#

someone said i could use event.setResult(null); but that didn't work

young knoll
#

Try material.air

deft sedge
#

well setResult isn't even a thing

deft sedge
young knoll
#

?jd

young knoll
#

It’s event.getInventory.setResult

deft sedge
#

k thanks

deft sedge
#

How do I get the item stack from a specific slot in an inventory

#

like I give the code a slot number to look at

young knoll
#

Inv.getItem(slot)

deft sedge
#

ok

young knoll
#

I wonder if it would be rude if I just answered ?jd to all these simple questions

deft sedge
#

yea

#

srry

deft sedge
young knoll
#

Inventory

#

It has a search option too

deft sedge
#

k that's fair

#

srry lol

wispy fossil
#

yall are mean

quaint mantle
wispy fossil
#

💃

quaint mantle
#

👉🏿 😄 👈🏿

young knoll
#

Javadocs exist for a reason ¯_(ツ)_/¯

deft sedge
#

yea

#

he's right

wispy fossil
#

this and alot of communities have the problem of "typical" developers
the real issue is that they are asked the same questions so much they get tired of writing out responses 😄

But i'm sure if we all wrote something like Hey, just to let ya know, these are all on the javadocs, it's got everything ya need just search for it. or If your IDE supports autofill it can do most of the work for ya

then it would be cooler
or if the ?jd command did it

deft sedge
#

lol it's fine

lost matrix
#

Im having a hard time finding a descriptive name for this method. Any suggestions?

wispy fossil
#

descriptiveNameForMethod()

eternal night
#

findPotentialSlots idk

#

addItemVirtually to represent that it does not affect the actual inventory

lost matrix
dusk flicker
#

thats a cool method

dawn hazel
#

does anyone know why this isnt working?

p.addPotionEffect(new PotionEffect(PotionEffectType.NIGHT_VISION, 999, 255, false, false));
#

it just tells me the plugin is already initialized

lost matrix
sage swift
#

y'all are mean
you should see enginehub

dawn hazel
#

i only have one class in my plugin

lost matrix
dawn hazel
#

if i remove it then my plugin just doesnt work

sage swift
#

do you have another copy of the plugin in your plugins folder?

dawn hazel
#
package xyz.skygamez.argonfullbright;

import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.player.PlayerJoinEvent;
import org.bukkit.plugin.java.JavaPlugin;
import org.bukkit.potion.PotionEffect;
import org.bukkit.potion.PotionEffectType;

public final class Argonfullbright extends JavaPlugin implements Listener {

    @Override
    public void onEnable() {
        // Plugin startup logic
        System.out.println("test");
        getServer().getPluginManager().registerEvents(new Argonfullbright(), this);
    }

    @Override
    public void onDisable() {
        // Plugin shutdown logic
    }
    @EventHandler
    public void onPlayerJoin(PlayerJoinEvent event) {
        Player p = event.getPlayer();
        p.addPotionEffect(new PotionEffect(PotionEffectType.NIGHT_VISION, 999, 255, false, false));
    }
}
#

no

#

sorry im a noob at coding

lost matrix
#

new Argonfullbright() <- This

#

You cant do that

sage swift
#

ye

#

just put (this, this) since that class is already listener and java plugin

dawn hazel
#

ok

#

alright now hopefully i can get this to work

hollow river
#

Hey so ive been struggling with this for some while now, when i spawn an entity i sometimes have a spider, zombie etc and want to be able to set the zombie to be a baby when the spawned entity is a zombie entitytype

#

Sorry idk how yo explain it very well btw, open for any questions of course

worldly ingot
#
Entity entity = // spawn the entity with spawnEntity() or spawn()
if (entity instanceof Ageable) {
    ((Ageable) entity).setBaby();
}```
hollow river
#

Oh its that easy???

worldly ingot
#

Ye

#

Just make sure you're importing org.bukkit.entity.Ageable, not the block one

hollow river
#

Nice nice thanks! Ill try when ill be able to

#

Will do! This will solve a lot of issues, basically making a system where i create mobs in a big list so i can do a custom spawn(mobs.farmerzombie) or spawn(mobs.forestspider) so that's why i needed that!

worldly ingot
#

Yeah that will cover anything that can be a baby. Pigs, sheep, cows, etc.. and in your case, zombies

hollow river
#

And the farmerzombie could be a baby but in the case of a spider i wouldnt be able to access setBaby of course, thanks a lot for that one! Was the last piece to the puzzle

worldly ingot
drowsy helm
#
    @EventHandler
    public void onVoid(PlayerMoveEvent event) {
        if(event.getPlayer().getLocation().getY() > 0) return;

        event.getPlayer().teleport(event.getPlayer().getWorld().getSpawnLocation().clone().add(0, 1, 0));
        event.getPlayer().setVelocity(new Vector(0, 0,0));
    }``` Any reason why this still kills the player one they are teleported?
#

trying to stop fall damage

lost matrix
#

Set the falling ticks to 0

drowsy helm
#

sweet thanks

worldly ingot
#

The clone() on the spawn location isn't necessary btw. It returns a copy every time

young knoll
#

Is that meant to be a < 0?

worldly ingot
#

No. Wants to tp them if they fall into the void

young knoll
#

Oh it’s a return

#

My bad

drowsy helm
#

i just clone stuff out of habit

#

yeah when they fall in

#

should probs make player a variable aswell

#

nasty coding 101

worldly ingot
#

Yeah, you might also want to use event.getTo() instead of player.getLocation() there

#

Just to be safe PES_SadShrug

lost matrix
#

But make sure that the Location by getTo() isnt null then

worldly ingot
#

I don't think it can ever be

young knoll
#

Isn’t it non null

drowsy helm
#

difference isn't by a huge margin is it

#

its 1 ticks difference right

worldly ingot
#

No, it's nullable because it either inherits from PortalCreateEvent or the other way around

#

and it can be null

#

It's a weird cyclic dependency thing

young knoll
#

Interesting

worldly ingot
#

PlayerTeleportEvent*, sorry

young knoll
#

Inconsistent with getFrom, which is a bit awkward

drowsy helm
#

is there any reason why most PlayerEvents use event.getPlayer but PlayerDeathEvent is event.getEntity()

#

just bugs me lmao

#

ah wait

#

extends EntityDeathEvent

worldly ingot
#

Ye

drowsy helm
#

doesnt it

young knoll
#

Spigwkward

worldly ingot
#

tbh I feel like defining a getPlayer() there would make sense lol

#

Even if it just delegates to getEntity()

young knoll
#

HumanEntity

#

Still no idea when a click event can return a human entity, or what a human entity even is

worldly ingot
#

Just any human-like entity

#

At one point in time, human entities did exist

#

Players just so happen to also be human entities

drowsy helm
#

EvolutionManager makes HumanEntity

young knoll
#

I mean there were a bunch of human mobs

#

But that was way back in classic

drowsy helm
#

that frog girl

#

and the other one?

worldly ingot
#

Ye, though at this point it's to stay in line with NMS

young knoll
#

There was a Steve and a Black Steve

worldly ingot
#

NMS still abstracts out human entities

young knoll
#

Does NMS use them for that packet

worldly ingot
#

"that packet" narrows it down to like... 130 packets my guy lol

young knoll
#

Inventory click

worldly ingot
#

afaik yes

drowsy helm
#

a have to make an invitation system that works over multiple servers, really dont want to code rn lmao

crisp iron
#

!git

#

!paste

#

?paste

queen dragonBOT
crisp iron
dusty herald
#

You need to set the result as the replacement

#

result = result.replace

drowsy helm
#

Say I have an event using PalyerTeleportEvent, if i check event.getFrom().getWorld().getPlayers(), would the size be 0 or 1?

#

assuming the player was only one in world

dense kestrel
#

I would assume it would be 1

#

as you can cancel the event, which would mean while you are handling the event they would still be there

drowsy helm
#

ah right

dense kestrel
#

i could be wrong though, test it

drowsy helm
#

yeah ill test it rn

dense kestrel
#

kk

bold parcel
#

is there some way to get the slime the slime split off of in the CreatureSpawnEvent? (when the spawnreason is SLIME_SPLIT)

#

or a way to get the slime entities a slime split into from the SlimeSplitEvent?

quaint mantle
lost matrix
weak adder
#
    @EventHandler
    public void onEntityDamageEntity(EntityDeathEvent event) {
        if(event.getEntityType() == EntityType.COW);

        Cow cow =(Cow) event.getEntity();
        cow.setInvulnerable(true);```

So Im trying to make cows invincible
lost matrix
quaint mantle
#

wdym?

lost matrix
weak adder
bold parcel
lost matrix
quaint mantle
#

yes i do

bold parcel
#

welp sad times, thanks for helping either way

lost matrix
# quaint mantle yes i do

Then change the artifact id for spigot-api to spigot and make sure that you ran BuildTools for your version at least once so it can install
spigot into your local maven repository.

quaint mantle
#

okay

#

got this error

lost matrix
# quaint mantle

Did you run BuildTools on your pc with --rev 1.12.2 as i just told you?

quaint mantle
#

oh no

#

i thought i do this first and then this

weak adder
#
    @EventHandler
    public void onEntityDamageEntity(EntityDamageEvent event) {

        if(event.getEntityType() == EntityType.COW) {
            
            event.setCancelled(true);```
So Here Im trying to do is when a player hurts a cow it sends a message to the player to not kill the cow
#

so how do it detect that a player is killing the cow

quaint mantle
#

e.getDamager() i think

#

then just check if its player too

weak adder
#

alrigth

#

ty

quaint mantle
odd gulch
#

Works fine for me

languid geode
#

Now it works idk

#

it had a small outage

lost matrix
quaint mantle
#

okay

#

now this

#

and i have these javas downloaded

lost matrix
#

I think you can figure that one out. Just run the jar with an older version

quaint mantle
#

like go to the directory?

#

oh nice works

lost matrix
#

So instead of java -jar BuildTools.jar you use the full path to your java binary. So "C:\Program Files\Java\jdk1.8.0_271\bin\java" -jar BuildTools.jar or whatever

quaint mantle
#

yeha done

#

but how does that help with the maven or how do i put in there

lost matrix
#

This just installs the spigot sources into your local maven repository because its illegal to publicly distribute the code (Mojang eula)
This way maven can resolve the dependency in your projects. Maven only looks in your local repo if the src is not accessible from the web.

quaint mantle
#

oh okay so its just like only on my computer ig

#

and i just import it with this?
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot</artifactId>
<version>1.12.2-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>

lost matrix
#

yes

quaint mantle
#

okay

#

thank you sm

quaint mantle
severe zenith
#

BungeeCord

    @Override
    public void onEnable() {
        ProxyServer.getInstance().registerChannel("firstbungee:mychannel");
        registerCommands();
    }
    @Override
    public void execute(CommandSender sender, String[] args) {
        if (!(sender instanceof ProxiedPlayer)) {
            sender.sendMessage("Dieser Befehl kann nur von Spielern ausgeführt werden.");
            return;
        }
        ProxiedPlayer player = (ProxiedPlayer) sender;
        Setting setting = settings.getOrDefault(player.getName(), new Setting());

        ProxyServer.getInstance().broadcast("Nachricht gesendet");
        player.getServer().getInfo().sendData("my:channel", setting.getArrayOutput("Settings"));
    }

Spigot

public final class Bungeesystem extends JavaPlugin implements PluginMessageListener {

    @Override
    public void onPluginMessageReceived(String channel, Player player, byte[] message) {
        Bukkit.broadcastMessage("PluginMessageRecieved in channel " + channel + player.getName());
        if (!channel.equals("my:channel")) {
            return;
        }
        ByteArrayDataInput in = ByteStreams.newDataInput(message);
        String subchannel = in.readUTF();
        if (subchannel.equals("Settings")) {
            PluginMessageHandler.settingsMessage(player, in);
        }
    }
}

Is there a mistake in it? I don't recieve the message in the Spigot Plugin.

quaint mantle
#

show the onenable method

#

in spigot

severe zenith
#

empty

eternal oxide
#

register yoru spigot listener

severe zenith
#

yes, if forgot it, thanks

quaint mantle
#

yeah

hazy rock
#

Okay so my retarded ass deleted an entire intellij workspace somehow and since i didnt have it on github i cant retrieve the src

luckily, i had the jar file, so i was able to retrieve the .class files thru recaf. However, .class files cant be edited through intellij.

Since I dont want to have to use recaf to continue on my project is there any way to get all the class files from recaf into .java files in intellij? any help at all will be appreciated.

quaint mantle
#

just download luyten then export it and import it into intellij

quiet ice
#

Try fernflower, Procyon, CFR and other decompilers and do a patchwork thing of the different classes so it compiles correctly

quaint mantle
#

decompiler

quiet ice
#

Luyten isn't really mainstream so I cannot comment on whether it works

quaint mantle
#

for me it does work done

hazy rock
#

dumb question ik

quaint mantle
#

yes

hazy rock
#

oh ok

quaint mantle
#

thats what decompilers do

hazy rock
#

thanks

#

so recaf isnt a ecompiler?

quiet ice
#

however there is a high chance of decompile errors

hazy rock
#

fuck ive been lied to

quiet ice
#

Recaf is a bytecode viewer

#

It has multiple decompilers built in as well as an (dis-)assembler

hazy rock
#

welp anyway time to download a two year-old .exe from github

quiet ice
#

Try compiling forgeflower and using it

#

It is meant to be recompilable, so chances are that it will work for you without too much issues

hazy rock
#

wait um

#

how do i use luyten

quaint mantle
#

just watch a youtube or just google

hazy rock
#

(sorry im a dumbass that has never used a decompiler before)

quaint mantle
#
  1. open luyten
#
  1. import the jar by dragging it in or just do ctrl+o
#
  1. do file and do save all
hazy rock
#

ah ok

#

thanks

quaint mantle
#

then it will decompile to .zip

hazy rock
#

kk

floral kindle
distant fern
#

I have a question. How to disable commands for player.

Cancelling AsyncPlayerChatEvent doesnt work

any help?

quiet ice
#

CommandPreprocess event or similar

dense kestrel
#

^

distant fern
#

thx

drowsy helm
#

How would you guys approach synchronization of data between servers? I can't keep a local cache because the data is always subject to change

#

I feel my only real option is to just query the database directly

drowsy helm
#

yeah I have redis, but only really use it for pubsub

#

and I would rather keep all my persistent data on mongo

quaint mantle
#

then keep it on mongo?

#

thats the way i sync things

drowsy helm
#

if you scale that up to query every time you need data, with 500 players that is probably 2000+ requests a second

#

it's not efficient

quaint mantle
#

oh okay

drowsy helm
#

I'm thinking use redis purely to query and cache

#

then have my manager download from the cache and save it

#

but that mean's I'll have to cache all ids and when they are used

ivory sleet
#

Have something like this

Local Cache (In Bungee/every Spigot instance) <-> In Memory Cache (Redis) <-> Persistent Storage (Mongo)
Then use
Redis pub/sub as a messaging service to push essential updates I guess

drowsy helm
#

hmm yeah I was thinking something like that

#

seems like redis only really supports basic data types

#

I've found this issue is called an "EAI" issue.

#

Maybe i can try BSON with redis

ivory sleet
#

serialization 🙂

drowsy helm
#

yeah I'll just use BSON or Gson or something

#

or maybe good ol' Base64

ivory sleet
#

yeah just use smtng like gson I guess

quaint mantle
lost matrix
#

} catch (NullPointerException ex) {ex.printStackTrace();} Pls dont do that.

quaint mantle
#

okay

lost matrix
drowsy helm
#

debug for (String newMenuFileNameList : menuFile.list()) {

#

and see the output

quaint mantle
#

[AstreansLobbySystem] build.yml

[13:25:52 INFO]: [AstreansLobbySystem] build.yml

[13:25:52 INFO]: [AstreansLobbySystem] buy.yml

[13:25:52 INFO]: [AstreansLobbySystem] buy.yml

[13:25:52 INFO]: [AstreansLobbySystem] buygems.yml

[13:25:52 INFO]: [AstreansLobbySystem] buygems.yml

[13:25:52 INFO]: [AstreansLobbySystem] eshop.yml

[13:25:52 INFO]: [AstreansLobbySystem] eshop.yml

[13:25:52 INFO]: [AstreansLobbySystem] 1

[13:25:52 INFO]: [AstreansLobbySystem] 2

[13:25:52 INFO]: [AstreansLobbySystem] exampleMenu.yml

[13:25:52 INFO]: [AstreansLobbySystem] exampleMenu.yml

[13:25:52 INFO]: [AstreansLobbySystem] gameselector.yml

[13:25:52 INFO]: [AstreansLobbySystem] gameselector.yml

[13:25:52 INFO]: [AstreansLobbySystem] profile.yml

[13:25:52 INFO]: [AstreansLobbySystem] profile.yml

#

these are the outputs

drowsy helm
#

thats before and other code?

quaint mantle
drowsy helm
#

you're probs getting and NPE

lost matrix
#

This is the correct way of accessing folder paths.
File menuFile = new File(instance.getDataFolder() + File.separator + "menu");

quaint mantle
#

yes i am

drowsy helm
#

wait no you're printing nvm

#

well your files named S

#

are last

#

so before you reach those, you are getting an npe

quaint mantle
#

wait lemme try export it

#

NPE

drowsy helm
#

why not have your catch npe inside your loop

#

then it wont stop each time you get one

#

then you can handle it from there

quaint mantle
#

idk

eternal oxide
#

Always test for a null when its possible. Allowing an exception to throw is a heavy load

quaint mantle
#

okay i updated the code at 29 to add npe and it returns only this "[13:31:39 WARN]: java.lang.NullPointerException"

lost matrix
quaint mantle
#

okay

#

done

lost matrix
#

perfect

quaint mantle
#

okay how do i fix that

lost matrix
#

Post the full stack trace

quaint mantle
#

full stack trace is?

eternal oxide
#

There is more after that

drowsy helm
#

the full error

quaint mantle
#

this is all

#

nothing after the npe

lost matrix
#

Do you catch the NPE somewhere else?

quaint mantle
#

no

lost matrix
#

Mind showing your Listener class?

#

Ah nvm

quaint mantle
#

xd

#

the newMenuFileName is null

#

ig

#

bcz when i try debug i get only there the npe

drowsy helm
#

File#list() wont give you a null name

eternal oxide
#

newMenuFileName can;t be null as its initialized

quaint mantle
#

yeah thats weird but when i hided it didnt give me null

eternal oxide
#

It is empty though

drowsy helm
#

what line is throwing the npe

#

it will say in your trace

quaint mantle
#

theres nothing

#

only this

eternal oxide
#

before line 9 you shoudl be checking if menufile isDirectory()

quaint mantle
#

okay ill ad it

#

added

#

the tempconfig is null

drowsy helm
#

still no s files lol

quaint mantle
#

now yes i changed name

drowsy helm
#

of the files?

quaint mantle
#

it debugs the an s files but how do i fix the npe

#

yes

drowsy helm
#

ah right

#

weird that teh trace doesnt give line

quaint mantle
#

yeah

drowsy helm
#

menuConfig is probably null

#

and check is newMenuFile.exists()

quaint mantle
#

its tempConfig thats null

#

this code is weird

#

now it doesnt give me npe in the tempconfig

drowsy helm
#

what is tempconfig

#

looks like an external variable

quaint mantle
#

just a temporary fileconfiguration for checking something

drowsy helm
#

i mean if tempConfig isn't null for the first n iterations

#

why would it be null at the end

quaint mantle
#

yeah idk

#

okay ig fixed ? i dont get npe now

lost matrix
# quaint mantle yeah idk
  @EventHandler
  public void openMenuByCustomCommand(final PlayerCommandPreprocessEvent event) {
    final Player player = event.getPlayer();

    final File menuFolder = new File(instance.getDataFolder() + File.separator + "menu");

    for (final File menuFile : menuFolder.listFiles()) {
      String menuFileName = menuFile.getName();
      try {
        FileConfiguration menuConfig = YamlConfiguration.loadConfiguration(menuFile);
        
        if (event.getMessage().replaceFirst("/", "").equals(instance.color(menuConfig.getString("menu.openCommand")))) {
          if (menuConfig.getBoolean("menu.useOpenCommand")) {
            instance.getMenuHandler().openMenu(player, menuFileName.replace(".yml", ""));
            event.setCancelled(true);
          }
        }
      } catch (final IOException | InvalidConfigurationException ex) {
        ex.printStackTrace();
      }
    }

  }

Btw you are def trashing the servers performance with this listener. Each time someone executes a command
you are loading a ton of files from the disk. Reading and writing to a disk blocks a CPU really hard.

drowsy helm
#

^

#

should cache

eternal oxide
#

instead of concat to get your paths you should usejava tempConfig.load(new File(menuFile, newMenuFileNameList));

quaint mantle
#

okay

lost matrix
#

File menuFile = new File(instance.getDataFolder(), "menu"); <- I think this will always be a non directory file.

eternal oxide
#

Yeah, sorry I ment for teh second one. as it IS a file not a folder

drowsy helm
lost matrix
rapid vigil
#

Hey, everytime I try to build my plugin using Maven it gives me 4 errors, while I didn't do anything wrong..

quaint mantle
#

basically the same

rapid vigil
#

I'm copying

#

3 of them :

package net.minecraft.server.v1_11_R1 does not exist

#

And the fourth one is :

package org.bukkit.craftbukkit.v1_11_R1.entity does not exist

drowsy helm
#

show your pom.xml

lost matrix
# rapid vigil I'm copying

You need spigot on your classpath.
Replace the artifact id spigot-api with just spigot
Also make sure to run BuildTools once for 1.11 on your local machine

rapid vigil
#

I tried using org.spigotmc, and spigot-api

drowsy helm
#

just use spigot

rapid vigil
#

But then 13 errors..

drowsy helm
#

not spigot-api

quaint mantle
#

try spigot and use buildtools

drowsy helm
#

spigot includes nms and cb

rapid vigil
#

Spigot plugins works on Paper servers right?

daring sierra
#

yes

rapid vigil
# drowsy helm just use spigot

Do you mean <dependencies> <dependency> <groupId>org.spigotmc</groupId> <artifactId>spigot-api</artifactId> <version>1.12.2-R0.1-SNAPSHOT</version> <scope>provided</scope> </dependency> </dependencies>?

quaint mantle
#

no

#

use artifactID spigot

rapid vigil
#

It gives me an error

#

And doesn't find spigot

drowsy helm
#

hav eyou ran build tools

quaint mantle
#

you have to use buildtools

#

to creat eit

lost matrix
drowsy helm
#

?bt

queen dragonBOT
rapid vigil
#

BuildTools into my build bath?

#

Oh..

drowsy helm
#

its a jar you have to run, just adds maven dependencies

rapid vigil
quaint mantle
#

just read the wiki

#

or watch tutorial on buildtools

#

you need to have java 8-10

rapid vigil
#

As I can see my java is 1.8.0

quaint mantle
#

nice

rapid vigil
#

Is it the latest version?

quaint mantle
#

then install the git bash and then do it inside of it

#

nah latest is 16

#

but dont worry

#

as i said u need to have 8 or 9 or 10

rapid vigil
#

I installed the BuildTools jar

quaint mantle
#

ok

#

do you have git bash?

rapid vigil
#

What is that lol..

quaint mantle
#

google it

drowsy helm
#

git cli

rapid vigil
#

I am not sure I have it

lost matrix
#

You dont need git. It installs portable git anyways

drowsy helm
#

yeah, pretty sure it can be run standalone

rapid vigil
#

When I go to Start and search for Git Bash doesn't find anything

lost matrix
queen dragonBOT
lost matrix
#

?bt

rapid vigil
#

Using BuildTools is not uploading it to your Build Path right?

drowsy helm
#

no, it adds it to your m2

rapid vigil
#

Should I download Git Bash?

drowsy helm
#

no, It's not necessary

rapid vigil
#

BuildTools is a way to build your plugin right?

eternal oxide
#

no

drowsy helm
#

no

rapid vigil
#

Bruh

#

What is it

drowsy helm
#

its for spigot dependencies

eternal oxide
#

it builds Spigot

rapid vigil
#

Yeah but how do you use it..

drowsy helm
#

it says on the wiki

rapid vigil
#

I know, but there's multiple 1: 1: 1:

drowsy helm
#

wot

novel hornet
#

hey

#

is there a way to make mobs move and fly in a straight line

rapid vigil
#

Which is better to code in paper-api or spigot-api?

quaint mantle
#

in 'spigot' bcz api doesnt contain things 'spigot' has

rapid vigil
#

Such as what?

eternal oxide
#

That wasn;t his question

rapid vigil
#

I code in paper-api since the server is on Paper

eternal oxide
#

In spigot you reach a wider audience as its the core. In paper you are limited to 40% of the servers.

rapid vigil
#

Yeah but, why there is paper-api then?

#

Why It's not only spigot-api

eternal oxide
#

Because thats the nature of open source

rapid vigil
#

Oh okay

#

Yeah but, when I use paper-api there is 4 errors, and spigot-api there is 13 errors

eternal oxide
#

Write better code

rapid vigil
#

Wdym

eternal oxide
#

There shoudl be zero errors

rapid vigil
#

I am using NMS

#

And it says : package net.minecraft.server.v1_11_R1 does not exist

eternal oxide
#

there should still be zero errors

rapid vigil
#

I know, when I try to build using Maven it gives me this errors

#

But when I build artifacts there's no errors

eternal oxide
#

because to use nms you have to use spigot not spigot-api and you have to run buildtools for the version you want to use.

rapid vigil
#

Ohh

#

You can't use NMS with paper-api or spigot-api?

eternal oxide
#

no, the api has no nms

rapid vigil
#

So why when I artifact build it works?

eternal oxide
#

run buildtools and use spigot instead of spigot-api in your pom

rapid vigil
#

Thanks for the tip, I'll do it

eternal oxide
#

If you are using maven you shoudl not be building with artifacts

rapid vigil
#

I build with artifacts since it automaticly put the plugin into my plugins folder

mortal hare
#

anyone's good with netty?

eternal oxide
#

you shoudl be building using the lifecycles in the maven tab (right hand side)

rapid vigil
#

Is it better than the artifacts?

eternal oxide
#

no

#

yes

#

Don't use artifacts

mortal hare
#

it allows flexibility in plugin deployment

#

for example you can "shade" classes

rapid vigil
#

Ah

mortal hare
#

how can i discard through netty sent server packet?

rapid vigil
#

Does every Developer that uses NMS needs the BuildTools?

wispy monolith
#

How to send a message to all the players on the server?

rapid vigil
#

Bukkit.broadcastMessage("Message Here");

wispy monolith
mortal hare
#

i don't, but its better to use it, if you need to only compile the plugin with NMS i'd rather grab paperclip, run it until it patched the jar

#

and install cached patched jar in local maven repo

#

i've haven't touched raw spigot in ages

#

so idk what spigot uses

rapid vigil
#

I am trying to run buildtools, but whenever I type : java -jar BuildTools.jar --rev 1.11

#

It says :

Loading BuildTools version: git-BuildTools-36c11e9-126 (#126)
Java Version: Java 16
Current Path: C:\Users\ahmad\OneDrive\Desktop\a.
Please do not run BuildTools in a Dropbox, OneDrive, or similar. You can always copy the completed jars there later.

#

Is it loading?

cinder thistle
#

should run latest spigot

rapid vigil
#

Wdym

#

Do I need a spigot jar in the file or something?

cinder thistle
#

no I mean you should use latest spigot

dusty herald
#

Please do not run BuildTools in a Dropbox, Onedrive, or similar

cinder thistle
#

you dont have to but you should

peak zealot
#

Poreyy dont run the buildtool in a onedrive folder

rapid vigil
#

Oh

dusty herald
#

BuildTools refuses to run in a OneDrive folder, try moving it someplace else

wispy monolith
#

How can I make it so it swaps inventories of players

ivory sleet
#

use gradle

#

😄

rapid vigil
#

I am running it in the downloads folder xD

cinder thistle
rapid vigil
#

No

wispy monolith
rapid vigil
#

It's building

cinder thistle
rapid vigil
#

Looks like It didn't work

#
Found version
{
        "name": "1110",
        "description": "Jenkins build 1110",
        "refs": {
                "BuildData": "77931c01e72ff84c004a310b121a72b52f0efdd5",
                "Bukkit": "55fa63e8b9c8f5f315f3d631fad2096a008074df",
                "CraftBukkit": "c8ff65136f23a3c2770b8d9ca508f61927f8acba",
                "Spigot": "6f7aabf0f73188de2433ec4570412235772f8fba"
        },
        "toolsVersion": 47
}

*** The version you have requested to build requires Java versions between [Java 7, Java 8], but you are using Java 16
*** Please rerun BuildTools using an appropriate Java version. For obvious reasons outdated MC versions do not support Java versions that did not exist at their release.``` That means it didn't work right?
peak zealot
#

You have java 16 but u need java 7-8

rapid vigil
#

JDK 16 or JDR?

proper notch
#

da hell is jdr lol

wispy monolith
peak zealot
rapid vigil
#

Alright should I remove my java and install a 8 one?

wispy monolith
proper notch
#

you can switch your java version in your environment variables normally.

wispy monolith
#

ig

rapid vigil
#

How?

wispy monolith
#

install the normal JRE

#

and get it's path

rapid vigil
#

I mean give me the command

wispy monolith
#

<JRE path> <Ur command>

rapid vigil
#

I'll just remove the JRE

#

And install it again the 8 one

wispy monolith
#

@rapid vigil
example:
"C:\Program Files\Java\jre1.8.0\bin\java.exe" -jar example.jar

dusty herald
#

kekwhyper 1.8.0

wispy monolith
dusty herald
#

1.8.0 is far from the latest java release

#

so far from it

rapid vigil
#

Here's where I install it right?

peak zealot
#

yes

wispy monolith
rapid vigil
#

I need the 8

wispy monolith
#

which is 8

rapid vigil
#

Okay

wispy monolith
#

see

wispy monolith
rapid vigil
#

Downloaded..

#

But still when I do 'java -version' it says that I have the 16 one

wispy monolith
#

did u install java 8?

rapid vigil
#

Yes

wispy monolith
rapid vigil
#

When I go to apps and search for java

#

jre 1.8.0

and

jdk 16

ivory sleet
#

jdk 16 includes bin tho

#

hence why no jre 16 is a thing I guess

rapid vigil
#

When I try to run the buildtools :

wispy monolith
#

and then open the jre folder

rapid vigil
#

$ java -jar BuildTools.jar --rev 1.11
Loading BuildTools version: git-BuildTools-36c11e9-126 (#126)
Java Version: Java 16
Current Path: C:\Users***\Downloads.
git version 2.31.1.windows.1
BuildTools
unconfigured@null.spigotmc.org
Attempting to build version: '1.11' use --rev <version> to override
Found version
{
"name": "1110",
"description": "Jenkins build 1110",
"refs": {
"BuildData": "77931c01e72ff84c004a310b121a72b52f0efdd5",
"Bukkit": "55fa63e8b9c8f5f315f3d631fad2096a008074df",
"CraftBukkit": "c8ff65136f23a3c2770b8d9ca508f61927f8acba",
"Spigot": "6f7aabf0f73188de2433ec4570412235772f8fba"
},
"toolsVersion": 47
}

*** The version you have requested to build requires Java versions between [Java 7, Java 8], but you are using Java 16
*** Please rerun BuildTools using an appropriate Java version. For obvious reasons outdated MC versions do not support Java versions that did not exist at their release.

severe zenith
#

how to get the spaces between the arguments when a command is entered?

rapid vigil
wispy monolith
ivory sleet
#

Poreyy you could install jre 8 as hesham says and then change the system environment variables to target 8

rapid vigil
#

Opened bin

wispy monolith
rapid vigil
#

Done

#

It installed java.exe

#

I mean downloaded

wispy monolith
#

did u click the java.exe once?

quiet ice
#

Are you installing Java 8 right now?

rapid vigil
#

Yes

rapid vigil
wispy monolith
quiet ice
#

I hope not

#

https://adoptopenjdk.net/ get Java 16 instead

AdoptOpenJDK provides prebuilt OpenJDK binaries from a fully open source set of build scripts and infrastructure. Supported platforms include Linux, macOS, Windows, ARM, Solaris, and AIX.

rapid vigil
#

When I try to run buildtools It needs java 8

#

JDK is 16

wispy monolith
wispy monolith
quiet ice
#

It's installer is 200x better than Oracle Java, so even for Java 8 it's nicer

eternal oxide
#

can you not just use --release 8

wispy monolith
eternal oxide
#

I guess n ot. I just tried it

rapid vigil
wispy monolith
#

now go run ur command that runs BuildTools

#

but replace java at the start of the command with the path that u copied

#

@rapid vigil

rapid vigil
#

I am not sure if it worked

wispy monolith
#

give me ur path

rapid vigil
#

It created 8 folders

wispy monolith
rapid vigil
#

But I can't use NMS anymore..

#

It's running, I can not use spigot?

#

Instead of spigot-api

wispy monolith
#

if this is ur command
java -jar BuildTools.jar --rev 1.11
u must do like this
"<path u copied>" -jar BuildTools.jar --rev 1.11

wispy monolith
rapid vigil
#

Why..

#

Can you come SS

wispy monolith
#

spigot is the server client

wispy monolith
rapid vigil
#

Just nvm

#

That all didn't help

wispy monolith
#

spigot api is the coding api

quiet ice
#

there is no such thing as a server client

wispy monolith
#

and the plugins api

rapid vigil
#

I am using java -jar BuildTools.jar --rev 1.11

wispy monolith
long portal
#

How can i make this:

If the player types "/reset" the overworld,nether and the end is getting deleted and a new overworld, nether and end is getting new created

quiet ice
#

Spigot (the artifact) is spigot-api + NMS

rapid vigil
#
        "name": "1110",
        "description": "Jenkins build 1110",
        "refs": {
                "BuildData": "77931c01e72ff84c004a310b121a72b52f0efdd5",
                "Bukkit": "55fa63e8b9c8f5f315f3d631fad2096a008074df",
                "CraftBukkit": "c8ff65136f23a3c2770b8d9ca508f61927f8acba",
                "Spigot": "6f7aabf0f73188de2433ec4570412235772f8fba"
        },
        "toolsVersion": 47
}

*** The version you have requested to build requires Java versions between [Java 7, Java 8], but you are using Java 16
*** Please rerun BuildTools using an appropriate Java version. For obvious reasons outdated MC versions do not support Java versions that did not exist at their release.
#

Basically this..

quiet ice
#

Ugh, ancient mc releases, wtf are you doing

#

I will honor a move where Mojang updates Minecraft to Java 15 and basically kills the entire ecosystem that lives until 1.12

wispy monolith
long portal
#

How can i make this:

If the player enters "/reset", the world is completely reset. A whole new overworld, nether and a new end is created

dusty herald
long portal
#

i mean in IntelliJ

quiet ice
#

Just use processbuilders to invoke that command

long portal
#

If the player enters "/reset"

dusty herald
#

like what would happen if the entire fucking world got thanos snapped while they're still in it?

rapid vigil
#

How can people use Eclipse while there's no pom though

quiet ice
#

Nothing

long portal
long portal
quiet ice
#

Just delete the world on shutdown

wispy monolith
quiet ice
#

Or perhaps disable auto-save?

wispy monolith
#

if server is off plugin is not on

dusty herald
#

so:

User executes the command /reset
All users are kicked from the server to prevent issues
Blacklists any further connections until server restart
Remove all world data
Restart the server```
long portal
#

Its clarified

wispy monolith
quiet ice
#

Does it per default

#

Paper saves the world every tick, not entirely sure how it works on Spigot

peak zealot
#

Does any1 know how i can give vanilla mobs a custom name when they spawning? i tried it with CreatureSpawnEvent and then set the Custom name but it didnt worked

quiet ice
#

You mean the nametag name, right?

peak zealot
#

yes

wispy monolith
wispy monolith
peak zealot
mortal hare
#

that way they could spawn in wilderness

hushed crescent
peak zealot
# wispy monolith did u make setCustomNameVisable(true);

public class MobHealth implements Listener {

public void onSpawn(CreatureSpawnEvent e) {

        if(e.getEntityType() == EntityType.WITHER) {
            e.getEntity().setCustomName("§c" + e.getEntity().getHealth() + "❤");
            e.getEntity().setCustomNameVisible(true);
        } else {
            e.getEntity().setMaxHealth(100);
            e.getEntity().setHealth(100);
            e.getEntity().setCustomName("§8[§7Lv?§8] §c" + e.getEntity() + " §a" + e.getEntity().getHealth() + "§7/§a" + e.getEntity().getMaxHealth() + "§c❤");
        e.getEntity().setCustomNameVisible(true);
    }
}

}

#

my code

#

i tried

hushed crescent
#

So I cannot use EssentialsX in spigot?

quiet ice
#

Then ask EssX, this is spigot

hushed crescent
#

alright, sorry

quiet ice
#

Though it is strange that is happens

#

But not the fault of spigot since paperlib was never provided at spigot

chrome beacon
#

Not strange they just forgot to add the repo to the POM

quiet ice
#

Well, it still takes quite a lot of effort to not spot this error

hushed crescent
#

?paste

#

ugh

#

@eternal oxide What is it again

#

nvm

#

checked search history

eternal oxide
#

you can only access the bot if your account is registered

plain quest
#

i'm trying to set a texture pack to a player with the player#setResourcepack() method BUT the client fails to download the pack

#

the link i'm using is for sure direct

#

and i'm listening to the PlayerResourcePackStatusEvent to determine whether the pack is downloaded or not

#

i have tried with more than 5 different hosts but none of them seems to be working

cinder thistle
#

make sure it's the direct download link

#

as in, you go to that link and the file downloads

#

none of this redirect stuff

plain quest
#

it is i checked it

#

give it a try ur self

#

i also read that minecraft is using http protocol instead of https so do i need a provider without encryption?

#

google drive uses https and so does dropbox

#

but i don't really know if that's the case

long portal
#

problem

#

so

#

im using paper

#

and i wanna get BuildTools

#

but how

#

i use paper but every tutorial is using spigot

eternal oxide
#

This is spogot support, not paper

long portal
#

okay..

#

im using an IntelliJ Plugin named "Minecraft Development" i selected "Paper" how can i change it to "Spigot"

#

?

mortal hare
#

Paperspigot is very similiar to Spigot in terms of API

#

its backwards compatible to spigot

#

don't worry

#

PaperSpigot is Spigot but on steroids

long portal
#

lmao