#help-development

1 messages · Page 1575 of 1

unkempt peak
#

Wait 1 tick and remove from inventory

sage swift
#

can't you do it same tick?

#

cancel the event then

unkempt peak
#

i dont remember the error but i had to delay a tick to get it to work properly

#

on the event wait 1 tick and remove the empty normal bottle

sage swift
#

cancel the event, do your stuff, decrease item in hand (or offhand!) count by 1

unkempt peak
#

or like gecko said cancel and remove the honey bottle and add the custom one

#

either way works

sage swift
#

although mine is easier 🙊

unkempt peak
#

eh that's a matter of opinion honesty I'd say either way is very easy

sage swift
#

harder to track the empty bottle

unkempt peak
#

true

sage swift
#

what happens if the player drinks it with a full inventory

unkempt peak
#

inventory check?

#

also 1 tick delay would solve that

#

bottle consumed wait 1 tick remove empty add custom

sage swift
#

if the player drinks it with a full inventory, it would drop on the ground...

unkempt peak
#

oh

#

i thought it just replaced the full one

sage swift
#

not if there is more than one

#

in your case there are many variables that can occur in a tick with an empty bottle: being thrown out, moved around, etc

fluid cypress
#
System.out.println(player.getName()+ "'s money:");
System.out.println("balance: " + PermissionShops.economy.bankBalance(player.getName()).balance);
System.out.println("amount: " + PermissionShops.economy.bankBalance(player.getName()).amount);

how i get the economy object

RegisteredServiceProvider<Economy> response = getServer().getServicesManager().getRegistration(Economy.class);
economy = response.getProvider();

output

[03:22:31 INFO]: misdocumeno's money:
[03:22:31 INFO]: balance: 0.0
[03:22:31 INFO]: amount: 0.0

tho if i do /money or /balance i get what i have. am i doing something wrong in that code? or its bc the economy plugin is essentials and not vault?

#

im using both, vault and essentials

sage swift
#

bankBalance is different from the normal balance i think

fluid cypress
#

you right, it has to be economy.getBalance(player)

#

thanks

#

hasPermission will always be true for ops?

torn oyster
#

help

#

?paste

undone axleBOT
torn oyster
#

1st is error

#

2nd is plugin.yml

hidden delta
#

are you sure you are including the plugin.yml in correct folder?

torn oyster
#

yes

#

i used minecraft plugin for intellij

quaint mantle
#

what is the best way to listen click events for menus

hidden delta
#

Inventory Events?

quaint mantle
#

I mean other than checking the title of the inventory

iron condor
#

is there a way to disable a player from using any command (without changing perms?)

iron condor
#

thanks 🙂

hardy swan
#

or some may say holder is good too, can be neater

#

will hardly recommend comparing titles of inventory views

quaint mantle
#

can I use PersistentData for it?

hardy swan
#

why would you

#

dun think so

#

menu should be recreated when your plugin enables or whenever the player view the menu

quaint mantle
#

Hello how i get length of results?
code:

ResultSet result = PVP.plugin.getManager().getSQL().query("SELECT * FROM PVP_stats ORDER BY 'kills' DESC");
#

length or size

quaint mantle
hardy swan
quaint mantle
#

and then just opening them with command

quaint mantle
#

like if have in data 5 players so print 5

#

so how i get the size?

torn oyster
#

help

hardy swan
#

and increment the count

hollow bluff
torn oyster
#

authors is a thing

quaint mantle
torn oyster
#

i've tried author too

drowsy helm
#

i think a plugin description is required

torn oyster
#

i don't think so

drowsy helm
#

the error is being thrown at the "getPluginDescription" method

#

worth a try

hollow bluff
#

@torn oyster This one maybe softdepend: ["PlaceholderApi", "LuckPerms"], remove all the "

torn oyster
#

well

#

i didn't have softdepends before that

#

and the errorwas still there

hardy swan
hollow bluff
torn oyster
#

new error

#

?paste

undone axleBOT
torn oyster
hollow bluff
hardy swan
#

authors exists too

#

fyi

hollow bluff
#

I know.

torn oyster
#

in resources

#

its not plugin.yml anymore anyway

craggy cosmosBOT
torn oyster
#
            Class.forName("com.mysql.cj.jdbc.Driver");
            setConnection(DriverManager.getConnection("jdbc:mysql://" + host + ":"
                    + port + "/" + database, connectionProps));```
#

that is whats causing error

#

DriverManager.getConnection

#

is the main error

quaint mantle
#

can someon help me make gui

hollow bluff
quaint mantle
#

mk

tepid monolith
#

`public boolean ifSuicide;

