#help-archived

1 messages · Page 97 of 1

tiny dagger
#

bruh

#

check ()

#

you dum

brisk mango
tiny dagger
#

yeah you're casting

brisk mango
#

you dont know how to get a living entity from projectile lol

#

and you cast shooter to projectile

#

so what

#

is casting bad? or

tiny dagger
#

read again

#

i showed you the code lol

bleak creek
#

lmfao @tiny dagger you need to cast again

brisk mango
#

i didnt need your code?

bleak creek
#

to LivingEntity

brisk mango
#

why would i copy shit code

#

lol

keen compass
#

@tiny dagger 's code is still correct if that is what the debate is about

brisk mango
#

i wrote this down before u even sent it

bleak creek
#

temedy's is much cleaner, imo

brisk mango
#

u need to cast to LivingEntity

keen compass
#

however both methods work too

bleak creek
#

^

brisk mango
#

holy

#

these eclipse colors look fucking ugly in intellij

tiny dagger
sturdy oar
#

Is he trying to get when an entity gets hit by arrow?

tiny dagger
#

to me it looks clean enough

brisk mango
#

no one is trying nothing

bleak creek
#

lol you're welcome

brisk mango
#

eclipse

frigid ember
#

that is not clean 😢
also light theme 😭

brisk mango
#

im using eclipse too look

#

and it is

frigid ember
#

that one is clean

sturdy oar
#

ProjectileHitEvent would be better

brisk mango
#

🤦‍♂️

sturdy oar
#

oh nvm I think it's paper only

brisk mango
#

bruh we are not doing anything

#

this guy is just debating about how it looks bad

keen compass
#

@sturdy oar its in spigot api

sturdy oar
#

Oh cool

tiny dagger
#

you're saying it's bad

brisk mango
#

me?

keen compass
#

not entirely sure how either one is bad when they both do the exact same thing o.O

tiny dagger
#

all you did is switch it out a little :p

brisk mango
#

which btw makes the code look terrifyinh
you never tried to get the entity behind the projectile did you
@tiny dagger

keen compass
#

one just uses one line the other just performs additional checks before assigning 😛

brisk mango
#

whatever imma done losing my time here, gotta do some better stuff, cya

tiny dagger
#

tbh

keen compass
#

but there is other suited events though that would aide in such things about projectiles

tiny dagger
#

the checks we'll always check in my case

keen compass
#

like a projectilelaunchevent and projectilehitevent

worn gate
#

Error :Local variable avance defined in an ennclosing scoop must be final or effectivelly final

brisk mango
#

where are you defening the variable

#

if its outside the class then ofc

keen compass
#

love how you came back

#

we missed you too 😉

bleak creek
#

define your variable outside the loop

worn gate
#

lol

brisk mango
#

ive just made really good scheduler API

#

(maybe)

worn gate
#

🤣

brisk mango
#

its similar to BukkitRunnable but better

tiny dagger
#

do you have a github page?

brisk mango
#

nope

#

maybe

#

but forgotten nickname

tiny dagger
#

aham i see

brisk mango
#
new DukkitRunnable() {
            @Override
            public void run() {

            }
        }.runTaskAsynchronously(50L, 50L, TimeUnit.SECONDS);
worn gate
#
for (avance<messages.length; avance++) {
new BukkitRunnable() {
@Override
public void run() {
player.sendMessage(ChatColor.GREEN + messages[avance]);
}
}.runTaskLater(plugin, 100);
}
                        

