#help-development
1 messages ยท Page 1666 of 1
I don't see how System.exit is slow for you
because it saves some stuff
it tells me to chnage language level? what does that even mean
if your goal is to stop the world from saving
there is a way to do that
instead of doing it this degenerate way
^ without destroying your server
it's slow
what does that mean
it saves some crap for like 2s
its in java 9
im using java 16
JNI?
Disable the saving and call System.exit ๐ฏ
Java Native Interface
ProcessHandle.current().destroyForcibly();
this does not wanna work...
allows you to run C/C++ code so you can mess with internals
and fuck a ton of shit up
including shut the server down quick
cause its a direct call
well, i was thinking todo api call and remove the server
but that's too hard to scale... im not that good
idk i'm sure your vps has an api to let you hard reset the server in some way
Runtime.getRuntime().halt()
it does, but im not sure how i would make it scalable

Docker
yupp
how would I create a new file for each player with a kill counter?
but i dont know on which node it will be nor whhats the container name
what just a bunch of files that only have 1 number in them
I would just have one file that stores all that info if I were you
surely just have one file
Wouldn't that lag the server?
No, multiple files would ๐
uh wouldnt multiple files lag it more
multiple files = more IO access needed
or just use a DB
I'm sure you could store some runtime vars in each container to make that process easier
maybe, I was looking at how minecraft worlds save every uuid to a seperate file with data
they store a lot of data tho, not just 1 number
I usually have 2700 people
possibly, again, im not that talented ๐ฆ
If you are gonna have that many people use a db
yeah
110% use a database
I don't have one
115%
Minecraft stores lots of data in one file. And do NOT create a file for each. Also try to configure a database for it if you plan to have that many players.
dear lord are you running a server with 2700 players and not using a database you are screwing up
compiling..
Exactly
2700 unique joins*
I get 20 players
F
bruh
bc that is my max plan
still could be useful
Why would you word it like that to us
2700 unique joins will still create those files
but the performance
very different
maybe
with 2700 you have to focus on optimizations more
still a db would be useful
what did you mean by usually?
How to improve the performance of your plugin
dbs are always useful anyway
I would still recommend a database for storing any data. I mean on the plus side if you use one file and it gets corrupted all that info gone. Or if you transfer the server the database still stores that info.
DBs are very very good for what it can do
[14:34:55 INFO]: game ended !
[14:34:55 INFO]: GAME ENDED - RETURNING TO BUNGEE
container@pterodactyl~ Server marked as offline...
daym, that is FAST
thanks !
lol
Lmao
threads are nice
Yea
d u m p of b u m p s
Bukkit.getScheduler().runTaskLater(MyEvents.this.plugin, () -> {
ByteArrayDataOutput out = ByteStreams.newDataOutput();
out.writeUTF("Connect");
out.writeUTF("survival");
for (Player onlinePlayers : Bukkit.getOnlinePlayers()) {
player.sendPluginMessage( MyEvents.this.plugin, "BungeeCord", out.toByteArray());
}
will this kick everyone off the node?
no that will send a plugin message
for every player?
that will connect everyone to survival
is there no shorter way?
public static String millisToHumanReadable(long millis) {
long days = TimeUnit.MILLISECONDS.toDays(millis);
long hours = TimeUnit.MILLISECONDS.toHours(millis) % 24;
long minutes = TimeUnit.MILLISECONDS.toMinutes(millis) % 60;
long seconds = TimeUnit.MILLISECONDS.toSeconds(millis) % 60;
String str = days > 0 ? days + " days " : "";
if (hours > 0) str += hours + " hours ";
if (minutes > 0) str += minutes + " minutes ";
if (seconds > 0) str += seconds + " seconds ";
return str;
}
I have never worked with a database? I know someone who works in the field of microsoft tsql but I use java
DateFormat
or whatever its called
hi im back
hi back im bing
MySQL is the easiest for beginners
lemme search
?ask
If you have a question, please just ask it. Don't look for staff or topic experts. Don't ask to ask or ask if people are awake or available. Just ask the question to the channel straight out, and wait patiently for a reply.
I should get ready on the ?learnjava ๐
hi bing i'm cute
Bukkit.getServer().getWorld("").dropItemNaturally(new item, e); how can i set the world to the players world beacuse p.getworld does not work and i cannot make it into a world string
i know ๐
p.getWorld().dropItemNaturally(...)
how do i do hoverable chat message? i looked on google and it says i need to use TextComponent but for some reason i can't import it, i also found something called "The Chat Component API" which says it uses bungeecord chat api
so my question is: how do i do a hoverable message, do i need to install bungeecord and chat component api if they're even a thing that is installable or they're apart of the spigot api
wdym p.getWorld does not work
well techincally it's 2 questions
the chat api is apart of the spigot api
nvm found out the reason
You should be able to implement it
got it, now how does one use it?
https://www.spigotmc.org/wiki/the-chat-component-api/ will go over all of it
The home of Spigot a high performance, no lag customized CraftBukkit Minecraft server API, and BungeeCord, the cloud server proxy.
also imma unblock everyone and just kinda deal with their annoying ?learnjava
i made somehing like this ๐ผ
public static TextComponent suggestCommandByClickableText(String message, String command) {
TextComponent textComponent = new TextComponent(colorize(message));
textComponent.setClickEvent(new ClickEvent(ClickEvent.Action.SUGGEST_COMMAND, command));
textComponent.setHoverEvent(new HoverEvent(HoverEvent.Action.SHOW_TEXT, new Text("Click to run command")));
return textComponent;
}
cause they might actually be helpful
yeah that's what i found
how would i put a item into a players inventory in any avalible slot
Inventory#addItem exists iirc
kk
declaration: package: org.bukkit.inventory, interface: Inventory
i should use additem
and test the return
it seems that i can't use BaseComponent, TranslatableComponent and as i said TextComponent too
do i need to extend or implment anything?
im so bad at this...
else if ( number_of_players_left <= 1) {
System.out.println("game ended !");
Bukkit.broadcastMessage(ChatColor.RED + "" + ChatColor.BOLD + "" + "GAME ENDED - RETURNING TO BUNGEE");
Bukkit.getScheduler().runTaskLater(MyEvents.this.plugin, () -> {
for (Player onlinePlayers : Bukkit.getOnlinePlayers()) {
ByteArrayDataOutput out = ByteStreams.newDataOutput();
out.writeUTF("Connect");
out.writeUTF("survival");
player.sendPluginMessage( MyEvents.this.plugin, "BungeeCord", out.toByteArray());
}
// Bukkit.dispatchCommand(Bukkit.getConsoleSender(), "stop");
}, 100);
// YEET
Runtime.getRuntime().halt(0);
}
}
the server halts before everyone gets moved...
schedule the stop 1 tick later
you have to give it time to empty its buffer
no you are schedulign the packets. You are not scheduling the shutdown
Yea so you need to make the Runtime.getRuntime delay longer
huh?
so it has time for the players to be sent
oh..
You need to schedule it again. not in the same runnable
^
p.getInventory().setItem(p.getInventory().firstEmpty(), ItemStack item); why does this not work
"not work"
p.getInventory().addItem(item)
use #addItem
ooof, can you help/give ressource?
and check the returned map is empty
nope
Also ItemStack can't be there
do exactly as you are doing, just wrap the stop inside another schedule
so a schedule inside your schedule
i did Material item = p.getInventory().getItemInMainHand().getType();
It needs to be an instance you can't put a class like that
That's not an ItemStack
ik
So make it one
also why are you scheduling the actual send players part
how would i make it a itemstack
couldnt you just leave that to the main thread
new ItemStack(Material)
and schedule the Runtime part
Guys I was wondering. Does the server create a thread for every player connection or it has loop that iterate over a pool of connections?
ok i got it
Yep, just do all the sending on teh main thread. only schedule the shutdown
as you are killing the server anyway, no need to worry about lag
else if ( number_of_players_left <= 1) {
System.out.println("game ended !");
Bukkit.broadcastMessage(ChatColor.RED + "" + ChatColor.BOLD + "" + "GAME ENDED - RETURNING TO BUNGEE");
Bukkit.getScheduler().runTaskLater(MyEvents.this.plugin, () -> {
for (Player onlinePlayers : Bukkit.getOnlinePlayers()) {
ByteArrayDataOutput out = ByteStreams.newDataOutput();
out.writeUTF("Connect");
out.writeUTF("survival");
player.sendPluginMessage( MyEvents.this.plugin, "BungeeCord", out.toByteArray());
}
// Bukkit.dispatchCommand(Bukkit.getConsoleSender(), "stop");
}, 100);
Bukkit.getScheduler().runTaskLater(MyEvents.this.plugin, () -> {
// YEET
Runtime.getRuntime().halt(0);
}, 100);
}
still same issue?
remove the scheduler for the first part
the one where you send the plugin message
its unnecessary
Do as we just decided. Move all teh message sending out of the runnable. Do it all on the main thread and use a single runnable to shutdown
no i want
game ended - wait
kick everyone - stop
i want like 100 ticks for people to realise game is over
ok then two runnables, one inside the other is correct
so what's wrong?
What doesn;t it do?
it stops the server, does not kick me
Make the delay of the second one longer
okay i guess
why not?
You realize that its being ran async
After the first schedualer is ran, it schedules for the next 100 ticks
how do i set the vaulue of a .additem
then it continues on the main thread directly
finds the next one, schedules for the next 100 ticks
you end up with a 0 tick difference (or something very small)
he's using runTaskLater so its sync
i wish i could wait will it's done..
but same idea applies
You can with CompletableFuture
his second task will not be scheduled until the first task has run
When I using /say test
Displaying: "[Server] test"
How can I change the [Server]?
Ah in that case its fine
oh boy... i assume it's not as easy as poython/js ๐
Play with teh length of the second timing to see what works
100 for the first is fine
experiment and see what the minimum you need it
could you just help with waitng till it's done?
since that would save most time tbh
There is no way to know when all teh packets have been sent
trying 100 and 200ticks now
as player is using a queue backed channel
okay 100 and 200 works, problem is, i have no idea how it will handle 10-20? players
is this possible?
DateFormat df = new SimpleDateFormat("dd hh mm ss");
how do i change the vaulue of a .additem
elaborate
p.getinventory.additem(new ItemStack(item)).setvaulue(e);
would what i want it to be
but i cant do that
you can;t chain that
yea
add item returns a map of anything that didn;t fit
well
what value?
why not modify the itemstack first
here's my other problem btw, if anyone can help that would be great <3
do you mean teh stack size?
then add it
so i want to change the ammount of the item
yea
you specify it when you create it
create a thread maybe
new ItemStack(Material, amount)
conclure you do realise i blocked you right
then why u answering
Because why not
(im unblocking everyone anyway)
why would you block a Discord helper
"In order to create an object (an instance of a class), we need a constructor method. "
What??
Oo cool ๐
they told me i was gay
oh i tried to add it after the itemstack
why i getting this error
im not homophobic but they used it as an offense
Do you find that an insult
I spent 8 hours tutoring him, then told him to read the spigot wiki on custom configs until he understood it. He blocked me for that.
no i find it that i don't like people who use gay as an offense and that i also don't like people who insult
LMFAO
I think I wrote it by mistake cause my phone autocorrected to that
๐
who did that??
im blocking him on spot
Hope you can forgive me regardless ๐
People here are foolish
i already blocked u 2Hex, sry
got tired of people not understanding my slow methods of learning and telling me to learn java left and right
dw it fine
Good choice.
hey im a nice person
ok what's with people not understanding that if you block someone you can't see their messages
annoying
I have 14 ppl in this discord blocked
you can have this channel, I'll refrain from talking here :P
and im the one gettin bullied
i have no blocks
2Hex is fine. Sometimes he's intelligent, sometimes he dumb, so its Not too bad ๐
lul it fine
u arent, because I seen your past messages before...
wdym
Elgarl is like switzerland in the second world war.
I can see the good sides and the bad sides - lets just stay in the middle
You block everyone that says learn java when you post code thats as simple as adding {} to the correct spot.
Everyone gave up helping you Buenny as you just block everyone the instant you don;t get what you want.
COUGH
anyways floofsy what was the issue
Yes
dis thing
And I was big noob
cant use the options of the team
yeah , don't learn java for plugins that are java made ๐
Everyone is. You shoudl have seen me a couple of years ago when I came back to Java
there is a way to get help here ?
actually i'm converting millis to a timestamp and im not sure what to use
Grenade.java line 47
yes
this is my last message here,
- just give up, you will have to learn java either way, so better start now
- dont block someone that's helping you nicely, especially elgar hes one of the rare people that help without offending
- if youre seeking help and someone is toxic just ignore them or if it goes over limit ping a helper or tell them to stop
- don't blame / hate on everyone, you should already know if you're 13+ that life isn't completely fair and not all opinions should be said, if you need someone showing niceness is the least you can do
The error is telling you you have somethign missing that JI requires
what is JI
so you cant use the method
- telling people to give up isn't nice, get nice
- they weren't helping me very nicely, they knew i get offended when someone tells me to learn java and they did
- helpers are apart of the problem
- i do whatever i want aslong as it's along the rules
you do need to learn java bruv
- the world isn't nice
nor will it get nice
- if you expect everyone to revolve around you that aint how it works
Guys this debate is as meaningless as the one I had to read yesterday
where the flip did you get that
we need to eat food too
this code is in kotlin but he started the class using Bullet.init() library which i am using but how can i do it in java class
your case is pathetic
com.badlogic.gdx.physics.bullet.collisionJNI.swig_module_init()
"get nice" WHAT THE FUCK! LMFAO
use static block
There were two or three debates yesterday, you have to be a bit more precise
i really wanna say you are pathetic but nah
class A{
{
Bullet.init();
}
}```
and then System.loadLibrary
imma stop now
or wait nvm
yeah floofsy good
bye
i'd like it if you call me buenny
Didn't you leave yesterday?
^^^
the class is public and is extended JavaPlugin (main class)
class PhysicsPlugin extends JavaPlugin, implements Listener```
yo that's one cute bunny
yes but ?
yes, that means its a plugin for spigot
? ...
can you show us the Bullet class
Cause this isnt related to your issue. It's something to do with the API you use
?paste
and it uses JNI to use a method thats coded in a native language
which cannot be found
likely due to a binary not loaded or found
yes
Show me that
wait nvm dont have
3k lines on one class?
oh hmm
Makes sense
its JNI
it includes all methods from a DLL, DYLIB, etc
or binary file whatever
Leave again
i think you mean this ?
ah okok
are you sure you have the gdx-bullet lib?
yes ?
Can you check the resources folder of the specific apis and your plugin too?
Are there any native binary files
(after compiling)
The JNI methods have to be extracted from somewhere
well in the plugin's resources folder there is nothing
yes i'm here
as a test, throw gdx-bullet in a folder called libs in yoru server root
create the folder if it doesn;t exist
server root ?
you mean where i start the .bat ?
yes
you mean the jar file or the .dll ?
try both ๐
can you help me with that
i tried setting one to 100ticks and 2nd one to 200... still didn't work 1/3 times with ONLY 2 players
or i could just use /send all ? but no idea how...
i dont think you can actually with CompletableFuture
i continues getting the error
as you are sending the player to teh lobby try using each player to send their own packt
but thhen it's connect survival and not send all survival
i am?
you are sending to survival, or wherever you are
for (Player onlinePlayers : Bukkit.getOnlinePlayers()) {
ByteArrayDataOutput out = ByteStreams.newDataOutput();
out.writeUTF("Connect");
out.writeUTF("survival");
player.sendPluginMessage( MyEvents.this.plugin, "BungeeCord", out.toByteArray());
}
use onlinePlayers.sendPluginMessage not player
uhm my math goes brr but i just wanted to now if this is correct
long days = TimeUnit.MILLISECONDS.toDays(millis);
long hours = TimeUnit.MILLISECONDS.toHours(millis) % 24;
long minutes = TimeUnit.MILLISECONDS.toMinutes(millis) % 60;
long seconds = TimeUnit.MILLISECONDS.toSeconds(millis) % 60;
oh shoot....
did DateFormat not work?
yeah im pretty new to java ๐
that returns a date i want a timestamp
/ not % in this case
ah i didnt make it myself ๐
I know but you can use the format() method
or whatever
and it returns a String
it should?
iirc
Oh you need to pass in the date
but you can just do new Date(millis);
https://github.com/Conclure/PlayerAttributesVoluble/ guys code review
Is there a reason you didn;t use ConfigurationSerializable on the PlayerData?
something like this
ยด```java
DateFormat df = new SimpleDateFormat("dd 'days', HH 'hours', mm 'minutes', ss 'seconds'");
return df.format(new Date(millis));
Uh no just that it might be nice in case of other storage implementation types like databases and such
final sucks
so clustered hehe
but ye
ima add that tru
yea try that
Lmao
https://github.com/MinecraftMediaLibrary/EzMediaCore guys code review
hopefully that doesnt say 0 days etc
more final ๐คก
so far I haven't solved my error
wait did i miss something lol
i thought my IDE auto adds final
final class
Oh

lol
well it should say 5 minutes
hmm thats weird
Projectile entity = event.getEntity();
Arrow arrow = (Arrow)event.getEntity();
arrow.remove();```
help - wait 5 second
in 5 seconds to delete the arrow
?scheduling
I would strongly suggest having a look at that
You want an arrow to get removed from an entity after 5 seconds? If so us what conclure did
otherwise, explain more
yes
Also check the projectile first, you have an unchecked cast.
Bukkit.getScheduler().runTaskLater(plugin, () -> arrow.remove()), 100L);
Generally it works but deletes immediately
.
100 is in ticks
You need to read what people are telling you Mervik
1 server tick = 1/20 of a second
it's a 20:1 rate
plugin is your main class instance
the one in the middle is a lambda expression
?javadocs would've been easier than asking here
Cool, if you have any more questions I'll answer to the max of my knowledge
Yeah, wait is unuseable (generally) with Spigot/Minecraft
if you tell me where to put it Bukkit.getScheduler().runTaskLater(plugin, () -> arrow.remove()), 100L);
I pasted it but something is wrong
show the error
Now I know, thank you very much.
I assume it's "plugin"
I'm just starting out with java
accept
make an instance variable
of your main class
name it plugin
private final YourPluginMainClassHere plugin;
static
then in your constructor add a param of ur main class
and set it to the field you created
and boom, you achieved Dependency injection
if you don't get the stuff I'm saying you may consider learning java
otherwise here's spoonfeed:
public void onArrowHit(ProjectileHitEvent event) {
Projectile entity = event.getEntity();
Arrow arrow = (Arrow)event.getEntity();
Plugin plugin;
Bukkit.getScheduler().runTaskLater(plugin, () -> arrow.remove()), 100L);```
||java private final urpluginclass plugin; public urclassnamehere(Main plugin){ this.plugin = plugin; }||
ok
^
it might be frustrating first, but sometimes you realize spigot is nothing but an addition to java
you're basically coding java
there is nothing called coding spigot
if you dont know java while youre coding java
it just won't make sense
don't use libraries and APIs while you're learning raw basic java
this is what I'm gonna do, learn java for some time then go back to spigot
until then I decided to not ask any questions here
Yes finally someone who understands. I wish everyone had this attitude with plugin development.
trust me It took long LOL
It's so annoying when people are like "oh ill learn Java by making plugins" then ask simple Java questions that should be easy to understand
Yes. If you want to program something in a specific language learn the atleast the basics of that language before you start trying to make stuff with it.
Yeah
LMFAO I saw this picture when i searched go learn java spigot
i mean java was made 31 years ago
btw everyone here whos same as me trying to learn java
codecademy is 100% the best option
mooc thingy or whatever is also good ig, but codecademy is Very good
can only disagree
... Java isn't that old.
Stackoverflow is the best and only resource
Its not
Do a simple google search
Java was first released in 1995, and Java's ability to provide interactivity and multimedia showed that it was particularly well suited for the Web.
and its development started on 1991
Java was started as a project called "Oak" by James Gosling in June 1991. Gosling's goals were to implement a virtual machine and a language that had a familiar C-like notation but with greater uniformity and simplicity than C/C++. The first public implementation was Java 1.0 in 1995.
Yeah
You may try that first.
So 26 years ago
the development progress was probably commenced before 1992 tho
It has to be said that java now is a shell of its former self
1995
started on 1991
Development started yeah but released 1995
Then maybe make 'simple google searches' before replying
And the JDK 1.0.2 was the first useable JDK according to my book, launched in 1996
yes
imagine using jdk 1 tho
lol
don't worry, I sometimes have the same moments
We're talking about Japan Darts Association
ofcourse
You sure love haskell, don't you?
I love lisp also
Hey guys! I was wondering if it is possible to mute messages for only certain advancements with spigot
messages as in chat?
yeah as in "Player has completed the challenge [challenge]"
it certainly is possible with nms and/or a packet library, not sure if it is otherwise doable
I mean, yes, you could. Should you?
It's likely as bad as setting op on and off - won't do damage in the short term, but might lead to strange situtations
Incorrect
you're compaing
comparing
the permission to do everything on the server
with a simple cosmetic chat message
There is even another way to do it
i think, idk tho
Infact
use my solution
easiest and simplest one
yeah code my commission for me
do i get a cut?
whats the plugin
hm no i dont wanna start an entire new proyect i just wanna join one and help xd
im bored but im also tired lol
yeah I get you
Seconds
would that be miliseconds * 1000 ?
You have 1000ms
Multiply it by 1000
You get 1_000_000us
or divide it by 1000
You get 1.0s
u 100% don't
player attributes are 100% gonna be water for you lol
wat
no
its 1 ms
wait
nvm i think im wrong lmfao
why is he asking that here tho
okay my brain goes brr
u can use google for that
u will get microseconds btw
but 1000 ms is 1 second
1000 / 1000 is 1 ms, 0.001 second
we learn maths in school but we'll never use it in daily life smh
you cant divide a number and make it bigger
1 millisecond / 1000 = 1 microsecond
us ๐
1000 / 0.1 :]
WHITE MODE EW
hmm my cooldown sucks
it says wait one second then i try again and it says 7 seconds
it has to be 5 minutes smh
lol
show code
O.O
command class
if (!isConsole) { // no cooldown for console
long timeLeft = System.currentTimeMillis() - CooldownManager.getCooldown(p.getUniqueId());
if (TimeUnit.MILLISECONDS.toMinutes(timeLeft) < 5) {
Utils.message(p, "&cPlease wait " +
Utils.millisToHumanReadable(
System.currentTimeMillis() -
CooldownManager.getCooldown(p.getUniqueId()))
+ " before reusing this command!" + (System.currentTimeMillis() - 5));
return true;
}
}
after executing command
CooldownManager.setCooldown(p.getUniqueId(), System.currentTimeMillis());
public class CooldownManager {
private final static Map<UUID, Long> cooldowns = new HashMap<>();
public static void setCooldown(UUID uuid, long time) {
if (time < 1) {
cooldowns.remove(uuid);
return;
}
cooldowns.put(uuid, time);
}
public static long getCooldown(UUID uuid) {
return cooldowns.getOrDefault(uuid, 0L);
}
}
smh ?paste was better
millisToHumanReadable LMFAO
whats not working @tardy delta
the cooldown time does not makes sense
?paste
well thats just the method thats formatting it right?
you cant change the theme of results?
Incorrect
hwo
this dont work
get gud
i use this to format time maybe this helps @tardy delta
private static String TIME_FORMAT = "%s Hrs, %s Mins, %s Secs"
public static String formatTime(long seconds) {
int day = (int) TimeUnit.SECONDS.toDays(seconds);
long hours = TimeUnit.SECONDS.toHours(seconds) - (day * 24);
long minute = TimeUnit.SECONDS.toMinutes(seconds) - (TimeUnit.SECONDS.toHours(seconds) * 60);
long second = TimeUnit.SECONDS.toSeconds(seconds) - (TimeUnit.SECONDS.toMinutes(seconds) * 60);
return String.format(TIME_FORMAT, hours, minute, second);
}
lemme see
yea i had that too
lets try again
i think i fixed it
lmao now is the cooldown 18000 days for 5 minutes
XD
maybe you are not calculating the time left correctly then
woops
wrong reply
rrrrr
Utils.message(p, "&cPlease wait " + Utils.millisToHumanReadable(
System.currentTimeMillis() - 5) + " before reusing this command!");
5 has to be minutes
ow wait
you should use timestamps
with a hashmap<UUID, TimeLeft>
but i found it i guess
i was converting System.currentmillis - 5 to days minutes etc
!md
?paste
XD
can i have 1
no
y no
that's all he has
'
we can share my dick tho 
how tf u gonna lick ur own dick
i dont :D
becuz yours is so small
i think were going a bit off toxic here ey
bruh what am I reading
lmfao
lMFAO
smh
dont steal my socks
whats going wrong?
@tardy delta ok i have an idea of how to do it
cooldown is working but the message says stupid things
show code?
this
uh wait
just under it
and the thing that says the message is the md5 paste thing
owo
uwu

i need cuddles
oh god
bro why does it look like that when i open it
bruh conclure just left the thread he was helping me in
i discovered this before sussy baka
scary af
multiple
o
...delete people... jk jk
hey does someone knows what yellow is in char color?
bruh
In Minecraft, there are color codes and format codes that you can use in chat and game commands. Here is a list of color codes and format codes that are available in Minecraft:
just zoom
that will make it worse
xd
soo lucky perms?
no
like you have npcs that do stuff like miners, crafters, smeleters, weapon bois
you can edit their proffesion, you can upgrade their speed and whatever
like minions?
and c u s t o m i z a t i o n
sure, like minions
minions that move and actually do stuff instead of having an animation of mining on loop
maybe even make them talk with eachother to make it seem realistic
doesnโt seem like a game xD
why not
but cool idea nonetheless
they mine, smelt the ores they got, then make them into weapons and sell them
and whats the game part of it?
like an idle game?
also they get revenue
yes, like an idle game
idk im just making it up as i go along explaining
and no revenue
or fight other player's slaves
xd
so the games is like factions
but you have your own army
and you have to manage your army
kinda reminds me of the clay army mod or whatever it's called
i don't play skyblock but don't minions just mine stuff or farm stuff instead of what i said which they move, talk with eachother and stuff like that
in hypixel
minions are in 1 place
and they do stuff arround them
but they dont move
they "talk"
i saw this video like 2 years ago, i don't remember much but i think it's what i have in mind
so imagine this but as a game
https://www.youtube.com/watch?v=GK6Vr9mcgjM
GOD WHYYYY
i'm guessing that's your own plugin?
ofc
lawl
rawr
sounds like a you problem jk jk
wait is it going up
someway
flip values
it doesnt makes sense
you are increasing the timer when you use the command no matter if its still on cooldown
did each of those messages come after you tried to reuse the command?
then yes, you are increasing teh cooldown
:9
if a cooldown exists you should do nothing other than notify the player
i have this
long timeLeft = System.currentTimeMillis() - CooldownManager.getCooldown(p.getUniqueId());
if (TimeUnit.MILLISECONDS.toMinutes(timeLeft) < 5) {
Utils.message(p, "&cPlease wait&e " + Utils.millisToHumanReadable(
timeLeft - 5000) + " &cbefore reusing this command!");
return true;
}
hi, i need help - im unable to use any of the TextComponent stuff in my IDE (IntelliJ), if you can help pls join thread ok thx
how do i put people in thread
does getCooldown return a future time for teh cooldown to expire?
hi elgar
hi
some more things here
does getCooldown return a future time for teh cooldown to expire?
LOL
bro that looks insane
i would play that
if its made properly
well someone with a very big brain regarding custom pathfindergoals would have to look at it :D
idk
The home of Spigot a high performance, no lag customized CraftBukkit Minecraft server API, and BungeeCord, the cloud server proxy.
or ask for help like normal poeple
ur using that?>
dont bother, i tried it and it's fucked up
i was looking for something with timestamps
wait i think i made a plugin with timestamps
let me find it
?bt
it was not much
i thought the course will at least take a day
took me like 4 hours
to 5
i dont understand why it isnt working
https://paste.md-5.net/guyowuxese.java this is waht i use for cooldowns
it saves the timestam of when it was used
and then checks
crying
long timeLeft = System.currentTimeMillis() - CooldownManager.getCooldown(p.getUniqueId());
if (TimeUnit.MILLISECONDS.toMinutes(timeLeft) < 5) {
Utils.message(p, "&cPlease wait&e " + (TimeUnit.MILLISECONDS.toMinutes(timeLeft) - 5) + " &cbefore reusing this command!");
return true;
}
so it seems to be 0
use what i sent
check otu dis
also whatever weird shit ur using just replace it with this:
make hashmap(uuid, integer)
onprecommandprocess
this would reset on server restart
check if command is ur command
Yes and it should
you can't make that persistent, except with pdc or configs
use configs and youre done for
yes thats what im trying to tell him, use timestamps and config files
u ok bro? u might need to take 5 and relax a bit
making them un persistent is good
yeah sry
all good ๐
why doesn't it work?
int exp = p.getTotalExperience();
List<String> lore = config.getStringList("messages.lore");
if (lore.contains("%exp%") && p != null) {
lore = lore.replaceAll((str) -> str.replace("%exp%", "" + exp));
send error? code? version? message?
something?
Type mismatch: cannot convert from void to List<String>
1.12.2
I already sent you a website telling you how to use streams
read. it.
this works:
lore.replaceAll ((str) - > str. replace ( " & " , "\u00a7"));
but why doesn't i %exp% work?

๐งฑ
๐งฑ
wut why not just lore.replaceAll("&", "\u00a7")
XD
I need to make a placeholder %exp%
So make it

it works!
lore.replaceAll((str) -> str.replace("%exp%", "" + exp));
XD
just
ChatColor.translatewhateveriforgor
.replace('&', 'ยง') >>>>>>>>>>>>>
break everything <<<<<< the api exists for a reason
compile to utf-8?????????????????
always used and never broke
only broke when i didnt compiled to utf-8
amogus??
What
how tf do i evaluate this
Evaluate what?
Oh
when a spigot plugin with 2k+ downloads has way worse java than you: man
You have a linked list right?
@grim ice
What do you mean kinda
tell me what to do
Do you have a linked list or not
Yes
yes
Is each operator assigned a priority?
yes
gimme the quickest way
Quickest as in runtime complexity?
yes
what yall doin
py
ill move to kotlin once i figure it tf out
ops = {} or something
can anyone help? i'm making a ranks create command but when i do anything that is incorrect it sends the internal error message
https://paste.md-5.net/ibenecenev.js
Do you want to move somewhere we won't be interrupting people asking for plugin help?
heres fine
Okay
why would anyone use maps instead of hashmaps if what theyre adding is @NotNull
Well, you create a map and iterate over all of the operators
love it when helpers encourge to missuse channels
im just wondering btw
A hashmap is a map
.-.
yeah but like
this is help development