@Override
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {

    if(command.getName().equalsIgnoreCase("kys")){
        if (sender instanceof Player) {
            Player player = (Player) sender;
            player.setHealth(0);
            player.sendMessage(ChatColor.GRAY + "That was too eazy, " + ChatColor.RED + player.getDisplayName());
            boolean ifSuicide = true;
        }else{
            System.out.println("You can't execute this command from the console!");
        }

    }`
#

@EventHandler public void onDeath(PlayerDeathEvent event){ if(ifSuicide == true){ event.setDeathMessage(""); }else{ event.setDeathMessage("Die!"); } }

#

does anyone know whats wrong?

#

trying to disable the death message only when the "kys" command is executed

rancid quail
#

if(ifSuicide == true){ - makes no sense.
Since if (ifSuicide) <- is already the thing you want

#

boolean ifSuicide = true; <- Does you IDE doesn't show you any error?

#

ifSuicide = true; would work

tepid monolith
#

nope it doesnt

rancid quail
#

Without the boolean

tepid monolith
#

so like this?

rancid quail
#

?

tepid monolith
#

@EventHandler
public void onDeath(PlayerDeathEvent event){
if(ifSuicide){
event.setDeathMessage("");
}else{
event.setDeathMessage("Die!");
}
}

rancid quail
#

Yea

tepid monolith
#

ifSuicide = true;

#

and this

#

alr lemme try

rancid quail
#

But the boolean is now forever true 🔨

tepid monolith
#

what im looking for is to only disable the death message when that command is executed

rancid quail
#

Well, you have to set the boolean back to false

tepid monolith
#

how tho

rancid quail
#
    @EventHandler
    public void onDeath(PlayerDeathEvent event){
        if (ifSuicide) {
            event.setDeathMessage("");
            ifSuicide = false;
        } else {
            event.setDeathMessage("Die!");
        }
    }
tepid monolith
#

oh

#

lol

#

true

rancid quail
#

🙂

tepid monolith
rancid quail
#

Please send us your full class ^^

tepid monolith
#

sure

rancid quail
chrome beacon
#

?paste

undone axleBOT
tepid monolith
rancid quail
#

Whatever 🤷‍♂️

tepid monolith
#

it doesnt send it when i die naturally

rancid quail
#

?help

undone axleBOT
#
CafeBabe Help Menu
*Red V3*
**__Admin:__**

selfrole Add or remove a selfrole from yourself.

**__Cleanup:__**

cleanup Base command for deleting messages.

**__Core:__**

embedset Commands for toggling embeds on or off.
info Shows info about CafeBabe.
licenseinfo Get info about Red's licenses.
mydata Commands which interact with the data CafeBabe has about...
set Commands for changing CafeBabe's settings.
uptime Shows CafeBabe's uptime.

**__CustomCommands:__**

customcom Base command for Custom Commands management.

**__Downloader:__**

findcog Find which cog a command comes from.

**__Mod:__**

names Show previous names and nicknames of a member.

**__ModLog:__**

casesfor Display cases for the specified member.
listcases List cases for the specified member.
reason Specify a reason for a modlog case.

**__Permissions:__**

permissions Command permission management tools.

rancid quail
#

Oh gosh

tepid monolith
#

its working just the opposite way

#

lol

rancid quail
#

👍

tepid monolith
rancid quail
#

The command shouldn't even work 😅

#

You have to register the command

tepid monolith
#

wym

#

in plugin.yml?

#

i did

rancid quail
#

Not only

tepid monolith
rancid quail
#

Well

#

#getCommand(String command)#setExecutor(new YourCommandClass());

#
  • you have to implement the CommandExecutor class
#

Or im just lost rn and it works without it in the main-class lol

eternal oxide
#

Yes if in the main class all commands in that plugin.yml will go through the main class.

tepid monolith
#

so no need to register then

eternal oxide
#

no

#

only if in other classes

tepid monolith
#

so any idea why does that not work?

eternal oxide
#

whats in your plugin.yml?

tepid monolith
#

commands:
kys:
description: You will die.
usage: /<command>
aliases: [kms, killme]

eternal oxide
#

?paste

undone axleBOT
reef wind
#

Depression plugin

tepid monolith
#

lol

rancid quail
eternal oxide
#

pluign,yml is fine

tepid monolith
#

was just a dark example

buoyant viper
eternal oxide
#

Does the plugin do anything at teh moment?

rancid quail
#

Well but "kys" is much weirder

tepid monolith
#

my problem is not the command not working tho

tepid monolith
#

fine

eternal oxide
#

its not killing them?

tepid monolith
#

it is

reef wind
#

Coca Cola eskumma

eternal oxide
#

Then whats not working?

tepid monolith
#

but the deathmessage doesnt work as it should be

tepid monolith
#

and make it display when they die naturally

void cedar
#

hi so uh i build finish a plugin and i got the file with me now, i want to test it but how?

eternal oxide
#

The death message is sent to other players. Not sure you can remove it

tepid monolith
#

When I set the deathmessage to be "" it doesnt say anything which is what i want but

reef wind
#

On death events it’s e.setDeathMessage() but that’s death events

tepid monolith
#

i want it to say "" ONLY when they execute that command

tepid monolith
eternal oxide
#

ah ok

#

move ifSuicide = true; above where you set health to zero

tepid monolith
#

alr

tepid monolith
#

thank you so much

supple elk
#

hey guys, does changing the colour of somebody's display name also change the colour of their name tag?

chrome beacon
#

Depends on how you change the color

#

If it's with teams then it changes in both places

supple elk
chrome beacon
#

Not sure if that's going to work but you can always try it

supple elk
#

can you help me test?

#

I can't see my own name tag

tepid monolith
tepid monolith
#

does "player.setInvulnarable(true)" work on 1.8.8?

chrome beacon
#

No

tepid monolith
#

alr

hybrid spoke
waxen plaza
#

How do I get a players persistent data container?

hybrid spoke
waxen plaza
#

I don't have that

hybrid spoke
#

you do if you are using the right version

waxen plaza
#

1.13 api

#

oh it doesn't have it

hybrid spoke
#

1.14 contains it

#

but what are you doing on 1.13

waxen plaza
#

I just wanted to learn how to use it

#

will persistent data container work on 1.13 if I make with api 1.14?

hybrid spoke
#

obv. not

waxen plaza
#

bruh

hybrid spoke
#

will a feature from version 3123.13 work in version 1.2?

waxen plaza
#

no lol

hybrid spoke
#

see

waxen plaza
#

I can't find boolean in PersistentDataType. ... what do I do?

eternal oxide
#

(Byte) 1

waxen plaza
#

oh so It's a byte

left swift
#

Hey, I'm currently working on my own world generator and I'd like some advice on how to create biomes. I mean, I will be able to break the map into "pieces" and manipulate blocks, height and terrain in them. My code:

    @Override
    public ChunkData generateChunkData(World world, Random random, int chunkX, int chunkZ, BiomeGrid biomeGrid) {
        ChunkData chunk = createChunkData(world);
        SimplexOctaveGenerator generator = new SimplexOctaveGenerator(new Random(world.getSeed()), octaves);
        generator.setScale(scale);

        for (int z = 0; z < 16; z++) {
            for (int x = 0; x < 16; x++) {
                double noise = generator.noise(chunkX * 16 + x, chunkZ * 16 + z, frequency, amplitude, true);

                int height = (int)(noise * 15.0 + 50);
                chunk.setBlock(x, height, z, Material.GRASS_BLOCK);
                chunk.setBlock(x, height-1, z, Material.DIRT);

                for (int i = height - 2; i > 0; i--) {
                    chunk.setBlock(x, i, z, Material.STONE);
                }

                chunk.setBlock(x, 0, z, Material.BEDROCK);
                biomeGrid.setBiome(x, z, Biome.FOREST);
            }
        }

        return chunk;
    }```
tardy delta
#

what does this do?

if (event.getView().getType() == InventoryType.PLAYER) {
            return;
        }

(InventoryClickEvent)

eternal oxide
#

Nothing as a View isn't an inventory type

#

um I'm wrong again, it seems it is

#

Determine the type of inventory involved in the transaction. This indicates the window style being shown. It will never return PLAYER, since that is common to all windows.

#

so I was half correct, that will do nothing. It is never a PLAYER type.

tardy delta
#

oh ok

honest iron
#

java.lang.IllegalArgumentException: Must supply additional paramater for this statistic

#

what does this mean?

#

the error is coming from MINE_BLOCKS

tardy delta
#

you have to specify the blocks

honest iron
#

yea, how i specify all

tardy delta
#

i did it something like this

public static int getTotalMinedBlocks(Player p){
        int total = 0;
        for (Material m : stoneBlocks) {
            total += p.getStatistic(Statistic.MINE_BLOCK, m);
        }
        return total;
    }
private final static EnumSet<Material> stoneBlocks = EnumSet.of(
            Material.STONE,
            Material.ANDESITE,
            Material.COBBLESTONE,
            Material.DIORITE,
            Material.GRANITE,
            Material.DIRT
    );
honest iron
#

can i use it?

tardy delta
#

ofcourse

#

idk if an enumset if that efficient but yea

honest iron
#

this also works

#

ill try it with 100 players

tardy delta
#

oki

ivory sleet
#

Iterating the Enum#values 🥴

#

didn’t know BlockLocation was a method

chrome beacon
jade haven
#

loot_tables vanilla work on spigot server?

chrome beacon
#

Depends on what you mean

hushed garnet
#

What's the right way to handle upgrading from 1.16 -> 1.17 with code like this?
net.minecraft.server.v1_16_R3.Entity

eternal oxide
#

?1.17

undone axleBOT
eternal oxide
#

not the link I expected

hardy swan
#

it is net.minecraft.network. something

chrome beacon
#

It depends on the class

#

Package names should be the same as vanilla

ivory sleet
#

So you wanna manipulate the client? Just shade it in 🐮 /s

quaint mantle
#
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
        if (sender instanceof Player) {
            Player player = (Player) sender;
            String page = args[0];
     }
}
Caused by: java.lang.ArrayIndexOutOfBoundsException: 0
        at pvp.pvp.commands.Top.onCommand(Top.java:43) ~[?:?]

