#help-development

1 messages ยท Page 1388 of 1

cold field
#

Ah ok

#

thanks

eternal night
#

dunno what you'd ever need that for tho o.O

#

not much merit in modifying those imo

cold field
#

I'm look at the source of a plugin. He created a DataWatcherObject with id 17 and then he has modified the DataWatcher.Item associated

hushed crescent
#

I am trying to make my scoreboard show, yet it wont.

eternal night
#

Interesting. You would probably have to trace back what DataWatcherObject is associated with id 17

#

tho that is a pain to begin with

hushed crescent
#
class SaplingScoreboard {
    public static void createBoard() {
        ScoreboardManager manager = Bukkit.getScoreboardManager();
        org.bukkit.scoreboard.Scoreboard board = manager.getNewScoreboard();
        Objective obj = board.registerNewObjective("Saplings", "", "Saplings Placed");
        obj.setDisplaySlot(DisplaySlot.SIDEBAR);
    }
}```
#

Then, I call it inside of the main file

#

new SaplingScoreboard().createBoard();

eternal night
#

As it isn't the main scoreboard you need to actively set it on each player that should receive it

hushed crescent
#

How can I set it to everyone?

sharp bough
#

any idea why this isint working?

crude charm
#

ERROR:

[00:08:01 WARN]: [Hub] Task #20 for Hub v1.0-SNAPSHOT generated an exception
java.lang.NullPointerException
        at me.zoibox.hub.hub.scoreboard.ScoreboardHandler$1.run(ScoreboardHandler.java:68) ~[?:?]
        at org.bukkit.craftbukkit.v1_8_R3.scheduler.CraftTask.run(CraftTask.java:71) ~[spigot.jar:git-Spigot-db6de12-18fbb24]
        at org.bukkit.craftbukkit.v1_8_R3.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:350) [spigot.jar:git-Spigot-db6de12-18fbb24]
        at net.minecraft.server.v1_8_R3.MinecraftServer.B(MinecraftServer.java:723) [spigot.jar:git-Spigot-db6de12-18fbb24]
        at net.minecraft.server.v1_8_R3.DedicatedServer.B(DedicatedServer.java:374) [spigot.jar:git-Spigot-db6de12-18fbb24]
        at net.minecraft.server.v1_8_R3.MinecraftServer.A(MinecraftServer.java:654) [spigot.jar:git-Spigot-db6de12-18fbb24]
        at net.minecraft.server.v1_8_R3.MinecraftServer.run(MinecraftServer.java:557) [spigot.jar:git-Spigot-db6de12-18fbb24]
        at java.base/java.lang.Thread.run(Thread.java:834) [?:?]
>

CODE:

eternal night
#

pretty sure vault api is not at version 1.16.5-R0-SNAPSHOT @sharp bough

chrome beacon
#

^^

sharp bough
#

oh yea

#

that was just me testing

#

its works now sorry

#

it didint work earlier so i tried that

crude charm
#

player.getScoreboard().getTeam("message").setSuffix(playerCount(player));

eternal night
#

maybe because there is no team called message ?

crude charm
#

check the code

eternal night
#

yes ?

#

you create a row

#

that is not a team

#

that is a score

crude charm
eternal night
#

m8

#

what ever your weird af scoreboard framework is

#

a row would, for me at least, indicate a score

#

not a team

crude charm
#
public static class Row {

        @Getter private final ScoreboardUtil scoreboard;
        private Team team;
        @Getter private final int rowInScoreboard;
        @Getter private String message;

        public Row(ScoreboardUtil sb, String message, int row){
            this.scoreboard = sb;
            this.rowInScoreboard = row;
            this.message = message;
        }

        public void setMessage(String message){
            this.message = message;

            if(scoreboard.finished){
                final String[] parts = splitStringWithChatcolorInHalf(message);

                this.team.setPrefix(parts[0]);
                this.team.setSuffix(parts[1]);
            }
        }
#

    public @Nullable Row addRow(String message){
        if(this.finished){
            new NullPointerException("Can not add rows if scoreboard is already finished").printStackTrace();
            return null;
        }

        try{
            final Row row = new Row(this, message, rows.length);

            this.rowCache.add(row);

            return row;
        }catch(Exception e){
            return null;
        }
    }

    public void finish(){
        if(this.finished){
            new NullPointerException("Can not finish if scoreboard is already finished").printStackTrace();
            return;
        }

        this.finished = true;

        for(int i=rowCache.size()-1; i>=0; i--){
            final Row row = rowCache.get(i);

            final Team team = this.bukkitScoreboard.registerNewTeam(name + "." + criterion + "." + (i+1));
            team.addEntry(ChatColor.values()[i] + "");
            this.obj.getScore(ChatColor.values()[i] + "").setScore(rowCache.size()-i);

            row.team = team;
            row.setMessage(row.message);
        }

        this.rows = rowCache.toArray(new Row[rowCache.size()]);
    }

eternal night
#

you write this code yourself ?

crude charm
#

nop

eternal night
#

ah

#

well, you can tell that it registers that team

#

with name + "." + criterion + "." + (i+1)

#

not just name

crude charm
#

*criterion

eternal night
#

Well good luck manually building the team name

toxic mesa
#

So i might be rlly stupid (would not be the first time)
But I have this code

    private final BungeeMain plugin;
    public MySQL(BungeeMain main) {
        this.plugin = main;
    }

And when using plugin I get the error that it hasnt been initialised (plugin)
So okay, just initialise it, but doing that i get an error that the class has already been initialised.
And ive used that code before and thats working fine, idk if im just that stupid or if its smth with bungeecord or whatever, but im rlly confused

minor garnet
#

@crude charm what is your ide ?

crude charm
#

intelliJ

minor garnet
#

ah ok

crude charm
#

nvm

#

its main

#

im dumb

eternal oxide
toxic mesa
#

using an instance

eternal night
#

are you doing something like new MySQL(new BungeeMain())

crude charm
#

trying to get main I think

toxic mesa
ivory sleet
#

not abuse

toxic mesa
eternal night
#

ah rip

crude charm
crude charm
#

you dont know

#

what ur main class is

#

...

#

OMG

eternal night
#

what are you talking about mate xD

crude charm
#

I HAVE 2 BRAIN CELLS

#

gdhgdioghdikghbd

toxic mesa
#

im confused

crude charm
#

I read "is this the main class"

#

ill shut up

ivory sleet
#

ftw pretty sure the enable method is called onEnable in bungeecord api

eternal night
#

idk zoi is not having their best day xD

crude charm
#

lmfao

eternal night
#

do you have a stack trace @toxic mesa

civic tapir
#

Hello, Im having some trouble adding in bstats to my plugin as a dependency, Ive followed the instructions and I still cant use methods? am I doing smth wrong?

toxic mesa
eternal oxide
# toxic mesa im confused

Your constructor for SQL is correct, as is your init class in yoru main (if you actually call it. So you are going to have to explain your issue better as your plugin field can;t be uninitialized unless you are calling somethign staticly

cold field
#

Does it exists a website were have been documented the existing datawatcherobjects?

eternal night
cold field
#

Ok, thanks. I will figure out

sharp bough
#

    public void onEnable() {
        //Commands
        this.getCommand("coinflip").setExecutor(new Coinflip());

        //Events
        getServer().getPluginManager().registerEvents(new Coinflip(), this);

        setupEconomy();
        FileManager.InitFiles();
        Coinflip.InitGUI();
    }

    private boolean setupEconomy() {
        if (getServer().getPluginManager().getPlugin("Vault") == null) {
            return false;
        }
        RegisteredServiceProvider<Economy> rsp = getServer().getServicesManager().getRegistration(Economy.class);
        if (rsp == null) {
            return false;
        }
        econ = rsp.getProvider();
        return econ != null;
    }```
did i do something wrong there? cuz when i try to use  
double PlayerMoney = Main.econ.getBalance(p);
i get null
eternal oxide
#