Error on : for (avance<messages.length; avance++) { : Syntax error on token "(" ,; expected```
brisk mango
#

what is avance<message.length; wat

#

and wait

#

why is the runnable in the for loop

#

wrong

tiny dagger
#

slimefun here we go

brisk mango
#
new DukkitRunnable() {
            @Override
            public void run() {
for(String message : messages) {
Bukkit.broadcastMessage(message);
}
            }
        }.runTaskAsynchronously(50L, 50L, TimeUnit.NANOSECONDS);
worn gate
#

well it's in the loop so that the messages send by player.sendMessage(ChatColor.GREEN + messages[avance]); are separated by 100 ticks

brisk mango
#

no

#

its in a for loop

#

it should be other way around

worn gate
#

yes

#

ah...

brisk mango
#

the for loop should be in the runnable

tiny dagger
#

why would your dukkit runnable be any better than the bukkit one?

worn gate
#

yeah but i want the messages to be send every 100 ticks

tiny dagger
#

to me it's the same thing

brisk mango
#

it is because my runnable uses ScheduledExecutorService

#

its not

#

because Bukkit scheduling crap works in ticks

#

mine works in all time units

#

meaning even in nano seconds

#

also it uses way better scheduling than bukkit does, nothing can be better than the one from java itself

tiny dagger
#

well that would be okay for async only

brisk mango
#

u can do synchronized(this) { }

naive goblet
#

Yh ExecutorService is amazing

brisk mango
#

or make it synchronized

#

and there is other way how to make it in sync

tiny dagger
#

synch block can block any thread not just yours

worn gate
#

why is it not working ?

brisk mango
#

what is not working?

worn gate
#

for (avance<messages.length; avance++) { : Syntax error on token "(" ,; expected

naive goblet
#

gnaboo if you’re iterating over messages with a for loop you’re kind of doing it wrong

brisk mango
#

what is avance<messages.length

#

da fuck

#

learn to use loops

#

i told you how to use it

naive goblet
#

(int i = 0; i<messages.length; i++)

brisk mango
#

but that will broadcast all the messages

#

at the time

#

that are in there

naive goblet
#

And massages[i]

brisk mango
#

no

naive goblet
#

I mean he could just (String message : messages)

brisk mango
#

do for(String message : messages) and then int as an argument in the array

#

int i = 0;

Bukkit.broadcastMessage(messages[i]);
#

not even needed actually

worn gate
#

Error :Local variable avance defined in an ennclosing scoop must be final or effectivelly final @naive goblet

brisk mango
#

because its outside the fucking class

#

put it before the overriden run() method

#

new BukkitRunnable() creates new instance of a fucking class

#

and the stuff inside it

#

is inside the class

naive goblet
#

^

worn gate
#
for (int avance = 0; avance<messages.length; avance++) {
                            new BukkitRunnable() {
                                @Override
                                public void run() {
                                    player.sendMessage(ChatColor.GREEN + messages[avance]);
                            }
                            }.runTaskLater(plugin, 100);
                            }```
#

so what should i do here ?

brisk mango
#

losing my patience

naive goblet
#

gnaboo jesus

worn gate
#

🤣

naive goblet
#

The other way

#

I guess you want to loop inside the BukkitRunnable

vagrant widget
#

guys who wanna know my ip?

brisk mango
#

final String messages = {"gnaboo", "is", "noob"};

new BukkitRunnable() {
int count = 0;
@Override
public void run() {
if(count != messages.length - 1) {
Bukkit.broadcastMessage(messages[count]);
count++;
return;
}

Bukkit.broadcastMessage(messages[count]);
count = 0;

}
}.runTaskLater(plugin, 100);
naive goblet
#

Huh

vagrant widget
#

my ip is ||127.0.0.1||

brisk mango
#

@worn gate

vagrant widget
#

lol who deleted my message

#

you really think i'm that stupid

#

xd

#

i'm just bored tbh

tiny dagger
#

Bukkit.getScheduler().runTaskLater(plugin, () -> { for (String msg : messages) { player.sendMessage(ChatColor.GREEN + msg); } }, 100);

naive goblet
#

Zack not rly the right channel

tiny dagger
#

@worn gate

worn gate
#

i'll try @brisk mango

brisk mango
#

@tiny dagger im pretty sure he doesnt want to broadcast all the messages at the same time, does he

vagrant widget
#

Ohhhhh

worn gate
#

no

vagrant widget
#

how did i end up here

brisk mango
#

exactly, ive said it 10 times

#

why are u guys keep sending over the same fucking code

#

which doesnt help him

worn gate
#

lol

brisk mango
#

actually do count++ after broadcasting the message

#

or index out of bounds gonna happen

#

ill switch it

#

actually no it wouldnt

#

but it would broadcast same message twice i think

#

copy that and try it and tell me if it works

worn gate
#

still doesn't work 😢

brisk mango
#

i dont know what does mean it doesnt work

naive goblet
#

gnaboo what are you trying to do?

brisk mango
#

what the fuck

#

there are rules dude

worn gate
#
final String messages []={"msg1", "msg2"};
new BukkitRunnable() {
                        int count = 0;
                        @Override
                        public void run() {
                        if(count != messages.length - 1) {
                        Bukkit.broadcastMessage(messages[count]);
                        count++;
                        return;
                        }

                        count = 0;
                        Bukkit.broadcastMessage(messages[count]);

                        }
                        }.runTaskLater(plugin, 100);
                        
                        
                        Inventory Classe = Bukkit.createInventory(null, 54, "§8Quel classe choisisez vous ?");
                        player.openInventory(Classe);
            }
            }
        }.runTaskLater(plugin, 20*30);
    }
    ```
brisk mango
#

u cant have a void inside of a void

#

i said put the broadcast before count = 0;

worn gate
#

i first get the gui and then i get the first message

brisk mango
#

thats what you have ?

naive goblet
#

DKLMapper what are you trying to do? The antiLogout method is completely unnecessary

brisk mango
#

logic me boi

naive goblet
#

And it doesn’t work for the record

worn gate
#

i cannot but the broadcast b4 the cout = 0;

brisk mango
#

why not

worn gate
#

because count is undeclared

brisk mango
#

no

#

i didnt say declare new variable

#

i said assign value 0 to count

#

and count is declared, up there

#

in BukkitRunnable

#

also assigned

#

count = 0; doesnt declare a new variable, it assigns a value to an declared variable

worn gate
#

ok

#

i'll try with this

#

still doesn't work

brisk mango
#

"doesn't work"

#

🤦‍♂️

#

@Override
public void run() {
doStuff();
}

public void doStuff() {

}
#

u can call methods inside of anything

#

but u cant create new methods

#

inside of methods

naive goblet
#

DKL you can’t declare a method inside another method

worn gate
naive goblet
#

Yes you can invoke a method almost anywhere once it’s declared

brisk mango
#

declaring doesnt mean invoking

naive goblet
#

Create a new method inside an if statement?

brisk mango
#

and what @worn gate

naive goblet
#

Nope

#

Afaik it’s not possible

brisk mango
#

how afaik

#

ofc its not fucking possible

#

this is possible tho

#

public void method() {
new Runnable() {
@Override
public void run() {

}
};
}
worn gate
#

well same as before, the gui opens and then msg1 is send but not msg2

brisk mango
#

though its not an method in a method

#

but its a method in a class/interface

naive goblet
#

impossible?

brisk mango
#

jesus fucking christ

#

why would you have a event handler in if statement

worn gate
#

?

naive goblet
#

Just have the if inside the event handler?

brisk mango
#

exactly

#

why do you need it the other way around

#

what ive sent should work gnaboo

#

just debug the count lol

#

System.out.println(String.valueOf(count))

worn gate
#

?

brisk mango
#

you can do it the other way around.

naive goblet
#

DKLMapper encapsulation?

brisk mango
#

no

#

omg..

naive goblet
#

If the variable is from another class encapsulate it to and use dependency injection to use it in other classes

worn gate
#

don't understand were to put it @brisk mango

brisk mango
#

private boolean shouldRun;

@EventHandler
public void onJoin(PlayerJoinEvent event) {

if(!event.getPlayer().hasPlayedBefore()) {
shouldRun = true;
}

if(shouldRun) {
//run
}
}
naive goblet
#

Listen to the PlayerQuitEvent and if it’s true do stuff?

brisk mango
#

@EventHandler
void onQuit(PlayerQuitEvent event) {
if(pvpManager.isFighting(event.getPlayer())) {
event.getPlayer().setHealth(0D);
}
}
worn gate
#

yeah but this doesn't send messages with a 100 ticks delay

brisk mango
#

because idk when youre calling it and where

#

thats not my fault

#

what ive given should work

naive goblet
#

gnaboo still what are you specifically trying to do?

worn gate
#

I'm trying to send messages which are kept in a list and between each one of them, having a 100 ticks delay

brisk mango
#

you can do that inside an event @frigid ember

naive goblet
#

^

brisk mango
#

@worn gate when exactly

#

when a player joins?

#

or

worn gate
#

when a player joins

#

if he never joined b4

naive goblet
#

Then why the hell are you using a runTaskLater

brisk mango
#

OH LOL

naive goblet
#

It should be runTaskTimer then?

brisk mango
#

he is using runTaskLater XDDDDDD

worn gate
#

idk, it is the one which is used in the tutorial i watch

brisk mango
#

runTaskTimer

#

use

#

thats why it only sends once

#

XD

worn gate
#

i'm going to eat, coming back soon 🥗

#

dm me if you have a code piece which could work pliz

brisk mango
#

???????????

#

if loop?

#

okay but why?

#

u can do it inside that statement

#

whatever im done with you

#

youre just trolling

worn gate
#

what could i use instead runTaskLater ?

brisk mango
#

runTaskTimer/Asynchronously

#

@frigid ember the event is gonna be fired

#

so u dont need to call it?

worn gate
#

}.runTaskTimer(plugin, 100, messages.length); ?

brisk mango
#

if u implement Listener and register it its gonna be fired every time a player quits

#

why length

#

Plugin plugin, long delay, long period

#

why onPlayerQuit()

#

u dont need to call events..

#

also u dont need to do duringPvp = true

#

u can just do if(duringPvp)

#

new to java and looks like you were

cloud crater
#

thats basic java DKL

#

@frigid ember have you been looking at docs? to help and study? its all on the web

#

yeah no point trying to wing it and hope for the best, its all there.

paper compass
#

How do I change an entities speed? [1.8.8]

brisk mango
#

entity#setWalkSpeed

paper compass
#

Thats only for humans?

naive goblet
#

temedy got fast fingers :/

brisk mango
#

no

paper compass
#

I meant a zombie

brisk mango
#

thats for living entities

#

so zombie is not an entity?

naive goblet
#

It’s a block pretty sure

brisk mango
#

oh

paper compass
#

The method setWalkSpeed() is undefined for the type LivingEntity

naive goblet
#

setVelocity perhaps

paper compass
#

Omg

#

I'm asking how to change a zombies speed

brisk mango
#

👌

paper compass
#

Don't you think I've searched?

cloud crater
#

You have to set their attributes

brisk mango
#

maybe search more

paper compass
naive goblet
#

Search setting entities speed or smtng more generalized

paper compass
naive goblet
#

^

paper compass
brisk mango
#

how come ive found it by searching only once?

cloud crater
#

same

naive goblet
#

Because you can’t

cloud crater
#

always find google search engine is better when finding source.

naive goblet
#

if () {
@EventHandler public void onEvent(Event e){}
} will never work

paper compass
#

    @EventHandler
    public void onSpawn(EntitySpawnEvent e) {
        LivingEntity z = (LivingEntity) e.getEntity();
        EntityInsentient nmsEntity = (EntityInsentient) ((CraftLivingEntity)z).getHandle();
        AttributeInstance attributes = nmsEntity.getAttributeInstance(GenericAttributes.MOVEMENT_SPEED);
        AttributeModifier modifier = new AttributeModifier(movementSpeedUID, "movement speed multiplier", 1.0d, 1);
        attributes.b(modifier);
    }```