Top.java:43

String page = args[0];
#

anyone help?

chrome beacon
#

Well ArrayIndexOutOfBounds

quaint mantle
#

so how to fix that...

#

any docs or something

chrome beacon
#

Don't access something out of bounds

#

?learnjava If you want docs it should be covered in these

undone axleBOT
hybrid spoke
ivory sleet
#

You can’t access the first arg if it doesn’t exist

quaint mantle
#

i tried new String[1]

obtuse basin
#

Is there a way getting the last time a world got loaded?

ivory sleet
#

That’s stupid

chrome beacon
#

Why are you creating an argument

ivory sleet
#

You’re just fetching the command dispatch result

quaint mantle
#

so how to do this -_-

frigid python
#

Potion deprecated, what the alternative?

ivory sleet
#

if (args.length >= 1) {
args[0] // <— here that would be acceptable
}

obtuse basin
ivory sleet
undone axleBOT
chrome beacon
#

It does

austere cove
#

yo how do I detect if a user right clicking an armor piece will equip it

ivory sleet
#

PlayerInteractEvent presumably

frigid python
ivory sleet
#

Check ifs a right click and involves an item

austere cove
#

yea but if you look at a block depending on the block it wont equip it

hybrid spoke
#

there is no offical way to do that

frigid python
#

But I can't apply on the itemstack

#

only on livingentity

ivory sleet
#

Thought block interaction was post item interaction

austere cove
#

no

#

same event

#

if you right click a crafting table it wont equip armor

ivory sleet
#

Oh right

hybrid spoke
#

if canceling doesn't work, set the equipped armor back

ivory sleet
#

@frigid python then you’re looking for PotionMeta

chrome beacon
austere cove
#

but then theres conditions too, e.g. a cake works if you're not hungry and are not in creative

ivory sleet
#

Mixins would be handy now certainly

frigid python
hybrid spoke
molten hearth
#

cannot access org.bukkit.command.Command is this uh normal

urban hedge
#

How do I hide the ability for players ingame to see / commands?

austere cove
#

yea that one also doesnt cover that

hybrid spoke
#

so if you right click a cake and you are hungry it doesn't fire the interaction event or what?

austere cove
#

it does but it does not equip the armor piece

#

eating gets priority

hybrid spoke
#

if minecraft doesn't do it, do it by yourself

austere cove
#

idk it I know all edge cases

#

:V

frigid python
chrome beacon
#

Use the search bar

#

._.

chrome beacon
#

Anyway Conclure already told you what to use

frigid python
#

Lol you funny bro

#

The docs he sent me doesn't have the answer, I need to apply potion on itemstack, not entity and not livingentity

chrome beacon
#

My guy read please

molten hearth
hardy swan
frigid python
#

Do you really think I would ask questions here if I already did and didn't find any solution? please man if you not willing to help just don't reply me please

hardy swan
#

the deprecation note will normally give you hints on what you can use in replacement

frigid python
frigid python
#

Why since the update I get java.lang.IllegalStateException: zip file closed error? anyone know what can cause this?

austere cove
#

malformed zip?

frigid python
#

I built it like I usually did

reef wind
frigid python
#

And I saw on paperMC discord server that a lot of people having this issue lately

hybrid spoke
#

maybe you wanna show us the full error?

unreal quartz
#

maybe you wanna go to paper

hybrid spoke
#

^

frigid python
#

Sure one moment

#

I'm using spigot sometimes and paper some other times 😄

hybrid spoke
#

whats on line 265

frigid python
#

I know to read error traces, there's nothing wrong with the project's code for sure

#

I changed nothing, since the update it's started to be a thing in most of my resources

hybrid spoke
#

so there you have the solution

#

just update your code

sand rune
#

Guys how to send player to another server and don't tell me Bungee Messaging Method , because I don't understand IT

sand rune
#

@hybrid spoke okay. But how to understand it ?!

quiet ice
hybrid spoke
#

?pmc

#

damn

sand rune
#

**How to understand it **

hybrid spoke
#

wasnt there a command for PMC

sand rune
#

!pmc

#

?pmc

#

;pmc

quiet ice
#

?cc list

sand rune
#

Meow

hybrid spoke
#

?mywarnings

sand rune
#

How to understand

unreal quartz
#

?cba

undone axleBOT
#

fatpigsarefat#5252 definitely regrets to for the most part inform you that unfortunately, they essentially are unable to definitely assist with definitely your enquiry, which essentially is fairly significant. Please simply really ask again later or possibly kind of ask someone else about this enquiry, demonstrating that the person that ran this command generally regrets to kind of inform you that unfortunately, they for the most part are unable to generally assist with actually your enquiry in a subtle way. Thank you very sort of much for kind of your time and the person that ran this command specifically wishes you a really good day, so the person that ran this command really regrets to actually inform you that unfortunately, they literally are unable to definitely assist with very your enquiry, or so they particularly thought.

frigid python
quiet ice
hybrid spoke
hybrid spoke
hybrid spoke
frigid python
hybrid spoke
frigid python
#

Not but for real, I need to change nothing, something wrong

hybrid spoke
#

you wanted a solution

#

there you have it

frigid python
#

What you mean update my code? the startup methods still the same so it's not matter

quiet ice
#

Not your code

#

This is an error with the server

#

This is another instance of the Classloader saying "fuck you" and where you basically wasted your time

frigid python
unreal quartz
#

the solution

#

is to fix it

frigid python
#

Alright thank you for the quick solution

unreal quartz
#

no problemo

sharp bough
#

?cba

undone axleBOT
#

