#help-development
1 messages Β· Page 352 of 1
they can describe direction
a vector basically describes a line between two points
you can have a vector of a single point, which basically is the above, but the line goes to the same point
I used an easier way
task RunBatfile {
exec {
workingDir "D:/Bat"
commandLine 'cmd', '/c', '<your_bat_file_name>.bat'
}
}
ok I got the uploading part correctly
but it uploads the file before building
isn't "exec" what I recommended?
I explained badly
a simpler way of using exec
xd
I am afraid of gradle's overly complicated build scripts lol
I prefer the maven way
for example in gradle you do kotlin task something { }
but like, where do you declare WHEN it runs? o0
I have no idea
Im getting this error
java.util.ConcurrentModificationException: null
at java.util.HashMap.forEach(HashMap.java:1340) ~[?:?]
at me.gurwi.mitrascore.Tasks.DoorsReplaceTask.run(DoorsReplaceTask.java:16) ~[?:?]
at org.bukkit.craftbukkit.v1_12_R1.scheduler.CraftTask.run(CraftTask.java:64) ~[patched_1.12.2.jar:git-Paper-1620]
at org.bukkit.craftbukkit.v1_12_R1.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:423) ~[patched_1.12.2.jar:git-Paper-1620]
at net.minecraft.server.v1_12_R1.MinecraftServer.D(MinecraftServer.java:840) ~[patched_1.12.2.jar:git-Paper-1620]
at net.minecraft.server.v1_12_R1.DedicatedServer.D(DedicatedServer.java:423) ~[patched_1.12.2.jar:git-Paper-1620]
at net.minecraft.server.v1_12_R1.MinecraftServer.C(MinecraftServer.java:774) ~[patched_1.12.2.jar:git-Paper-1620]
at net.minecraft.server.v1_12_R1.MinecraftServer.run(MinecraftServer.java:666) ~[patched_1.12.2.jar:git-Paper-1620]
at java.lang.Thread.run(Thread.java:829) [?:?]```
But i don't know how to fix it
CODE: https://paste.md-5.net/zoxazowezi.cs
where does the plugin get compiled in build.gradle?
How can i fix it, i done the same thing with an another task and it works
kek
Now it isn't doing anything
problem is that you are editing map while traversing over it
so use Iterator or ConcurrentHashMap
It isn't working in any way
what isnt working
idk what else to try but I just realised I can build it 2 times
and it will work
xd
The task
Which is the particle when you break a block?
Iterator::remove
hey
I have 2 tables
company
id | name | owner
company_member
id | role | company_id
should I create 2 DAO classes?
or could I create only 1?
@EventHandler(priority = EventPriority.LOWEST)
public void BackpackUnapply(final PlayerInteractEvent event) {
Player player = event.getPlayer();
if (event.getPlayer().isSneaking()) {
if (event.getHand() == EquipmentSlot.HAND && event.getAction() == Action.LEFT_CLICK_BLOCK || event.getAction() == Action.LEFT_CLICK_AIR) {
if (CosmeticUsers.getUser(player).getCosmetic(CosmeticSlot.BACKPACK).getId().equals("backpack")) {
Bukkit.getServer().dispatchCommand(Bukkit.getConsoleSender(), "oraxen give " + player.getName() + " backpack");
} else if (CosmeticUsers.getUser(player).getCosmetic(CosmeticSlot.BACKPACK).getId().equals("woodcutter_backpack")) {
Bukkit.getServer().dispatchCommand(Bukkit.getConsoleSender(), "oraxen give " + player.getName() + " woodcutter_backpack");
}
if (CosmeticUsers.getUser(player).hasCosmeticInSlot(CosmeticSlot.BACKPACK)) {
Bukkit.getServer().dispatchCommand(Bukkit.getConsoleSender(), "cosmetic unapply BACKPACK " + player.getName());
player.playSound(player.getLocation(), "backpack.unwear", 1.0F, 1.0F);
}
}
}
}
This is my code and when player don't have anything on the last if and do left click air or block then it print error that player don't have anything on back, how I can repair that to not get printed that error?
I know that I can make else and negate it but then it needs to do something but I don't want to make anything when there's anything on the back
more of a java question rather than spigot itself, but how would i import jars like spigot does?
like i dont understand how it can access the classes and run the code of abritrary jars in a directory
is it any more useful than simply creating an api with an init() function?
not dependencies
like how plugins work
how does the server.jar recognize and import plugins?
same with any mods
can I break a loop inside a bukkitscheduler?
why wouldnt you be able to
for (int j = 0; j < 5; j++) {
Bukkit.getScheduler().runTaskLater(Data.getInstance(), () -> {
switch (direction) {
case NORTH -> location.setZ(location.getZ() - 1);
case SOUTH -> location.setZ(location.getZ() + 1);
case EAST -> location.setX(location.getX() + 1);
default -> location.setX(location.getX() - 1);
}
if (location.getBlock().getType() == Material.AIR) {
break;
}
location.getBlock().setType(DIAMOND_BLOCK);
location.getWorld().playSound(location, Sound.BLOCK_STONE_BREAK, 1, 1);
location.getWorld().spawnParticle(
Particle.BLOCK_CRACK, location, 100, 1, 1, 1, 0, DIAMOND_BLOCK.createBlockData()
);
}, j*2);
}```
error: break outside switch or loop
break;
cant
bad practice to do it like that. use a BukkitRunnable and schedule a repeating task
then call this.cancel()
when you want to break
better?
for (int i = 0; i < 2; i++) {
for (int j = 0; j < 5; j++) {
new BukkitRunnable() {
@Override
public void run() {
switch (direction) {
case NORTH -> location.setZ(location.getZ() - 1);
case SOUTH -> location.setZ(location.getZ() + 1);
case EAST -> location.setX(location.getX() + 1);
default -> location.setX(location.getX() - 1);
}
location.getBlock().setType(DIAMOND_BLOCK);
location.getWorld().playSound(location, Sound.BLOCK_STONE_BREAK, 1, 1);
location.getWorld().spawnParticle(
Particle.BLOCK_CRACK, location, 100, 1, 1, 1, 0, DIAMOND_BLOCK.createBlockData()
);
}
}.runTaskLater(Data.getInstance(), 2*j);```
no, use a single runnable and increment each thing
wdym
like in it before the function def you define int i = 0 and int j = 0
and then at the end of it you do i++ and j++
with if(i >= 2 || j >= 5) this.cancel()
dont instantiate bukkitrunnables, use the scheduler
i should record how many times ive already said that
i am confused
he was just saying instead of running .runTaskLater use the scheduler
ill show you fixed code as an example or something
what I had at firsT?
oh im stupid you adjusting delay with j here?
yeah
How can i make a broken door autoreplace in the sameplace with the same data that had before?
so 2*j will delay for 0, 2, 4, 6
i trhink you can stil do it with one loop running every tick and return if the delay isnt above a certain amount
thats all youre doing?
. . . . .
. . . . .
like that
(ik I can set the blocks)
but I want to make it like an animation
place block by block
btw better to add case WEST and default an exception if for some reason its not a real value of the enum
im gonna make a little demo for you for the loop thing
@terse ore https://paste.md-5.net/qinimohufe.java (no idea if this works though, didnt use an ide or docs so might have some small issues)
you can adapt from that
oh yeah might want to do final Material mat in the parameters
what would be the advantage of doing it like that?
speed, organized code, etc.
mainly so it doesnt spam runnables in the queue
only uses one runnable
that wouldve had 3 nested for loops if you had done it without this method
why 3 tho?
this is an example using 3 dimensions: x, y, and z, which it loops through to fill a space
i was gonna use Runnable, but that doesnt have cancel()
use the scheduler as i said, with the Consumer<BukkitTask> param
task -> task.cancel()
anyways ig ill just bump this. i could just look through the sc but im lazy
Hi i really need help i changed something with intellij memory and now doesnt open
Any suggestion about what i can do?
what did you change
Memory usage
and now i just click on the program and dont open
look through intellij files and try to find a settings file with launch params
it is a 2D
thats usually how i fix stupid things like that
because it'x width if is 1
ok ok
I will try thanks bro
set same maxZ and minZ then
or maybe its maxZ is 1 more than minZ
idk just try something until it works
lol intellij support is garbage so i always have to do things manually
What i can do?
I dont find the settings file
tf is this sussy file
probably in jetbrains settings then
I can open the program
Hwo would i get that
do you use the toolbox?
No i dont have it
because the package is broken for apt
launch the exe from terminal?
located in?
for me thats C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2021.2\bin on windows
right
version might be different for you though
so it might be like C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2023\bin
the toolbox offers that, but not really a way other than that
lol my wording
Hmnn
toolbox lets you update, but you have to reinstall if you dont have toolbox
lol
bruh
they are broken
Idk how i was able to install IJ i used to had lot of issues
Because their repo was giving me brokened the packages, but didnt happen to my friends
why is this disabled by default lmao
did you save the file
ye
you could also check the logs directory to see whats erroring
where is that?
currently yes
Just because i didnt want to restart whole pc just to move to linux
i meanm broke windows ij
cant u help me?
you could try editing launch params in idea.bat but make sure you can undo changes if you mess something up
where is that?
like the -Xms and -Xmx ram
in bin
that line doesnt appear
bottom
you dont see this?
that could be why lmao
right
not actually running the ide
what i have to add?
I didnt touch nothing tho
just modified something related to ram
try adding this
:: ---------------------------------------------------------------------
:: Run the IDE.
:: ---------------------------------------------------------------------
"%JAVA_EXE%" ^
-cp "%CLASS_PATH%" ^
%ACC% ^
"-XX:ErrorFile=%USERPROFILE%\java_error_in_idea_%%p.log" ^
"-XX:HeapDumpPath=%USERPROFILE%\java_error_in_idea.hprof" ^
-Djava.system.class.loader=com.intellij.util.lang.PathClassLoader -Didea.vendor.name=JetBrains -Didea.paths.selector=IdeaIC2021.2 -Didea.platform.prefix=Idea -Didea.jre.check=true ^
%IDE_PROPERTIES_PROPERTY% ^
com.intellij.idea.Main ^
%*
because ide was freezing so i added 20gb
oh wait
Same happens
this has IdeaIC2021.2, use latest version there
so youre 2022
so IdeaIC2022
lol
What params i have to change to fix
btw try opening command prompt in that directory and doing ./idea to see if it errors
i think thats in idea.properties
hmnn
at least all the things like max filesize are there
π
ok
btw is this a bash terminal on windows or are you on linux again
huh
the hell does "IDE is being shut down" mean
but no issue th
thats not a line in the batch, so something with the exe is up to no good
can you try running idea64.exe in terminal?
yes
./idea64.exe i think
did you use apt on git bash to install this lol
k
best way to install is usually https://www.jetbrains.com/toolbox-app/
i just put to it 20gb of ram and broken
i cant reinstall it
That will take huge time
I have lots of configuration and i need to finish my work
yeah i hate the amount of download time
i think it keeps your settings because toolbox installs to a different directory and imports
Hi I have been trying to work on a plugin and I am not so sure why my plugin is not generating the config.yml could anyone look over my code and help me out?
download speeds gonna suck though
you have to create config.yml in resources
and load it with the YamlConfiguration thing in your script if its in resources
i wil ltry restarting OS
maybe he is getting the values from ENV which is not being updated
thx lots @arctic moth
lol i can change the help links?
where ar ethose xml
np
same folder
huh
also there is something called repair.exe
you could try that
dont know if it wipes settings though
i dont even have a repair.exe
Anyone have a gradle script to automatically start a spigot server instead of doing it manually
no, wont work like that because plugin would have to be added to the plugins folder. wouldn't be too hard to make for self-use, but distribution of the script would be redistribution of server software
I run the repar.exe, the OS crashed with a blue screen, auto restarted the OS and when turns on, IJ worked
π
@arctic moth thanks
never calling getname?
implement TabExecutor adn return a List based upon args.length
@Override
public @Nullable List<String> onTabComplete(@NotNull CommandSender sender, @NotNull Command command, @NotNull String label, @NotNull String[] args) {
List<String> rifiuta = new ArrayList<>();
if(args.length==0) {
}
return rifiuta;
}
return null;
}
your list is empty
what i need to add?
whatever you want as options for tab complete
ok thanks
Hey, so does anyone know if there's an available plugin out there that can recreate the old lava survival minigame?
basically, lava used to flow out infinitely when placed, so the goal of lava survival was to survive as the lava consumes the entire map
Never seen that lol
Hello ! I have an issue with my server, in my spigot.yml : every time I change the item merge-radius from 4.0 to 1.0 and restart the server, it comes back to 4.0... Could anyone help me please ? π
merge-radius:
exp: 6.0
item: 4.0
I need help trying to do a hotbar server selector- I have bungeecord and spigot server
I really wanna try it, it seems so fun
could anyone help me with my issue?
https://gyazo.com/a4b3c1c8eefe340673bdee2599f5e973
is this how I would call on getname?
sorry Im pretty new to this
getName(Material)
Difference between getInventory and getClickedInventory?
yes @winged anvil but is it being called upon correctly in this code in the screenshot? it doesn't seem to be working
i hate to do this to you but
?learnjava
Here are some links to get you started on learning Java:
- https://www.codecademy.com/learn/learn-java
- https://www.sololearn.com/learning/1068
- https://www.learnjavaonline.org/
- https://programmingbydoing.com/
- https://docs.oracle.com/javase/tutorial/java/index.html
The last one is the only official one, however some of those concepts assume that you already know a bit about programming.
Thanks for sending me resources that I already knew were available.
Why you can't
declaration: package: org.bukkit.inventory, interface: Inventory
where are you trying to get the inv name
there isn't a getName() or a getView()
Inventory inventory = event.getClickedInventory();
what does the class do that ur trying to get the inv in
which class
my command class or the inventory class
Inventory is a class
just do event.getView
Love to know why I get linked resources to learn java but other people get help with their problems.
what's ur problem?
can I tell you a recommendation
https://gyazo.com/a4b3c1c8eefe340673bdee2599f5e973
is this how I would call on getname?
because other people are asking questions about spigot api, your question show that you have absolutly 0 java knowledge, which is required to use spigot api
So I guess the rest of the code came out of my ass?
hence why ?learnjava command exist
yeah, go ahead with being rude instead of admitting you should learn fundamentals first. Its cba from me
Does someone know about gradle, I made a task to execute a python file that automatically uploads the plugin to my server, but it does it before building, there is a way to do it after build is done
I've tried to look on internet but I didn't managed to achieve it
cba?
what is getName supposed to do?
CBA is an acronym that means can't be arsed, meaning, essentially, that a person can't be bothered to find the energy or willingness to do something.
Thanks
How can I use Player#getUniqueId as ObjectId in MongoDB?
Hello, I always get the message that my plugin.yml is wrong, but what's wrong with this?
name: AutoNickerLobby
version: ${project.version}
main: joel.autonickerlobby.AutoNickerLobby
api-version: 1.19
authors: [ RadJaguar2005 ]
description: AutoNick Tool for Lobbys
It's an UUID (128 bits) to an ObjectId (96 bits, with timestamp)
does it say anythibng else?
enter it inside ""
name: AutoNickerLobby
version: ${project.version}
main: joel.autonickerlobby.AutoNickerLobby
api-version: 1.19
authors: [ RadJaguar2005 ]
description: "AutoNick Tool for Lobbys"
may be that
here
[23:51:47] [Server thread/ERROR]: Could not load 'plugins/AutoNickerLobby.jar' in folder 'plugins'
org.bukkit.plugin.InvalidDescriptionException: Invalid plugin.yml
at org.bukkit.plugin.java.JavaPluginLoader.getPluginDescription(JavaPluginLoader.java:170) ~[spigot-api-1.19.2-R0.1-SNAPSHOT.jar:?]
at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:144) ~[spigot-api-1.19.2-R0.1-SNAPSHOT.jar:?]
at org.bukkit.craftbukkit.v1_19_R1.CraftServer.loadPlugins(CraftServer.java:414) ~[spigot-1.19.2-R0.1-SNAPSHOT.jar:3610-Spigot-6198b5a-19df23a]
at net.minecraft.server.dedicated.DedicatedServer.e(DedicatedServer.java:224) ~[spigot-1.19.2-R0.1-SNAPSHOT.jar:3610-Spigot-6198b5a-19df23a]
at net.minecraft.server.MinecraftServer.v(MinecraftServer.java:968) ~[spigot-1.19.2-R0.1-SNAPSHOT.jar:3610-Spigot-6198b5a-19df23a]
at net.minecraft.server.MinecraftServer.lambda$0(MinecraftServer.java:293) ~[spigot-1.19.2-R0.1-SNAPSHOT.jar:3610-Spigot-6198b5a-19df23a]
at java.lang.Thread.run(Thread.java:833) [?:?]
Caused by: java.io.FileNotFoundException: Jar does not contain plugin.yml
... 7 more
maybe your file has read only flag on it?
you do realize that UUID doesnt fit in that var type?
No, but I don't understand why because I didn't change anything during the build
16 bytes > 12 bytes, if you did convert uuids to object ids there will be data loss
unless you crop up same useless data for you from uuids
probably because you exported the jar without maven or gradle
You don't. You pick one or the other.
Why is it that you want to use a ObjectId and not just a UUID?
yea, but you may exported it without the maven itself
eclipse and intellij lets you do that
they both have their own build systems
intellij
have you used build artifacts
Yes
to build it?
you're not using maven then
there's sidebar dedicated to maven (build systems) at right of the screen
Funny, had the plugin on 1.16 and it worked
it works if you add the plugin.yml as a resource to intellij build system
mine's gradle
but in your screen it should be maven
you click on specific goals that you've setup there to build it
also you need to add your plugin.yml to src/main/resources
I'm asking because Verano told me that Mongo is faster than SQL.
I know that SQL uses a cache of primary keys so you can grab a row (in form of ResultSet) just by providing the primary key and it will retrieve it very fast because of the cache.
Then I was told that Mongo has ObjectId as _id and that it works similar.
I am a performance fanatic, I just don't want Mongo to iterate through all the collection until finding the document/s π€¨
Currently I am doing it through MongoCollection#find
you dont need _id as objectid
you're technically right
That's why I know it's iterating
Yh. _id's only requirement is that it's unique
I'm not asking for spoon feed
But I just want to understand what I have to do so I can profit in performance
Mongo doesn't have a concept of primary keys, instead you create indexes for different fields within a document. This doesn't require every document have that field though still
There's always an index for _id that enforces uniqueness, but you can make your own for other fields that will greatly speed up filtering on large data sets (when querying those fields)
Is there any source where I can read how to set up these field indexes? I just want to setup a field index for UUID π€‘
I'd recommend installing mongodb compass. It's a nice visual guide for those newer to mongo and is useful nevertheless for anyone.
They have documentation for indexes here though: https://www.mongodb.com/docs/manual/indexes/
you have maven
you click on it
and build it via the goal
i switched from maven to gradle a while ago, so idk much anymore but that's the most basic thing
you need to do
i hated gradle at first
until i got it how groovy dsl worked
properly
at least partially for me to understand how to setup custom plugins and extend tasks
do you know how tasks work?
roughly yes
how can I execute a task after the build is done
idk actually paperweight uses depends on to chain tasks
so i guess thats right way
but idk what to call when task is finished
that's what I am asking
for making a task after another
I need a first task
and idk which one is it
regulars of the QuickShop plugin?
wdym
Quick question.
Im a software dev starting to get into plugins..
Been looking around. Theres not too much information regarding plugins made with kotlin.
Why is it not used more often?
What potential problems and bottlenecks can i expect to run into?
What should i generally know before diving into this?
Have already worked extensively with both java and kotlin. (React native, native module)
It's not used more because, well, Minecraft and spigot/bukkit are written in java ig and it's same with any other app, you shouldn't run into bottlenecks because of kotlin
There are some people around who use Kotlin for spigot, but generally you'll get better help using Java even though they aren't superrr different languages
Why is it not used more often?
What potential problems and bottlenecks can i expect to run into?
What should i generally know before diving into this?
You're going to have to get the Kotlin stdlib onto the classpath one way or another. Whether that be shading it into your plugin (adding a rather hefty additional file size), downloading it at runtime yourself and loading it, or making use of the plugin.yml'slibrariesfeature to download dependencies from Maven Central. That in and of itself is a big hurdle. On top of that, the Kotlin ecosphere really isn't all that big so if you're looking to get support for your plugin written in Kotlin, you'll find far fewer responses on the forums.
Can you do it? Yes. Should you do it? Whatever. Preference. I don't want to touch Kotlin plugins with a 100ft pole, but others would say the same about Java so who am I to judge
While Kotlin can in some instances be helpful, it just adds a lot of needless complexity to what already is hard enough to design properly for most people: the plugin itself. I'd rather focus on solving the problem than to use a fancy tool.
can you write a plugin to fix my broken marriage
?services
If you wish to request or offer development/art/building/administration services, please do so at https://www.spigotmc.org/forums/services-recruitment-v2.54/
I can do better
π³οΈβπ Gay | Femboy :3 | He/Him | 27 | Germany
Lol
Got a problem with my sexuality?

all I can see from your bio is a twitter link to some person who insults people that watch porn
brb quickly gotta make out with my bf to wake him up so he can fetch me another beer
thats just lame

Is there a better way to get key by value that doesn't involve looping?
Yo. I want to launch a pig in a direction using entity.setVelocity(), in a bezier curve. The player will be a passenger of the pig.
The following code generates a bezier curve and returns a list of locations.
public static Location bezierPoint(float t, Location p0, Location p1, Location p2)
{
float a = (1-t)*(1-t);
float b = 2*(1-t)*t;
float c = t*t;
Location p = p0.clone().multiply(a).add(p1.clone().multiply(b)).add(p2.clone().multiply(c));
return p;
}
public static List<Location> bezierCurve(int segmentCount, Location p0, Location p1, Location p2)
{
List<Location> points = new ArrayList<Location>();
for(int i = 1; i < segmentCount; i++)
{
float t = i / (float) segmentCount;
points.add(bezierPoint(t, p0, p1, p2));
}
return points;
}
Here is what the locations (represented by particles) look like in game:
The problem is I can't really do anything with the list, teleporting the pig to the locations doesn't work, and I don't know how to translate the list to a Vector for the entity.setVelocity(). How do I do that?
Wdym teleporting doesn't work
Because:
A) I can't teleport the pig every tick because the player is riding it
B) It looks laggy and isn't smooth, I'd prefer to use entity.setVelocity()
Well the necessary velocity would be the derivative of the curve
But idk the maths behind that
the problem;'s that minecraft physics would slow it down
I can calcualte the derivative of the 2 curves (pointA -> extremum and extremum -> pointB)
Setgravity(false)
but that's only for vertical movement, is it not?
Is there resistance through air? Idk tbg
yes there is
Guess so
I tested it arleady
Gravity is 0.08 * 0.98, I believe x/z is just * 0.98
Does disabling AI help?
I also tried disabling the physics all together but that meant I can't set its velocity
setAI(false)
doesn't NoAI disable all velocity
so how gravity/resistance works is: newLocation = Vector(x * 0.98, y - 0.08 * 0.98, z * 0.98) every tick?
I'll test the setAI method. thanks!
well in simple terms every tick gravity and friction is applied to the entity
is the y calculation correct though? or does it only account for gravity?
oh yeah cause you added *0.98
I'm not certain about x/z, I would have to check
Hm
yeah, disabling AI means setVelocity() won't work.
You can do the calculations async
wdym? ( I know what async means, but could you elaborate? :) )
Don't think that's the issue
The issue is gravity & friction
I have an example of this on Hypixel though, lemme record it real quick
Also keep in mind it's 0.98f (float)
I'm sure we cld account for that but what does mc velocity mean?
What are the units?
meters per tick
nope
Here's how Hypixel does it:
https://gyazo.com/e316759620098cc8853081f7c1ffb6de
I was hoping there was some way to disable friction without outright disabling the AI
Are you sure that's not a snowball or something?
Maybe creating a custom pig entity
hm, could be. It doesn't have to be a pig, I just want to ride an entity from pointA to pointB in a bezier curve
it'll be invisible anyway
Paper has a friction api https://jd.papermc.io/paper/1.19/io/papermc/paper/entity/Frictional.html#setFrictionState(net.kyori.adventure.util.TriState)
declaration: package: io.papermc.paper.entity, interface: Frictional
spigot not it seems
Why would you ever just paste the status of somebody else in a public chat without saying anything else, lmao
it's #help-development as well πΏ
needs attention
Oh, you mean one of those "my life's too boring, let's pick on somebody more interesting than that"? xDD
I think I've come up with a different method: Launch a snowball in a general direction, but now I'll have to pre-calculate the path it'll take, because
I want to display the curve with particles before launching the snowball
you could calculate it
you know the yaw and pitch
and the force the snowball is thrown doesnt change
but I'll have to take gravity and collision into account as well
I need the exact path the snowball will take
You are not in DiCaprios age range :/
I mean
not necessarily
no wait
yeah you do
you could check the coords of every block of the path
and if there's a solid block
stop the path ig
Well you can set gravity to false
I want gravity though. and there's collision anyway
which you can't disable
one java question
if I make a method for getting a hashmap from another class, and I do a .put on it
should it affect the hashmap?
well it's quite easy to disable entity physics, just there's no api for it
Do you have an example of that? I'm quite new to Spigot. (also, by disabling physics I mean disabling friction & gravity, not the AI)
Yeah, it will affect hashmap
weird then
Entity entity = player.getWorld().spawnEntity(player.getLocation(), EntityType.SNOWBALL);
entity.setInvulnerable(true);
entity.setSilent(true);
How do I make the snowball invisible, and disable its particles when it lands on the ground?
How can I store Bedwars bed's location?
The problem occurs since the bed is 2 blocks long, so it's "bi-locational".
What do you want to store it for? But very likely you're gonna need the head location as well as a block face where the second block is attached
public superabstract void onBlockBreak(BlockBreakEvent event)
for(RawBedLocations[] bed : RawBedLocation)
event getBlock().getRawLoc == bed.getRawBedLocation()
//todo```
superabstract?
he said What do you want to store it for?
you could store the head of the bed and direction
is there a better way to do this
int playerAmount;
if (Data.getInstance().battles.get(battleName) == null) {
playerAmount = 0;
} else {
playerAmount = Data.getInstance().battles.get(battleName);
}```
assuming battles is a Map, getOrDefault
theone, what do you suggest?
How can I get the head of the bed?
blockdata could work I think
but check this
declaration: package: org.bukkit.block.data.type, interface: Bed
yeah I am a biiit younger lol
OH BOY MY PR GOT MERGED
Is storing Locations too heavy?
no
Are you sure?
Ty
If it's a bed block and it's not in your bed array, get it's block-state and get the second block to check it too, I guess
in angelchest, I store a thousands of locations, it's no problem at all
depending on the size of the graveyard, it can be a few million of locations, that's totally fine
Yeah, so 3 * 8 + 2 * 4 = 32 bytes, and there's a world-reference in there too, so another 4 bytes, plus the (I guess) 8 bytes object overhead. So 44 bytes total per location. Having a thousand of them will be 44kB, so basically irrelevant in todays memory capacities, lol. In general I'd say that memory will never be an issue, as long as people aren't leaking it.
how can I print a string without color coding onto console?
Strip the colors. ChatColor#stripColors() should exist.
finally we can do getTranslationKey()
what does that do?
Where X's
I spawned a snowball, how do I make it invisible?
Stash does not show it on master for me kek
it gets the translation key
so you can e.g. throw it into a TranslatableComponent
or whatever
tbh it's been too long ago, I don't remember myself how it works
basically the idea was sth like this:
new TranslatableComponent(Material.DIRT.getTranslationKey())
or sth like that
and then it'll be "Dirt" for english people or "Erde" for german people
sth like that, idk
I am kinda reluctant to adding new pull requests because everytime I do so, some dude from paper appears and claims I stole their code, even if it's just 2 obvious lines lol
paper was a nice addition to minecraft until they started to do their own API additions
the paper one you mean?
one second pls
the bukkit one is linked there
oh damn
md removed the comments I was responding to
So not merged
oh
yeah my bad
I thought that "approved" means that it'll be merged in the next -SNAPSHOT
this was my first craftbukkit PR so I don't really know how it works yet
so what's the difference between "approved" and "merged"?
(honest question, I don't know anything about how it works lol)
Approved means nothing really beyond that MD thinks it's ready to go
Until it hits master nothing is final
Dency
Hi ! How we can make a text with a bold color ?
dency yourself
&l
ChatColor.BOLD
or that
tho it would be Β§l unless you pass it through translateAlternate
well tbh it depends
do you use ChatColor.translatelaternateCOlorCodes etc?
then just do &l
do you just use spigots components? then ChatColor.BOLD
do you use Adventure from paper? / MiniMessage?
set component style bold 
just dont have a response 
I use ChatColor
my code not workings ?notworking
then, as Lynx said, just do ChatColor.BOLD
make sure to do it after any coloring
best format on the planet
speakin of formats
true
my code not workings, maven shit shit shit
gonna make a plugin that takes in text from config by user and idk how i want to handle formatting
my code still lag spiking, shit shit shit
aren't you the person who always refers to me as jΓ€germeister dude?
Yes
i can either go legacy (translateAlternateColorCode), custom (would probably be close to minimessage), or minimessage/adventure (<color>, <gradient>, <bold>, etc)
joke's on you, sometimes I drink berentzen
π΄ πππ ππ ππππππ
Have you tried Pfeffi now?
I know Berliner Luft
could also go minedown
if you mean that
But I can't add a color before or after that
you can
want to know something cool
do both
toString one of them
wats minedown
ew. PreuΓengetrΓ€nk
Yeye thats very very similar. Very good right?
ChatColor.RED.toString() + ChatColor.BOLD
"&c&lThis is red and bold"
"&l&cThis is only red because red replaces bold"
y
lazy
it's nice, yeah
its easy
if (use minimessage) { do minimessage } else { do bukkit }
I would really recommend everyone to use minimessage if it wouldnt have one major flaw that makes it basically useless
the part that makes u require adventure? yeah
and that flaw is that it ignores the normal color codes on purpose
oh
"normal colour codes" 
I would really recommend everyone to not ever work with sending tons of fakeblocks to clients
legacy serialzier
perfect ty
you get both
np np
you may find this funny, but have you ever dealt with somebody who runs a server with 500 consec. players?
Yes
tbh I havent
has as much correlation to the issue as your statement
Is that what you guys drink over there?
what does player count have to do with configuration format π
I just wanna say that, whenever you invent something new, you should keep in mind that there's at least 20k servers that still wanna be able to use the "old way"
Berliner Luft comes from Berlin(Northern Germany) and not Bavaria lol
that doesn't mean your format has to backport for eternity
Thats me from bavaria staring over to you guys
it just means that those communities should seek alternatives that work for them
e.g. minedown
No im Bavarian lol
sure, but it wouldn't hurt for MM to just add support for legacy color codes
they abaonded it on purpose though
yes
that makes no sense imho
loool
one proper format over a mix of old stuff
what a fuckin method name
Β§xΒ§FΒ§FΒ§FΒ§FΒ§FΒ§FYes
yeah they claim it's unusual but it actually isn't
it is literally added by spigot
not even the minecraft server understands that format, even in the old days
yeah same like JavaPlugin or PlayerJoinEvent. are those now "unusual" too, because they were added by spigot?
wtf does it translate &x&R&R&G&G&B&B to for minecraft
mc uses a component system. This is very much unusual as it gets translated to the mc components firts.
like, spigot didn't invent it
I understand that, I just say that it's not "unusual"
where as the entire API is a full own new creation
it is because legacy format as defined by mojang does not support it
if the most popular server software invented this format, it's not "unusualy" per definition
it is unusual to work
I gotta throw in some medicine tomorrow to be able to do my maths exam lol
the most popular
spigot 
i mean i can agree that spigot was weird as Fuck do to it the way they did
i think &#RRGGBB couldve sufficed
It would have
lynx are you drunk or sth lol
no just laughing at "most popular"
Cheers
please do remember that paper is a fork of spigot
Forks count as using it too
exactly
if you fork spigot and change a few things, it's still spigot
few things
many things still counts as spigot too
until paper hardforks and kills off all of whatever spigot/bukkit added in favour of whatever the hell paper will replace it with, its still spigot at its core
I mean
if you clone spigot, then add 18265712 patches, it's still spigot... well, spigot + 12841672 patches
the "unusual" is related to minecrafts format
adventure is not a spigot first implementation
hence, unusual
fabric nor sponge support the format
adventure is not only on the server side
Sponge 
I don't know what is so hard to understand about the fact that spigot smashed a new "addition" to the legacy format to "support" RGB values that is not supported in the official minecraft legacy format and hence is marked as unusual in an implementation that does not depend on spigot
paper is a really nice server software, I don't deny that. But the API sucks ass, and not in the good way. Everything that takes a string si deprecated. Admins hate it, paper claims to be a "drop in " replacement for vanilla/spigot, but it isn't. it "fixes" things nobody ever asked them to fix. Paper's discord is also a huge joke, you get banned there for saying "yo guys I had sex yesterday" because idk somehow they think everyone is 8 year old and must be protected from talking about normal things.
i think the best from paper discord is knowing people that got banned for asking for help... with Paper..
also probably the only reason why spigot has less % on bstats is because you can download paper, while you gotta build spigot yourself
as said, no hate against paper, the software is decent
that has nothing to do with "unusual" in adventure
that method name is from adventure not paper
idk why you are switching topics here
thats why the most spigot servers get the "this build is outdated. will start in 20 secs" message
well you gotta admit that paper is very much mafia-like
you get good conenctions, your stuff gets added
wtf has that to do with calling the method unusual
because it si not unusual
EVERY plugin that uses ChatColor.translateAlternateColorCodes(...) undertands the &x&f&f&0&0&0&0 format
and hence it's not unusual
your mind is limited to plugins
on
spigot basis
adventure is not a plugin specific api
obviously. we are on spigot's discord
no I don't
I don't hate adventure
you have been on about the term "unusual"
the only thing I dislike is paper thinking "haha spigot sucks so hard, we can do better"-attitude
which is an adventure coined term
wtf are you talking about, what does adventure have to do with paper. That is a one sided relationship. Paper includes adventure. Adventure does not know about paper
how does the method name "unusual" in adventure relate to paper
lynx maybe I explained it wrong, I didnt mean to start any hate war or anything
that wasnt my intention
i wonder if the git is supposed to be there (ChatColor in bungeecord-chat)
no I don't mind it no worries, no hard feeligs lol
I just don't understand why you flame paper for the term "unusual" in an adventure created and coined method
when adventure exists outside of the spigot realm
yeah it doesnt, but for a "regular spigot" dude like me, we think that "paper" and "adventure" etc are basically "bond together"

maybe they couldve called it useSpigotHexFormat
probably, yes
that'd make much more sense, yes
calling it unusualXRepeated kind of paints a negative light on it imo
Well kk, then my mind is calm
exactly
it is not unusual
which is understandable, but i /personally/ dont like it
unusual is not negative 
it is
you are rather unusual alex
calling something unusual could be negative
I'm handsome
it could be if you interpret it that way
just because something is not the norm does not make it bad :/
I personally dislike legacy text, don't get me wrong
if at all, then paper is the "unusual" thing, since it forked spigot and changed things
does not mean that unusual itself is negative
Unusual can be neutral, positiv or negative just depending on how you interpret it
the method name obviously was chosen to say that Adventure > md5 components
in my opinion, both APIs are shit
nothing todo with bungee components
adventure does not touch those
unless you mean legacy text
when you say md5 components
I will not argue against what's better, I myself think that MiniMessage is nice. I still think it's shit for a fork to claim "haha we made it better but contributing upstream? naaaah" is a shitty idea. Both MM and adventure are shit and md5's components are shit too. Bukkit was made to wrap around the vanilla things, instead of adding their own things

why is adventure bad tho
like components are just the way vanilla does stuff
both bungee and adventure aim to replicate that
So basicly everything is shit then lol
I stand my point, and I will explain it quickly: Paper has nice things that spigot doesnt have. But paper contributors are a jerk for not contributing it to spigot
if it wrapped to a string or something sure, its good but its not made for other stuff
i mean, yeah... have you seen minecraft?
the spigot project is maintained by a single australian
Yes
I contribute stuff upstream
are you judging md
I am saying, a single person might not be enough to maintain a large project like that
yeah I still simp on you for PDC
not even PDC
Imagine being smart enough to PR Spigot
I have a few PRs up there
if u can write java u can PR to spigot
my PDC list PR is landing upstream too
that is true. I tried to get into paper communtiy but I got banned, so yeah. Maybe having 37 different people in charge also isn't exactly a good way
I do, but after all the years, im still too bad to implement anything lol
just that a) Paper is nicer to contribute to on github b) no CLA
true
I also sent a ban appeal but never got an answer
And also,c cannot sign a CLA
if someone isn't able to sign a CLA, I doubt that their contributions would be of any use in the first place
I mean
what
how can someone code something useful but is too stupid to sign a simple agreement
what
it is not about being too stupid
you are indefinitely licencing your code to spigot
Its legal issues for me lol
you are giving away personal information that you might not be comfortable with
I'd need to be 18 I guess, and that
signing the CLA is not a matter of physical ability lol
idk maybe I'm too european to understand the problem. My addres, my phone number, and my name is publicly visible on my website, ebcause the law requires it anyway https://www.jeff-media.com/site-notice/
might actually try and convert my stuff to bungee components now that im thinking about it
you are rather open about your personal information alex
that is known
does not mean everyone wants to be that way
Not everyone is
it is required by law
here*
Yeah but not if you are just a simple dev without any website
wait im supposed to list my contact details on https://winnpixie.xyz ? 
I never understood why people are afraid of telling the name on the internet
their*
i come from the mc cheating community, doxxing was a pretty rampant and a real issue
if I just wanna contribute a quick fix to spigot or paper, I either a) sign a CLA, b) then wait for that to be accepted, c) survive the clusterfuck that is stash d) wait for the PR to be reviewed and merged by the single maintainer of spigot or I just submit a patch to paper on github
so like, idk. I would not blame someone for not contributing
so hardened privacy was something i focused on
the hurdles to get there are certainly not non-existant
I also never understood "doxing" in general
part of privacy is anonymity
like, wheres the problem in having know your actual name or address? what's the worst thing that can happen?
signing the CLA and giving ur info to some australian guy isnt very anonymizing
I'd rather not be having some guy that hates me sending german police to me lol
idk about germany but US citizens can get swatted
and its a pretty traumatizing experience
ofc you cannot stay anonymousl md5 would need to know who you are i ncase you just submit some code that doesnt belong to you
wtf does that mean lol
"getting swatted"?
Well german police will still come and shock you lol
swatting is when the police (or military even?) basically invades your location/home
usually under the impression that youre a terrorist bc the doxxer left them a "note"
but that makes no sense
Some fucking monkeys tell the police that you are doing bad things
Then police thinks you may be dangerous
so I could just call police and tell them "123 Random Street in 66543 Random City" is a terrorist? and then they'll get swatted?
pretty much
Basicly, yes
but then why care? I could do that for every address anyway
I could call 010911 right now and give a random address and they'll swat it?
Yes
that makes... erm... little sense to me
Really depends on the story you tell
If its realistic and they believe you, yes
street names are public
minimessage & legacy on top
if you tell them they have a bomb and 6 kids in the basement, tf are the authorities supposed to do
Yeah, it's a "better safe than sorry" precaution
I coul just go to google maps, enter "los angeles", choose a random street + house number, and they'll swat it? lmao
only problem is that people sometimes get hurt
Like, if you call 911 and hang up, they'll still send a unit out to come check
during swatting
At least, I think so
intimidating, at least
yeah, if u so much dial them they pretty much come to check up on u
happened to me a few years ago lol
but then ur swatting yourself lol
idk but I am not afraid to have my address in public. It's JunkerstraΓe 17 in 48153 MΓΌnster, Germany,
Bro youre gonna have the shock of your life if randomly at 3am your door gets broken with 10 people with machine guns come running into your room
Well the difference between that and swatting is in their approach
Swatting is more "4 armed guys in bulletproof vests w/ semi-auto rifles bursting into your house unannounced"
rrue
yeah
do they set up snipers around ur house
was more so reinforcing ur statement that calling 911 basically makes them send at least someone
Nah, not unless they have confirmation
Snipers are for hostage/terrorist situations usually
imho if people are afraid of giving their address awyay, then they shouldnt use discord, or internet in general. Just do not illegal things and there's nothing to be afraid of
Mainly in the case an individual is believed to be armed or dangerous
Thats the case for swatting then?
There's a chance that the individual who was swatted could get killed. That's why doxxing is dangerous.
banking is digital, healthcare is digital, hell, voting will probably become digital eventually
I have sent my adress many times here in the last 2 years and I never was shot, nor confronted by any armed people
You live in a different country alex. :/
True. I believe a few Twitch streamers have passed away due to that.
if you call 911 saying that the house contains 3 bombs, an IED and 3 kids being held hostage shouldnt they handle it as a hostage/terrorism situation
He's also just not someone who people would want to target.
i feel like swatting is almost exclusively an American issue
Also you gotta pay for your doors to get repaired lol
Like, most swatting targets are influencers.
true
When you get influencer in 5 years and someone finds your address here by scrolling up, youre fucked.
influencers, or some poor kid that did 1 dumb thing that everybody will forget about within the next 3 months
Yeah, pretty much
huh? if the police breaks your door for no reason, you are ofc free to get it repaired, Β§ 823 I 1 BGB
America my guy
That's German law, ain't it?
german law
Yes
I only know german law
then dont use it as an argument?
You're in the land of American now, buddy.
Alex we have better law lmao
oh okay. yeah I dont know anything about murican laws
without doubt, yeah
on the topic of dev real quick... still cant decide between MIT or GPL3 for my normal software....
do you want other people be able to earn money with your stuff?
idk if i wanna go GPL and force any forks (that theoretically will probably never happen) to also be GPL
What is your software?
nothing of real worth just little programs n some mods
I prefer GPL2 over 3
Whats the difference?
doesnt the GPL allow commercial use?
if no - make up your own license and just write "you can use this for WHATEVER you want, but if you earn any money by using this, I demand 10% of your earnings"
I just yeet MIT everywhere :3
it does
I don;t remember now. I remember it was somethign about not being able to give rights or take them back. it's been a loing time
Thats what I would do fr lol
yeah I mean why not lol
yeah, something about GPL3 is why Linux kernel is still GPL2
Well, if a lawyer says I can do that then might as well-
Imagine getting rich in 10 years bc some guy forked your random software you write when you were literally 12 and earned millions
"You just use it for a free MC plugin? Go ahead. You make 20 billion $ every year? please gimme some"
best license ever
Well but when they made money, they would then contact me to give me money right?
Well, it is a decent license considering how many companies do a "commercial license"
But that's mostly just "Pay me in order to gain commercial rights"
someone who's afraid to sign the spigot CLA isn't someone whom I'd trust anyway
ποΈ
I mean, wtf. If you cannot promise to me that you wrote that code yourself, why would I use it
i mean id maybe trust @onyx fjord
the promise you wrote the code yourself is the least worrying part xD
Do I need to be 18 to sign a CLA? Yes
and im pretty sure Kas wont sign the CLA
haha good one
lmao trusting kacper
troll
please tell me what's the "problematic" part
but yeah tursting kacper is a funny statment haha
trusting*
you are licencing your code away /shrug
I don't trust most people with my address
you do that on pape rtoo
I think there's only a select few people who know where I live
And that's basically just down to my boyfriend and exes, lmao
paper has no CLA, no?
whatever code u contribute to it is still urs isnt it
if you contribute to paper and tell them "here's my code: .." then you already gave it away
Ye you can just go over and press on pr lol
that is indeed how that works 
I uploaded my code to github
that means I gave it away

True
I mean... .just imagine being a judge. Now someone claims "paper is using my code". And your point is "Yeah but it's my code". Then the judge asks you "So why did you give it to paper if you don't want paper to use it?"
good luck answering that
I remember. One GPLv3 is not the same as all others. Each one can be different with different restrictions.
with GPLv2 you know what you are getting. same license every time
Are you referring to LGPL and AGPL?
the choices
no
except CC, its just there for my occasional non-code content
"But sir, L + ratio"
(Why do people license their code under Creative Commons?? I've seen people say "this code is CC0," like, no, that's what MIT is for)