Yes, its not Main, its this.plugin

toxic mesa
# eternal oxide Your constructor for SQL is correct, as is your init class in yoru main (if you ...

Okay, so ive got this in my MySQL class

    private final BungeeMain plugin;
    public MySQL(BungeeMain main) {
        this.plugin = main;
    }

And this in main class

    private MySQL SQL;
    private void init() {
        this.SQL = new MySQL(this);
    } 

calling the init in onEnable of course
So when i use something like this in the MySQL class:

    private String host = plugin.getConfig().getString("host");

I get an error in my IDE "the blank final field plugin may not have been initialized"
And idk why

eternal oxide
#

oh static ๐Ÿ˜ฆ

#

ignore me

eternal night
#

@toxic mesa do you have another constructor ?

toxic mesa
#

?

#

In what class?

eternal night
#

the MySQL class

eternal oxide
toxic mesa
#

alrighty hold on a sec, uploading methods and the MySQL class

eternal oxide
#

?paste

queen dragonBOT
eternal night
#

^^

toxic mesa
eternal night
#

OH

#

Well

toxic mesa
#
    public Configuration getConfig() {
        try {
            Configuration configuration = ConfigurationProvider.getProvider(YamlConfiguration.class).load(new File(getDataFolder(), "config.yml"));
            return configuration;
        } catch (IOException e) {
            e.printStackTrace();
        }
        return null;
    }

#getConfig method in the main class, it does actually works as ive used it in the onEnable to check if that was the problem

eternal night
#

๐Ÿ˜‚

eternal oxide
#

ah, you intializre all yoru fields in yoru class body

#

move them all into the constructor

toxic mesa
#

wait how does that make a difference

eternal oxide
#

your plugin is not set when the class is created

toxic mesa
#

aaah

#

okay ty

eternal night
#

static fields are initialized when the class it loaded and non static ones are initialized prior to the object creation

#

so you are essential accesing the plugin field before you set it through the constructor

toxic mesa
#

Yeah okay so when they are initialized they dont have the plugin object yet

#

am i understanding that correctly?

eternal oxide
#

yes

eternal night
#

yus

toxic mesa
#

great

#

tysm

eternal oxide
#

define the field and then set them in your constructor

toxic mesa
#

Yup trying it rn

#

It works, tysm

sharp bough
#

does anyone have a cf plugin i can see?

eternal oxide
#

cf?

stone sinew
#

CoinFlip

sharp bough
#

coinflip

eternal oxide
#

Random random = new Random()

#

about all there is to it

hushed crescent
#
    @Override
    public void onEnable() {
        System.out.println("One, two, buckle my shoe.");
        getServer().getPluginManager().registerEvents(new SaplingClass(), this);

        if (!Bukkit.getOnlinePlayers().isEmpty())
            for (Player online : Bukkit.getOnlinePlayers()) {
                new SaplingScoreboard();
                SaplingScoreboard.createBoard(online);
            }
    }


    public void onJoin(PlayerJoinEvent event) {
        SaplingScoreboard.createBoard(event.getPlayer());
    }```
eternal night
#

idk how does your pom.xml look

hushed crescent
#

I did this in the main java file and I still do not see the scoreboard

#

and also this

#
class SaplingScoreboard {
    public static void createBoard(Player player) {
        ScoreboardManager manager = Bukkit.getScoreboardManager();
        org.bukkit.scoreboard.Scoreboard board = manager.getNewScoreboard();
        Objective obj = board.registerNewObjective("Saplings", "", "Saplings Placed");
        obj.setDisplaySlot(DisplaySlot.SIDEBAR);
        player.setScoreboard(board);
    }
}```
odd gulch
#

Missing #EventHandler annotation.

#

Also new SaplingScoreboard(); does nothing.

hushed crescent
#

I put that above the public void onJoin correct?

hushed crescent
#

alright

cold field
#

Is there a list of what dataWatcherItems a player can store?

hushed crescent
#

Still does not work.

#

Am I missing anything else?

odd gulch
#
getServer().getPluginManager().registerEvents(new SaplingClass(), this);```
#

Should be

#
getServer().getPluginManager().registerEvents(this, this);```
hushed crescent
#

But there is a separate file

main dew
#

I want to edit a package with chunk, but for each player I want to send a different package with one chunk but when I use ProtocolLib I have bugs (not in console but sometimes players get kicked or chunk edits incorrectly). Everything works perfectly for one player. I am convinced that it is 99.9% of ProtocolLib's fault

hushed crescent
#

Still did not work.

crude charm
#

@eternal night after all this time

#

I gave in

#

im using spigot scoreboard

#

?paste

queen dragonBOT
crude charm
#

however

#

SOMEHOW

#

this is too many chars

#

also the runnable is giving me a null pointer

#

:/

cold field
#

@eternal night I'm struggling... Do you know a method to figure out what is used for a value of a datawatcheritem?

eternal night
#

value of data watcher item ?

#

isn't that just straight up the value of the data ?

crude charm
#

๐Ÿ˜ข

eternal night
#

like, the entity pose

#

@crude charm sorry your code is a little bigger let me read through it

crude charm
#

aight thanks

#

I made the line ALOT shorter

#

and its still throwing

cold field
#

Let me explain, I want to know what that the data is used for

eternal night
#

data watcher holds meta data about an entity. Like current entity pose or bed position for a player

cold field
#

To figure it out do I need to play the game until the data change?

eternal night
#

@crude charm what lines error for you o.O score entries are hard limited to 40 chars on server side

#

@cold field Well you would need to cause an update to one of the tracked values.

#

E.g. the player data watcher changes when you sleep in a bed

crude charm
eternal night
#

I don't know all the values that are tracked by the data watcher ๐Ÿ˜…

cold field
#

We are nuking you xD

quaint mantle
eternal night
#

What verssion are you on @crude charm

#

o.O

crude charm
#

1.8

eternal night
#

yikes

#

you may be having troubles with the prefix length

#

I think 1.8 had some very low team prefix/suffix caps

crude charm
#

yeah

#

its 16

#

but I dont hit that

eternal night
#

you do

#

onlinePlayers

#

has a prefix of 18

crude charm
#

String playerCount(Player player){ return PlaceholderAPI.setPlaceholders(player, "%bungee_total%"); }

eternal oxide
crude charm
#

would it take less if I register it when I need it

eternal night
#

he ? no. Your prefix is a string of 18 characters

crude charm
#

like new PlaceHolderAPI.setPlaceHolder(e.getPlayer, "%bungee_total%");

eternal night
#

that will fail whenever you send it

#

for the onlinePlayers team

crude charm
#

hmm

#

well

#

imm

#

fucked

eternal night
#

you have 16 chars raw string and two chars from the chat colour

#

1.8 life

#

I don't care much for it

#

lol

crude charm
#

I have to use it tho thats the annoying thing

#

thinking of working on a big rpg project

#

gonna do that in 1.16

eternal night
#

Pretty sure you won't get around the client cap of 16 chars in 1.8 tho

quaint mantle
crude charm
#

umm

#

fuck

#

so

#

like

eternal night
#

Good luck ๐Ÿ˜…

quaint mantle
#

and whats the error youre getting or @crude charm

crude charm
#

too many chars

quaint mantle
#

show me code and error

crude charm
#

none

#

@eternal night how easy is it to get global players with BungeeChannel

quaint mantle
#

its very easy

crude charm
#

how do u do it

#

im a noob with it

eternal night
#

๐ŸŒˆ bungeecord messages ๐ŸŒˆ

#

google, the spigot tutorial should do its job

quaint mantle
#

ByteArrayDataOutput out = ByteStreams.newDataOutput();
out.writeUTF("PlayerCount");
out.writeUTF("ALL");
player.sendPluginMessage(instance, "BungeeCord", out.toByteArray());

crude charm
#

oh

quaint mantle
crude charm
#