Paradis#4432 definitely regrets to for the most part inform you that unfortunately, they essentially are unable to definitely assist with definitely your enquiry, which essentially is fairly significant. Please simply really ask again later or possibly kind of ask someone else about this enquiry, demonstrating that the person that ran this command generally regrets to kind of inform you that unfortunately, they for the most part are unable to generally assist with actually your enquiry in a subtle way. Thank you very sort of much for kind of your time and the person that ran this command specifically wishes you a really good day, so the person that ran this command really regrets to actually inform you that unfortunately, they literally are unable to definitely assist with very your enquiry, or so they particularly thought.

left swift
#

Hey, does anyone know how I can create my own biomes grid and then change blocks and terrain for each biome?

sharp bough
#

16 chunks

#

thats a lot of blocks

sharp bough
#

theres plugins that take that and add schematics for example

#

you should make a void world for that

#

yes

#

i think you have to add a plugin

#

that adds void to mv

#

i dont wanna be rude cuz i woke up in a good mood today, but that was the first link

#

i googled "multiverse core void world"

#

try tha

bitter ridge
sharp bough
#

show current code

left swift
hushed garnet
#

How do I include a library.jar in my plugin without using maven? I'm using Eclipse and not really sure what to do. Trying to import BookAPI...

quaint mantle
#

still not totally sure how listeners work. if i create a new method and name it whatever i want (say, for pedagogical purposes, onButtFart) and then pass an argument (say, final InventoryCloseEvent event) will any occurrence of said InventoryCloseEvent call this method?

worn tundra
#

Then just export it as a runnable jar file & tick "include the libraries"

frigid python
#

I found the reason for the closed zip file issue when the system trying to access other class rather than the main class it's printing this error

#

There's nothing wrong with the classes by the way I checked that

#
[17:58:54 WARN]: java.lang.IllegalStateException: zip file closed
[17:58:54 WARN]:        at java.base/java.util.zip.ZipFile.ensureOpen(ZipFile.java:828)
[17:58:54 WARN]:        at java.base/java.util.zip.ZipFile.getEntry(ZipFile.java:327)
[17:58:54 WARN]:        at java.base/java.util.jar.JarFile.getEntry(JarFile.java:514)
[17:58:54 WARN]:        at java.base/java.util.jar.JarFile.getJarEntry(JarFile.java:469)
[17:58:54 WARN]:        at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:167)
[17:58:54 WARN]:        at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:586)
[17:58:54 WARN]:        at org.bukkit.plugin.java.PluginClassLoader.loadClass0(PluginClassLoader.java:119)
[17:58:54 WARN]:        at org.bukkit.plugin.java.PluginClassLoader.loadClass(PluginClassLoader.java:114)
[17:58:54 WARN]:        at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:519)
#

The issue can be maybe on Eclipse IDE?

hardy swan
#

actually no, does it even matter

quaint mantle
#

i have that but idk if it does

quiet ice
#

That is unless you closed the zip file manually, but I highly doubt that

summer scroll
opal juniper
#

^

#

as long as you have the correct event set as well

quaint mantle
#

cool ok

quiet ice
#

and as long as it is loaded by the correct classloader

prime mountain
#

Quick question, why is there no spigot api wrappers? Can’t you just compile to Java from an api wrapper then compile to bytecode

unreal quartz
#

wut

#

actually it think someone was working on one for javascript

prime mountain
#

You make a wrapper for the api calls then you make a program which formats it to Java so no bottleneck

unreal quartz
#

how would that solve a bottleneck

opal juniper
#

you would need a pretty advanced lexer for that

#

but i guess its possible

prime mountain
#

Because currently ((unless I misunderstood)) current wrappers are impractical for “”reasons””

#

Presumably weird jvm stuff

quaint mantle
#

what's the point

ivory sleet
#

Aren’t most? And the ones that may arrive in the future

opal juniper
#

I mean - i often see people trying to use this shitty python wrapper which has a few things you can do, but doesn't fully expose the api

prime mountain
#

I wanna do stuff in Nim then compile to JS then compile to Java but the api Doesn’t exist obviously

hardy swan
#

somehow Method has annotation getters

unreal quartz
#

some can be included in the compilation to be read at runtime

hardy swan
#

ahh ok

latent merlin
#

is there a plugin that replaces blocks when they are broken?

prime mountain
#

There is one if you code your own.

tardy delta
#

does barstyle.SOLID means a filled bossbar?

hushed garnet
# worn tundra

I tried checking all the options I could a few different ways and still no dice...

real spear
unreal quartz
#

why is there basicalyl everything in that jar

#

also those have different names

#

plugins/BloodyPlugin-0.0.1-SNAPSHOT.jar BloodyServerPlugin - Copy.zip

real spear
unreal quartz
#

well no that's just the file name

real spear
unreal quartz
winged anvil
#

How come I can only access my singleton class when I call it and the methods under a @Override or @EventHandler

winged anvil
#

Ive got this class public class a { public static PlayerGroups caller = new PlayerGroups(); }

#

and I use it so I can access that instance from other packages to only use that group

winged anvil
#

But I can only access its methods when its inside @Override or @EventHandler ```public class PlayerLeaveListener implements Listener {

@EventHandler
public void onPlayerLeave(PlayerQuitEvent e) {
    System.out.println(a.caller.getPosition(1));
    System.out.println(a.caller.getPosition(2));

    Player player = e.getPlayer();
    if (player == a.caller.getPosition(1)) {
        a.caller.clearPosition(1);
        a.caller.sortGroup();
    } else if (player == a.caller.getPosition(2)) {
        a.caller.clearPosition(2);
    }

}

}

shut field
#

are you importing it into the other classes

winged anvil
#

yes

shut field
#

events need @ EventHandler

unreal quartz
#

what happens when you access it not inside an override or eventhandler

winged anvil
#

I cant call the methods

#

like they dont appear

unreal quartz
#

whats the access modifier of the methods

#

are they public

winged anvil
#

yes

unreal quartz
#

have you tried just calling one anyway

winged anvil
#

yes

#

nothing

shut field
#

don't they need to be static

unreal quartz
#

so.. it works then?

winged anvil
#

no like its red

#

it doesnt call

unreal quartz
#

send the PlayerGroups class

winged anvil
#

pastebin?

#

or ``````?

unreal quartz
#

?paste

undone axleBOT
winged anvil
quaint mantle
#

Hello can someone helpme in this?
i made leaderboard with pages but it doesnt split the players
like i do
10 players per page
and i have 20 players
it say have 2 pages but in both of them it show 20 players
code:
https://haste-bin.xyz/yuzolefahi.java

unreal quartz
glossy scroll
#

I cant really help with the IDE problems but cant this whole class be replaced with an array?

#

With some convenience methods ofc

#

Also that class isnt a singleton

winged anvil
#

well shiii

#

idk i just looked up what I needed and i saw singleton

unreal quartz
glossy scroll
#

A singleton manages one instance of itself and uses static accessors to modify said instance

#

So only 1 instance exists at all times

sharp bough
unreal quartz
#

you shoudl also consider having uuid in PVP_stats a foreign key to names so you can perform a join on the database rather than sending a ton of queries

quiet ice
#

everything can be a singleton if you try hard enough

glossy scroll
#

ok

winged anvil
#

what do the @Override and @fresh templetHandler do exactly? Like whats the term for them

#

rip even

glossy scroll
#

Theyre just annotations

#

They have nothing to do with compiled code

unreal quartz
#

override tells the compiler it is overriding a method, eventhandler is used by spigot to register your methods where youo listen to events

glossy scroll
#

Well eventhandler does

#

Not override

#

Zlaio i dont think the annotations are your problem

sharp bough
#

poor even, hes a victim of his own nickname

winged anvil
#

yeah ik

#

i just wanted to know

#

but its weird cause i can call them inside that annotation

glossy scroll
#

I doubt thats the case tbh

#

?xy

undone axleBOT
harsh kayak
#

is there any way to go back in a blockiterator

unreal quartz
#

no

weary geyser
#

Does anyone know when I print out e.getClick() and I right click, nothing shows up. But when I left click, it says "LEFT" (InventoryClickEvent)

unreal quartz
#

are you holding anything

weary geyser
#

*In InventoryClickIvent

unreal quartz
#

are you clicking anything

#

like an actual item

weary geyser
#

Yes

odd tapir
#

Hello guys, i'm diving into configuration serialization/deserialization... but when i try to get the set it gives me a null value, here my code: ```java
@Override public void onLoad() {
ConfigurationSerialization.registerClass(Database.class, "DatabaseConfig");
saveDefaultConfig();
}
@Override public void onEnable() {
Database db = getConfig().getObject("database", Database.class);
getLogger().severe(db.getHostname());
}

