#help-archived
1 messages · Page 97 of 1
yeah you're casting
you dont know how to get a living entity from projectile lol
and you cast shooter to projectile
so what
is casting bad? or
lmfao @tiny dagger you need to cast again
i didnt need your code?
to LivingEntity
@tiny dagger 's code is still correct if that is what the debate is about
i wrote this down before u even sent it
temedy's is much cleaner, imo
u need to cast to LivingEntity
however both methods work too
^
Is he trying to get when an entity gets hit by arrow?
to me it looks clean enough
no one is trying nothing
lol you're welcome
eclipse
that is not clean 😢
also light theme 😭
that one is clean
ProjectileHitEvent would be better
🤦♂️
oh nvm I think it's paper only
@sturdy oar its in spigot api
Oh cool
you're saying it's bad
me?
not entirely sure how either one is bad when they both do the exact same thing o.O
all you did is switch it out a little :p
which btw makes the code look terrifyinh
you never tried to get the entity behind the projectile did you
@tiny dagger
one just uses one line the other just performs additional checks before assigning 😛
whatever imma done losing my time here, gotta do some better stuff, cya
tbh
but there is other suited events though that would aide in such things about projectiles
the checks we'll always check in my case
like a projectilelaunchevent and projectilehitevent
Error :Local variable avance defined in an ennclosing scoop must be final or effectivelly final
define your variable outside the loop
lol
🤣
its similar to BukkitRunnable but better
do you have a github page?
aham i see
new DukkitRunnable() {
@Override
public void run() {
}
}.runTaskAsynchronously(50L, 50L, TimeUnit.SECONDS);
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```
what is avance<message.length; wat
and wait
why is the runnable in the for loop
wrong
slimefun here we go
new DukkitRunnable() {
@Override
public void run() {
for(String message : messages) {
Bukkit.broadcastMessage(message);
}
}
}.runTaskAsynchronously(50L, 50L, TimeUnit.NANOSECONDS);
well it's in the loop so that the messages send by player.sendMessage(ChatColor.GREEN + messages[avance]); are separated by 100 ticks
the for loop should be in the runnable
why would your dukkit runnable be any better than the bukkit one?
yeah but i want the messages to be send every 100 ticks
to me it's the same thing
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
well that would be okay for async only
u can do synchronized(this) { }
Yh ExecutorService is amazing
synch block can block any thread not just yours
why is it not working ?
what is not working?
for (avance<messages.length; avance++) { : Syntax error on token "(" ,; expected
gnaboo if you’re iterating over messages with a for loop you’re kind of doing it wrong
what is avance<messages.length
da fuck
learn to use loops
i told you how to use it
(int i = 0; i<messages.length; i++)
And massages[i]
no
I mean he could just (String message : messages)
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
Error :Local variable avance defined in an ennclosing scoop must be final or effectivelly final @naive goblet
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
^
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 ?
losing my patience
gnaboo jesus
🤣
guys who wanna know my ip?
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);
Huh
my ip is ||127.0.0.1||
@worn gate
lol who deleted my message
you really think i'm that stupid
xd
i'm just bored tbh
Bukkit.getScheduler().runTaskLater(plugin, () -> { for (String msg : messages) { player.sendMessage(ChatColor.GREEN + msg); } }, 100);
Zack not rly the right channel
@worn gate
i'll try @brisk mango
@tiny dagger im pretty sure he doesnt want to broadcast all the messages at the same time, does he
Ohhhhh
no
how did i end up here
exactly, ive said it 10 times
why are u guys keep sending over the same fucking code
which doesnt help him
lol
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
still doesn't work 😢
i dont know what does mean it doesnt work
gnaboo what are you trying to do?
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);
}
```
i first get the gui and then i get the first message
thats what you have ?
DKLMapper what are you trying to do? The antiLogout method is completely unnecessary
logic me boi
And it doesn’t work for the record
i cannot but the broadcast b4 the cout = 0;
why not
because count is undeclared
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
"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
DKL you can’t declare a method inside another method
Yes you can invoke a method almost anywhere once it’s declared
declaring doesnt mean invoking
Create a new method inside an if statement?
and what @worn gate
how afaik
ofc its not fucking possible
this is possible tho
public void method() {
new Runnable() {
@Override
public void run() {
}
};
}
well same as before, the gui opens and then msg1 is send but not msg2
impossible?
?
Just have the if inside the event handler?
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))
?
you can do it the other way around.
DKLMapper encapsulation?
If the variable is from another class encapsulate it to and use dependency injection to use it in other classes
don't understand were to put it @brisk mango
private boolean shouldRun;
@EventHandler
public void onJoin(PlayerJoinEvent event) {
if(!event.getPlayer().hasPlayedBefore()) {
shouldRun = true;
}
if(shouldRun) {
//run
}
}
Listen to the PlayerQuitEvent and if it’s true do stuff?
@EventHandler
void onQuit(PlayerQuitEvent event) {
if(pvpManager.isFighting(event.getPlayer())) {
event.getPlayer().setHealth(0D);
}
}
yeah but this doesn't send messages with a 100 ticks delay
because idk when youre calling it and where
thats not my fault
what ive given should work
gnaboo still what are you specifically trying to do?
I'm trying to send messages which are kept in a list and between each one of them, having a 100 ticks delay
you can do that inside an event @frigid ember
^
Then why the hell are you using a runTaskLater
OH LOL
It should be runTaskTimer then?
he is using runTaskLater XDDDDDD
idk, it is the one which is used in the tutorial i watch
i'm going to eat, coming back soon 🥗
dm me if you have a code piece which could work pliz
???????????
if loop?
okay but why?
u can do it inside that statement
whatever im done with you
youre just trolling
what could i use instead runTaskLater ?
runTaskTimer/Asynchronously
@frigid ember the event is gonna be fired
so u dont need to call it?
}.runTaskTimer(plugin, 100, messages.length); ?
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
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.
How do I change an entities speed? [1.8.8]
entity#setWalkSpeed
Thats only for humans?
temedy got fast fingers :/
no
I meant a zombie
It’s a block pretty sure
oh
The method setWalkSpeed() is undefined for the type LivingEntity
setVelocity perhaps
Don't you think I've searched?
You have to set their attributes
maybe search more
Search setting entities speed or smtng more generalized
^
how come ive found it by searching only once?
same
Because you can’t
always find google search engine is better when finding source.
if () {
@EventHandler public void onEvent(Event e){}
} will never work
@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);
}```
Lol if u search something and then put “plugin development” after it there is always an answer xD
is this for 1.8.8?
getServer().getPluginManager().registerEvents(listener, this);
or getProxy depending on if its bungee or spigot
yeah
or just
not a lot of new spigot developers do bungee plugins first.
getPluginManager works on its own without getting the server but it’s not recommended
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
never done it that way temedy
[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]
Ag yes, lets create more garbage on the heap by using a unnessasary collection and lambda
Lol 1.7
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```
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
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?
It's an object
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
more than just registering it regularry holy shit
i shouldnt argue with these spigot noobs
how is lambda an object?
this guy is retarded
leave him
rather go code ur shit and stop talking here @hoary parcel
@cloud crater, it's an instance of some functional interface, of course it's an object
lambda isnt an instance of some functional interface
it replaces a functional interface
Dayum
stop saying bullshit
since interfaces are having their own classes
https://docs.oracle.com/javase/tutorial/java/javaOO/lambdaexpressions.html
"Lambda expressions let you express instances of single-method classes more compactly."
^
they just replace them
they arent instances themselves
which means ur statement isnt right
"let you express instances"
Lambdas are just syntax sugar
you arent probs getting me
Lambda isnt an instance of interface
it only replaces it
i.e
A lambda implement the interface
How can somebody be so confident when he clearly has a flawed knowledge of the jvm spec?
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) { }
It's is possible to excute a command whe a player dies?
player.performCommand() ?
Thanks @brisk mango
np
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.
the command should have ""?
yes
it's good mhia
its not
wait player.performCommand() requires the permission right still?
Ty
should
and that's why?
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.
ig Bukkit.getServer().dispatchCommand bypasses that permission
i use it, it's very light and it has a good randomization every time mhia
@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 -> {
});
@brisk mango gaves me this error
i feel like mini had enough discord for today
should learn it properly before trying to teach other ppl
😂
fucking retard
i feel like mini had enough discord for today
@tiny dagger I have enough of this discord, yes ^^
yes, fix your knowledge
youre missing some knowledge about lambdas
and about functional interfaces too
Idk, you clearly never looked at a class file that uses lambdas
clearly havent, yes
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
temedy i feel like now you're trying to prove to yourself this
what?
i mean the best thing is to come with arguments in byte code or something
i dont need to
Bukkit.getServer().dispatchCommand(player, "eco give " + target.getName + " 1000");
brain
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
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
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.
i'm back
wb
Well, not directly, just as an anonymous class isn't an object, but they instanciate an object
Why is that so surprising?
you said something different a while ago
^
Maybe you understood me wrong then
It's an object
@hoary parcel
Well, yes, usage of a lambda allocates an object
it's an instance of some functional interface, of course it's an object
I think you said it clearly
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
I'm sick of this guy
he meant u minidigger
simpleauthoritydnes v 13:42
@hoary parcel can't code
@pale crow You know what you're saying.
What
Don't bring simple into this
So lets just end this, you were wrong because lambda replaces a functional interface; its not an instance of functional interface itself
Of course it is
LOL
Holy shit you still don't get it
tunnel visionnnn
I'm sick of you MiniDigger
damn its an object itself
🤮
lambda the best object ever yes
lAmBdA iS aN oBjEcT
anyway, who cares, if something works it works
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
You are saying that a lamba doesn't implement an interface, that's just wrong
Go read the spec again
? 😂
From this day, I can say that "+" is an object
yes
if operator is an object
==
best objects ever
operator == object
Man you guys are stupid
:FeelsDumbMan:
Yeah, sorry, lost all my brain cells while talking to you
you didnt had any even before we started arguing
Brain cells doesnt equal intelligence
Ppl like you are the reason this community is dying 🤷
does anyone use lib api's?
Or 6'7 people would be smart af
Long life paper
I understand that you dont have common sense its fine
dont read discord then
thats the same thing
lambda expression/operator lambda u can call it whatever u want
i had a good time bullying you though, gotta go now
@brisk mango He was bullying us, with his operator objects
Get bullied!
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
And wtf is wrong with you kyngs, are you like his moral support?
nah he is one of the more normal people here
they're both implementing the bigmouth interface
tbh i can't take seriously someone who's only thing he showed is his big mouth
I mean, clearly temedy needed moral support that's why he called kyngs to help him
I skyped him 😡
Me: Looks at spigot and sees someone who's saying operators is an object
MiniDigger: Temedy called kyngs!
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!
I mean, this is better than school
😭 😭
I learn so many new things here
Like how you shouldnt use your own thing or 5 people will try to force you to switch to what they like
I mean, your logic is like
Why should I use BukkitScheduler? Let's use BukkitRunnable IDC it is a piece of shit, I want to be original
Oh, now it's getting interesting
Why is a bukkit runnable a piece of shit?
Compared to using the scheduler directly
Educate me pls
hi can we jus be friends
no, that wouldn't be interesting
hey i need some help
and I'm already making the popcorn
Too late
I want to be friends
i have this map that saves a player with their inventory
I mean
But kyngs doesn't want to explain me why a bukkit runnable is bad
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?
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
I have to say, I'm impressed
Of course the methods are synchronized, how else would you avoid race conditions for scheduling?
I expected something less entertaining than this
I'm done with this.
finally
I'm so sick of this.
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?
Wym
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?
Bull
⚽
Ball
Balling
Cbt? 😳
Hello i cannot talk talk on my server can anyone help
ChatGames.getPlugin(ChatGames.class)
Will this work in a runnable? 🤔
anyone
nothing comes up
@red bolt the map
is storing itemstack
not inventory
try changing the type
to incentory
anyone
@frigid ember details?
its not cloneable
mabye you have to transfer the itemstack
back into an inventory type
does it have alog
Is there an event triggered if a witch throws a bottle?
@ashen stirrup that’s a plugin instance?
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?
Anyone knows a good plugin for create new recipes in 1.15.2?
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]```
does anyone know how to send an action bar packet in 1.8 ?
Google it
Pretty sure that’d be it
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
how do i implement runnables into my plugin
It has a duration param
can i make the duration param a boolean ?
It takes an int
Why would you need a Boolean
@hollow thorn use the BukkitScheduler
cause i want it to fade away when a certain action occurs
i have a command that is a toggle
Well it has a runnable
would protocol lib work ?
Why use that
that is why im asking :p
rum dum
?
You see the BukkitRunnable in the method
yeah
Or I should say the task
Make the method return that task reference
Then you can cancel it
whenever i talk idk why my username become blue and no one see my message
And you can probably edit the method a way to it keeps sending unless cancelled
@frigid ember Minecraft?
Or discord ?
mc
Screen
Hi there, how much time does it take to approuve a premium resource about?
You see the BukkitRunnable in the method
@naive goblet link?
That was to rum
But here’s an example
Bukkit.getScheduler().runTask(pluginInstance, ()-> {
//code
});```
amyone
Nevermind that's okay
Sorry for distubing
took me ~3 weeks each
Oof
I was expecting 1 week max but yeah... between a week and a month ^^ Thanks dude!
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 😂
Lol true
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]```
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.
Idk if you can get rid of that if you don’t code it yourself
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
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 ;-;
Premium Bedwars
you got everything setup correctly?
You should be reaching out to the author, the one you paid
I left the maps with AutoLoad disabled, what is it?
we aren't supposed to know, since it is a random premium resource
@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
I meant by setup, that you set all the required locations
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
^
are you guys still measuring dicks
I managed to solve it, it was the Multiverse Core autoload I had disabled
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

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
^
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
Those methods throw exceptions because the scheduler throws them, lmao
thats unnecessary though
how are u gonna explain me why are Async methods synchronized?
So that you don't run into concurrency issues when you try to schedule the runnable
you know that makes the performance really shit?
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
fight! fight! fight!
still going?
Those sync keywords only really do stuff if you access the method concurrently on the instance
So there isn't much to worry about
Is there any API made for using the new command system implemented in 1.13 or this plugin (https://github.com/JorelAli/1.13-Command-API) the only way to do it (at least for now expecting it to be implemented later)
no API for that
No API in spigot for that *
Is there any specific reason why or has it just not gotten enough attention to implement?
fwiw, Luck, the dev of LuckPerms has his own lib for that
Yeah I assume Sponge and Forge do have the API for that somewhere
Paper allows you to add metadata to your commands
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?
It's available on his GH
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
Ah but that would mean it's no longer linked to the Spigot Plugin registry wouldn't it?
No, it still is
Ah so it's basically the best of both worlds ;)
Yeah
Is there anything similar for Bungeecord as well?
Basically, bukkit already registers your command into brigadier, with an string array arg
And that event allows you do define your own args
Ah I see
No clue, I don't touch bungee
I would be surprised if bungee would offer a proper command API for that
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
just use ACF, it will integrate it for you 😛
From what I have heard spigot has no intentions of adding brigadier support
My only guess is the forward-compatibility of plugins is in the way with Spigot and Bungeecord supporting 1.8 are the issues
ACF?
we can try Bungee support later
Aikars command framework
Ah
https://acfspigot.emc.gs see end of thread for details
The only sane way to implement commands
Lol and here's me reinventing the wheel for a command arguments API
I implemented the brigadier support for that and now am waiting for aikar to finish it ^^
yeah no offense but ACF has around 6 years of development behind it 😛
im not aware of any framework near it in capability
The 6 years of development has got my interested peeked
it was internal to my plugin for many years, i spent time extracting it out for public release
And wow it supports cross-server platforms. You beat me to the idea 6 years before me rip
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 😛
no borja its default to mc, stop turning off tab complete, its a horrible idea
Well, don't disable tab completions then
tab complete is there to make users life easier
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 ;)
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
complain to your plugin authors to set/handle permissions correctly
That's a good new, i thought that users could gossip the admin commands
Is it possible for plugins to have disabled or modified the log on startup that's like, [PLUGIN_NAME] Enabling NAME v1.0.0?
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?
Store a set of players it's already executed for then check using .contains.
No rollermachine
Why?
Why would there be a way?
Ooh, thought u were talking about what I said afte.r
It's coz I'm having an issue with Vault.
@odd knoll you make a custom fork of spigot, that's how
or bytecode injection, that's my fav
Because that's totally nessasary
Does someone with scoreboard experience know why this piece of code is not working?
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 🙂
it hides the visibility of your own team nametag
therefore that is correct
@peak marten
Is it appropriate for me to ask a question related to hooking into Vault here?
sure
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.
Vault doesn't provide an economy implementation. You need an actual economy plugin for that.
Oh shoot, that'll definitely be it then. So just, if I install something like Essentials it'll work then I presume.
Yep
Thx, yh. That worked 🙂
any kit plugin?
@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
wtf is the talk about random for in BukkitRunnable?
🤦♂️
read the whole message
for example this is why u shouldnt create new random objects
@brisk mango
same with BukkitRunnable
what in the world are you talking about
Im talking about you shouldnt do Random random = new Random();
because Random is Thread-safe
ok?
if you would use it on multiple threads it would have really bad performance
the main reason to not do that is to improve randomness
ThreadLocalRandom always has its own thread seed when used
it has nothing to do with thread safety
and?
ThreadLocalRandom isn't
Random has its methods synchronized
thats why they litterly created it lol
ok, you need to say that in a different manner.... like "ThreadLocalRandom is faster than Random because it's able to avoid synchronization"
i litterly said that lol
and you told me that it has nothing to do with thread-safety
Is it possible to disable opening an enderchest?
yes but it wasn't clear thats WHY you was saying it
so what does this have to do bukkit runnable?
BukkitRunnable is thread-safe too
and?
so it has alot to do with it
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
any new instance of BukkitRunnable from another thread would have bad performance
._. ok im just gonna chalk it up to your new and think you know what your talking about but don't.
?????/??????
temedy HELP PLEASE
and you're argueing with people with 20 years of experience?
hold on please
Is it possible to disable opening an enderchest? What event would I use?
if you have 20 years of expeirence then its sad that you have no knowledge about java
lol
well i don't know how much Mini has, but he knows his stuff
20 yrs lol
ok you clearly don't know who I am lol
i won every debate
yes @tulip pendant
no but i can tell your not experienced
Noghinb candino
?
temedy pls
if u dont know what Thread-safe means
yes I quite much do, and you clearly don't lol
no one helps me
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!
quite sad that you dont know what thread-safe means
and you dont know why synchronized methods make poor performance accross threads
Don't forget Aikar also created ACF XD
Ok im going back to work, can't deal with this trolling
@brisk mango and you magically think you do with your 3 years?
not entirely sure what makes you think you are the expert
i dont think im an expert
DONT ArGUE
but im right in what ive said
If you want to believe so
blocking this tard
Just, don't use the plugin
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
please
Imagine calling Aikar a retard
Omg
i meant the other guy spamming me
NO ONE HELPS HERE
@brisk mango Thread safe methods need to exist
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
@brisk mango Would u like to help me
https://dev.bukkit.org/projects/clearlagg/issues/260
depends how you use them
it doesnt depend on how you use them the fuck youre saying
dog lover was spamming in my server as well
He just want some attention
synchronized methods r just synchronized methods
which is why ThreadLocalRandom was invented
for example
Synchronized just means it blocks if something wants it. IE it won't do two actions at once if attempted to be accessed
How can I prevent a player opening an enderchest? Can anyone help?
Dude, you just spam. You've spammed in 2 servers now
no one knows how to help yuo dog, stop spamming
@tulip pendant Not being funny, you are being quite impatient and using caps! Just stop
@brisk mango thank you for continuing this, you cheered me up bud
@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.
no one obligated to help you
?????//?/??/?//?
wow, weird concept ikr
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.
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
wdym "real info"
a thread on the forums, in the support section lol
real info meaning log dumps, plugin list, config dumps, etc.
i need a KIT PLUGIN
There's a forum for these kinds of complex issues for a reason
@fickle surge https://lmgtfy.com/?q=spigot+kit+plugin
Thread thread = new Thread(new PleaseHelpMeRunnable());
i dont find any
ANGER
@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
no free candy for you kiddo 😄
so it really depends on what is needed
exactly
@fickle surge Literally https://owo.oooooooooooooo.ooo/i/hkbc.png
that ScheduledExecutorService is Async though
ok i'll try
and don't use ultimate kits, screw songoda
But using Random won't necessarily have bad performance, just depends how it is used really
.ooo domain wut
Yeah I didnt say necessarily, but same could be with BukkitRunnable's synchronized shit
whatever im done arguing for now
not sure what you keep saying synchronized
as if using the synchronized variable makes it bad
synchronized = thread-safe
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
@gentle kelp yeah, .ooo TLD is a thing lol. Custom image host
benchmark how much uncontested synchronization impacts performance 😉
but you dont seem to be experienced
well you're running quite a bit of my code 😉
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.