oak stump
#

Lol if u search something and then put “plugin development” after it there is always an answer xD

tiny dagger
#

is this for 1.8.8?

brisk mango
#

u can

#

by implementing Listener

#

and registering it.

oak stump
#

U need to tell the server that there is a listener

#

By Registering it

cloud crater
#

getServer().getPluginManager().registerEvents(listener, this);

#

or getProxy depending on if its bungee or spigot

#

yeah

brisk mango
#

or just

cloud crater
#

not a lot of new spigot developers do bungee plugins first.

oak stump
#

getPluginManager works on its own without getting the server but it’s not recommended

brisk mango
#

final Set<Listener> listeners = Collections.newSetFromMap(new IdentityHashMap<>());
listeners.add(new Listener());
listeners.add(new Listener1());

final PluginManager manager = Bukkit.getServer().getPluginManager();

listeners.forEach(listener -> {
manager.registerEvents(listener, this);
}
#

why its not recommend @oak stump

#

teach me

cloud crater
#

never done it that way temedy

frigid ember
#
[07:18:27 ERROR]: Error occurred while enabling AntiGamingPhone vHOT PATCH 1.03 (Is it up to date?)
java.lang.NoClassDefFoundError: com/comphenix/protocol/events/PacketListener
        at me.l3ilkojr.gamingphone.checks.CheckManager.<init>(CheckManager.java:17) ~[?:?]
        at me.l3ilkojr.gamingphone.AntiCheat.onEnable(AntiCheat.java:30) ~[?:?]
        at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:316) ~[spigot.jar:git-Spigot-1.7.9-R0.2-208-ge0f2e95]
        at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:332) [spigot.jar:git-Spigot-1.7.9-R0.2-208-ge0f2e95]
        at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:412) [spigot.jar:git-Spigot-1.7.9-R0.2-208-ge0f2e95]
        at org.bukkit.craftbukkit.v1_7_R4.CraftServer.loadPlugin(CraftServer.java:476) [spigot.jar:git-Spigot-1.7.9-R0.2-208-ge0f2e95]
        at org.bukkit.craftbukkit.v1_7_R4.CraftServer.enablePlugins(CraftServer.java:394) [spigot.jar:git-Spigot-1.7.9-R0.2-208-ge0f2e95]
        at net.minecraft.server.v1_7_R4.MinecraftServer.n(MinecraftServer.java:360) [spigot.jar:git-Spigot-1.7.9-R0.2-208-ge0f2e95]
        at net.minecraft.server.v1_7_R4.MinecraftServer.g(MinecraftServer.java:334) [spigot.jar:git-Spigot-1.7.9-R0.2-208-ge0f2e95]
hoary parcel
#

Ag yes, lets create more garbage on the heap by using a unnessasary collection and lambda

#

Lol 1.7

frigid ember
#
        at net.minecraft.server.v1_7_R4.MinecraftServer.g(MinecraftServer.java:334) [spigot.jar:git-Spigot-1.7.9-R0.2-208-ge0f2e95]
        at net.minecraft.server.v1_7_R4.MinecraftServer.a(MinecraftServer.java:290) [spigot.jar:git-Spigot-1.7.9-R0.2-208-ge0f2e95]
        at net.minecraft.server.v1_7_R4.DedicatedServer.init(DedicatedServer.java:210) [spigot.jar:git-Spigot-1.7.9-R0.2-208-ge0f2e95]
        at net.minecraft.server.v1_7_R4.MinecraftServer.run(MinecraftServer.java:458) [spigot.jar:git-Spigot-1.7.9-R0.2-208-ge0f2e95]
        at net.minecraft.server.v1_7_R4.ThreadServerApplication.run(SourceFile:628) [spigot.jar:git-Spigot-1.7.9-R0.2-208-ge0f2e95]