#

what's wrong?

weary geyser
#

Does it implement Serializable

odd tapir
#

yeah

harsh kayak
#

is there a way to check the next item in a BlockIterator without going to the next one

weary geyser
#

Question, why are you doing that on load?

odd tapir
weary geyser
#

Do it onEnable

odd tapir
#

hm ok i'll try and let you know

eternal oxide
undone axleBOT
vivid gazelle
#

Hello

weary geyser
#

Hi

vivid gazelle
#

Can anyone fix this code

#

on join:
open virtual chest inventory with size 4 named "&bWorlds" to player
set {_i} to 10
loop all worlds:
format gui slot {_i} of player with grass block named "&e%loop-value%" with lore "&7Click to teleport" to run function tpToWorld(player, loop-value)
add 1 to {_i}

function tpToWorld(p: player, world: world):
if {_world} is a world:
teleport {_p} to world {_world}
message "&aSuccessfully teleported you." to {_p}
stop
else:
message "&cError whilst receiving world info. Contact staff." to {_p}

odd tapir
odd tapir
weary geyser
#

And you cannot just say "fix code"

vivid gazelle
#

Oh sorry

vivid gazelle
#

bye

weary geyser
#

Correct me if I'm wrong, but does it not have to implement java.io.Serializable too?

eternal oxide
#

no

weary geyser
#

Alright

eternal oxide
#

database looks fine

glossy scroll
#

@odd tapir deserialize is static

#

Wait

#

My bad

#

Read the docs

#

@odd tapir

#

Did you do that

glossy scroll
#

What’s the reason for setting the alias?

odd tapir
#

i don't want to have issue just for the name

#

it's just for safety

weary geyser
#

You could try putting it in a static block idk

eternal oxide
#

Do you have the class saved to your config?

glossy scroll
#

Hmmm what’s the config look like

#

Seems that codewise it’s fine

odd tapir
#

||```yml
database:
type: 'mysql'
username: 'root'
password: 'root'
hostname: 'localhost'
port: '3306'
name: 'database'

eternal oxide
#

Thats not serialized, thats just an entry

odd tapir
#

oh

eternal oxide
#

getConfig.set("database", new Database())

weary geyser
#

^

eternal oxide
#

then save, and you will see what it should look like

odd tapir
#

ok

#

it "just" have the ==: with the alias

#

so i think that's the error

#

i didn't implemented it

glossy scroll
#

No thats how the serialization works

#

You dont need to use that value

#

Same thing when you save a Location to a config too

real spear
#

I am using external libraries, but don't want to shade bukkit into my plugin for file size. Why isn't this working? (I am very new to this, so sorry if it is just me being an idiot)
Part of my pom.xml that is the issue:
<build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-shade-plugin</artifactId> <version>3.2.4</version> <executions> <execution> <phase>package</phase> <goals> <goal>shade</goal> </goals> <configuration> <artifactSet> <excludes> <exclude>org.spigotmc:spigot-api:1.17-R0.1-SNAPSHOT</exclude> </excludes> </artifactSet> </configuration> </execution> </executions> </plugin> </plugins> </build>

odd tapir
vivid gazelle
#

Can anyone link me to the skript discord server

eternal oxide
real spear
eternal oxide
#

yes

quaint mantle
#

so the fawe developers dont seem very nice and refuse to fix this big issue "because the plugin is open sourced" and said issue is causing major issues on my server. the issue in question is the "disallowed-blocks" config option. it just doesnt work at all. one of the devs said this (paraphrasing): "if the option doesnt work, then no, there isnt a way to blacklist blocks" like... its your plugin, maybe you should fix it.. since they refuse to fix it, im hoping someone from here can give it a shot ;shrug:

daring sierra
#

FAWE sucks tbh...

#

regular worldedit works just fine

quaint mantle
#

Spigot 1.17 is not optimized yet, I occupy 16 plugins, with 56 ram and 8 cores, and the tps go down

unreal quartz
quaint mantle
#

its causing the server to crash if someone decides to lag the server with a ton of blacklisted blocks and its getting really annoying at this point. we use plotsquared so we cant switch to regular w/e unfortunately

chrome beacon
#

By looking in their discord they never said they wouldn't add it. They just said it wasn't a priority because they have a lot of other things to fix

quaint mantle
chrome beacon
#

They will fix it when they have time

#

If you need it faster hire someone or do it yourself

unreal quartz
#

looking at the code i don't spot anything wrong with it at first glance

quaint mantle
unreal quartz
#

either way you should probably open an issue at least

#

on github

daring sierra
#

github my beloved

quaint mantle
#

if they arent gonna address it when someone directly asks i dont see why theyre gonna listen to a github issue..

unreal quartz
#

i am more likely to address something if it's a github issue rather than if it's a question in my discord server

#

discord is not an issue tracker

#

github is

quaint mantle
#

fair enough ig

unreal quartz
#

in fact i tend to just ignore people who suggest things through discord, since i am 99% likely to forget about it anyway

#

i have specific templates set up with the github issue tracker so i get the right information, and i make it very clear to use that to report bugs & suggestions to, rather than just dropping a line in discord

#

reddit

daring sierra
#

ok but

#

i thought i was in general tf

unreal quartz
#

jebaited

granite stirrup
#

XD

#

how can you think your in general

granite stirrup
quaint mantle
unreal quartz
#

lol

cinder timber
#

I think that galaxy background causes it 😉

molten hearth
#

so im having issues similar to this <#help-development message>
says the same, Cannot resolve method 'scheduleSyncDelayedTask' but im calling it like this ```java
public class TradeCommand implements CommandExecutor {
private final TradeSimulator tradeSimulator;

public TradeCommand(TradeSimulator tradeSimulator) {
    this.tradeSimulator = tradeSimulator
}

}