ik

eternal night
#

or use pavlyi as google

#

guess that works too ๐Ÿ˜‚

crude charm
#

I made a util for it and havent touched it since

quaint mantle
#

xdd

crude charm
#

lmfao

quaint mantle
#

and then do this in main class getServer().getMessenger().registerOutgoingPluginChannel(this, "BungeeCord");

crude charm
#

aight

#

ill add it to my util

quaint mantle
#

okay

cold field
#

@eternal night I analyzed whenever the data is updated And it turns out that whenever the player login it is set with a byte of value 127

crude charm
#

fuck in dumb

#

hisufhsiufhsfiush

eternal night
#

today really ain't your day xD

crude charm
#

why was I looking at the start or the error

quaint mantle
#

at me.zoibox.hub.hub.scoreboard.ScoreboardHandler.lambda$buildScoreboard$0(ScoreboardHandler.java:45)?

crude charm
#

onlinePlayers.setSuffix((Hub.secondColour + bungeeChannelApi.getPlayerCount("ALL").toString()));

eternal night
#

yeah you may either wanna join that completable future

#

or thenAccept it

#

xD

#

@cold field okay ? what are you even trying to do I am confusion

cold field
#

I was reading the source code of this plugin

#

read line 55

crude charm
quaint mantle
#

@crude charm this is my scoreboard function class try it

#

ig you just need to edit the configs and things

crude charm
#

Ive tried like 100 utils

#

and none of them work

#

so I just went to spigot

quaint mantle
#

if you never try you never know

cold field
#

do you have any idea why he is doing it?

eternal night
#

I think that might be the skin part byte

crude charm
#

@eternal night

synchronized (callbackMap) {
            callbackMap.compute("PlayerCount-" + serverName, this.computeQueueValue(future));
        }
eternal night
#

represents what parts of a skin are shown

#

but that is a guess into the blue

cold field
#

ook. I think I got it

#

Thanks

crude charm
#

this is throwing the same error :/

eternal night
#

ooof, just google it xD

crude charm
#
public CompletableFuture<Integer> getPlayerCount(String serverName) {
        Player player = getFirstPlayer();
        CompletableFuture<Integer> future = new CompletableFuture<>();

        synchronized (callbackMap) {
            callbackMap.compute("PlayerCount-" + serverName, this.computeQueueValue(future));
        }

        ByteArrayDataOutput output = ByteStreams.newDataOutput();
        output.writeUTF("PlayerCount");
        output.writeUTF(serverName);
        player.sendPluginMessage(this.plugin, "BungeeCord", output.toByteArray());
        return future;
    }
ivory sleet
#

what is computeQueueValue

crude charm
#
    private BiFunction<String, Queue<CompletableFuture<?>>, Queue<CompletableFuture<?>>> computeQueueValue(CompletableFuture<?> queueValue) {
        return (key, value) -> {
            if (value == null) value = new ArrayDeque<CompletableFuture<?>>();
            value.add(queueValue);
            return value;
        };
    }
ivory sleet
#

jesus

crude charm
#

lmfao ikr

ivory sleet
#

why do this to yourself

crude charm
#

idk ๐Ÿ”ช

ivory sleet
#

I mean just use cfs like any normal person

#

CompletableFuture#run/supplyAsync

crude charm
#

this was my friends idea

#

dont blame me

ivory sleet
#

yeah like
synchronized (callbackMap) {

#

bruh

#

we're not java 6 or smtng lol

crude charm
#

lmfao

cold field
crude charm
#

what one

eternal night
#

no the google part was for zoi

cold field
#

ahn ok

eternal night
#

you my friend are rip

#

xD

cold field
#

ajahahhahahah

crude charm
#

aisdhfdsifgfhdsighsd guhim so dumb

#

sfuish

#

are u making what I think ur making ๐Ÿคญ

#

a speedrun auto world regen plugin

#

no sorry I dont

#

its 3am

eternal night
#

@cold field debugged a bit, it is infact the data id for the skin parts

eternal night
#

IntelliJ debugging of the papermc source code

#

pretty neat for debugging the server internals

crude charm
#

was gonna make one on alot larger of a scale. Like making and deleting whole servers, cloud, settings, inbuilt timer and ALOT MORE

cold field
#

ahnnnn

#

Thanks for all

eternal night
#

so yeah, that line of code is basically saying "display all the skin parts of the skin"

crude charm
#

i'd actually need cloud

cold field
#

โค๏ธ

crude charm
#

im going ot bed

#

bye

ivory sleet
#

you should probably use ur own thread pool with io it doesnt block the bukkit schedulers thread pool but ye this is nitpick

#

oh yeah nvm maybe its a cached one

quaint mantle
quaint mantle
#

if you want it in a file thats not config.yml you can use galaxylib's config handler

#

or literally any other config handler

#

this ones just minimal

eternal oxide
slim magnet
#

does .contains of a HashSet work on Locations or blocks?

quaint mantle
#

i mean

#

.contains

#

dont see why it wouldnt

ivory sleet
quaint mantle
quaint mantle
ivory sleet
#

private FileConfiguration config = null;

#

why imaginedev

quaint mantle
unreal quartz
#

love the super descriptive javadoc

quaint mantle
#

dont wanna call reloadConfig when you initalize it

quaint mantle
#
    /**
     * Save config.
     */
#

rate this one

#
/**
 * <h2>DO NOT REMOVE THIS HEADER</h2>
 *
 * Config class.
 * From library GalaxyLib by imaginedev.
 *
 * Documentation:
 * https://imaginedevmc.github.io/GalaxyLib/
 *
 * Repository:
 * https://www.github.com/imaginedevMC/GalaxyLib/
 *
 * @author imaginedev
 */
late ledge
#

Anyone know a good way to "lock" a player?
methods i tried:

  • cancelling the move event: works but causes rubberbanding
  • setting the spectator target for the player to a specific entity: works and has a clean "lock" but doesn't allow the player to look around and requires entity control (hard to check when players leave the entity etc)
  • setting the entity as passenger of another entity: works but causes a sitting pose. Prefer to not have that.
    Suggestions?
quaint mantle
#

you literally have to cancel the move event

ivory sleet
#

no need to explicitly put it

quaint mantle
#

eh

late ledge
quaint mantle
#

yes but why does this matter?

unreal quartz
#

I do not believe there is any way to do it without the caveats you described

quaint mantle
#

is better question

unreal quartz
#

you could add slowness but that will mess with the FOV

quaint mantle
#

oh lord

unreal quartz
quaint mantle
late ledge
quaint mantle
#

because wouldn't you run that in a loop?

quaint mantle
#

its literally just cancelling the event

#

Yes but he wants it to be "clean"

#

ie not rubberbanding

#

i thought he wanted to cancel move

quaint mantle
#

which is if I am not mistaken is strictly client side

eternal oxide
#

rubberbanding is client side. Visual issue

quaint mantle
#

you're just cancelling the event in more steps

late ledge
#

what I need is a method to prevent a player from moving camera angle / position (preferably need both versions)

quaint mantle
#

if you want it to be smooth you gotta calculate a vector and make the player move that way

#

which is just unneccesary imo

late ledge
#

I know you can fix it with player#setSpectatorTarget() but if possible, I would prefer another way as this is a big workaround

unreal quartz
#

well making them spectate an entity has that effect

quaint mantle
#

let them rubberband

unreal quartz
#

I do not see any other solution

safe granite
#

im currently making a plugin to change skin texture of a player, but idk what the best way to reload skin view for other player and for self

#

if anyone know pls

late ledge
quaint mantle
#

so use spectator target and/or vectors

unreal quartz
#

is it too much of an issue to let them spectate an armour stand? they arenโ€™t affected by physics

late ledge
#

it is not until you start by telporting players and spectating positions around

#

setting spectatortargets that are further than 8 blocks away have undefined results

round finch
#

1: ok i'm unfamiler with furance inventory how will i make a functional one

2: any tips for understand source and be better at developing things?

unreal quartz
#

hmmโ€ฆ well unfortunately I donโ€™t know if any other solution

late ledge
#

hmmm, ill have to check some things then ๐Ÿค”

#

I have done it before with a custom spigot fork but I am really not planning on doing that again ...

cinder thistle
#

should @see to both the docs and repo

novel lodge
#

Does anybody know why these two string are not counted as being the same?
bakedcake5941 bakedcake5941

late ledge
#

can you give the code you use to compare them?

novel lodge
#

I'm making the custom name of the player to a projectile and then using that to check if the player should be damaged, but for some reason it doesn't count them being the same

late ledge
#

it could be a \n or something

#

color codes?

novel lodge
#

     if (event.getDamager().getCustomName() == event.getEntity().getCustomName())

event.getDamager().getCustomName() returns bakedcake5941 as well as event.getEntity().getCustomName()
unreal quartz
#

.equals()

round finch
#

yup .equals () is better for string

novel lodge
#

Oh that fixed it

#

๐Ÿ‘

ivory sleet
#

if (event.getDamager().getCustomName().intern() == event.getEntity().getCustomName().intern()) ๐Ÿคก

ivory sleet
#

idk packets might be essential

lost matrix
#
  1. Remove player from everyones view using new PacketPlayOutPlayerInfo(EnumPlayerInfoAction.REMOVE_PLAYER, new EntityPlayer[]{player}))
  2. Add player again using new PacketPlayOutPlayerInfo(EnumPlayerInfoAction.ADD_PLAYER, new EntityPlayer[]{player})