Caused by: java.lang.ClassNotFoundException: com.comphenix.protocol.events.PacketListener
        at java.net.URLClassLoader.findClass(Unknown Source) ~[?:1.8.0_251]
        at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:101) ~[spigot.jar:git-Spigot-1.7.9-R0.2-208-ge0f2e95]
        at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:86) ~[spigot.jar:git-Spigot-1.7.9-R0.2-208-ge0f2e95]
        at java.lang.ClassLoader.loadClass(Unknown Source) ~[?:1.8.0_251]
        at java.lang.ClassLoader.loadClass(Unknown Source) ~[?:1.8.0_251]
        ... 13 more```
brisk mango
#

fucking hell

#

stop

oak stump
#

Because it doesn’t specify whether the server is bungee or spigot so it defaults to spigot @brisk mango there is the answer to your question

brisk mango
#

non really more garbage @hoary parcel also this is the first time im hearing that lambda produces more garbage

#

can you tell me how is that possible?

hoary parcel
#

It's an object

brisk mango
#

id like to know new stuff

#

lambda is an object?

#

i thought it was just an operator to replace a functional interface

#

so much more garbage and 100% guaranteed it wont get GC'd

#

that much garbage that it would crash the server

#

holy fucking shit

hoary parcel
#

Why do I even bother?

#

Bye

brisk mango
#

more than just registering it regularry holy shit

#

i shouldnt argue with these spigot noobs

cloud crater
#

how is lambda an object?

brisk mango
#

this guy is retarded

#

leave him

#

rather go code ur shit and stop talking here @hoary parcel

hoary parcel
#

@cloud crater, it's an instance of some functional interface, of course it's an object

brisk mango
#

lambda isnt an instance of some functional interface

#

it replaces a functional interface

oak stump
#

Dayum

brisk mango
#

stop saying bullshit

tiny dagger
#

since interfaces are having their own classes

hoary parcel
tiny dagger
#

^

brisk mango
#

they just replace them

#

they arent instances themselves

#

which means ur statement isnt right

hoary parcel
#

Dude

#

How else would it work?

brisk mango
#

"let you express instances"

hoary parcel
#

Lambdas are just syntax sugar

brisk mango
#

you arent probs getting me

#

Lambda isnt an instance of interface

#

it only replaces it

#

i.e

hoary parcel
#

A lambda implement the interface

#

How can somebody be so confident when he clearly has a flawed knowledge of the jvm spec?

brisk mango
#

Thread thread = new Thread(() -> {
try {
Thread.sleep(100L);
} catch (InterruptedException e) { e.printStackTrace(); }
});
thread.start();

Thread thread2 = new Thread(new Runnable() {
@Override
public void run() {
try {
Thread.sleep(100L);
} catch (InterruptedException e) { e.printStackTrace(); }
}
}
#

lambda is an operator retard

#

public Thread(Runnable runnable) { }

azure finch
#

It's is possible to excute a command whe a player dies?

brisk mango
#

why wouldnt it be

#

Bukkit.getServer().dispatchCommand

#

stop saying bullshit

cloud crater
#

player.performCommand() ?

azure finch
#

Thanks @brisk mango

brisk mango
#

np

frigid ember
#

I saw the word "Collections' here, so it brings me to a question. I'm using Collections.shuffle to randomize a List, is this good/bad/etc.

azure finch
#

the command should have ""?

brisk mango
#

yes

tiny dagger
#

it's good mhia

brisk mango
#

its not

cloud crater
#

wait player.performCommand() requires the permission right still?

azure finch
#

Ty

brisk mango
#

should

tiny dagger
#

and that's why?

frigid ember
#

Yeah, I mean it's a little 'too simple" so I have this thought, ugh, this is too easy to be "good". so i'd love to know the "best" way.

#

List<Town> of towny towns btw.

cloud crater
#

ig Bukkit.getServer().dispatchCommand bypasses that permission

tiny dagger
#

i use it, it's very light and it has a good randomization every time mhia

brisk mango
#

@hoary parcel Lambda never is an instance of an interface itself, it just replaces an functional interface in the parameter, i.e void run(Consumer<Object> consumer) { }

.run(object -> {

});

azure finch
#

@brisk mango gaves me this error

tiny dagger
#

i feel like mini had enough discord for today

brisk mango
#

should learn it properly before trying to teach other ppl

tiny dagger
#

😂

brisk mango
#

fucking retard

hoary parcel
#

i feel like mini had enough discord for today
@tiny dagger I have enough of this discord, yes ^^

brisk mango
#

yes, fix your knowledge

#

youre missing some knowledge about lambdas

#

and about functional interfaces too

hoary parcel
#

Idk, you clearly never looked at a class file that uses lambdas

brisk mango
#

clearly havent, yes

azure finch
brisk mango
#

it requires 2 parameters

#

first is the ConsoleCommandServer and then string

#

so

#

Bukkit.getConsoleSender(), " command "

#

@hoary parcel if a lambda would be instance of an functional interface itself, then how could it replace more functional interfaces at the time?

#

ur statement doesnt make any sense

tiny dagger
#

temedy i feel like now you're trying to prove to yourself this

brisk mango
#

what?

tiny dagger
#

i mean the best thing is to come with arguments in byte code or something

brisk mango
#

im trying to prove it to other guy

#

lol

hoary parcel
#

Am not at home, so I can't show you bytecode

#

All I can say is just look yourself

brisk mango
#

i dont need to

cloud crater
#

Bukkit.getServer().dispatchCommand(player, "eco give " + target.getName + " 1000");

brisk mango
#

u clearly do because you clearly dont know how lambdas work

#

lol

silk gate
#

brain

hoary parcel
#

Idk, just use google then, every site you see says that lambdas implement a target type, most of the type that target type is a functional interface

brisk mango
#

not most lol

#

thats all what lambda does

#

but it isnt an instance of it itself

#

it just replaces the instance

#

ive explained this enough to you didnt i?

#

if it would be an instance then it would have to be same instance in every case

hoary parcel
#

Found the part of the spec, let's settle this

https://docs.oracle.com/javase/specs/jls/se8/html/jls-15.html#jls-15.27.4

expression is similar to evaluation of a class instance creation expression, insofar as normal completion produces a reference to an object. Evaluation of a lambda expression is distinct from execution of the lambda body.

Either a new instance of a class with the properties below is allocated and initialized, or an existing instance of a class with the properties below is referenced.

worn gate
#

i'm back

cloud crater
#

wb

minor flint
#

@hoary parcel WTF

#

Lambdas are objects?

hoary parcel
#

Well, not directly, just as an anonymous class isn't an object, but they instanciate an object

#

Why is that so surprising?

brisk mango
#

you said something different a while ago

minor flint
#

^

hoary parcel
#

Maybe you understood me wrong then

brisk mango
#

It's an object
@hoary parcel

hoary parcel
#

Well, yes, usage of a lambda allocates an object

minor flint
#

it's an instance of some functional interface, of course it's an object

#

I think you said it clearly

brisk mango
#

allocates

#

its not an object itself, so i didnt understood you wrong

#

you were just saying bullshit that you didnt know if was right or wrong

minor flint
#

I'm sick of this guy

hoary parcel
#

Only now? :P

#

I wish wiz was mod here, lol

brisk mango
#

he meant u minidigger

minor flint
#

simpleauthoritydnes v 13:42
@hoary parcel can't code
@pale crow You know what you're saying.

pale crow
#

What

hoary parcel
#

Don't bring simple into this

brisk mango
#

So lets just end this, you were wrong because lambda replaces a functional interface; its not an instance of functional interface itself

hoary parcel
#

Of course it is

brisk mango
#

LOL

hoary parcel
#

Holy shit you still don't get it

tiny dagger
#

tunnel visionnnn

minor flint
#

I'm sick of you MiniDigger

brisk mango
#

damn its an object itself

frigid ember
#

🤮

brisk mango
#

lambda the best object ever yes

minor flint
#

lAmBdA iS aN oBjEcT

frigid ember
#

anyway, who cares, if something works it works

brisk mango
#

I think the only one who doesnt get it is you

#

i care that this guy is trying to teach others about something when hes not right

#

An object is a different than a operator that replaces an object

hoary parcel
#

You are saying that a lamba doesn't implement an interface, that's just wrong

#

Go read the spec again

brisk mango
#

? 😂

minor flint
#

From this day, I can say that "+" is an object

brisk mango
#

yes

minor flint
#

if operator is an object

brisk mango
#

is also an object

#

<< is also object

minor flint
#

==

brisk mango
#

all these are objects

#

yes

minor flint
#

best objects ever

brisk mango
#

operator == object

hoary parcel
#

Man you guys are stupid

brisk mango
#

and you are brain damaged

#

lol

minor flint
#

:FeelsDumbMan:

hoary parcel
#

Yeah, sorry, lost all my brain cells while talking to you

brisk mango
#

you didnt had any even before we started arguing

frigid ember
#

Brain cells doesnt equal intelligence

hoary parcel
#

Ppl like you are the reason this community is dying 🤷

cloud crater
#

does anyone use lib api's?

frigid ember
#

Or 6'7 people would be smart af

hoary parcel
#

Long life paper

brisk mango
#

oh really

#

interesting

#

i had a good time bullying you though, gotta go now

hoary parcel
#

"bullying"

#

Lol

#

That implies I care about what some kid says

brisk mango
#

I understand that you dont have common sense its fine

pale crow
#

can yall stfu

#

im tryna play toontown

brisk mango
#

dont read discord then

tiny dagger
#

temedy

#

were you talking about the lambda operator or lambda?

brisk mango
#

thats the same thing

hoary parcel
#

It's an expression

#
  • runs *
brisk mango
#

lambda expression/operator lambda u can call it whatever u want

minor flint
#

i had a good time bullying you though, gotta go now
@brisk mango He was bullying us, with his operator objects

hoary parcel
#

Get bullied!

brisk mango
#

You are saying that a lamba doesn't implement an interface, that's just wrong
@hoary parcel

#

what?

#

implement interface?

#

where does it implement an interface i cant see

#

-> my new interface lets go

minor flint
#

-> -> -> -> ->

#

Oh so many interfaces!

hoary parcel
#

Dude, am done discussing this with you

#

You are way to stubborn

brisk mango
#

same i've had enough

#

but i didnt learn anything new

hoary parcel
#

And wtf is wrong with you kyngs, are you like his moral support?

minor flint
#

I've learn so many new things

#

Like

#

All operators are objects

#

Or

brisk mango
#

nah he is one of the more normal people here

minor flint
#

-> this is interface

#

So many new things

#

I can master at java now

tiny dagger
#

they're both implementing the bigmouth interface

brisk mango
#

yes

#

public operator<? implements @FunctionalInterfacewat> -> {
//wtf
}.lol();

tiny dagger
#

tbh i can't take seriously someone who's only thing he showed is his big mouth

hoary parcel
#

I mean, clearly temedy needed moral support that's why he called kyngs to help him

brisk mango
#

I didnt call kyngs?

#

lol

frigid ember
#

I skyped him 😡

minor flint
#

Me: Looks at spigot and sees someone who's saying operators is an object
MiniDigger: Temedy called kyngs!

hoary parcel
#

tbh i can't take seriously someone who's only thing he showed is his big mouth
@tiny dagger hey, those are valuable contributions to the community!!

#

Don't make fun of that!

minor flint
#

I mean, this is better than school

brisk void
#

😭 😭

minor flint
#

I learn so many new things here

frigid ember
#

Like how you shouldnt use your own thing or 5 people will try to force you to switch to what they like

minor flint
#

I mean, your logic is like

wide gate
#

what is going on here

#

oh 🍿 time

minor flint
#

Why should I use BukkitScheduler? Let's use BukkitRunnable IDC it is a piece of shit, I want to be original

hoary parcel
#

Oh, now it's getting interesting

#

Why is a bukkit runnable a piece of shit?

#

Compared to using the scheduler directly

#

Educate me pls

minor flint
#

If you're not dumb, you will understand why it is really bad

hoary parcel
#

Ah yes, the bukkit GitHub org

#

Am dum, pls explain me

frigid ember
#

hi can we jus be friends

wide gate
#

no, that wouldn't be interesting

red bolt
#

hey i need some help

wide gate
#

and I'm already making the popcorn

minor flint
#

Too late

red bolt
hoary parcel
#

I want to be friends

red bolt
#

i have this map that saves a player with their inventory

minor flint
#

I mean

hoary parcel
#

But kyngs doesn't want to explain me why a bukkit runnable is bad

red bolt
#

but whe n ido this

#

nothing comes up

bleak osprey
#

Hey,

does anybody know how to create an empty start world?

i created one, put this in "level-name".. after a restart, a world created right round. how could i prevent this?

minor flint
#

By kyngs doesn't want to explain me why a bukkit runnable is bad
@hoary parcel Everything is synchronized (even runTaskAsynchroniously()) and every method throws 5 exceptions

#

Ok use BukkitRunnable anymore

wide gate
#

I have to say, I'm impressed

hoary parcel
#

Of course the methods are synchronized, how else would you avoid race conditions for scheduling?

wide gate
#

I expected something less entertaining than this

minor flint
#

I'm done with this.

daring crane
#

finally

minor flint
#

I'm so sick of this.

wide gate
#

please do continue

#

I want to learn more

bleak osprey
#

Hey,

does anybody know how to create an empty start world?

i created one, put this in "level-name".. after a restart, a world created right round. how could i prevent this?

naive goblet
#

Wym

hoary parcel
#

Should we tell him that the scheduler does throw those exceptions too? It's just doesn't mention it in the javadocs

#

Or would that be bulling?

frigid ember
#

Bull

#

#

Ball

#

Balling

#

Cbt? 😳

#

Hello i cannot talk talk on my server can anyone help

ashen stirrup
#

ChatGames.getPlugin(ChatGames.class)
Will this work in a runnable? 🤔

frigid ember
#

anyone

hollow thorn
#

nothing comes up
@red bolt the map

#

is storing itemstack

#

not inventory

#

try changing the type

#

to incentory

#

anyone
@frigid ember details?

red bolt
#

getContents returns an array of itemstack

#

you cant copy someones inventory

hollow thorn
#

there is an Inventory type

#

and getInventory()

red bolt
#

its not cloneable

hollow thorn
#

mabye you have to transfer the itemstack

#

back into an inventory type

#

does it have alog

rich cape
#

Is there an event triggered if a witch throws a bottle?

naive goblet
#

@ashen stirrup that’s a plugin instance?

remote socket
#
                    String nameText = ChatColor.translateAlternateColorCodes('&', "&f&lOwner: &f" + player.getName()).trim();
                    TextLine textLine2 = hologram.insertTextLine(1, nameText);
#

I'm using HolographicDisplaysAPI, any ideas why there is trailing whitespace?

little lava
#

Anyone knows a good plugin for create new recipes in 1.15.2?

paper compass
#

Hey guys, someone keeps on crashing our server. How can we stop this?

java.lang.NullPointerException
at net.minecraft.server.v1_8_R3.LoginListener.d(LoginListener.java:155) ~[spigot-1.8.8.jar:git-Spigot-db6de12-18fbb24]
at net.minecraft.server.v1_8_R3.LoginListener.a(LoginListener.java:151) ~[spigot-1.8.8.jar:git-Spigot-db6de12-18fbb24]
at net.minecraft.server.v1_8_R3.NetworkManager.l(NetworkManager.java:312) ~[spigot-1.8.8.jar:git-Spigot-db6de12-18fbb24]
at net.minecraft.server.v1_8_R3.ServerConnection.c(ServerConnection.java:145) ~[spigot-1.8.8.jar:git-Spigot-db6de12-18fbb24]
at net.minecraft.server.v1_8_R3.MinecraftServer.B(MinecraftServer.java:814) ~[spigot-1.8.8.jar:git-Spigot-db6de12-18fbb24]
at net.minecraft.server.v1_8_R3.DedicatedServer.B(DedicatedServer.java:374) ~[spigot-1.8.8.jar:git-Spigot-db6de12-18fbb24]
at net.minecraft.server.v1_8_R3.MinecraftServer.A(MinecraftServer.java:654) ~[spigot-1.8.8.jar:git-Spigot-db6de12-18fbb24]
at net.minecraft.server.v1_8_R3.MinecraftServer.run(MinecraftServer.java:557) [spigot-1.8.8.jar:git-Spigot-db6de12-18fbb24]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_242]```
red bolt
#