// and setting it like this in my main class
this.getComand("trade").setExecutor(new TradeCommand(this));

// within TradeCommand, I'm trying to use the var like this
Bukkit.getScheduler().scheduleSyncDelayedTask(tradeSimulator, new Runnable() {
@Override
public void run() {
// do stuff
}
}, 20, 20);```

weary geyser
#

bro everyone do be hating on it idk what's so bad

unreal quartz
unreal quartz
granite stirrup
#

when is it gonna be able to convert Double to Integer

molten hearth
granite stirrup
#

yes you are?

unreal quartz
#

there is an implicit cast when you make the comparison

#

yes

#

System.currentTimeMillis is a long, so map.get(s) will need to also be converted to a long

#

assuming that the map stores Double, then yeah

granite stirrup
#

wait you cant?

unreal quartz
#

interesting

#

i don't know where the double has come from then

granite stirrup
#

im pretty sure you can compare a Integer to a int or Long to long

unreal quartz
#

the issue is when they're different boxed types

granite stirrup
#

whats candyapi?

unreal quartz
#

because then technically they're objects then, and different

granite stirrup
#

it says the error is in there

#

CooldownBasePlayer line 21?

#

can you please put it in a paste

#

?paste

undone axleBOT
granite stirrup
#

yeah but its low quality

#

barley

#

is that line 21?

sharp bough
#

what should i use to move data between local plugins? is it possible to broadcast data internally?

#

like an economy plugin

granite stirrup
#

hmm yeah weird sys idk whats wrong

sharp bough
#
        return config.getLong("kitsUsed." + id + "." + kitID);
    }

    //if data > 0 kit is on cooldown return true
    public boolean kitIsOnCooldown(int kitID) {
        return ((getWhenKitIdWasUsed(kitID) / 1000) +
                (kits.getKitCooldown(kitID)) -
                (System.currentTimeMillis() / 1000) > 0);
    }```
for cooldown you can use that
#

ah sorry

granite stirrup
#

wait sys you know the start cooldown method where you have a arg with int cooldown maybe change it to long cooldown

#

same error?

#

idk wtf you got that error because your legit not casting Double to Integer

#

im thinking its this bit System.currentTimeMillis() < map().get(s)

#

maybe the < is casting map().get(s) to Integer?

#

idk why it would tho

unreal quartz
#

have you tried souting the map.get to see what it really is

#

should be long but might as well see

#

i say just fuck it and cast it to Number and .longValue()

#

can't see whats wrong with ti

#

don't see the point of holding Dates if all you care about is the numeric representation of it

#

well like i said you can cast it to Number and just get the long value

#

the boxed primitives extend Number so that should be safe

eternal oxide
#

map().get(s).longValue()

molten hearth
#

uh how do I color clay blocks? its being fussy and not accepting theBlock.setData((byte) 1)

unreal quartz
#

dunno what version ur on but modern mc versions dont have a concept of data codes anymore

#

each colour has a seperate material

molten hearth
#

1.17.1 but im trying to use legacy_stained_clay

unreal quartz
#

why

worn tundra
#

why

molten hearth
#

because I need to view it colored on 1.8 lol

unreal quartz
#

that won't work on 1.8

molten hearth
#

but it did doe

worn tundra
#

Why not use 1.8 then

#

completely

unreal quartz
#

if you put that on a spigot server running 1.8, it wont

molten hearth
#

oh no, I meant the server is 1.17.1, the client is 1.8

unreal quartz
#

LEGACY_STAINED_CLAY did not exist then

#

so why wouldn't using the named colour materials work

worn tundra
#

Bruhh

unreal quartz
#

does viaversion not translate it or something

molten hearth
#

dont think it exists anymore

worn tundra
#

What doesn't?

#

ViaVersion does translate it

molten hearth
#

should I try concrete

worn tundra
#

diauwjdiuaj

molten hearth
#

and I mean GREY_STaINED_CLaY for instance doesnt seem to exist

#

or gray

#

ill try concrete 🤔

unreal quartz
#

isn't it called terracotta or somethign like that

molten hearth
#

oh right I always mix them up

worn tundra
shut field
#

anyone know what causes this?

#

I have "depend: [ProtocolLib]" in plugin.yml

unreal quartz
#

wrong java version

shut field
unreal quartz
#

no you're running java 8

quasi flint
#

Java 16

#

For 1.17

shut field
#

so I need to upgrade my java?

unreal quartz
#

yes

shut field
#

ok will do that rn

#

I was under the impression I had an up to date java

quasi flint
#

Nah

#

Java 8 Stone old

shut field
#

is it java se development kit?

granite stirrup
#

java 1.8 is from 2006

#

i think

muted idol
#

hey there just a quick question but how would i go about giving a random string name to a json array
for example: JSONArray randomName = new JSONArray(); and then the randomName would be a randomly generated string

granite stirrup
#

isnt there like JsonString?

shut field
iron condor
#

is there an event of player setting a respawn loaction?

granite stirrup
#

added it to your intellij and select it?

shut field
eternal oxide
#

You have built with JDK 16 but you are running JRE 8

granite stirrup
#

lol you add it in the sdk sections in the settings

#

and you select it in the project settings

#

pretty sure

granite stirrup
eternal oxide
#

it says the class file is 60 but expected 52. So it was built with java 16

granite stirrup
#

oh i thought it said it expected 60 but was 52

#

xd

#

@eternal oxide wait but didnt he say hes running 1.17.1 spigot how is he running it on java 8? or was that someone else

unreal quartz
#

if u notice

#

it's a nms class which is compiled as java 16

#

and is what is causing the error

opal juniper
#

how come all the spigot stuff is spelt in american english angryeyes

iron condor
#

Does getBedSpawnLocation() includes anchor???

granite stirrup
ivory sleet
#

I would presume not

#

The name kinda hints it but unsure

unreal quartz
#

well i dont see any other method for setting anchor spawn location, and the docs are vague, so maybe

#

but then it wouldnt make sense if there was both a bed and anchor spawn, so probably not

granite stirrup
#