In spigot there is no api way of doing that. I know that a certain fork of spigot has a method to handle that.
@safe granite

ivory sleet
#

Ok nice smile is here good bye folks

lost matrix
#

lul

ivory sleet
#

I am not needed (:

quaint mantle
#

any help?

#

im trying to run minecraft

long portal
#

Download Java

quaint mantle
#

I just installed java 16

long portal
#

Runtime 1.8

#

download 1.8

quaint mantle
#

k

primal ledge
#

no

long portal
stone sinew
eternal oxide
#

It shoudl be possible

#

Actually, probably not, if it was a map element it would

stone sinew
primal ledge
#

Section can be the list type but there can be only one scalar type per key.

long portal
#

I wanna make a Challenge Plugin and:

I wanna do this:

If the player enters /test, I want him to be thrown up

primal ledge
long portal
#

But i dont understand how

eternal oxide
long portal
#

i search in the Internet but i didnt found anything

#

searched*

quaint mantle
#

Vector vector = player.getLocation().getDirection().multiply(1).setY(1);
player.setVelocity(vector);

            player.setFallDistance(-999F);
primal ledge
quaint mantle
#

try this

eternal oxide
long portal
#

dosent work

#

does not

#

doesnt

#

wtf

#

this code is too smart for me

eternal oxide
#

player.setVelocity(new Vector(0,1,0).multiply(5));

main dew
#

how I can send packet to player without register this by the server?

eternal oxide
#

that will set the vertical velocity

stone sinew
#

@primal ledge didn't mean to reply to your message lol messages moved when I clicked.

long portal
#

doesnt work

quaint mantle
#

what doesnt work about it

long portal
#

no error in the console

#

NVM

quaint mantle
#

is the command working?

eternal oxide
#

You shoudl be returnign true

long portal
#

I ACTIVATED FLY

stone sinew
eternal oxide
#

and the code is fine

long portal
#

and it didnt worked

#

IT was because of fly

quaint mantle
#

yea

long portal
#

but it worked tysm

quaint mantle
#

you could player.setFlying(false) before the player.setvelocity if you want it that way

languid geode
#

Does anyone have a plugin that will autosort these darn imports checkstyle keeps screaming at me and i do not know what it wants

quaint mantle
#

?

lost matrix
main dew
#

how I can send packet to player without register this by the server?

lost matrix
long portal
#

How can i make that if a players eating then XY will happen

#

so after he ate

quaint mantle
#

FoodLevelChangeEvent

main dew
#

Love the video or need more help...or maybe both?
๐Ÿ’ฌJoin us on Discord: http://discord.gg/invite/fw5cKM3
Thank you for tuning in to this episode of TheSourceCode! โค๏ธ

If you enjoyed this video make sure to show your support by liking , commenting your thoughts, and sharing for all your friends to see and learn!

All code is available on Github:
...

โ–ถ Play video
lost matrix
long portal
main dew
#

latter you can read this one with metod on this video

long portal
#

only if he eats

long portal
#

NO IM SO SMART

#

if p.getFoodLevel > p.getLastFoodLEvel?
maybe

#

idkl

main dew
#

he wants the server not to be able to catch it, for example in the way shown in the movie

lost matrix
#

And dont use the FoodLevelChangeEvent. It also triggers if you lose food or when you gain food through an effect.

main dew
#

@lost matrix you know how make this?

lost matrix
main dew
lost matrix
main dew
#

I want send to all players other packet about one chunk

#

but the server, as we can see that I sent a packet to one player all sends the same

quaint mantle
#

like the '1' and '2' but not '3' or '4'

main dew
#

I try make this with ProtocolLib and NMS but someone result

quaint mantle
#

Can someone help me with plotsquared plugin

#

Please join in spigotcraft talk

lost matrix
lost matrix
#

Im not sure if the PacketPlayOutMapChunk packet is cached. Show some code pls.

main dew
#

how this source is very long

#

11 class

lost matrix
#

Oh god...

quaint mantle
#

lmao

main dew
#

but I can send 2 main class

lost matrix
#

You should have your code separated in a way that such a thing only requires some small classes

main dew
#

@lost matrix I can share screen

lost matrix
#

throws Exception
You really like crippling your code. Catching/Throwing exceptions like that is expensive.

#

I understand what you are doing. Just give me a moment.

main dew
#

or you website?

woeful ermine
#

Does a plugin exist that enables the creation of cutscenes in-game?

main dew
#

what do you mean?

#

repetitions?

left swift
#

how can i set the socreboard team color from hex? i tried:
team.setColor(ChatColor.of(new Color(245, 66, 96))) but it is bad

main dew
#

remember teams in plugin != teams in command (how I good remember)

languid geode
#

@karmic heart Hope you dont mind the ping but since you do a lot of work on spigot/paper i might hope you would have the answer to my question. with the repackaging with the NMS and patch files none of my branches are compatible anymore and i have no idea how i need to fix this

#

Any idea?

crisp iron
#

if do a runnable and want it to run in ms rather than seconds, i need to change 20L to 1L correct?

eternal night
#

not quite ๐Ÿ˜… 20L means 20 ticks which is 1000ms. 1L is hence 50ms

hexed saddle
#

Can you cancel the EntityDeathEvent in any way?

eternal night
#

which is the lowest interval in which your runnable can tick

lost matrix
#

So highest time resolution is 50ms at best

crisp iron
#

ok

lost matrix
hexed saddle
#

I'll try, thx

main dew
#

@lost matrix and what are youi think?

cerulean harbor
#
    public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
        if (sender instanceof Player) {
            Player player = (Player) sender;
            if(player.isOp() || player.hasPermission("gates")) {
                if (label.equalsIgnoreCase("gates")) {
                    if (args.length == 0) {
                        sender.sendMessage("nice");
                    } else {
                        Player target = Bukkit.getPlayerExact(args[0]);
                        if (target != null){
                            player.sendMessage("added" + target.getDisplayName());
                            //send target to addGates??
                        }else{
                            player.sendMessage("doesnt exist");
                        }
                    }
                }
                return true;
            } else {
                player.sendMessage("bruh");
                return true;
            }
        } else {
            main.getLogger().info("You have to be a player");
            return true;
        }
    }
}

====DIFFERENT CLASS======
    public void addGates(Player player){
        config.set("player-id", player.getUniqueId().toString());
        config.set("player-name", player.getPlayerListName());
    }