does anyone know how to send an action bar packet in 1.8 ?

naive goblet
#

Google it

red bolt
#

i did

#

found this

#

but im not sure

naive goblet
#

Pretty sure that’d be it

red bolt
#

yeah but i need a way for the action bar to stay up

#

not fade away

#

i tried a while loop

#

but it blocks the whole plugin

hollow thorn
#

how do i implement runnables into my plugin

naive goblet
#

It has a duration param

red bolt
#

can i make the duration param a boolean ?

naive goblet
#

It takes an int

#

Why would you need a Boolean

#

@hollow thorn use the BukkitScheduler

red bolt
#

cause i want it to fade away when a certain action occurs

#

i have a command that is a toggle

naive goblet
#

Well it has a runnable

red bolt
#

would protocol lib work ?

naive goblet
#

Why use that

red bolt
#

that is why im asking :p

naive goblet
#

rum dum

red bolt
#

?

naive goblet
#

You see the BukkitRunnable in the method

red bolt
#

yeah

naive goblet
#

Or I should say the task

#

Make the method return that task reference

#

Then you can cancel it

frigid ember
#

whenever i talk idk why my username become blue and no one see my message

naive goblet
#

And you can probably edit the method a way to it keeps sending unless cancelled

#

@frigid ember Minecraft?

#

Or discord ?

frigid ember
#

mc

naive goblet
#