Gets the Location where the player will spawn at their bed, null if they have not slept in one or their current bed spawn is invalid. it says

#

isnt the anchor for all players

unreal quartz
#

no its per player

granite stirrup
#

it is?

unreal quartz
#

probably

#

it is

#

well actually that method might since the player can only have one respawn location set

granite stirrup
#

pretty sure it doesnt

#

but you can try

unreal quartz
#

precisely what i am doing now

granite stirrup
#

and if it doesnt then its up to you to choose to use nms or something

unreal quartz
#

because it has now piqued my interest

granite stirrup
#

nms might have a way to get/set it idk

unreal quartz
#

can confirm it in fact does

#

set spawn location to respawn anchor then relogged

PlayerJoinEvent: Bukkit.broadcastMessage(event.getPlayer().getBedSpawnLocation().toString());
-> [20:17:06] [Server thread/INFO]: Location{world=CraftWorld{name=world_nether},x=-17.5,y=71.0,z=25.5,pitch=0.0,yaw=0.0}```
granite stirrup
#

i guess that makes sense if they just set the bed spawn they wouldnt have to change alot of the code

#

and thats probs also why when you use a respawn anchor in the end you cant go back to the overworld

#

without using cheats

unreal quartz
#

or deactivating it

granite stirrup
unreal quartz
#

you can't even use a respawn anchor in the end

#

tf u on about

granite stirrup
#

i did it before...

#

i think maybe they made it so you cant in 1.17

#

but it was in 1.16 working (pretty sure)

#

atleast i think (respawn anchors are in 1.16 right?)

granite stirrup
#

cuz when i did it i was in 1.16 or 1.15 (not sure)

#

and 1.17 wasnt out then

robust crypt
#

how about u try it out

granite stirrup
#

cant

robust crypt
#

why

granite stirrup
#

i dont want to open mc ;-;

#

it takes 10 years

fluid cypress
#

is there any way of checking if an op has a permission, without hasPermission returning always true?

robust crypt
#

yes

#

wait wat

#

idk

granite stirrup
#

im pretty sure if you have a permission plugin if a player has op and you remove a permission from that player pretty sure hasPermission doesnt return true on that permission

fluid cypress
#

it does

robust crypt
#

prove it

fluid cypress
#

im using groumanager

#

idk if that has something to do

granite stirrup
#

eww

robust crypt
#

?

ivory sleet
#

LuckPerms 😌

robust crypt
#

noice

granite stirrup
unreal quartz
#

to use it?

granite stirrup
#

pretty sure you dont have to ?

unreal quartz
#

you do

#

it's like a bed

granite stirrup
#

i dont remember doing that

robust crypt
unreal quartz
#

you need to set your spawn point

#

bro

fluid cypress
# ivory sleet LuckPerms 😌

it was literally the only one that worked when i started the server about 4 years ago, for some reason the rest didnt work, i tried all of them, and i have no plans of changing it now

unreal quartz
#

have you even played the fucking game

robust crypt
#

lmao

granite stirrup
#

i just havent used respawn anchors in a while

fluid cypress
#

yes it is

#

🙂

robust crypt
#

u can make a plugin that the respawn anchor doesnt explode and set ur respawn point

granite stirrup
#

not now

eternal oxide
#

pff

granite stirrup
fluid cypress
#

what is this, a minecraft or a javascript community

#

how could that change in 1 year

#

well anyways, no way of knowing the real permissions of an op player?

granite stirrup
#

nah we hated it for like more than 3 years ago (idk)

#

but it was last updated a year ago

#

anyway no one likes groupmanager

#

its yucky

fluid cypress
#

thats rude

unreal quartz
#

so u might be chatting shit or smth

granite stirrup
#

nah i legit ran it in the end before

eternal oxide
granite stirrup
#

on the spigot page

#

it was last year of update

eternal oxide
#

Yes it did. I'm the dev for it 🙂

granite stirrup
#

anyway gm sucks

fluid cypress
#

he is literally the guy who made it lol

unreal quartz
#

i remember it taking like a solid week for me to figure out how to use groupmanager back in the day

#

but I was like 13

granite stirrup
#

and then i stop hating it

eternal oxide
#

a year ago I did a LOT of updates.

unreal quartz
#

then pex was the next thing that all the cool kids used and now its luckperms

granite stirrup
#

pex died

eternal oxide
#

pex was bad

unreal quartz
#

aren't they remaking it

granite stirrup
#

we dont even know if pex 2.0 was coming out

#

wasnt it like announced it was happening a year ago

unreal quartz
#

rip pex

#

it was simple and i liked it

#

luckperms is quite overwhelming imo

fluid cypress
#

why is intellij replacing this

if (!(sender instanceof Player)) return false;
Player player = (Player)sender;

with this

if (!(sender instanceof Player player)) return false;
unreal quartz
#

new java feature

fluid cypress
#

does instanceof cast sender into a Player or what

eternal oxide
#

its java 16 auto cast

fluid cypress
#

mmm

#

cool

unreal quartz
#

don't need the second line anymore to make it slightly more cleaner

granite stirrup
#

thats probs only thing i actually might like of java 16

#

lol trent(minehut admin also a dev of essx) is in the pex(its more just than pex tho) discord

oblique pike
#

What have i done wrong?

unreal quartz
#

show your dependencies

#

you're importing spigot not spigot-api

#

if you're not aware

oblique pike
#

i need spigot

unreal quartz
#

then run buildtools for those versions

oblique pike
#

spigot api is succesfully imported

granite stirrup
#

the spigot repo doesnt contain the spigot jars im pretty sure

oblique pike
unreal quartz
#

are you sure you need spigot and not spigot-api

oblique pike
#

i need both

unreal quartz
#

its either

#

spigot contains the api

oblique pike
#

okay, then i need spigot

granite stirrup
#

why do you need to use nms ?

unreal quartz
#

then make sure you have run buildtools for the version you want

#

it will be installed to maven local

oblique pike
#

okay

#

thanks

granite stirrup
#

what im wondering rn is why you need access to nms

oblique pike
#

something that cannot be done through the api for sure 🤔

granite stirrup
#

only thing that comes to mind is hiding entities or using packets

#

but then you could just use protocollib

oblique pike
#

Im just making an addition plugin to another plugin that uses nms

#

Thats all

robust crypt
#
Player player = (Player) sender;
        if (args.length >= 1)
            sender.sendMessage(ChatColor.RED + "bro you're so cringe lmao");
        else {
            Player target = Bukkit.getPlayerExact(args[0]);
            if(target instanceof Player) {
                ScoreboardManager manager = Bukkit.getScoreboardManager();
                Scoreboard board = manager.getNewScoreboard();
                Objective obj = board.registerNewObjective("test", "dummy","§cEwen_Is_Fat_XD§r" );
                obj.setDisplaySlot(DisplaySlot.BELOW_NAME);
                obj.setDisplayName("§cEwen_Is_Fat_XD§r");

                player.setScoreboard(board);

                player.setPlayerListName("§cEwen_Is_Fat_XD§r");
                player.setDisplayName("§cEwen_Is_Fat_XD§r");
                player.setCustomName("§cEwen_Is_Fat_XD§r");
            }
            else {
                sender.sendMessage(ChatColor.RED + "who tf is that?");
            }

would the scoreboard under my name work because i can't really confirm it myself

granite stirrup
robust crypt
#

explain how

granite stirrup
#

get someone else on to tell you or get a alt??

robust crypt
#

brhioaljsdkpaodjas

unreal quartz
#

back again with the ewen abuse

robust crypt
#

yes

#

xd

granite stirrup
#

i have a really slow hard drive

robust crypt
#

yes me too

granite stirrup
#

so it takes so long to open minecraft

#

the fucking bar saying its starting sometimes even rewinds

#

LIKe wtf

#

shouldnt it stay at where it is

robust crypt
granite stirrup
#

not fucking rewind

robust crypt
#

i cant even open minecraft

granite stirrup
#

then how are you testing your code works

robust crypt
#

if my server can handle it

granite stirrup
#

f

robust crypt
prisma needle
#

Hey guys, I've been getting into spigot and bungee developement for a few weeks now, and I've really been struggling to figure out how to communicate between the spigot plugin and the bungee plugin. Specifically I'm trying to make the bungee plugin send a plugin message to the spigot plugin which will then do something.... I've tried a bunch of different stuff and it hasn't worked, so would anyone have any advice or examples of how this could be achieved? Thanks :)

granite stirrup
prisma needle
#

As far as I can tell that is spigot to bungee, but would that also work to send from bungee to spigot?

ivory sleet
#

Myeah

robust crypt
ivory sleet
#

You need to register an incoming channel with a plugin message listener in your spigot plugin then iirc register the outcoming channel in bungee

granite stirrup
robust crypt
#

bruh ok

hushed garnet
#

Can somebody help me in understand how to remap 1.16 import net.minecraft.server.v1_16_R3.Entity; for 1.17?

Me iz confuzed.

granite stirrup
#

then dont use nms

#

simple

ivory sleet
#

Presumably without the nms version

granite stirrup
#

if changing a thing that your ide might suggest changing to so hard then dont use nms at all

prisma needle
hushed garnet
granite stirrup
#

¯_(ツ)_/¯

robust crypt
granite stirrup
#

i dont know nms doesnt have a 1000 page document on how to use it

#

cuz it isnt a api

robust crypt
#

@hushed garnet what is the 1.17 issue

granite stirrup
#

w h a t

robust crypt
#

tf

robust crypt
hushed garnet
#

I was using this to track entities for hologram text on item drop, Entity nativeEntity

ivory sleet
robust crypt
#

wtf is happening

granite stirrup
robust crypt
#

?

#

i am confusion

granite stirrup
#

i posted 1.17.1 leaks in chat today rn (even tho its released now)

robust crypt
#

wtf

granite stirrup
robust crypt
#

wtf????

granite stirrup
#

why are you saying "wtf" tho?

robust crypt
#

i dont get it

granite stirrup
#

???

#

yeah ik its released now

robust crypt
#

wat

#

it was released like 5 days ago

granite stirrup
#

1.17.1??

#

its fucking july

robust crypt
#

i am so confused

granite stirrup
#

i didnt mean legit now

robust crypt
#

k

granite stirrup
#

alr now your confusing me

#

i said its released now as its been released i dont mean actually rn

robust crypt
#

no u are

#

confusing me

granite stirrup
#

dont look at my cRingE skin

prisma needle
# ivory sleet Looks right, lmk if you encounter some issues Ig

So for some reason it's still not working....
This is the code to send the pluginMessage from bungeecord:


        Collection<ProxiedPlayer> networkPlayers = ProxyServer.getInstance().getPlayers();
        if ( networkPlayers == null || networkPlayers.isEmpty() ) return;

        ByteArrayDataOutput out = ByteStreams.newDataOutput();
        out.writeUTF( "SubChannel" );
        out.writeUTF(data);
        player.getServer().getInfo().sendData( "bungee:channel", out.toByteArray() );
    }```