can someone help me send the target player to addGates? I'm new to this sort of thing so excuse the bad code

safe granite
crisp iron
#

@lost matrix so when i do a countdown in incriment to tick (50ms), i need to 1L??

safe granite
main dew
#

20 tick = 1s but how server have lags 20 > 1s

#

@lost matrix you have idea about my source?

#

@lost matrix pls

lost matrix
main dew
#

I don't understand question

#

I create packet from the begining

#

in total, only the variable d

lost matrix
main dew
#

you tried code in MC?

#

just to be sure that you also duplicate

#

I've been working on it for a month; /

#

how I end I have error ;/

quaint mantle
main dew
#

@lost matrix would you like to help me later I don't want to tire you but you know ... it's really hard for me and you know more

modest oar
#

does anyone know the command for piglin drops?

#

or is it just itemstack

turbid tiger
#

command? /loot?

modest oar
#

public static final LootTables PIGLIN_BARTERING
?

#

this is kinda a noob question

#

but how do you create a config.yml file?

opal sluice
#

Hi, how could I stop the crafting book to auto complete the crafting slots ?

blissful folio
#

Hey, I noticed there's a possibility where ping is not displayed on the tablist (i.e. when a player is connecting), is there a way to recreate that by setting an entity player's ping to an insane amount such as 10000?

#

Or maybe -1?

cunning cloak
#

?paste

queen dragonBOT
cunning cloak
eternal oxide
#

you plugin.yml is not pointing to the obfuscated main class

cunning cloak
#

How do I make that happen?

eternal oxide
#

Why are you even obfuscating?

cunning cloak
glass sparrow
#

#opensourceallplugins

cunning cloak
#

no

#

I might in the future

cunning cloak
eternal oxide
#

item 2

cunning cloak
#

AAC, Spartan, GrantX, etc all hide their code via obfuscation so what is the difference between them and me?

glass sparrow
#

they are shitty and dumb

eternal oxide
#

You have not read the rules on obfuscation as your error is due to ignoring item 2

cunning cloak
glass sparrow
#

yea bad servers

#

make your own if you want something good and specific

#

general purpose stuff is barely ever practical

cunning cloak
glass sparrow
#

yea kinda

novel lodge
#

How can I stop an explosion from destroying blocsk

glass sparrow
novel lodge
#

I tried that but it didnt' wrok

glass sparrow
#

what happened

novel lodge
#
    @EventHandler
    public void onEntityExplode(EntityExplodeEvent event) {
        event.setCancelled(true);
    }
``` blocks broke
fresh heath
#

How to create a ShapeLess recipe with one itme that is named what it isnt supposed to be

glass sparrow
#

or send primedtnt with a packet

eternal oxide
novel lodge
#
        getServer().getPluginManager().registerEvents(new EventHandlinger(), this);
eternal oxide
#

Is this a TNT or projectile explosion?

twin cape
#

how do you check if a PlayerInteractEvent is caused by a main hand? Is it possible to just compare EquipmentSlot against MainHand?

eternal oxide
#

you use getHand()

novel lodge
#

Sorry I misread that

twin cape
eternal oxide
#

its either HAND or OFF_HAND

twin cape
#

ah, ok. thank you!

hushed crescent
#

Cannot resolve symbol 'ExampleAssembleAdapter'

#
     @Override
    public void onEnable() {
        System.out.println("One, two, buckle my shoe.");
        getServer().getPluginManager().registerEvents(new SaplingClass(), this);

        Assemble assemble = new Assemble(this, new ExampleAssembleAdapter());
        assemble.setTicks(2);
        assemble.setAssembleStyle(AssembleStyle.VIPER);
    }```
#

I am trying to use Assemble

quaint mantle
#

"One, two, buckle my shoe."

hushed crescent
#

oh crap lmfao

#

I couldn't think of anything

novel lodge
#
    @EventHandler
    public void exploe(BlockExplodeEvent event)
    {
        event.setCancelled(true);
    }``` apparently this isn't used in the code when every other `@EventHandler` is
sharp bough
#
    '1':
        - Player
        - PlayerTwo
        - Money
        - PlayerColor
        - PlayerTwoColor
    '2':
        - Player
        - PlayerTwo
        - Money
        - PlayerColor
        - PlayerTwoColor```
if  i want to loop through 1,2,etc do  i have to use .getKeys(false) or  a while theres next do
ornate heart
#

getKeys(false)

sharp bough
#

k thanks

eternal oxide
#

That is also ONLY for exploding blocks, not entities

novel lodge
#

Never mind it does work, I just thought it broke because the explosion disappeared entirely

#

It keeps the knockback and damage which are the main things I Want

#

Never mind it still breaks blocks...

eternal oxide
#

What type of explosion?

#

What is the source of the explosion?

novel lodge
#

It's spawned with player.getWorld().createExplosion(player.getLocation(), 5f);

fresh heath
#

How to create a ShapeLess recipe with one itme that is named what it isnt supposed to be like Special Stick

eternal oxide
#

If you want the damage and knockback but no blocks broken then clear the blocklist in teh EntityExplodeEvent

#

Also set the Yield to zero so nothing drops. Not sure if clearing the block list will stop drops

novel lodge
#
    @EventHandler
    public void explode(EntityExplodeEvent event){
        List<Block> targets = event.blockList();
        for (Block b : targets){
            event.blockList().remove(b);
        }
    }``` still makes blocks explode
eternal oxide
#

event.blockList().clear()

gaunt eagle
#

wut

quiet ice
#

well, it is what it is

gaunt eagle
#

for add custom enchants

quiet ice
#

OzelBuyuler.parlakBuyu is null

gaunt eagle
#

Is there a different use for 1.16.5? It can be related to this

quiet ice
#

Well, it isn't the line to NPE, so not me to judge

gaunt eagle
novel lodge
eternal oxide
gaunt eagle
quiet ice
#

I already told you the cause of the Exception, not much I cannot say

main dew
#

How I can send packet without register this about server

gaunt eagle
novel lodge
quiet ice
#

In this case it is an IllegalArgumentException, but in this case it acts like a NullPointerException, which is why I called it a NullPointerException (abbreviated as NPE)

novel lodge
#

Wait it does there is just a major error

eternal oxide
main dew
#

how to send a packet to a player so that the server does not register it?

eternal oxide
#

You can cause damage, no entity so no event but you can set it to not destroy blocks

hushed crescent
#

Has anyone used assemble

languid geode
#

Is there not a plugin for intellji that does the checkstyle automatically for me

final fog
#
                    for (Entity entity : sword.getWorld().getNearbyEntities(sword.getLocation(), 20, 20, 20)) {
                        if (entity instanceof Creature) {
                            ((Creature) entity).damage(10);
                            entity.getWorld().strikeLightning(loc);
                        }
                    }``` How can I make it so that in this loop, it loops through one entity, waits 5 ticks and then goes through another entity?
eternal oxide
#

you can;t wait on the main thread, use the bukkit scheduler to handle timed code.

final fog
#

Would I put the Scheduler on top of the loop

quaint mantle
#

anyone here knows how to respawn an entity (already spawned of course) throught protocollib?

#

or even without protocol lib, I just need a way to respawn an entity

#

like "refresh" it

dense kestrel
hushed crescent
#

?bin

#

?haste

#

?hastebin

eternal oxide
#

?paste

queen dragonBOT
hushed crescent
#

ty

#

I am trying to create a scoreboard but it will not show

tribal holly
#

Hi is there any way to cancel the sound make by the trident while throwing it ?

ancient whale
#

Hey, I'm looking to make a little scoreboard updating every second (few teams + few objectives), rn I'm creating a new scoreboard for each player and sending it to him every seconds,
I was wondering if storing scoreboard of each players in a hashmap and updating them instead would be more efficient ?

eternal oxide
eternal oxide
ancient whale
#