Screen

frigid ember
#

how to send

#

wait for a sec

undone narwhal
#

Hi there, how much time does it take to approuve a premium resource about?

hollow thorn
#

You see the BukkitRunnable in the method
@naive goblet link?

naive goblet
#

That was to rum

#

But here’s an example

#
Bukkit.getScheduler().runTask(pluginInstance, ()-> {
//code
});```
frigid ember
#

amyone

undone narwhal
#

Nevermind that's okay
Sorry for distubing

tiny dagger
#

took me ~3 weeks each

naive goblet
#

Oof

undone narwhal
#

I was expecting 1 week max but yeah... between a week and a month ^^ Thanks dude!

tiny dagger
#

tbh it makes sense more than you think

#

it keeps the money grabbers away

#

because they'll give up if their 20 kb code gets rejected after a 3 week wait 😂

naive goblet
#

Lol true

paper compass
#

Hey guys, a kid keeps crashing our server. How can we stop it?

java.lang.NullPointerException
at net.minecraft.server.v1_8_R3.LoginListener.d(LoginListener.java:155) ~[spigot-1.8.8.jar:git-Spigot-db6de12-18fbb24]
at net.minecraft.server.v1_8_R3.LoginListener.a(LoginListener.java:151) ~[spigot-1.8.8.jar:git-Spigot-db6de12-18fbb24]
at net.minecraft.server.v1_8_R3.NetworkManager.l(NetworkManager.java:312) ~[spigot-1.8.8.jar:git-Spigot-db6de12-18fbb24]
at net.minecraft.server.v1_8_R3.ServerConnection.c(ServerConnection.java:145) ~[spigot-1.8.8.jar:git-Spigot-db6de12-18fbb24]
at net.minecraft.server.v1_8_R3.MinecraftServer.B(MinecraftServer.java:814) ~[spigot-1.8.8.jar:git-Spigot-db6de12-18fbb24]
at net.minecraft.server.v1_8_R3.DedicatedServer.B(DedicatedServer.java:374) ~[spigot-1.8.8.jar:git-Spigot-db6de12-18fbb24]
at net.minecraft.server.v1_8_R3.MinecraftServer.A(MinecraftServer.java:654) ~[spigot-1.8.8.jar:git-Spigot-db6de12-18fbb24]
at net.minecraft.server.v1_8_R3.MinecraftServer.run(MinecraftServer.java:557) [spigot-1.8.8.jar:git-Spigot-db6de12-18fbb24]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_242]```
mortal belfry
naive goblet
#

Idk if you can get rid of that if you don’t code it yourself

bleak osprey
#

Hey,

does anybody know how to create an empty start world?

i created one, put this in "level-name".. after a restart, a world created right round. how could i prevent this?

#

and does anybody knows how to use NuVotifier on a bungeesystem? it says 15:41:33 [SEVERE] [NuVotifier] Votifier was not able to bind to /192.145.46.62:8192

#

15:55:37 [SEVERE] [NuVotifier] Votifier was not able to bind to /192.145.46.62:25565

changed the port: same result

frigid ember
#

java.lang.NullPointerException
at org.bukkit.Location.getBlock(Location.java:87) ~[spigot.jar:git-Spigot-db6de12-18fbb24]
at ro.Marius.BedWars.GameManager.Game.lambda$26(Game.java:869) ~[?:?]
at java.util.ArrayList.forEach(Unknown Source) ~[?:1.8.0_251]
at ro.Marius.BedWars.GameManager.Game.loadChests(Game.java:868) ~[?:?]
at ro.Marius.BedWars.GameManager.GameManager.loadGames(GameManager.java:561) ~[?:?]
at ro.Marius.BedWars.Main$1.run(Main.java:67) ~[?:?]
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.lang.Thread.run(Unknown Source) [?:1.8.0_251]

#

Help me ;-;

tawdry venture
#

is that your plugin?

#

the location is null

frigid ember
#

Premium Bedwars

tawdry venture
#

you got everything setup correctly?

frigid ember
#

the plugin is Premium Bedwars

#

I dk ,-,

pale crow
#

You should be reaching out to the author, the one you paid

frigid ember
#

I left the maps with AutoLoad disabled, what is it?

tawdry venture
#

we aren't supposed to know, since it is a random premium resource

brisk mango
#

@hoary parcel BukkitRunnable is an useless class , synchronizing methods makes worse performance, aswell the exceptions it throws. Meaning its shit and its useless since it just uses the scheduler methods

tawdry venture
#

I meant by setup, that you set all the required locations

brisk mango
#

There is other ways to make it synchronized with the server rather than just using the synchronized keyword

#

better ways

#

and the unnecessary exception throwns

minor flint
#

^

pale crow
#

are you guys still measuring dicks

frigid ember
#

I managed to solve it, it was the Multiverse Core autoload I had disabled

brisk mango
#

synchronized keyword is known to be bad for performance

#

BukkitRunnable is basically thread-safe

#

thats why creating new object can be bad

#

thats why they invented ThreadLocalRandom for randomizing

#

@pale crow leave us

pale crow
brisk mango
#

meaning what youve said again is bullshit

#

just use whatever u want, im not using the bukkit scheduler's crap

#

i have my own API

#

which really is better

#

There is no reason why should runTaskTimerAsynchronously be synchronized

minor flint
#

^

brisk mango
#

just stop talking anymore everything you say is wrong

#

Why rather not use a scheduler that uses methods that are kinda decent instead of using an abstract class that wraps the methods in another methods that are synchronized and throw exceptions

hoary parcel
#

Those methods throw exceptions because the scheduler throws them, lmao

brisk mango
#

thats unnecessary though

#

how are u gonna explain me why are Async methods synchronized?

hoary parcel
#

So that you don't run into concurrency issues when you try to schedule the runnable

brisk mango
#

you know that makes the performance really shit?

chrome lark
#

You'd have to be stupid for those syncronizations to save you, but, that's hardly a massive concern vs other areas of the codebase

pale crow
#

fight! fight! fight!

tiny dagger
#

still going?

hoary parcel
#

Those sync keywords only really do stuff if you access the method concurrently on the instance

#

So there isn't much to worry about

serene briar
chrome lark
#

no API for that

hoary parcel
#

No API in spigot for that *

serene briar
#

Is there any specific reason why or has it just not gotten enough attention to implement?

chrome lark
#

fwiw, Luck, the dev of LuckPerms has his own lib for that

serene briar
#

Yeah I assume Sponge and Forge do have the API for that somewhere

hoary parcel
#

Paper allows you to add metadata to your commands

serene briar
#

Metadata?

#

What would that mean exactly? Would it allow naming parameter types using a file?

#

@chrome lark sorry to ping if it's bad manners on this server, but would this lib be accessible for all developers or is it designed only for LuckPerms?

chrome lark
#

It's available on his GH

hoary parcel
#

No, there is an event that gets called when your command gets registered. You can override the root command node for your command there and use brigadier to define your command

#

So yes, you could be able to name params using that

serene briar
#

Ah but that would mean it's no longer linked to the Spigot Plugin registry wouldn't it?

hoary parcel
#

No, it still is

serene briar
#

Ah so it's basically the best of both worlds ;)

hoary parcel
#

Yeah

serene briar
#

Is there anything similar for Bungeecord as well?

hoary parcel
#

Basically, bukkit already registers your command into brigadier, with an string array arg

#

And that event allows you do define your own args

serene briar
#

Ah I see

hoary parcel
#