This is the spigot main class to receive it:
```public class Main extends JavaPlugin implements PluginMessageListener {

    @Override
    public void onEnable()
    {
        getServer().getMessenger().registerIncomingPluginChannel(this, "my:channel", this);
    }

    @Override
    public void onPluginMessageReceived(String channel, Player player, byte[] bytes){
        if (!channel.equalsIgnoreCase("my:channel")) return;
        
        ByteArrayDataInput in = ByteStreams.newDataInput(bytes);
        String subChannel = in.readUTF();
        if (subChannel.equalsIgnoreCase("SubChannel")) {
            String data = in.readUTF();

            Bukkit.broadcastMessage(data);
        }
    }
}```
granite stirrup
#

put that in a paste

quiet ice
prisma needle
#

oh my that was a lot more than I thought

#

shouldn't have sent in here

granite stirrup
#

is this just texture or is it actually something different about the two?

#

because if its just texture why did mojang just not add customModelData to blocks and use that??

muted idol
#

hey there so right now im trying to run this code to save the players cords to a JSON file. the int i is just there to be temportary but for some reason it is not working i am getting no stack trace or anything
https://pastebin.com/gaJ7csfj

undone axleBOT
quaint mantle
ivory sleet
#

CommandGeek bungee:channel isn’t the same as my:channel PES_Blush

muted idol
#

now its in a pastebin :)

granite stirrup
#

why is a lectern in redstone tho

#

thats what i dont get

granite stirrup
quaint mantle
grave kite
#

Hi, is it possible to assign custom properties on a player object?

granite stirrup
chrome beacon
#

?pdc

quaint mantle
grave kite
muted idol
granite stirrup
#

why?

grave kite
#

my server is 1.12.2 only

granite stirrup
#

not a big deal

grave kite
#

that's not the solution

quaint mantle
oblique pike
#

Is there any way to cancel console messages when a named entity kills someone or dies ?

chrome beacon
granite stirrup
muted idol
#

np then

granite stirrup
grave kite
chrome beacon
granite stirrup
#

that isnt gonna be persistent though

#

so you will have to save it some where if you do want it persistent

chrome beacon
#

Hence why you store it yourself in a persistent file

prisma needle
granite stirrup
#

just please dont save to the file every time maybe just make it when someone quits the game or server stops

grave kite
#

but is it good from a performance perspective?

granite stirrup
#

you probs will be fine

grave kite
#

ok, thanks alot guys

ivory sleet
#

Or like the bungee option, I believe that might be needed also

prisma needle
#

yep I do, the servers are working just fine, and the spigot plugin and the bungee plugin are working perfectly, except for the communication between them