Paste Services
When asking for help with a config/menu/code issue please use our paste bin:
(we prefer it over pastebin.com)
• HelpChat Paste - How To Use
Requested by: Emily • paste
1 messages · Page 145 of 1
Paste Services
When asking for help with a config/menu/code issue please use our paste bin:
(we prefer it over pastebin.com)
• HelpChat Paste - How To Use
It's hard to tell what's going on with so little context. Is any code running asynchronously/on new threads? Where are things added to/removed from the list?
just when someone sends a message
only usage
as I said before ".......but on my computer nothing weird happens.."
this should work
Is any code running asynchronously/on new threads?
can you show more?
yep
this code is so simple and doesn't have much code
I still think this is occurring due to replit issue
becuase this code run perfectly smooth on my computer
and the jar on my computer is the same jar on replit
I even recompiled it and repackage it
just to be sure
Okay so you are creating new threads (readThread extends Thread (might want to rename the class itself to ReadThread though)), Server.messageHistory (it's a regular ArrayList which is not thread safe) is being modified from the whichever many client connection threads you create
Concurrency is a bitch, anything can happen
can you suggest a solution that could work?
You can make your list thread safe by using a concurrent implementation
So you won’t run into that issue
what do you mean by saying concurrent implementation? I'm a begginer in java
Thread safe
I know, the question is how to use concurrent implementation?
this could be easy to fix without overengineering a solution but it might be a band-aid patch on the long run
eeeck
you can use Collections.synchronizedList
not a concurrent list
but it'll work
no it won't
That only allows single-thread access to each method (adds synchronized to every method), but once you get the iterator you are outside of the sync list itself and you're still gonna modify the list as you iterate it
oh
does the iterator in this work? or does it have the same issue
They could use a CopyOnWriteArrayList instead of an ArrayList but that's gonna be funny for memory usage on the long run - or use some sort of (thread safe) queue to offer/pull messages between threads rather than iterating
so what is the best way?
for short term
I dont really care much about this java application this is mainly for testing
well for a "list" I think you can use ConcurrentLinkedDeque
I think
uh i don't think a set is fit for this
oh wait which one
any
if I send two messages with the same contents then that's gonna be a no-go lol
it's on server class
so is this the best way for this particular needs?
Quickest and dirtiest solution? Use a Collections.synchronizedList(new ArrayList) for messageHistory and use an indexed for loop (for (int i = 0; i < messages.size(); ++i)) with List#get(int index) instead of enhanced for loop (for (String message : messages))
But this is smelly lmao
for what I can see in the code, it'll work afaik, but note that you can't do get(index) on it
although technically you can iterate through it and get the element that way 🥲
🥲
orrr you can do this
¯_(ツ)_/¯
Concurrency is nasty, and doing it well isn't easy
collections from java.util?
yee
are you sure?
uh, yes?
why
I mean, it’s like the only import option lol
i have an image to send
but i don't have the preivleges to send it'
maybe imgur will help
Lol
err could you show the whole line? 
Also this is the solution to iterating a synchronizedList safely, I never read that lmao
CC @dusky harness
oh
makes sense 🥲
oh nevermind
so yeah you could do that with a synchronizedList instead of doing the indexed for loop
both solutions should work
the actual class is implementation detail, you'd just use a List<String>
like List<String> messageHistory = Collections.synchronizedList(new ArrayList<>());
and then when iterating
synchronized (messageHistory) {
for (String message : messageHistory) {
// ...
}
}
Ok it fixed the error and now it doesn't show up in the console
but I still getting null in the client
please note that on my local machine it works fine
but on replit...
fine I dont really care about that server on replit, most important is that it actually works on my local machine perfectly fine
Another question - can I place the JDK folder or JRE in the project folder and run jdk/bin/javaw.exe -jar asdsd.jar and it will run on any machine?
I believe you can
thats how minecraft bundles the jre for example
now its my time to ask
can you spawn fireworks with different angles?
like I want to spawn one that goes to the right
and another that goes to the left
can you do so?
and how?
Probably Entity#setVelocity if it’s possible
No problem
I keep getting "Caused by: java.lang.IllegalArgumentException: Cannot translate null text
at com.google.common.base.Preconditions.checkArgument(Preconditions.java:145) ~[guava-31.0.1-jre.jar:?]
at org.bukkit.ChatColor.translateAlternateColorCodes(ChatColor.java:354) ~[paper-api-1.19-R0.1-SNAPSHOT.jar:?]
at me.darklife12345.nsc.commands.Heal.colorize(Heal.java:117) ~[NSC-1.0-SNAPSHOT.jar:?]
at me.darklife12345.nsc.commands.Heal.onCommand(Heal.java:66) ~[NSC-1.0-SNAPSHOT.jar:?]
at org.bukkit.command.PluginCommand.execute(PluginCommand.java:45) ~[paper-api-1.19-R0.1-SNAPSHOT.jar:?]
... 17 more"
In most cases this error happens when the plugin you're using is trying to recall a message from a config that doesn't exist.
To fix make sure you haven't deleted any config lines by mistake and each message has a value set.
FYI Objects.requireNonNull() does not fix NPE's it just makes them throw immediately instead of waiting till you attempt to access something on that variable
Basically the config is failing to get the Value of the key "No-Permission"
The yaml file is your config.yml?
Try without caps
hi guys does this work in 1.8?
https://www.spigotmc.org/wiki/custom-item-models-in-1-9-and-up/
The home of Spigot a high performance, no lag customized CraftBukkit Minecraft server API, and BungeeCord, the cloud server proxy.
no
i mean from your experience but not from the information of the post
yeah it doesn't work on 1.8 lmao
1.9 and up supports custom models via durability and 1.14.4+ supports custommodeldata
oh alr thx a lot
where can i learn about both spigot and minecraft updates 1.9+
like the most quickest and summarising soures
cuz I feel like im lagging behind everyone else
you can't quickly summarise almost 9 years worth of updates
for mc itself check each major update's wiki page in the mc fandom
for spigot either the update threads on spigotmc.org or each version's javadoc
(\[?#[a-fA-F0-9]{6}]?)|(&[0-9a-fk-or]) how can I get all matches for this regex? I don't understand how matcher.group() works.. when I try group() it only returns one result every time
you use a while (matcher.find())
I do
and what's the problem?
// &aHey &cThere
while (matcher.find()) {
matcher.group()
}
// &a
// &c
Do you know how I could possibly fix it?
Is that your config.yml file
Never mind I fixed it
I was stupid
I mixed up the comments
I put // instead of #
Hello everyone !
Someone want me to create an add-on of Guilds. (https://www.spigotmc.org/resources/guilds-30-sale.66176/)
I have a problem with the API: GuildsAPI class doesn't exist.
Version I'm using: 3.5.6.4-SNAPSHOT
Error message : Cannot resolve symbol 'GuildsAPI'
Feel free to ask questions !
Thank you 🙂
public DataManager(StartupClass plugin) {
configFile = new File(plugin.getPlugin().getDataFolder(), "data.json");
System.out.println("1");
try {
fileWriter = new FileWriter(configFile);
System.out.println("2");
}catch(IOException e){
e.printStackTrace();
System.out.println("err");
}
initializeConfig();
}
/**
* Should only be used by this class to grab/create the config
*/
private void initializeConfig() {
try {
if (!configFile.exists()) {
gson.toJson(new Data(), fileWriter);
System.out.println("4");
}
config = gson.fromJson(new FileReader(configFile), Data.class);
System.out.println("5");
} catch (IOException e) {
System.out.println("6");
e.printStackTrace();
}
}
/**
* Gets the Data object the config is held in.
* @return Returns the config object.
*/
public Data getConfig() {
return config;
}
GetConfig is returning null
1,2,and 5 print
Put more detail in debugging. Check if config's value is altered.
For example instead of System.out.println("5") do
System.out.println(gson.fromJson(new FileReader(configFile), Data.class).toString());
config = gson.fromJson(new FileReader(configFile), Data.class);
System.out.println(config.toString());
its null on startup tho
i did a chuck
Imma try and make it final
Ig making is final fixed it 💀
So it must have been changed somewhere
i gotta find that
👍
IT WORKY!
if (plants.containsKey(world.getName()))
return;
PlantTicker plantTicker = new PlantTicker(world);
plants.put(world.getName(),plantTicker);
System.out.println(plants.keySet().toString());
}``` Can someone tell me why it prints an empty array ?
Where are you creating the array
it a hashmap
Hey folks I have a pretty hefty set of questions for yall
I'm trying to create a new api to be used in place of the bukkit scheduler. However, I'm using ProjectReactor, to ensure the scheduled tasks are all reactive and non blocking. My first question is, how would I get the service in question able to be executed on a new thread?
My second question is: how can I make a service execute repeatedly, and how can I delay it?
Third and final question: would the actions in question be considered asynchronous as they're operating on parallel threads and not on the main thread?
This something like what you're trying to do? https://github.com/TheCrappiest/TaskManagement
I'd say that's in the ballpark, except more oriented towards server performance on paper / spigot
I have a bit of what I threw together the other day uploaded to github but it's not anywhere near done
Take a look at this
This is what I'm using to make the API
private final Map<String, PlantTicker> plants = new ConcurrentHashMap<>();
Found a solution : Using version 3.5.4.5
No reason why it wouldn't have atleast a single entry then
sth to do with keyset prolly
See here
||keySet: The view's iterator is a "weakly consistent" iterator that will never throw ConcurrentModificationException, and guarantees to traverse elements as they existed upon construction of the iterator, and may (but is not guaranteed to) reflect any modifications subsequent to construction||
It’s not guaranteed to reflect any modifications made
Try doing thread.sleep maybe for even like 3 ms and see if the changes is posted
that won't change anything as
and guarantees to traverse elements as they existed upon construction of the iterator
having random sleeps in your code isn't how you solve threading issues, but this isn't a threading issue anyways
Retrieval operations (including get) generally do not block, so may overlap with update operations (including put and remove).
This statement implies that put is non blocking too and is async to be overlapping with another async function
So the get function may have preceded set function
And the other problem may be that all sync operations are done before async operations
So this can be a thread problem
And indeed sleep may not solve this issue but at least it will test if this is indeed the issue
no
threading issues can only appear if multiple threads are involved
and "non blocking" is often confused, because the method actually does not return until it did its work.
Depend on your definition of threading issues
The set operations create a new thread apart from the main thread,which is exactly the definition of non blocking
So it’s effects have to be delayed after all synchronous operations finish
that's just wrong
What do you mean
If an operation is non blocking it means that the operation is async
I’m talking about the operation not the function
please read the documentation instead of spreading false information
CHM does not create any threads at any point
retrieval operations don't block, but that still doesn't mean those methods run anything async
this, chm does not do anything async by itself
My mistakes
unless the person is calling from another thread (even then should be no issue as the retrieval and put is on the same thread)
Should be synchronisation issues
Or locking sequence or sth
But delaying get for a few ms certainly would help
If the code is as shown, there is only one thread involved
even if there were multiple, that method would still be used by only one thread
so that should not cause an issue
Yeah
Yes my mistakes
i just tested, putting and pulling from a concurrent hashmap works fine
so my bet is there is somehow an issue maybe with the objects that they are putting in
but they didnt say anything about npe either so

I mean it can be inherent thread design problem
It’s probably just a weird toString method lol
Like the synchronise or read and write block problem
most likely
whole point of chm is that you dont run into those issues
quite sure its safe up to? 16?? operations at the same time
depending on the segment
How can I check if a player used a totem of undying? Is there a event for that?
EntityResurrectEvent
I know
but i wanna like check if a player used a totem with a custom disaplayname
and then do stuff
Hiiiii does anyone know how to make a symbol using photoshop or something im working on a t shirt and need a symbol to put on the sleeve please DM 😊
Hello im using commandNPC plugin but when im going too far from my npc and i come back i can see his name on tablist for a second
how could i fix it
Not really possible, it happens for all player NPCs
if we REMOVE_PLAYER to the npc just after we spawn it it will do the same thing ?
It will do it as long as it is player NPC, if you make the type like a villager or something, it won't do it anymore
oh ok ty, but how could i change the NPC type ?
Yes but it will lose his texture to be a villager
Of course it will, as i said, this problem will always occur with player NPC type, you cant do anything about it
should i use local sqlite and also mysql at the same time in case of something happen to mysql in another server
like a backup plan
if there is a way to know that mysql connection closed i can stop server basically thats the best option i believe but idk if it is possible
Use the same event, check if the entity is an instanceof player, then check if they have a displayname that doesn’t match the username
Then do your stuff
no. they mean if the totem they used had a custom display name
O
He can get the players inventory though right? Or is it fired after the totem disappears?
the event is fired before. but you can't be sure which totem is used. at least idk if you can
Cause I feel like if that doesn’t work he can just use the damage event cleverly enough
I’ll check it soon, can’t do much on phone lol
;d spigot EntityReserructEvent
How did it work again 🤨
кто русский?
d;
Help, why did PlaceholderAP stop working?
https://www.toptal.com/developers/hastebin/wowunusoxu.md
Anyone know the reason for this error
[17:28:15 WARN]: [io.alenalex.github.codegenerator.shaded.hikaricp.hikari.pool.ProxyConnection] HikariPool-1 - Connection com.mysql.jdbc.JDBC4Connection@3354c77c marked as broken because of SQLSTATE(08S01), ErrorCode(0) com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure
Hi i use DeluxeMenus and i have setup a gui, with command but i have some problems to get the username in the command, eks /rank (user) (group), what can i use on user to get the user of the gui?
does anybody have an idea
Hi, If I put this inside an async task:
Bukkit.getScheduler().scheduleSyncDelayedTask(plugin,() -> {
for (var block : blocksToRemove) {
block.setType(Material.AIR);
}
});```
Why would it still give an error that it's being executed in an async task? The idea is to execute this sync after the async task
you sure? can u give the error/stacktrace?
Here is the method:
https://paste.helpch.at/ofekimazob.cs
Why is it a delayed task without any delay specified?
you're doing setType async
line 29 in the hastebin
ohh
my plugin is loading before the dependencies and that's why it's giving an error, what can I do?
Depend/soft depend on your dependencies so spigot forces it to load after them
I tried also to put softbefore but did not solve
"depend: [LuckPerms, HolographicDisplays]" "softbefore: [LuckPerms, HolographicDisplays]"
I tried to use depend: as it usually is, and it didn't work so I put the softbefore but it didn't work either, I tried to use both but it didn't work either
Luckyperms keeps starting right after my plugin and not before. I tested starting the server after giving /reload the plugin and the plugin worked, but when I start the srv with the plugin it remains the same error
error https://prnt.sc/qNB88KxtWa9U plugin.yml https://paste.helpch.at/orakowuyet.apache
it's softdepend if it's an optional dependency, or just depend for a required dependency
also forge + bukkit 💀
YamlConfiguration iirc
what now?
but still the dependency starts before the plugin
How can I detect if a player gets their hit blocked from another players shield?
Use entitydamagebyentityevent
And check if the damage cause is Entityattack
And also check if getfinaldamage is 0 plus if get Entity is player and is holding shield
Hello im using wg api but i cant find a class named BlockVector2D
But some methods ask me BlockVector2D as parameters
Yes u right ty
You can use Player#isBlocking
Hi, could anyone explain me this? a bit confused on the meaning/function of it
it will remove the entity from the world
but it's worded like that because it won't necessarily be removed in that same tick afaik
no, it is worded like that because md sucks as writing documentation, wdym
oh, understood, thanks.
Uhm quick question, any way to deserialize a text with MiniMessage and return a string instead of Component?
tried toString, but kinda returns this
(Trying to set the name of an armorstand btw, which doesn't accept components)
you have to serialize the component in some way
if you want it in § form then use LegacyComponentSerializer
that function has existed loooong before md, lol
ah ah
I serialize, the deserialized component?
pretty much
You can either use what BM suggested, or try to set the name using reflections, that should work
Surely it does? Like any other entity?
lol
uhm another quick question, anyways to fix this "shadow glitch"?
like, since the armorstand is inside the block, it displays the name like it's "suffocated" or well, "inside a block"
setMarker(true)
okay, thx
that will get rid of the hitbox altogether so you need to place the armour stand where you actually want it to be
i.e. above the thing rather than trickily below
yea
k thx
Oh also, entities, specifically armorstands, can't be removed async right?
Does that also apply to spawn?
it applies to every entity
make a data class with location, etc and serialize that instead
I don't think you can serialize the entity itself
¯_(ツ)_/¯
welll
you "can", you just are very very very much not supposed to do it
usually you save data that refers to the entity, like the UUID
Well, actually, no need to serialize it, found another way, but thanks. Also, any way to prevent like, the armorstand being visible for a mili second?
like when I spawn the armorstand
I can see it for a millisecond
it doesn't go invisible directly
use the spawn method that takes a Consumer, and in that lambda you can "configure" the entity before it's added to the world
this one?
ye it's that, thanks.
Any ideas why this loc.getNearbyEntitiesByType(ArmorStand.class, 0, 3); could not be detecting the hologram?
the yRadius is 3 just to make sure, but it apparently can't find it
I turned the collecetion into a List, and tried getting the first item
and got an java.lang.IndexOutOfBoundsException: error
quite confused, doesn't it detect Armorstands specifically?
if this doesn't work, I remember that setting it on fire works
It worked.
try to use 1 for x, instead of 0
but the issue is I don't want the armorstands in the right or left lol
maybe 0.2? or something
works?
will just try it
okay, doesn't give the IndexOutOfBounds Exception anymore but...
doesn't rlly delete the armorstands lol
basically doing this:
var entities = location.getNearbyEntitiesByType(ArmorStand.class, 1, 3);
var list = new ArrayList<>(entities);
(ArmorStand) list.get(0).remove();
why dont you get the entity by its id or something
try printing out the armorstand location and the location location
how exactly do I get the Id of an Armorstand?
getUniqueId
Im not done with this but It constantly says its incorrect and does not tab complete, Im new and am following a tutorial and even though I have all the same things it tells me im wrong
import org.bukkit.event.EventHandler;
import org.bukkit.event.entity.ExpBottleEvent;
public class XpBottleBreakListner Listener {
@EventHandler
public void onXpBottleBreak(ExpBottleEvent e){
Block block = e.getHitBlock();
block.breakNaturally();
}
}
There we go! thank you
I keep getting a error in when trying to register the events
It says that it expected a ) after plugin:
import com.pukinetwork.debuffban.debuffban.listeners.XpBottleBreakListner;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.entity.EntityToggleGlideEvent;
import org.bukkit.plugin.java.JavaPlugin;
public final class DebuffBan extends JavaPlugin {
@Override
public void onEnable() {
// Plugin startup logic
getServer().getPluginManager().registerEvents(new XpBottleBreakListner(), plugin:this);
}
}```
don't add the plugin:
you might see that if the IDE supports it - it just shows what the parameter is asking for, but it's not part of the actual java code
ohh ok
@worn jasper you could try saving the stand's chunk & UUID, and then load the chunk and get the entity by its UUID
far more reasonable than aimlessly trying to get it with the location alone lol
@Override
public void onLoad() {
preRegion1 = WorldGuardPlugin.inst().getRegionManager(Bukkit.getWorld("lobby")).getRegion("prehistoire").getPoints().get(1);
preRegion2 = WorldGuardPlugin.inst().getRegionManager(Bukkit.getWorld("lobby")).getRegion("prehistoire").getPoints().get(1);
double xMiddle = (double) ((preRegion1.getBlockX() + preRegion2.getBlockX()) / 2);
double zMiddle = (double) (preRegion1.getBlockZ() + preRegion2.getBlockZ()) / 2;
Bukkit.getScheduler().scheduleSyncRepeatingTask(plugin, new Runnable() {
@Override
public void run() {
System.out.println(Bukkit.getWorld("lobby").getEntities().size());
if(Bukkit.getWorld("lobby").getEntities().size() < 15){
System.out.println("1");
double xPos = ThreadLocalRandom.current().nextDouble(xMiddle, xMiddle-preRegion1.getBlockX());
double zPos = ThreadLocalRandom.current().nextDouble(zMiddle, zMiddle-preRegion1.getBlockZ());
MobManager.spawnMob(xPos, zPos, Bukkit.getWorld("lobby"));
}
}
}, 0L, 120L);
}
[23:27:25 ERROR]: null initializing EvoPlugin v1.0 (Is it up to date?)
java.lang.NullPointerException
at com.sk89q.worldguard.bukkit.WorldConfiguration.getBoolean(WorldConfiguration.java:217) ~[?:?]
at com.sk89q.worldguard.bukkit.WorldConfiguration.loadConfiguration(WorldConfiguration.java:342) ~[?:?]
at com.sk89q.worldguard.bukkit.WorldConfiguration.<init>(WorldConfiguration.java:209) ~[?:?]
at com.sk89q.worldguard.bukkit.ConfigurationManager.get(ConfigurationManager.java:228) ~[?:?]
at com.sk89q.worldguard.bukkit.WorldGuardPlugin.getRegionManager(WorldGuardPlugin.java:972) ~[?:?]
at fr.palmus.plugin.Main.onLoad(Main.java:191) ~[?:?]
at org.bukkit.craftbukkit.v1_8_R3.CraftServer.loadPlugins(CraftServer.java:297) [server.jar:git-Spigot-db6de12-18fbb24]
at org.bukkit.craftbukkit.v1_8_R3.CraftServer.reload(CraftServer.java:739) [server.jar:git-Spigot-db6de12-18fbb24]
at org.bukkit.Bukkit.reload(Bukkit.java:535) [server.jar:git-Spigot-db6de12-18fbb24]
at org.bukkit.command.defaults.ReloadCommand.execute(ReloadCommand.java:25) [server.jar:git-Spigot-db6de12-18fbb24]
at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:141) [server.jar:git-Spigot-db6de12-18fbb24]
at org.bukkit.craftbukkit.v1_8_R3.CraftServer.dispatchCommand(CraftServer.java:641) [server.jar:git-Spigot-db6de12-18fbb24]
at org.bukkit.craftbukkit.v1_8_R3.CraftServer.dispatchServerCommand(CraftServer.java:627) [server.jar:git-Spigot-db6de12-18fbb24]
at net.minecraft.server.v1_8_R3.DedicatedServer.aO(DedicatedServer.java:412) [server.jar:git-Spigot-db6de12-18fbb24]
at net.minecraft.server.v1_8_R3.DedicatedServer.B(DedicatedServer.java:375) [server.jar:git-Spigot-db6de12-18fbb24]
at net.minecraft.server.v1_8_R3.MinecraftServer.A(MinecraftServer.java:654) [server.jar:git-Spigot-db6de12-18fbb24]
at net.minecraft.server.v1_8_R3.MinecraftServer.run(MinecraftServer.java:557) [server.jar:git-Spigot-db6de12-18fbb24]
Hello im using world edit/guard api but i dont understand why i receive a NPE at preRegion1
The selected region exists
pretty sure you can't do that in onLoad, needs to be in onEnable
well, at least in modern versions lol
I asked in their discord, but I have this issue with the ShopGUI+ API and maybe someone else has had it and knows how to fix it.
I get this error when registering an ItemsProvider with ShopGUIPlus:
13.07 20:36:50 [Server] [ShopGUIPlus] Task #109 for ShopGUIPlus v1.77.4 generated an exception
13.07 20:36:50 [Server] INFO java.lang.NullPointerException: Cannot invoke "org.bukkit.inventory.meta.ItemMeta.setLore(java.util.List)" because "<local2>" is null
13.07 20:36:50 [Server] INFO at net.brcdev.shopgui.util.ItemUtils.loadItemMeta(ItemUtils.java:487) ~[ShopGUIPlus-1.77.4.jar:?]
13.07 20:36:50 [Server] INFO at net.brcdev.shopgui.util.ItemUtils.loadItemStackFromConfig(ItemUtils.java:110) ~[ShopGUIPlus-1.77.4.jar:?]
13.07 20:36:50 [Server] INFO at net.brcdev.shopgui.config.Settings.loadItemStacks(Settings.java:133) ~[ShopGUIPlus-1.77.4.jar:?]
13.07 20:36:50 [Server] INFO at net.brcdev.shopgui.ShopGuiPlugin.loadAfterServerLoaded(ShopGuiPlugin.java:228) ~[ShopGUIPlus-1.77.4.jar:?]
13.07 20:36:50 [Server] INFO at net.brcdev.shopgui.task.LoadShopsTask.run(LoadShopsTask.java:26) ~[ShopGUIPlus-1.77.4.jar:?]
13.07 20:36:50 [Server] INFO at org.bukkit.craftbukkit.v1_18_R2.scheduler.CraftTask.run(CraftTask.java:101) ~[pufferfish-1.18.2.jar:git-Pufferfish-72]
13.07 20:36:50 [Server] INFO at org.bukkit.craftbukkit.v1_18_R2.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:483) ~[pufferfish-1.18.2.jar:git-Pufferfish-72]
13.07 20:36:50 [Server] INFO at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1175) ~[pufferfish-1.18.2.jar:git-Pufferfish-72]
13.07 20:36:50 [Server] INFO at net.minecraft.server.MinecraftServer.lambda$spin$1(MinecraftServer.java:318) ~[pufferfish-1.18.2.jar:git-Pufferfish-72]
13.07 20:36:50 [Server] INFO at java.lang.Thread.run(Thread.java:831) ~[?:?]
It doesn't happen when the ItemProvider isn't registered
Would the DeluxeMenu developers be interested in changing the EventPriority for its PlayerCommandPreprocessEvent listener (in PlayerListener) from LOWEST to LOW? I maintain a plugin for creating Bedrock Edition Forms and I provide a way of intercepting commands so that server owners can instead show forms to bedrock edition players. The problem is that DM uses the LOWEST priority so I cannot modify the event before DM does its thing. It would be nice if DM also ignored the event if it was cancelled.
The workaround for this is setting the DM menu to register_command: true but that isn't really a solution for users that use DM to intercept commands from other plugins. Or just not using open_command.
{"providers":
[
{"type":"bitmap","file":"custom/admin.png", "ascent":7,"height":7,"chars":["ꈁ"]}
]
}
Umh whats wrong here doesn anyone know
You should be able to add softdepend: DeluxeMenu to your plugin.yml
How would that help?
if its the same priority?
Yeah
Ill try both, thanks so much!
Yeah that would make sense
Yeah loadbefore should work https://www.spigotmc.org/wiki/plugin-yml/
The home of Spigot a high performance, no lag customized CraftBukkit Minecraft server API, and BungeeCord, the cloud server proxy.
and then i'll use event#setMessage to obfuscate it or something awful so that DM doesn't pick up on it 💀
lol
what is 1.8 equivalent of packetplayoutstopsound?
do I just play the same sound and set the volume to 0?
pls ping if you are available for help, thx
Most likely
nope it does not work
There is no time to wait! Ask your question @weak bronze!
i have create a gui for control the players.
and for get the player info, i am using this:
String book_gui_lore2 = PlaceholderAPI.setPlaceholders(event.getRightClicked().getName(), book_gui_lore);
is an invalid method
?????????
First parameter takes in a player instance, not their name
And the second one takes in a string
also check out naming conventions of java
this is custom model data in 1.9
{
"parent": "item/handheld",
"textures": {
"layer0": "items/wood_hoe"
},
"overrides": [
{"predicate": {"damaged": 0, "damage": 0.01666666666667}, "model": "item/my_cool_custom_item"}
]
}
what does damaged and damage mean respectively?
I'm guessing the 'damaged' is a boolean where 1 is false and 0 is true? Then damage is the amount of damage the item has
Don't @ me though I've no idea lol, just a guess
oh alr that makes sense actually
just gonna double check if its true
thx a lot kind man!
it probably means whether the damage is displayed or not
🙏 🙏 🙏
Oh yeah that’s make more sense
how can i code when a block is broke set to a other block and give player a amount of money and wait 5 seconds and set to other block
block break event:
set block
give money
create scheduler, wait 100 ticks
set block again
can i copy thi or
so where do i place it here
no you cant copy it, it aint code
import org.bukkit.block.Block;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.block.BlockBreakEvent;
import org.bukkit.inventory.ItemStack;
public class IronBreakListener implements Listener {
@EventHandler
public void onPlayerBlockBreak(BlockBreakEvent event) {
Block brokenIore = event.getBlock();
if (brokenIore.getType() == Material.IRON_ORE) {
event.setCancelled(true);
brokenIore.setType(Material.BEDROCK);
ItemStack brokenioreDrop = new ItemStack(Material.IRON_INGOT, 5);
brokenIore.getWorld().dropItemNaturally(brokenIore.getLocation(), brokenioreDrop);
}
}
}
so how do i use it here
i am ne
new
what you want is runtasklater
for your 5 seconds delay
and for money, you need to hook up with whatever econ plugin you normally use
through their api if they got one
how i use vault
By finding their GitHub and then following the tutorial
i cant find how to use the scheduler and the api
yes but i dont know what to google and i i google how to give someone money if they break a block java spigot plugin i get plugins in stead of the code i want
Don’t Google so specific things
Google how to use bukkit scheduler
Google how to detect block break
Google how to set block
Google how to use vault
I’m trying to avoid spoonfeeding and make you learn
but i want that you get money if you break
wat is spoonfeeding
yes
but i dont understand
so
and i dont find it easy to find code that i can put here
look this is the code for my event now
if you press you see my event
and i want that you get money instead of the naturaldrop
@support pls help me
is this the one i need
so BukkitScheduler
If we answer all your questions directly instead of helping you learn, you will perpetually ask more questions
sorry but i realy want this to work and i cant find how to use a scheduler in a event
i am gonna watch a tutorial
You also might want to learn Java before bukkit
you need java to make plugins
yes, and they're saying that if you learn java beforehand, you only have to learn the spigot api instead of both at the same time
ow but i have command such as fly and god without tuts but i can't understand a schedular i dont know how to add it in my event
but now if i break iron the iron becomes bedrock but i dont know how to wait 5 sec and set it back to iron
https://www.spigotmc.org/threads/delay-5-seconds.277448/
they even give you the code here
Bukkit.getScheduler().runTaskLater(this, new Runnable() {
@Override
public void run() {
//code here
}
}, ticks);
all the code
but, you need to learn java
well to delay 5 seconds
there is no going around it
I googled
spigot delay 5 seconds
and that's the first result
this was the first result, and it shows the code needed
but it is re
red
Well their plugin structure, etc might not be the exact same as yours, so you can't just copy and paste
you have to code it yourself too
they're just guiding you
ow
Yeah I’d suggest learning java or paying someone to develop
at least help them explaining or something bruh
what it does is that it schedules a task that will run 100 ticks later
20 ticks = 1 second
so 5 seconds
the problem with that is that the schedule task is deprecated
if you are using paper iirc
you can also do:
new BukkitRunnable() {
@Override
public void run() {
//you do your stuff here
}
}.runTaskLater(pluginInstance, 100)
if you want to be able to change the length of the delay
new BukkitRunnable() {
int seconds = 5;
@Override
public void run() {
//you do your stuff here
}
}.runTaskLater(pluginInstance, seconds * 20L)
uh yeah that's not gonna work
that literally does not compile lol
Emily is talking about seconds being defined inside the runnable
it literally does not compile
I am totally certain
pretty sure I've used that before
maybe check again
bruh of course that part compiles
;-;
you can't use count outside tho
what
like you're using seconds here
Bukkit.getScheduler().runTaskLater(plugin, () -> {
//your code here
}, delay);
that will schedule a sync task and it is not deprecated
schedule*Task has been deprecated since forever lmao
For some reason, I have been having trouble using SplittableRandom. I first tried RandomGenerator.getDefault(), however, I would get an error saying that No implementation of the random number generator algorithm "L32X64MixRandom" is available. So then I tried RandomGenerator.SplittableGenerator.of("L32X64MixRandom") in order to try to specify the implementation to use. However, I still get the same exact error.
What is weird is that when clicking on the SplittableRandom interface and clicking on View Implementations, I can see the source code for the L32X64MixRandom class. However, when I try to import the class, Intellij cannot identify the class.
So after some research it turns out some JDK's don't actually have the implementations?
I ended up using a faster random utility class outside the jdk
It does
But Spigot's class loading does some weird bullshit that for whatever reason excludes some of the default jdk modules from being included
jdk.random being one of them
Actually I believe it's some Paperclip thing
Which can be easily solved by using not paperclip, but a bundler jar
Spigot weird
That being said
I don't know whatever classloader BS is going on behind there
but its causing ServiceLoader to just not work
and it fucks up many libs and implementations
mhm
some things service loader relies on won't work properly for some weird quirks PluginClassLoader does
i remember i had to copy a whole library (copy all the classes over) cause it used ServiceLoader
it was not fun
Hello @everyone
-I am a computer science student that is struggling financially due to the economic crisis in my country.
-I can give you tutoring, make your projects, help you with your assignments , essays, exams.
-I tutor java , c++ , front end web programming , react js ,vb, microsoft apps(ppt,word,excell...), Math,physics
-My prices are so cheap and affordable, contact me for more details.
gotta love the everyone attempt
@everyone
The 'everyone' mention is disabled so you can't annoy people.
Guys emojis in minecraft chat are avaiable also on tab list or there arent emojis avaiable there in 1.19?
public void onPlace(BlockPlaceEvent e) {
Player player = e.getPlayer();
if (!e.isCancelled()) {
if (e.getItemInHand().isSimilar(SnowMinion)) {
player.getInventory().removeItem(SnowMinion);
ArmorStand stand = (ArmorStand) e.getBlock().getWorld().spawnEntity(e.getBlock().getLocation(), EntityType.ARMOR_STAND);
stand.setHelmet(new ItemStack(Material.PLAYER_HEAD));
stand.setChestplate(SnowMinionChestPlate);
stand.setLeggings(SnowMinionLeggings);
stand.setBoots(SnowMinionBoots);
stand.setItemInHand(new ItemStack(Material.DIAMOND_SHOVEL));
stand.setArms(true);
stand.setGravity(false);
stand.setVisible(true);
stand.addEquipmentLock(EquipmentSlot.HAND, ArmorStand.LockType.REMOVING_OR_CHANGING);
stand.addEquipmentLock(EquipmentSlot.HEAD, ArmorStand.LockType.REMOVING_OR_CHANGING);
stand.addEquipmentLock(EquipmentSlot.CHEST, ArmorStand.LockType.REMOVING_OR_CHANGING);
stand.addEquipmentLock(EquipmentSlot.LEGS, ArmorStand.LockType.REMOVING_OR_CHANGING);
stand.addEquipmentLock(EquipmentSlot.FEET, ArmorStand.LockType.REMOVING_OR_CHANGING);
stand.setInvulnerable(true);
stand.setSmall(true);
e.setCancelled(true);
player.sendMessage("worked");
}
help
why does it not show leggings and boots
on the armors stand
Debug the items
ohh I think I got the problem
its probably coz I forgot to set the itemmeta to the specified meta
Hi, so, right now I have this method, which well, as the name says, is supposed to delete a hologram with the specified uuid in the location's chunk:
The issue I am having, is that, whenever I unload the chunks, and wait a bit, and load them again, it seems like, this method can't find the hologram??
Do the armorstands change the UUID or something?
Possibly!
Hmm, will test it then, thanks lol
quite a stupid mistake
still get sometimes confused when I should use == and when I should use .equals
since both can compare objects
== compares referential equality for objects
so if they are not referencing the exact same object, it will not be true
.equals() methods are user-defined, which, especially in this case with objects being loaded and unloaded by the garbage collector, is what you want
when you're using enums (like you are above) or numbers, you want to use == as you can't use .equals
cast to string then use .equals like a true dev
Thanks a lot for the explanations guys!
A hologram won't be just a single armorstand most of the time.
Also you can clean this up by just using Bukkit.getEntity(UUID)
wait wut 😮 Thanks and also, wdym with your first sentence?
Well you can't create multi lined holograms with the display name of 1 armorstand. You use multiple named armorstands with an offset of the ylevel.
Also with holograms I know it's a bit more advanced but I recommend looking into nms and using packets. Otherwise your gonna be running things on the main thread which won't be to beneficial in terms of performance.
Will look into it! Thanks.
so long you spawn armour stands with ticking disabled it's not a concern whatsoever
Best way to make the arena restoration system for a minigame? (Maybe an api ready to use? xd)
slimeworldmanager
Api i guess?
wit this you basically scrate a "slime" world and load it when you need
players can brak/place stuff and then you can just reload the map
meaning it doesn't save map progress
does anyone know of a way to reduce/remove the invulnerability of the player when they have a wither/poison level higher than 3?
Sounds good but couldnt find the method to save the map (i mean i saw the saveWorld but didnt find what byte[] was required)
are you just replace a build or something? I want to make sure I understand what you're trying to do haha
if it's not huge huge then I'd just use FAWE and use a schematic to paste the whole build async
otherwise if it's a huge thing then you might be better off unloading the world, changing the region files, and reloading it. that's only if it's stupid big haha
at that point just dont save the chunks lol
Minigame, might be 50x50 or 1000 x1000 or more
Depends on the owner and the map he uses i guess
Slime worlds are perfect for minigames
Or rather, minigame worlds are perfect for the Slime format
https://www.spigotmc.org/wiki/colored-particles/
does this work in 1.9?
The home of Spigot a high performance, no lag customized CraftBukkit Minecraft server API, and BungeeCord, the cloud server proxy.
Why you on 1.9 is the real question, and also yea probably
1.9?!
ew
1.9 is good version
why 1.9 tho?

what thought train made you choose 1.9? I am really really curious
1.9 for a bit of custom model data
kinda wanna fiddle with models and make my own vehicles or sth
you can do it in 1.9 with durability
tried it and it works
yes. but that's not custom model data.
thats similar to
Just use latest?
why do that when you can use legacy stuff? xD
which one would be better performance-wise for checking something every tick, relative to every player: using PlayerMoveEvent or using a repeating scheduler?
well it kinda depends on what you're doing
are you checking something every time a player moves? because there can be a ton of those every tick
or are you checking for like one thing every tick?
yeah, I am checking if they are looking at another player, then display a bossbar
yeah so that wouldn't really be a very good use case for PlayerMoveEvent, as they would have to move to see the boss bar?
well yeah, and if they are no longer looking, the bossbar disappears
yeah but they can rotate their camera without PlayerMoveEvent firing
I mean either way it's not going to be great for performance, but it doesn't really make sense tying pitch/yaw to x/y/z movement
what if they move without rotating their head and a player pops in their view?
then the every tick check will get it?
what if they rotate their head without moving and a player pops into view?
PlayerMoveEvent won't show them a bossbar lmao
why not? the x,y,z will change, but not the yaw and pitch, PlayerMoveEvent fires when either of these change
PlayerMoveEvent fires on pitch/yaw? I thought it was only x/y/z changes
yeah
yeah
it does
If so, then it doesn't really matter, though depending on how events are handled, it'll probably be better to listen to that event (if it only can happen once per tick per player)
weird
i would've thought there'd be separate x/y/z movement and pitch/yaw move events
I thought about that, the event can eventually stop firing when no one moves, but the scheduler will check forever
well i doubt that'll really be happening often, but moreso just less players if the events are capped to once per tick per player
whereas the scheduler will iterate over every player every tick no matter what
though to be fair, players can also move without you moving
so if someone walks into your view, the bossbar wouldn't show until you moved
yeah. unless you do the double check in the playermoveevent. which seems not that good.
if there's not that big of a difference, then I guess a scheduler seems to be the choice
half legacy half custom models sound great
my plan was to use models as some skills like missiles or sth
I really don't think you should be using 1.9
It's a bad decision to make since versions like that are at this point hella unstable and prone to loads of exploits
You can do much, MUCH cooler stuff with the latest version when it comes to resourcepacks, that doesn't have to involve finnicky stuff like item damage
Development wise you're also going to be stuck with a really old version of the API that has nowhere near as many improvements/features as the current one
i took processing power into consideration
mmorpg takes a lot of mechanics based calculations so i just fear that 1.19 will be too much of a burden for servers to accomodate large amount of players
and about resourcepacks im too noob at that to make good packs lol
do you think i should use 1.13 instead? at least its relatively more stable?
You should use latest, and not use a potato to run the server and it'll be just fine
You can still accomodate a lot of people comfortable on the latest versions. It may not be as much as 1.9 but i'd say it comes pretty close depending on what you're willing to sacrifice gameplay wise
Performance keeps getting improved and unless you do stuff horrendously wrong you should have decent enough performance
And you also should write your plugins in an optimal way so that the calculations run quickly
even when players can traverse as fast as 1 million blocks per second (chunks unloaded ofc)
and there will be too much mechanics going on
i tried running 1.9 vs 1.19 on my potato pc
it made much much difference
took 1 minute more to finish startup for 1.19
people can still travel fast in 1.9
there's really no reason to run anything besides latest and 1.8
"on my potato pc"
and only 1.8 if you're a dumb old pvp user
yeah I was about to say you don't need 1.8 either lol
well actually, 1.19 might be worth boycotting due to the whole moderation thing
but if you don't care, then meh
OldCombatMechanics got a bunch of updates recently that made the pvp pretty similar to what it was before.
i mean with better pc the difference is gonna be smaller but with more players the difference is gonna show up again i guess
i mean yeah but you also get a much better game and a much more willing playerbase
not many people are going to install a version of minecraft that's like 7 years old just to play on your server
and good luck getting support for plugins or security fixes or anything
Startup times don't really matter, you aren't going to be spam restarting the server so that's a bad argument

You realise hypixel and other massive servers use modified older jars with just protocol support for higher versions
Typically modified 1.7
oh alr i was just trying to make like hypixel kind of feeling
guess i should stick to 1.19 instead
oh damn
Hypixel uses entirely custom software so no point comparing to it at all
Yea I don't think he'd be able to make stuff at that scale, at least for now.
yeah unless you have literally an entire dev team to essentially remake the Notchian server from scratch, don't think like Hypixel
yeah lol. they have actual developers getting actual salaries working for them
and besides, as a dev, your life will be markedly better getting to use latest Java features!
switch expressions 🤤
pattern-matching instanceof 🤤
Records
oh yeah you'd be stuck with like java 8
love that shit.
i can but its a matter of motivation
oh alr thx for all the info guys really appreciate it
and just you wait until Loom and Valhalla 😌
will take yall's advice and make it 1.18-1.19
What's valhalla star
I think no matter how motivated you are, you're not gonna be able to remake an entire server system that a bunch of developers collaborated on to house over 60k players concurrently. 
value objects 😌
Oooh this looks interesting
yeah Java is actually getting kind of cool
i wonder what motivated them to do that?
like faster speed or efficiency for generating chunks?
Hypixel does not do a lot of chunk generation lmao
Money motivated them, money
what makes them earn more money with a custom piece of server software?
it just adds more work instead of making more gamemodes
it can run way lighter
Because people play and spend money on the server?
turns out that the Notchian server, not the most well optimized lmao
Well no shit sherlock
and Hypixel has a very specific niche use case where they can just basically delete a bunch of features
oh alr makes sense
Nah they just have stupid big numbers because of all the publicity, so they had to keep up with the demand somehow. It's split into thousands of smaller server instances for each gamemode to be able to keep up.
like, you wouldn't want Hypixel's server software for your latest SMP server
but it's really good for quick-starting minigame servers
sounds like custom some virtual machine for me
thats informative
and yes certainly wouldnt want to make thousand isntances of smp servers haha
Oh shit you can make your own primitives and stuff.
not yet, but soon!
struct lets go!
uh well, not exactly
it's more likely they're using something like Docker and k8s
would recommend their dev blogs if you're interested, they go into a lot of detail about some cool stuff, like making a custom world file format for their housing servers
Any ideas on what this could be? First time that I saw it, besides that, all data from my .json file got deleted. https://paste.helpch.at/uxelizucih.sql
I mean it says the issue
How do i get a player's name for this thing?
String command = "gmc playername";
wdym
I am trying to execute a command when a player drinks a Water Bottle and when they drink the water a command will trigger iaplayerstat write %player_name% thirst float 2 but i dont know how to make the %player_name% to work
hello
hi
I have a problem, my spigot account result already linked
but I don't have linked anything
i dont think u should be asking this here
for tickets?
I don't find command for create a ticker or contact support
anyone can help pwease
parse it using PlaceholderAPI
./papi parse me %placeholder%
No..
For this create java plugin or skript
I think he already is making a java plugin. He just wants to know how to parse the placeholder using PlaceholderAPI
in which case, @main cloud read here please https://github.com/PlaceholderAPI/PlaceholderAPI/wiki/Hook-into-PlaceholderAPI#setting-placeholders-in-your-plugin
OFF TOPIC rapid, I have problem with spigot linking process
what is support channel?
I am doing it
java plugin
anyone can help, i didnt understand (i am new to javascript) 
you probably mean java
public void onPotionDrink(PlayerItemConsumeEvent event) { Player player = event.getPlayer(); player.sendMessage("Consumed item"); ItemStack item = event.getItem(); PotionMeta pMeta = (PotionMeta) item.getItemMeta();
like this?
` @EventHandler(priority = EventPriority.NORMAL)
public void onPotionDrink(PlayerItemConsumeEvent event) {
Player player = event.getPlayer();
player.sendMessage("Consumed item");
ItemStack item = event.getItem();
PotionMeta pMeta = (PotionMeta) item.getItemMeta();
if (pMeta.getBasePotionData().getType().equals(PotionType.WATER)) {
event.setCancelled(true);
ConsoleCommandSender console = Bukkit.getServer().getConsoleSender();
String command = "iaplayerstat write %player_name% thirst float 2";
Bukkit.dispatchCommand(console, command);` dis is my script, it checks if its water but idk how to parse my name at String ciommand
d;jdk String#replace
public String replace(CharSequence target, CharSequence replacement)```
Replaces each substring of this string that matches the literal target sequence with the specified literal replacement sequence. The replacement proceeds from the beginning of the string to the end, for example, replacing "aa" with "b" in the string "aaa" will result in "ba" rather than "ab".
1.5
The resulting string
target - The sequence of char values to be replaced
replacement - The replacement sequence of char values
you can just use
"hi" + name + "now name is in between"
or you can do string manipulation
with .replace ^
is valhalla still beign worked on?
The last preview they have seems to be on 14
I wonder what state it is ijn
yeah iirc, just kind of a lot to do lol
lol
it's set to release alongside papi 3
Ah yes
2030 babyyyyy
papi 4
Nah, we'll have a new dominant species on earth
they're waiting for BM to release his Java tutorial videos
😳
dude this whole time I thought Emily was going to say something like super insightful that she knew about Valhalla or something
but tbh this is better
The Java-elins
https://www.youtube.com/user/TheBCBroz
im waiting for this dude to continue his bukkit tutorial 2030
his videos brought me into this whole thing
googled them once, third suggestion: https://www.spigotmc.org/threads/why-you-shouldnt-recommend-thebcbroz.49313/
wow this post has been really harsh on him
he was like a god to me back then
i used to watch his videos non stop while chugging cola in mc donalds and i just blindly followed his code after watching his whole video and find joy in manipulating basic events
someone even got into uni and landed a dev job because of him.
The post is mainly about deprecation and bad conventions. Honestly those part about deprecated methods and bad naming conventions did not matter to me at all. I corrected all of them later on when partly seriously about learning java as a whole.
And that part about his lack of knowledge about java. Honestly I have already forgotten about that to this day because i wasnt learning java from him but i was learning how to code in bukkit. Any style did not matter to me at that time and as long as it works and as long as i can learn the proper methods to do stuffs i would be happy.
For me this is way too harsh for my past personal god like honestly he doesnt deserve criticism like that being a pioneer in bukkit tutorials
Everyone deserves criticism, best way to improve, when people aren't allowed to critisize you get shit like the current events happening in the world
honestly constructive criticism yes but all the mockings and sarcasms no
And this post is like peeling off every skin of his just to find his mistakes in response to someone's mockings
what sarcasm?
and what mocking? the comments, sure but the post seems pretty constructive
idk how to put it
it just doesnt feel right to me
Maybe just for me myself
It doesn't need to
i mean hes doing it for free solely out of teaching purpose
Like the people can go a bit less harsh on him
No
yes
there isnt much good youtube content to learn spigot/bukkit from regardless i feel like
people need to learn java and jump after instead of trying to do both
Is it possible to get a entity from a InventoryClickEvent?
should be event#getWhoClicked()
well you can get the entity and use Player#getTargetEntity()
New to making particle effects and this aura does not feel quite right
In fact its quite disgusting (just the shape not colour that matters
is there any cooler way to make particles
oh oops, that's only in paper
yeah I dunno a good way to get that in not-Paper
d;paper Player#getTargetTntity
@Nullable
@Nullable Entity getTargetEntity(int maxDistance, boolean ignoreBlocks)```
Gets information about the entity being targeted
entity being targeted, or null if no entity is targeted
maxDistance - this is the maximum distance to scan
ignoreBlocks - true to scan through blocks
yeah see there it is
it is what it is maybe you may want to change the particle type that is how that one looks like
but afaik not all of them allows you to use with colors
im just looking to make someting like this
but i end up like this
colour is certainly something to change
but the shape and stuffs for now i am resort to using formulas
maybe i should use something like custom model data and make an effect sticker or sth?
yes and also there will be lots of particles and some clients may struggle to show them continuously
i tried to make the particles less dense with random numbers to try and populate the particles
and it still ends up like this lol
its not that bad actually my potato pc is able to keep up with this
i think it takes more toll server side
nah just some packets wont damage the server
but you may want to think something else than particles
alr thx for all the advice man appreciate it
if changing particle textures possible you can actually make something with it
that would be lit
but on the other hand I actually thought about it but i want people to be able to customize their aura and stuffs so i didnt want to use texture
but if textures make it look better then imma go for it
is there such thing in mc tho
like custom model data
yeah think about it more before you actually try to implement and also i believe that you can still make auras customizable with custom textures
just show different custom model data depends on each players settings
i mean like i want people to customize particle physics or make their own aura shape or sth
but for now its too overwhelming for me
yo that looks real nice
i can change the colour using spawnParticle method with that right
that would be super cool thx bro
oh i actually cant
you can only change the color for redstone dust particle
still pretty nice
gonna try and use that to model super saiyan blue
thx so much
no problem
Hi, i'm currently working on Factions fork to support MultiPaper, since i can't use cache, should i use MySQL or MongoDB (or some other alternative ?). Because i don't want the database to affect performance of the plugin
depends what you're storing
Anyone know if i can find some old mappings? Im not sure what this is from 1.16.4 to 1.18.2
what does .code do in kotlin
in what context
are you making things up again
you're iterating over a String, which is a collection of Chars
How do I create a new branch (through IntelliJ) from an existing repository on github?
bottom right iirc
im using it as a int for indexing
has the branch selector
I mean you're not
it works in C so im a bit confused
yeah but how do I completely replace the contents of what I have to what's on the repository
C and kotlin are very different languages
I dont want to merge, completely replace
doing in is just syntax sugar for an iterator over the String
i dont mean to bother anyone but does this plugin have any version that works on 1.7.10
ik im trying to learn it
which is per characters
for (x in iterable) always iterates over the elements, not the indices
uh, you might want to get an understanding of git first
like for (var x : iterable) in java
so index = what im trying to look for anyways?
guess i'll do it manually
still not sure I understand your question honestly
index = the current char of the word?
yes
yes
oh wow thats really nice
you don't need the index, since you already have the character
thats amazing
java has that too lmao
most languages do lol
C moment
not C 😭
iterables are a thing in like, basically every language I can think of that is used in the modern day besides C lol
oh no not the Allman brackets
what kotlin does in one line ;-;
and that is why C is old and unsafe lmao
Im kind of liking this new kotlin thingy
oh no lmao
no im using the strlen for somthing else
i have a feeling Strings just have a property for length anyways
im returning a different variable
not in C they dont
oh I thought you meant in Kotlin lol
the C string type is null terminated rather than storing a length
strlen or smt in c i think
yeah but to index i have to make a new variable
painful
its a method though not a property
it's a property in Java for some reason lmao
old java code is not very consistent
kotlin bad
kotlin gud
wrong
I mean it kinda should be a property
it doesnt matter really
yeah, i prefer property too
purely stylistic
Java is just weird because it has special syntax for arrays for some reaosn
what
?
I mean it makes more sense in the object oriented sense
what on earth has that got to do with strings
oh yeah I was thinking of arrays sorry
eh, for things like mutable collections a method arguably makes more sense as property might imply it's a constant
but im nitpicking here
how does a property imply it's a constant
the whole point of OOP is that properties are state and they change
if anything it should explicitly not be a function, because that function is just a getter and it does nothing special
in kotlin if you have val size: Int theres nothing in the code saying that might change
obviously you know from context
but in terms of self-describing code it's not ideal
that's why you make it a var???
that's cause Collection is immutable
MutableCollection is the interface for mutability where the size actually can change
i know
but there's nothing saying that size is actually mutable sometimes
you just have to know it from the context
I mean it really shouldn't be if it can change
does anyone know the answer to my question in #general-plugins 😅
what
"it shouldnt be mutable if it can change"
?
it shouldn't be val if it can change
that is entirely my point
that is entirely my point
.
Kotlin bad, confirmed
kotlin bad yes