No clue, I don't touch bungee

#

I would be surprised if bungee would offer a proper command API for that

serene briar
#

It's a bit of a shame Spigot and Bungee haven't yet added support for this. I hope it will soon as using Brigadier is kinda hacky imo but if it works, then I guess I'll use it

timid valley
#

just use ACF, it will integrate it for you 😛

hoary parcel
#

From what I have heard spigot has no intentions of adding brigadier support

serene briar
#

My only guess is the forward-compatibility of plugins is in the way with Spigot and Bungeecord supporting 1.8 are the issues

#

ACF?

timid valley
#

we can try Bungee support later

hoary parcel
#

Aikars command framework

serene briar
#

Ah

timid valley
hoary parcel
#

The only sane way to implement commands

serene briar
#

Lol and here's me reinventing the wheel for a command arguments API

hoary parcel
#

I implemented the brigadier support for that and now am waiting for aikar to finish it ^^

timid valley
#

yeah no offense but ACF has around 6 years of development behind it 😛

#

im not aware of any framework near it in capability

serene briar
#

The 6 years of development has got my interested peeked

timid valley
#

it was internal to my plugin for many years, i spent time extracting it out for public release

serene briar
#

And wow it supports cross-server platforms. You beat me to the idea 6 years before me rip

timid valley
#

it can be used outside of MC too

#

it has a JDA discord bot version also

mortal belfry
#

Hi, I have disabled the "tab-complete" in spigot.yml and it works, but... Is there a possibility to prevent that message from showing? It's annoying.

https://i.gyazo.com/e938d9d3adab871184dce418a97ed5b3.png
@mortal belfry Could someone else see it and help me if it's possible? Thanks 😛

timid valley
#

no borja its default to mc, stop turning off tab complete, its a horrible idea

hoary parcel
#

Well, don't disable tab completions then

timid valley
#

tab complete is there to make users life easier

serene briar
#

Time to deprecate all my code that I spent hours working and designing rip. Anyways kudos to you for dedicating all that hard work and time into the library ;)

hoary parcel
#

The server will only send commands to the client he is allowed to use

#

If those commands are registered properly

#

No need to disable tab completions

timid valley
#

complain to your plugin authors to set/handle permissions correctly

mortal belfry
#

That's a good new, i thought that users could gossip the admin commands

hoary parcel
#

Fun fact, if you acf you don't have such problems ^^

#

Use*

odd knoll
#

Is it possible for plugins to have disabled or modified the log on startup that's like, [PLUGIN_NAME] Enabling NAME v1.0.0?

gray plume
#

Anyone have a suggestion for a plugin where if you step on a pressure plate for example, it executes a command, but it only executes the command once per player, and if they try to step on the pressure plate again it doesn't execute anything?

odd knoll
#

Store a set of players it's already executed for then check using .contains.

hoary parcel
#

No rollermachine

odd knoll
#

Why?

hoary parcel
#

Why would there be a way?

odd knoll
#

Ooh, thought u were talking about what I said afte.r

hoary parcel
#

It's just what the plugin manager prints

#

Oh no

odd knoll
#

It's coz I'm having an issue with Vault.

obtuse rose
#

@odd knoll you make a custom fork of spigot, that's how

#

or bytecode injection, that's my fav

hoary parcel
#

Because that's totally nessasary

peak marten
#

Does someone with scoreboard experience know why this piece of code is not working?

odd knoll
#

But I can only find it printing out Checking for Updates ... and No new version available, not anything actually loading.

#

Oh wait, Notepad++ was just being dumb. Thanks tho @hoary parcel 🙂

tiny dagger
#

it hides the visibility of your own team nametag

#

therefore that is correct

#

@peak marten

odd knoll
#

Is it appropriate for me to ask a question related to hooking into Vault here?

tiny dagger
#

sure

odd knoll
#

So I'm using this to hook into Vault, which is near to identical to their recommendation (see img) however, serviceProvier is null and I have no idea why. Any ideas?

#

The debug of vault enabled prints true.

wraith thicket
#

Vault doesn't provide an economy implementation. You need an actual economy plugin for that.

odd knoll
#

Oh shoot, that'll definitely be it then. So just, if I install something like Essentials it'll work then I presume.

wraith thicket
#

Yep

odd knoll
#

Thx, yh. That worked 🙂

fickle surge
#

any kit plugin?

brisk mango
#

@hoary parcel there is much to worry about

#

for example this is why u shouldnt create new random objects

#

because Random class is thread-safe

#

synchronized methods

#

For example if a new instance of BukkitRunnable would be createn on a different thread than the main thread it would have poor performance

#

also the methods that run something are synchronized

#

that is just wrong

#

Java wouldnt invent the ThreadLocalRandom just because why not

#

you probably should take look at this stuff lol

timid valley
#

wtf is the talk about random for in BukkitRunnable?

brisk mango
#

🤦‍♂️

#

read the whole message

#

for example this is why u shouldnt create new random objects
@brisk mango

#

same with BukkitRunnable

timid valley
#

"shouldnt"?

#

I think you mean should

brisk mango
#

yeah, shoudln't

#

no i didnt mean should

#

I meant shouldnt

timid valley
#

what in the world are you talking about

brisk mango
#

Im talking about you shouldnt do Random random = new Random();

#

because Random is Thread-safe

timid valley
#

ok?

brisk mango
#

if you would use it on multiple threads it would have really bad performance

timid valley
#

the main reason to not do that is to improve randomness

brisk mango
#

ThreadLocalRandom always has its own thread seed when used

timid valley
#

it has nothing to do with thread safety

brisk mango
#

it has

#

Random is thread-safe

#

lol

timid valley
#

and?

brisk mango
#

ThreadLocalRandom isn't

#

Random has its methods synchronized

#

thats why they litterly created it lol

timid valley
#

ok, you need to say that in a different manner.... like "ThreadLocalRandom is faster than Random because it's able to avoid synchronization"

brisk mango
#

i litterly said that lol

#

and you told me that it has nothing to do with thread-safety

empty salmon
#

Is it possible to disable opening an enderchest?

timid valley
#

yes but it wasn't clear thats WHY you was saying it

brisk mango
#

you shouldve read the whole message then lol

#

also im arguing with a guy

timid valley
#

so what does this have to do bukkit runnable?

brisk mango
#

BukkitRunnable is thread-safe too

timid valley
#

and?

brisk mango
#

so it has alot to do with it

tulip pendant
#

GUYS SOMEONE HELP ME 😦

#

gamerule randomtickspeed 0 This will stop any tick based thing like chorus growing, lava and water flowing, etc

#

OOF

#

not that

#

There

brisk mango
#

any new instance of BukkitRunnable from another thread would have bad performance

tulip pendant
#

Thats my problem Someone pls help me

#

Please guys someone help me

timid valley
#

._. ok im just gonna chalk it up to your new and think you know what your talking about but don't.

tulip pendant
#

?????/??????

brisk mango
#

@timid valley im new? i have 3 years of experience with java

#

lmfao

tulip pendant
#

temedy HELP PLEASE

timid valley
#

and you're argueing with people with 20 years of experience?

brisk mango
#

hold on please

empty salmon
#

Is it possible to disable opening an enderchest? What event would I use?

tulip pendant
#

canidino

#

OOF

brisk mango
#

if you have 20 years of expeirence then its sad that you have no knowledge about java

#

lol

timid valley
#

well i don't know how much Mini has, but he knows his stuff

tulip pendant
#

20 yrs lol