Yeah that's what I tought, thanks :D

quaint mantle
#
    public void onPlayerHit(EntityDamageEvent e){
        if (e.getEntity() instanceof Player){
            Entity p = e.getEntity();
            p.setVelocity(p.getLocation().getDirection().multiply(getConfig().getInt("knockback-of-players")));
        }
    }
    @EventHandler
    public void onMobHit(EntityDamageEvent e){
        if (e.getEntity() != null){
            Entity p = e.getEntity();
            p.setVelocity(p.getLocation().getDirection().multiply(getConfig().getInt("knockback-of-mobs")));```
is this right way to get info from config i am so frustrated. This doesn't work is it done wrong?
eternal oxide
#

Thats correct

#

if it is an Int in the config

quaint mantle
#

knockback-of-mobs: 5Does that work?

eternal oxide
#

yes

quaint mantle
#

ok thx

#

ohwait

#

How do I register in onEnable? saveDefaultConfig(); ?

eternal oxide
#

yes

quaint mantle
#

ok

young knoll
quaint mantle
young knoll
#

I'm not sure how much longer the regular YamlConfiguration takes, might not be worth the effort

eternal oxide
quaint mantle
#

oh

#

i see

#

how do i register it then?

eternal oxide
#

register?

#

Your main class is instanced by Spigot

quaint mantle
#

ok

eternal oxide
quaint mantle
#

how to add gradient to text?

quaint mantle
eternal oxide
#

Bungee ChatColor is in Spigot

#

just use the md5 import not the bukkit one

quaint mantle
#

wdym?

quaint mantle
eternal oxide
quaint mantle
#

yes

#

The events are in the main class

#

would those events already be registered because they are in the main class?

eternal oxide
#

pluginManager.registerEvents(listener, this);

quaint mantle
#

ok ty

eternal oxide
#

getServer().getPluginManager()

quaint mantle
eternal oxide
#

show yoru code

#

?paste

queen dragonBOT
quaint mantle
#

getServer().getPluginManager().registerEvents(onPlayerHit(), this);
getServer().getPluginManager().registerEvents(onMobHit(), this);

eternal oxide
#

no

quaint mantle
#
        getServer().getPluginManager().registerEvents(onMobHit(), this);```
#

How do I get the colors

eternal oxide
#

just one getServer().getPluginManager().registerEvents(this, this);

quaint mantle
#

ah

eternal oxide
quaint mantle
#

THANKS @eternal oxide It worked! :D:D

quaint mantle
eternal oxide
#

yes, but you'd have to do math

#

calculate start and end colours and the number of characters

high pewter
#

What's the easiest / general way of changing block and mob drops (loottables)? I tried this for just block dropsjava @EventHandler public void onBlockBreak(BlockBreakEvent event) { if (event.isDropItems() && event.getPlayer().getGameMode() != GameMode.CREATIVE) { event.setDropItems(false); event.getBlock().getWorld().dropItemNaturally(event.getBlock().getLocation(), new ItemStack(Material.ACACIA_BOAT)); } }but this isn't effective because, for example, if I stack scaffolding then break it the attached blocks still drop as scaffolding. That's just one example I've found, but there are a few.

main dew
#

how to send a packet to a player so that the server does not register it?

hushed crescent
# eternal oxide Why use a nested class when its doing no more than a simple method?
public final class EarthDay extends JavaPlugin {

    private Assemble assemble;

    @Override
    public void onEnable() {
        System.out.println("EEEEEEEEEEEEEEEEEEEEEEE");
        getServer().getPluginManager().registerEvents(new BlockPlace(), this);
        this.assemble = new Assemble(this, new ScoreboardAdapter());

    }

    @EventHandler
    public void onJoin(PlayerJoinEvent event) {
        createBoard(event.getPlayer());
    }

    @Override
    public void onDisable() {
        // Plugin shutdown logic
    }

    public static void createBoard(Player player) {
        ScoreboardManager manager = Bukkit.getScoreboardManager();
        Scoreboard board = manager.getNewScoreboard();
        Objective obj = board.registerNewObjective("SaplingScoreboard", "dummy", ChatColor.translateAlternateColorCodes('&', "&f&l<< &a&lTrees Planted &f&l>>"));
        obj.setDisplaySlot(DisplaySlot.SIDEBAR);
        Score score = obj.getScore(ChatColor.AQUA + "=-=-=-=-=-=-=-=-=-=-=");
        score.setScore(3);
        player.setScoreboard(board);
    }
}```
#

Fixed.

#

My scoreboard won't show for some reason though

#

I have been trying to fix it all day

cerulean harbor
#

what method can i use to save an arraylist to my custom yml file?
not sure how helpful it would be, but here is my setup for the yml file

public class GatesConfig {

    private static File file;
    private static FileConfiguration config;

    public static void setup(){
        file = new File(Bukkit.getServer().getPluginManager().getPlugin("FishMong").getDataFolder(), "GatesConfig");

        if(!file.exists()){
            try{
                file.createNewFile();
            }catch (IOException e){
                System.out.println("IOException 1");
            }
        }
        config = YamlConfiguration.loadConfiguration(file);
    }

    public static FileConfiguration get(){
        return config;
    }

    public static void save(){
        try{
            config.save(file);
        }catch (IOException e){
            System.out.println("IOException 2");
        }
    }

    public static void reload(){
        config = YamlConfiguration.loadConfiguration(file);
    }
}
earnest junco
cerulean harbor
#

there will be two, UUID and String

eternal oxide
hushed crescent
#

It is not

earnest junco
hushed crescent
#

EarthDay is my main class

eternal oxide
young knoll
#

Yes, but I'm wondering if it's worth the slight performance increase

hushed crescent
#

I did the scoreboard stuff right, it just won't work for some reason

eternal oxide
young knoll
#

Probably not, but I've seen people recommend it

eternal oxide
cerulean harbor
earnest junco
cerulean harbor
#

alright

#

thanks

eternal oxide
hushed crescent
#
public class BlockPlace implements Listener {
    @EventHandler
    public void onPlayerPlantSapling(BlockPlaceEvent e) {
        if (e.getBlockPlaced().getType().toString().endsWith("SAPLING")) {
            Bukkit.broadcastMessage("lol");
        }
    }
}```
eternal oxide
#

you register any class that implements Listener

young knoll
hushed crescent
#

dangit no images

#

Do I need to register EarthDay as a listener too?

#

onJoin is an event

eternal oxide
#

If it implements Listener yes

#

you register(this, this)

hushed crescent
#

Why do I register this when I also have BlockPlace

#

how would I register both

eternal oxide
#

your blockplace is Only your blockPlace class

#

you add another register line

#

registerEvents(this, this);

quaint mantle
#
    public void onPlayerHit(EntityDamageEvent e){
        if (e.getEntity() instanceof Player){
            Entity p = e.getEntity();
            p.setVelocity(p.getLocation().getDirection().multiply(getConfig().getInt("knockback-of-players")));
        }
    }
    @EventHandler
    public void onMobHit(EntityDamageEvent e){
        if (e.getEntity() != null){
            Entity p = e.getEntity();
            p.setVelocity(p.getLocation().getDirection().multiply(getConfig().getInt("knockback-of-mobs")));
        }
    }```
When I hit a mob/player, it only goes in the direction it is facing. how can I change it so I goes into the direction you hit it?
eternal oxide
#

change yoru multiplier to a negative

main dew
#

how to send a packet to a player so that the server does not register it?

eternal oxide
#

it will go backwards, but if you want it to go away from teh attacker you have to do some math

high pewter
hushed crescent
#

I got this error in the mc console [18:07:17 ERROR]: Could not pass event PlayerJoinEvent to earthday v1.0

getServer().getPluginManager().registerEvents(new BlockPlace(),this);
getServer().getPluginManager().registerEvents(this,this);```
cerulean harbor
#

my files are saving as just regular java files, is it important for them to be yml?

eternal oxide
quaint mantle
#

mmm ohkya

round finch
#

how the heck is furanceInventory working?

eternal oxide
quaint mantle
#

.getPlayerDirection or smth?>

hushed crescent
#

Elgar

eternal oxide
quaint mantle
#

ah

hushed crescent
#

It can't pass PlayerJoin event to earthday

eternal oxide
#

Caused by: java.lang.IllegalArgumentException: The name 'SaplingScoreboard' is longer than the limit of 16 characters

hushed crescent
#

Yeah, I just noticed that

#

Still doesn't work wtf

main dew
#

how to send a packet to a player so that the server does not register it?

eternal oxide
hushed crescent
#

Nope, and I debugged each event. Each logged a word so I know they are working

#

It is the scoreboard

#

onJoin works, and so does createBoard, does too but the scoreboard is not being made

cerulean harbor
#

can i use a list as a value in my config?

eternal oxide
eternal oxide
#

?paste

queen dragonBOT
hushed crescent
quaint mantle
# eternal oxide Use EntityDamageByEntityEvent
    public void onPlayerHit(EntityDamageByEntityEvent e){
        if (e.getEntity() instanceof Player) {
            Entity p = e.getEntity();
            p.setVelocity(p.getLocation().getDirection().multiply(getConfig().getInt("knockback-of-players")* -1));
        }
    }
    @EventHandler
    public void onMobHit(EntityDamageByEntityEvent e){
        if (e.getEntity() != null) {
            Entity p = e.getEntity();
            p.setVelocity(p.getLocation().getDirection().multiply(getConfig().getInt("knockback-of-mobs")* -1));
        }
    }```
I'm a little confused
eternal oxide
#

you need to use e.getAttacker() to get yoru direction

#

or is it getDamager() I forget

cerulean harbor
#

damager i think

quaint mantle
#

ok

#

thx

eternal oxide
#

you can combine yrou events into one. no need for two seperate.

#

Check if instanceof Player else mob

left swift
#

How can I continue color from prefix to player name? Make the player name yellow (without setColor() method) ?
team.setPrefix(ChatColor.RED + "PREFIX " + ChatColor.YELLOW);

eternal oxide
#

obj.setTitle

round finch
#

any tutorials on furanceInventory

#

i'm new to furnaces idk what is what

eternal oxide
#

It has its own events and recipes

hushed crescent
#

you mean obj.setDisplayName("hi");

#

?

eternal oxide
#

What do you mena not a thing?

#

sorry, yes setDisplayName

#

I have a helper method called setTitle for it

hushed crescent
#

Nope

eternal oxide
#

No clue then. I see nothing wrong with your code now

hushed crescent
#

same

eternal oxide
#

The only difference between yours and some code I use is that I use teams

high pewter
quaint mantle
# eternal oxide Check if instanceof Player else mob

Like this?

    public void onPlayerHit(EntityDamageByEntityEvent e){
        if (e.getEntity() instanceof Player) {
            Entity p = e.getEntity();
            p.setVelocity(e.getDamager().getVelocity().multiply(getConfig().getInt("knockback-of-players") * -1));
        } else if (e.getEntity() != null) {
            Entity p = e.getEntity();
            p.setVelocity(e.getDamager().getVelocity().multiply(getConfig().getInt("knockback-of-mobs") * -1));
        }
    }```
#

i made the syntax wrong

#

I'm not sure...

eternal oxide
#

looks ok at first glance

#

You could move Entity p = e.getEntity(); to teh very top, outside the if test, so you only need a single variable for both test if (p instanceof Player) etc

quaint mantle
#

ok ty also when I hit a mob/player it reverts back to the normal minecraft knockback.

eternal oxide
#

You want get Direction of the damager

quaint mantle
#

ah

round finch
#

furance set burning time?

eternal oxide
#

burn time value is not on the furnace but the consumable. The time remaining is the value on teh furnace

quaint mantle
eternal oxide
#

remove getVelocity

quaint mantle
#

ok

#

TYSM! :)

round finch
bright jasper
#

I cant seem to shade Hikari into my plugin

#

Its incredibly annoying

ivory sleet
#

Gradle?

bright jasper
#

Maven

ivory sleet
#

Ok good bye

bright jasper
#

Show how you did it in gradle tho, i can understand both lmao

#

would help

ivory sleet
#

Thatโ€™s how you do it in gradle

eternal oxide
#

this is to shade a package xml <!-- Shade the BungeeCord configuration so we can use it under Spigot. --> <artifactSet> <includes> <include>net.md-5:bungeecord-config:*:*</include> </includes> </artifactSet>

bright jasper
#

Yeah what I currently have is Hikari as a dependency with compile option

#

I basically have a common library in the middle, the spigot plugin and a bungee plugin both use it with compile too

#

supposedly hikari is shaded too but it aint working

#

java.lang.NoClassDefFoundError: com/zaxxer/hikari/HikariConfig

#
<plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-shade-plugin</artifactId>
                <version>3.2.4</version>
                <configuration>
                    <dependencyReducedPomLocation>${project.build.directory}/dependency-reduced-pom.xml
                    </dependencyReducedPomLocation>
                    <relocations>
                        <relocation>
                            <pattern>com.zaxxer:HikariCP</pattern>
                        </relocation>
                    </relocations>
                </configuration>
                <executions>
                    <execution>
                        <phase>package</phase>
                        <goals>
                            <goal>shade</goal>
                        </goals>
                        <configuration>
                            <minimizeJar>true</minimizeJar>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
eternal oxide
#

open yoru jar and see whats in it

cerulean harbor
#

is there anyway to force the first hotbar slot to be empty always?

ivory sleet
#

I mean yeah cancel all events that may manipulate the first slot of the inventory

#

Then if you really wanna be sure you could schedule an active task to make sure something isnโ€™t there

bright jasper
ivory sleet
#

How do you build

#

You should use maven clean install if you donโ€™t

cerulean harbor
ivory sleet
#

Yep

#

But there isnโ€™t really a solid way around

cerulean harbor
#

sucks, thanks for the advice

ivory sleet
#

You welcome (:

round finch
#

reee
furances confuses me

eternal oxide
#

you could just check when an item is placed in any of those specific slots

#

Why do you want the first hotbar to be empty?

eternal oxide
bright jasper
#

I did

#
<plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-shade-plugin</artifactId>
            <version>3.2.4</version>
            <configuration>
                <dependencyReducedPomLocation>${project.build.directory}/dependency-reduced-pom.xml
                </dependencyReducedPomLocation>
                <artifactSet>
                    <includes>
                        <include>com.zaxxer:HikariCP</include>
                    </includes>
                </artifactSet>
            </configuration>
            <executions>
                <execution>
                    <phase>package</phase>
                    <goals>
                        <goal>shade</goal>
                    </goals>
                    <configuration>
                        <minimizeJar>true</minimizeJar>
                    </configuration>
                </execution>
            </executions>
        </plugin>
eternal oxide
#

sare you certain you got teh entry correct?

bright jasper
#
    <dependency>
        <groupId>com.zaxxer</groupId>
        <artifactId>HikariCP</artifactId>
        <version>2.6.0</version>
        <scope>compile</scope>
    </dependency>
#

So im not sure if its happening because of this

#

but the library hikari is being shaded into is a common library in a multi module project

#

might it be because im not shading the common module into the spigot one?

ivory sleet
#

gradle (:

bright jasper
#

gradle is not the savior of all problems lmao

ivory sleet
#

I must go ahead and disagree

bright jasper
#

i didnt think i needed to shade the common because it worked running other stuff through the lib

ivory sleet
#

Wait r u just shading?

cerulean harbor
ivory sleet
#

Not relocating that is

eternal oxide
#

with a compile scope it shoudl be auto shaded

ivory sleet
#

^

bright jasper
#

yeah then it makes no sense why it doesnt work

ivory sleet
#

Do you build correctly?

bright jasper
#

yes

ivory sleet
#

maven clean install ?

eternal oxide
#

delete the entire shade plugin section, unless you are doing something else in there

hushed crescent
#

obj.getScore().setScore(0);

eternal oxide
#

its not needed

hushed crescent
#

How can i put the users name in there

#

inside the score

bright jasper
#

both show classnotfound

eternal oxide
#

show me your pom

ivory sleet
drowsy helm
#

anyone know how to get around this with latest spigot build?

ivory sleet
#

Donโ€™t see the entire error

bright jasper
#

wym

#

oh git repos? its a private project so no, i prob should still add the private repo links tho

eternal oxide
#

no maven repos

bright jasper
#

for common?

#

hikari didnt specify it needed one

#

and bungeecord chat is filled by the spigot/bungeecord plugin which uses it

ivory sleet
#

Gradle (:

hushed crescent
#

Does anyone know how to create a scoreboard? I think the method I was doing it was out of date

ivory sleet
#

Yes but misa sleep soz

hushed crescent
#

?

ivory sleet
#

Btw not cool to hate TS

#

Ok gn

eternal oxide
bright jasper
#

Yeah even shading it with the thing you suggested didnt work

#

the stuff thats commented out

eternal oxide
bright jasper
#

you used the same settings i did?

eternal oxide
#
        <plugins>
            <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>
        </plugins>```
bright jasper
#

let me try

#
java.lang.NoClassDefFoundError: com/zaxxer/hikari/HikariConfig
    at com.github.myriadmc.myriadcommon.Database.Database.<init>(Database.java:32) ~[?:?]
    at com.github.myriadmc.myriadspigot.MyriadSpigot.onEnable(MyriadSpigot.java:54) ~[?:?]
    at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:263) ~[patched_1.16.5.jar:git-Paper-601]
    at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:380) ~[patched_1.16.5.jar:git-Paper-601]
    at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:483) ~[patched_1.16.5.jar:git-Paper-601]
    at org.bukkit.craftbukkit.v1_16_R3.CraftServer.enablePlugin(CraftServer.java:501) ~[patched_1.16.5.jar:git-Paper-601]
    at org.bukkit.craftbukkit.v1_16_R3.CraftServer.enablePlugins(CraftServer.java:415) ~[patched_1.16.5.jar:git-Paper-601]
    at net.minecraft.server.v1_16_R3.MinecraftServer.loadWorld(MinecraftServer.java:591) ~[patched_1.16.5.jar:git-Paper-601]
    at net.minecraft.server.v1_16_R3.DedicatedServer.init(DedicatedServer.java:280) ~[patched_1.16.5.jar:git-Paper-601]
    at net.minecraft.server.v1_16_R3.MinecraftServer.w(MinecraftServer.java:1065) ~[patched_1.16.5.jar:git-Paper-601]
    at net.minecraft.server.v1_16_R3.MinecraftServer.lambda$a$0(MinecraftServer.java:289) ~[patched_1.16.5.jar:git-Paper-601]
    at java.lang.Thread.run(Thread.java:829) [?:?]
Caused by: java.lang.ClassNotFoundException: com.zaxxer.hikari.HikariConfig
    at java.net.URLClassLoader.findClass(URLClassLoader.java:471) ~[?:?]
    at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:182) ~[patched_1.16.5.jar:git-Paper-601]
    at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:111) ~[patched_1.16.5.jar:git-Paper-601]
    at java.lang.ClassLoader.loadClass(ClassLoader.java:589) ~[?:?]
    at java.lang.ClassLoader.loadClass(ClassLoader.java:522) ~[?:?]
    ... 12 more

#

does not work for me

#

should not have pasted the whole thing woah

eternal oxide
#

I ran build and hikari is in my jar

bright jasper
#

could it be because myriadcommon is not the plugin but myriadspigot is

#

and hikari is in common

#

while spigot just shades/uses common with a compile scope

eternal oxide
#

I thought Hikari was included in paper?

bright jasper
#

it is?

#

i didnt think so

eternal oxide
#

No clue I don;t use it

#

however, check your jar. If com/zaxxer is not in there then its a build issue

bright jasper
#

it is not in there

#

im gonna try building common by itself and seeing if its in the common jar

eternal oxide
#

as I just ran it with just the dependency from your XML and the Plugins I just gave you

cold pawn
#

Can I get some help with what this is looking for?
public boolean Right(String aname) { byte b; int i; PermissionGroup[] arrayOfPermissionGroup; for (i = (arrayOfPermissionGroup = Main.get().getPex().getPermissionsManager().getGroups()).length, b = 0; b < i; ) { PermissionGroup group = arrayOfPermissionGroup[b]; if (group.getOption("land", null, "").equalsIgnoreCase(aname)) return true; b++; } return false; }

eternal oxide
#

Its searching permission groups in PEX for the first group with a option of "land" with a value of aname

#

returns true if one was found

cold pawn
#

Ah I see makes sense

hushed crescent
#

Still didnโ€™t work, I tried using my friends scoreboard api and it works fine

bright jasper
eternal oxide
#

single

bright jasper
#

could it be the multi module thing fucking it up

eternal oxide
#

possible I guess

bright jasper
#

can you have artifactset and relocation in the same project

eternal oxide
#

yes

#

relocation is for changing the classpath of a package

#

not just copying

#

ArtifactSet is to copy a whole dependency or any portion of

#

as per teh first one I gave you only copies the Bungee config packages and nothing else

bright jasper
#

I changed it to be single modulethrough the bungee config

#

lemme show the config

#

does not work

gaunt eagle
#

any idea?
1.16.5
value and signuture is correct by the way

paper viper
#

line 31 is the property map

gaunt eagle
#

yeap

paper viper
#

it cant even reach there (the values)

gaunt eagle
#

true xD

eternal oxide
gaunt eagle
#

You have Any idea why it's not working?

paper viper
#

debug

#

try setting up a debug enviornment

#

and debugging step by step and step into that

paper viper
gaunt eagle
# paper viper debug
[WARNING] 
[WARNING] Some problems were encountered while building the effective model for net.turkgamerz:skin:jar:1.0-SNAPSHOT
[WARNING] 'dependencies.dependency.systemPath' for org.spigotmc:spigot-api:jar should not point at files within the project directory, ${project.basedir}/libs/spigot-1.16.5.jar will be unresolvable by dependent projects @ line 72, column 25
[WARNING] 
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING] 
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING] 
#

Is that an important detail?

paper viper
#

why are you using the jar?

gaunt eagle
paper viper
#

but why are you using the jar?

gaunt eagle
#

mmmh

#

I don't know the other method

#

xD

paper viper
#

Did you run buildtools?

#

or did you download that jar from a website

eternal night
#

why even remove the texture property like that. You could also just clear the entire textures value set using PropertyMap#removeAll. Not like you want to keep a specific texture

gaunt eagle
paper viper
#

??

gaunt eagle
#

But I did it with the server on, I don't know how important it is

#

so

paper viper
#

No, cause you are making your life kinda harder lmao. Run BuildTools and provide the maven dependency normally

eternal night
#

where did that jar come from xD

gaunt eagle
eternal night
#

ah

paper viper
#

what?

#

spigot page?

eternal night
#

so an illegal one

bright jasper
eternal night
#

like getspigot

#

or something

paper viper
#

No no no no

#

do not use that

#

that is an illegal website

gaunt eagle
#

ha?

paper viper
#

That is bad

eternal night
#

yea

#

don#t use it

paper viper
#

that is illegal

#

too

eternal night
#

๐Ÿ‘ฎ

paper viper
#

it can also contain malware, outdated code

#

so dont use that

#

lol

gaunt eagle
#

๐Ÿฅฒ

eternal night
#

๐Ÿš”

#

follow this and build the jar on your own

paper viper
#

then, for the maven

#

use spigot