brisk mango
#

he doesnt

#

ive had alot debates with him

timid valley
#

ok you clearly don't know who I am lol

brisk mango
#

i won every debate

empty salmon
#

yes @tulip pendant

brisk mango
#

no but i can tell your not experienced

tulip pendant
#

Noghinb candino

empty salmon
#

?

tulip pendant
#

temedy pls

brisk mango
#

if u dont know what Thread-safe means

tulip pendant
#

I have 0 patience now

#

Im doing this over 2 hrs

timid valley
#

yes I quite much do, and you clearly don't lol

tulip pendant
#

no one helps me

brisk mango
#

Alright buddy

#

think whatever the fuck you want

tulip pendant
#

temedy plz

#

Help

#

@brisk mango

#

😦 😦 😦 :9

timid valley
#

I'm only the lead developer for the most used server software for MC, who's done the most work at improving performance of this game out of anyone, who's multithreaded tons of aspects of this game.

#

I totally don't know what I'm doing!

brisk mango
#

quite sad that you dont know what thread-safe means

#

and you dont know why synchronized methods make poor performance accross threads

tulip pendant
#

WOW what a joke Aikar

#

Seriously ur not a dev

keen compass
#

Don't forget Aikar also created ACF XD

timid valley
#

Ok im going back to work, can't deal with this trolling

tulip pendant
#

xD

#

llol

#

temedy and fros help me pls

brisk mango
#

but still does know nothing about threads

#

sad

tulip pendant
#

There thats my prob

#

pls forget about him

#

and help me plz

keen compass
#

@brisk mango and you magically think you do with your 3 years?

#

not entirely sure what makes you think you are the expert

brisk mango
#

i dont think im an expert

tulip pendant
#

DONT ArGUE

brisk mango
#

but im right in what ive said

tulip pendant
#

Please

#

DONT ARGUE

#

OMG

keen compass
#

If you want to believe so

brisk mango
#

blocking this tard

tulip pendant
#

PLZ SOMEONE help me

#

Who is the tard?
lol

fickle surge
#

sooo no one cares?

#

i need a kit plugin...

worn temple
#

Just, don't use the plugin

keen compass
#

He probably thinks I am, but eventually he will get to the point that everyone is and they are not and they are better and yada yada yada

fickle surge
#

please

brisk mango
#

Frosttalf so you're saying BukkitRunnable isn't thread safe?

#

nah i didnt mean you

gentle kelp
#

Imagine calling Aikar a retard

tulip pendant
#

Omg

brisk mango
#

i meant the other guy spamming me

tulip pendant
#

NO ONE HELPS HERE

keen compass
#

@brisk mango Thread safe methods need to exist

brisk mango
#

they do but why they have to exist in BukkitRunnable

#

you know that thread-safe methods cause poor performance across threads?

#

every method synchronized in BukkitRunnable

#

even the Async methods

tulip pendant
keen compass
#

depends how you use them

brisk mango
#

it doesnt depend on how you use them the fuck youre saying

tulip pendant
#

Go to #general for arguements

#

Here is for HELPS

#

NOt arguements

worn temple
#

dog lover was spamming in my server as well

gentle kelp
#

He just want some attention

brisk mango
#

synchronized methods r just synchronized methods

#

which is why ThreadLocalRandom was invented

#

for example

keen compass
#

Synchronized just means it blocks if something wants it. IE it won't do two actions at once if attempted to be accessed

empty salmon
#

How can I prevent a player opening an enderchest? Can anyone help?

tulip pendant
#

OH MY GODDD

#

NO ONE HELPS ME!!!!

worn temple
#

Dude, you just spam. You've spammed in 2 servers now

timid valley
#

no one knows how to help yuo dog, stop spamming

empty salmon
#

@tulip pendant Not being funny, you are being quite impatient and using caps! Just stop

timid valley
#

this isnt clearlagg support

#

plus you shouldnt be using clearlagg anyways, its bad

wide gate
#

@brisk mango thank you for continuing this, you cheered me up bud

tulip pendant
#

Ok

#

No one helps me THATS WHY im using CAPS!

worn temple
#

@tulip pendant Open an issue with clearLagg, open a support thread on spigot. Stop spamming random servers. You spammed my software studio server and now here. And like AIkar said, clearlagg is bad, shouldn't be used. You don't need those plugins ideally.

tulip pendant
#

I deleted it nowxD'

#

I deleted

#

and still same issue

obtuse rose
#

no one obligated to help you

tulip pendant
#

?????//?/??/?//?

obtuse rose
#

wow, weird concept ikr

worn temple
#

Open a support thread then. No one can help you with no real information. You even linked me to someone else's thead in my server. Everyone has different server configs.

tulip pendant
#

wdym

#

support thread?

brisk mango
#

final Random random = new Random();

final ScheduledExecutorService service = Executors.newScheduledThreadPool(1);
service.scheduleAtFixedRate(() -> {
int i = random.nextInt(4) + 1;

}, 20L, 20L, TimeUnit.NANOSECONDS);

final ScheduledExecutorService service = Executors.newScheduledThreadPool(1);
service.scheduleAtFixedRate(() -> {
final ThreadLocalRandom random = ThreadLocalRandom.current();

int i = random.nextInt(4) + 1;
}, 20L, 20L, TimeUnit.NANOSECONDS);

For example, which would have better performance @keen compass

tulip pendant
#

wdym "real info"

worn temple
#

a thread on the forums, in the support section lol

#

real info meaning log dumps, plugin list, config dumps, etc.

fickle surge
#

i need a KIT PLUGIN

worn temple
#

There's a forum for these kinds of complex issues for a reason

bronze marten
#

Google?

#

xd

worn temple
obtuse rose
#

Thread thread = new Thread(new PleaseHelpMeRunnable());

silk gate
#

i need a KIT PLUGIN

#

NOW

fickle surge
#

i dont find any

silk gate
#

ANGER

keen compass
#

@brisk mango Thread Local Random just provides random numbers that doesn't affect other threads as in, that random is exclusive to that thread, using Random gives random numbers globally

obtuse rose
#

no free candy for you kiddo 😄

keen compass
#

so it really depends on what is needed

brisk mango
#

exactly

worn temple
brisk mango
#

that ScheduledExecutorService is Async though

fickle surge
#

ok i'll try

worn temple
#

and don't use ultimate kits, screw songoda

keen compass
#

But using Random won't necessarily have bad performance, just depends how it is used really

gentle kelp
#

.ooo domain wut

brisk mango
#

Yeah I didnt say necessarily, but same could be with BukkitRunnable's synchronized shit

#

whatever im done arguing for now

keen compass
#

not sure what you keep saying synchronized

#

as if using the synchronized variable makes it bad

brisk mango
#

synchronized = thread-safe

timid valley
#

pro tip, synchronized is hit about a billion times a second in running a server, just an FYI. 1 every second from a Bukkit runnable with 0 contention where BiasedLocks is default on.... yeah

worn temple
#

@gentle kelp yeah, .ooo TLD is a thing lol. Custom image host

brisk mango
#

did I ask anything?

#

dont need to hear your "pro tips"

#

have no clue who you are

wide gate
#

benchmark how much uncontested synchronization impacts performance 😉

brisk mango
#

but you dont seem to be experienced

timid valley
#

well you're running quite a bit of my code 😉

keen compass
#

synchronized just means it blocks if something needs that method if that method provides say a list for example. You don't want something to be removing from the list at the same time as it is adding so you use synchronized for that.