#help-development
1 messages · Page 1842 of 1
It's still shown like you're trying to return a value
yeah but i am not returning a value
Syntactically it doesn't matter
I don't know what you want from me
Like yes it doesn't work
Yes it's intentional
There is no reason you should need to return a void value from a void function anyways
What's the problem
C is a different language, python is a different language, so they have different rules
So basically I am wondering if i can put early-return and error-message in a single line, as possible in any other language:
if (!condition1Fulfilled) {
System.out.println("Condition 1 not fulfilled");
return;
}
if (!condition2Fulfilled) {
System.out.println("Condition 2 not fulfilled");
return;
}
Would be way nicer in a single line
if (!condition1Fulfilled) return System.out.println("Condition 1 not fulfilled");
if (!condition2Fulfilled) return System.out.println("Condition 2 not fulfilled");
You can't
You can make it return a string if there was an error
Or throw an exception
true but im trying to call
player.sendMessage()
to tell him his args are wrong
and in what way they are wrong
I don't know why you lead with the a vs b thing instead of your actual use case
Okay then return a string in your helper method
That or use a command framework that does this for you
I have one you could use and there are plenty of others
Your first example looks much cleaner imo
you could also just make it return a string
and then print out the result of the function
Yeah it solidifies the scope and makes it more conspicuous to the reader
and call that function inside my actual command function?
cuz i cant make a command function return a string afaik
wait yeah, nvm, have to do it like that
i see
Anyways if you want to have returnable void, you could sort of use a monad like Optional::flatMap
Not the same but yeah
It's also best to use a command framework
Closest I can think of
Like I know you're not asking for one but I cannot stress enough how much of a difference it makes
https://paste.md-5.net/xonosiqoha.java does anyone know how to turn this into a cmd instead of breaking block event
can i use color codes (like &c) in log messages? i mean bungee
How do I remove damage from the damage event, but keep knockback? event.setDamage seems to remove kb althogether
altogether*
What does that even mean
Just set the damage to a really small number like .001
kk
im trying to pull the location of a projectile hit event regardless if it hit the ground or an entity
how would i do this?
check if it hit a block/entity, then get the location fo that block/entity?
Be patient in #help-server dont post in every channel
how would i check that? would i just check if one or the other is null?
Probably
so my projectile is a wither skull, if a player hits the skull and causes it to explode, does that still count as an entity hit?
Make a helper method
public Location getHitLocation(ProjectileHitEvent e) {
return e.getHitBlock() != null ? e.getHitBlock().getLocation() : e.getHitEntity().getLocation();
}```
Say I got two plugin jars: One for spigot and one for paper. Is it allowed to submit an external download URL to my spigot resource which shows a download link for paper and spigot separately and explains what the difference is?
why have 2? every spigot plugin should work on paper
I'd like to use the "Interfaces" API and some adventure components for creating ItemStacks, as well as some other paper-api-only stuff, so I decided to maintain two jars. One for spigot and one for paper
Apparently "advertising paper" at least in the jar isn't allowed, so I wanna make sure doing it that way (the link with two jars) is fine first
I would still just use one jar
anyone know of a gui manager library or smth
or like a really good item builder system
does yours make you cry late at nights
No
What are you trying to do though
...make a gui
I need to remake my item builder, thanks for the reminder
So I can gauge whether mine would be good for it
Make a gui that does what
What functionality does it need
i have a system for gui pagination already
Mine has that built in
oh rlly?
it really just needs to have a clean way of handling lore, playerskulls, pagination
f
But it does everything else easily
And I guess you could just make a helper method for skulls
¯_(ツ)_/¯
I should add that to my library
brb gonna go do that
ItemButton button = ItemButton.create(new ItemBuilder(Material.EMERALD_BLOCK)
.setName("Click me!"), e -> {
e.getPlayer().sendMessage("You clicked me!");
});
gui.addButton(button, 13);``` this looks sexy
sexier than whatever i have -_-
Glad you think so
i made a system that would just pull all material, count, name, lore, etc. from a yaml file
what is there to not understand, i just need to figure out how to use commands instead of usin block for mob to spawn
that idea got shit on
I mean I've considered something like that before
Both are valid approaches
whats verbose
java needs a snazzier way of handling blocking npes
like kotlin's thing?.thing?.thing?
except maybe not as... wedge-y
Which are verbose and not at all clean if you overuse them :/
They can really, really clean stuff up though
- ItemTrait.NAME and ItemTrait.LORE will no longer fail if one item has meta and another does not, as long as their names/lore are equal (including both being null)
Like look how much I was able to clean up the lore comparison using optionals
25 lines to 1
thats a whole lot of red
Optional.ofNullable(a.getItemMeta()).map(ItemMeta::getLore).equals(Optional.ofNullable(b.getItemMeta()).map(ItemMeta::getLore))) 😌
The only good thing about optionals are the they’re in fact higher level than the low level null shit you’d otherwise have to deal with, and that you can avoid having a Nullable api.
Nah optionals are great
Even if stuff does return null you can use ofNullable and then map to clean up your logic a lot like I did here
if only i knew half the shit you were saying meant 
Well you should at least use a new line per method
and I mean, you could get just a clean code without optional
A little bit more effort
But it’s not a big deal imho
Hey conclure
Do you know if 1.8 SkullMeta's setOwner is by name?
I'm guessing it is since it takes a string
Yeah pretty sure it was
Ok cool
Alright sweet, I created an ItemUtils.skull method
Let's see if it actually works lol
Gotta test it on 1.18 and 1.8 which is annoying
Alright cool it works on both
@patent horizon Ok so now my library has everything you want 🥲
Yes
nice
im still a moron at coding concepts... does this lib need a plugin on my server or smth?
i know some things like netherboard do
You can use it as a plugin dependency, or you can shade it into your plugin
Up to you
is JavaPlugin#onDisable triggered during server shutdown?
making it a plugin dependency would mean i'd need the plugin in my server right?
Yes, why wouldn't it be?
Yes
was just wondering since it didn't look like some of my code executed on shutdown
obviously the label is condescending
If the server hard crashes then disable won't be run
Shading is using a build system to unpack another jar into yours
interesting
So you can put all the needed dependencies into your own jar rather than requiring them to be installed as plugins
oh so i can just shove your pom.xml stuff into my project and maven will do it for me?
how would i do this
Though if you're going to shade all of redlib you should check out its other parts because it has a lot going on
Not really sure since I don't use maven but I'm sure it's not hard
You can probably find a good guide
ah ok
OHHHHH
youre the owner of redlib
lol i may have memed on your github homepage for not really being specific in what it made better lmfao
you can get it down to a reasonable size with jar minimizing
it supports reflection as well if the class name string is hardcoded
Interesting
sometimes jar minimizing breaks libs, just depends how they are setup
it does sometimes
worth testing it though because it does reduce the size 🙂
Use reflection? Or mojang mapped?
mapped
Yeah I've tried it lol. It commented out cause I was testing what broke without it.
So
for some reason doing entity.setCustomName(null)
doesn't actually clear the name?
it sets the entity's custom name to their mob name
e.g. Creeper on a creeper
it's either that or getCustomName() is returning the mob name
[Server] INFO org.bukkit.command.CommandException: Unhandled exception executing command 'start' in plugin
does anyone know what this means
likely means an exception occurred in your start command
are you instead wanting the name to become invisible?
yeah
if you clear a custom name, it will revert to the mobs default name
ah
List<Map.Entry<String, YamlConfiguration>> results = new ArrayList<>(playerHashmap.entrySet());
results.sort(Comparator.comparing(e -> e.getValue().getInt("Balance")));
i have this method. but i wanna reverse the order of the comparator.
however when I do
List<Map.Entry<String, YamlConfiguration>> results = new ArrayList<>(playerHashmap.entrySet());
results.sort(Comparator.comparing(e -> e.getValue().getInt("Balance")).reversed()); //added .reversed() here
the .getValue() turns red.
Why and how to fix?
@lavish hemlock use setCustomNameVisible(boolean)
if set to false, makes it invisible
doesn't that only make it so the name doesn't appear until you hover over the mob?
um not sure, but I don't think you can really remove names either though so its better then nothing
Create the comparator outside the sort call
this is why I hate Bukkit
any way to do it inline tho?
And then call .reversed() within the sort call
had it outside before, but all in one line is nicer
I understand but the compiler doesn't really know how to type inference the entire expression when multiple method calls are made
Even when it seems like it should be obvious
how does it even know the types when doing Comparator.comparing(e -> e.getValue().getInt("Balance")) without the reversed
never rlly understood how lambda does that in the first place xD
is there any alternative to do the reversing in that line?
maybe a function on List ?
maybe Collections.reverse might work, ill try that
only solution I've found so far for this is
adding a mob to a team that hides nametags
but that's still a very gross method
so I might need to import a nametag API
hihi, how should i convert a List<Player> into a Player[], i tried casting Player[] to #toArray(), and i got an error..
list.toArray(new Player[0]);
oh thats a thing?
i will do it like that, thank u
@ivory sleet Do you have any idea what this error is about?
It happens seemingly randomly when I try building
hey, im writing a core plugin from scratch
and im saving player data like rank, money, etc
but should I use libs for that kind of stuff? like Vault for money etc
and rank with essentials or something (as dependency)
ServerLevel and WorldServer are the same class, ServerLevel is Mojang Maps, WorldServer is Spigot's.
They really shouldn't exist together... Are you depending on both mappings?
Yeah that's probably why it's confused.
<!--Bukkit/Spigot API -->
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot-api</artifactId>
<version>${project.spigotVersion}</version>
<scope>provided</scope>
</dependency>
<!-- Spigot Javadocs -->
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot-api</artifactId>
<version>${project.spigotVersion}</version>
<type>javadoc</type>
<scope>provided</scope>
</dependency>
<!--Bukkit/Spigot NMS -->
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot</artifactId>
<version>${project.spigotVersion}</version>
<classifier>remapped-mojang</classifier>
<scope>provided</scope>
</dependency>```
try adding <classifier>shaded</classifier> to your top one
CompoundTag in Mojang
NBTTagCompound in Spigot
?
Why do you need non-mapped for IBlockData
You probably did it wrong then, as much as I want to blame the mappings for problems, if you do it right, it gets mapped correctly
🤷♂️ the mappings are super nice once you get them working tbh
I thought md_5 had posted the exact pom you needed for remapping with maven?
Thsi provides the Spigot API and dependencies just fine. You just need a second for the remapped. xml <!--Bukkit/Spigot API --> <dependency> <groupId>org.spigotmc</groupId> <artifactId>spigot-api</artifactId> <version>${project.spigotVersion}</version> <classifier>shaded</classifier> <scope>provided</scope> </dependency>
does anyone know why my packages are showing up like this instead of normal packages? I think I screwed something up
thats just a package symbol
it is at the top of the left pane to change the view mode
I meant package
how do I add an entity to a team?
gets its UUID and add it to the team 🙂
i doubt entities can belong to teams
I've heard they can
I've seen a lot of posts that hint at it
You add entities by UUID. Players by name
i stand corrected then
and how do I do that?
Entity.getUUID
get its ID toString
no
that seems like an oversight
actually it's an oversight I have to do toString() anyways
god I hate Bukkit
Does anyone know how I can change the name on a players nametag? and is there also a way I can hide a players name tag?
Pretty sure you'd need to use packets since I haven't seen any official method for it.
you can add everyone with hidden names to a team and have the team set to never show the nametag
if you don't want to use packets
funnily enough this is what I'm trying to do for entities
but it doesn't fix their first question, actually changing the name
Players can have custom names
If you're referring to setCustomName, it's specifically stated to not work with players.
Display Name
declaration: package: org.bukkit.entity, interface: Player
I don't know if display name actually affects the nameplate tho
that wont change the nameplate though right
No it wont
because it is the method essentials' /nick uses
yeah the docs say it doesn't
reiterating: "god I hate Bukkit"
and I would fork it to add changes but eh
I'm too lazy
(I also don't know how to contribute to Spigot's codebase sooo yeah lmao)
therefore it will never get better
How would I go about using packets to achieve that
dunno, never used them
Same
you're apparently supposed to use ProtocolLib
declaration: package: org.bukkit.entity, interface: Player
wonder if this would change the nameplate as well
well it says "player list name"
given how the player list works
it doesnt
Player list name is tablist
player list packet controls a lot of things just fyi
im pretty sure
sign the cla, then fork bukkit and/or craft bukkit, clone it locally, make the changes, rebuild the patches, push to remote, pr
peasy
yes it is the tablist, but the packet for that is the same one for seeing names on the player itself
however we have our answer that it doesn't work
but now you know why I suggested it 😛
O ok
god, I hate Minecraft
how does one create a mob head stack in 1.8 🤔
Is there a good gif player plugin for spigot?
https://wiki.vg for your packet related curiosities XD
how do i register two of the same named commands into main
this.getCommand("start").setExecutor(new BossS(this));
this.getCommand("start").setExecutor(new BlocksRemoving());
however this last one makes plugin just not work why is that
you don't
you shouldnt have two of the same commands
how tf you gonna tell the difference between the two in game
they should all be in same class?
well no i was trying to sort it out so i can remember the functions of each thing
anyone have a good event listener registration system?
commands can have arguments fyi
so if what you are looking for is how to organize commands and what not or have commands do more then one thing, then you just make that command handle arguments 🙂
ok thanks
@foggy estuary
https://github.com/frostalf/ServerTutorial/tree/master/ServerTutorial/src/main/java/pw/hwk/tutorial/commands
an example of how to do such things 🙂
thank you so much man.
you still need to register the main command in the main class
yeah
hope that helps you out 🙂
does Bukkit.getWorlds() only contain currently loaded worlds?
yes
Hey, i'm trying to start using nms. But when i change spigot-api to spigot it will give me this error:
Dependency 'org.spigotmc:spigot:1.17-R0.1-SNAPSHOT' not found
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot</artifactId>
<version>1.17-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
I ran build tools
Can someone help me please?
How can i replace all of a certain type of block in a chunk
You can;t have, or you somehow broke yoru local repo
how to get max player size in bungeecord server?
var server = ProxyServer.getInstance().servers[key]!!
1.17 is not 1.17.1
Ohhh, thx!! I'm creating a plugin for 1.17.1.
Hey
Hopefully someone can help me with that
So im starting with plugin making and im already having problems, when im starting my server with custom plugin this appears:
[23:42:14 INFO]: [my-plugin] Loading my-plugin v0.1.0
[23:42:14 ERROR]: [org.bukkit.craftbukkit.v1_17_R1.CraftServer] J2V8 native library not loaded initializing my-plugin v0.1.0 (Is it up to date?)
java.lang.IllegalStateException: J2V8 native library not loaded
at com.eclipsesource.v8.V8.checkNativeLibraryLoaded(V8.java:195) ~[my-plugin.jar:?]
at com.eclipsesource.v8.V8.createV8Runtime(V8.java:149) ~[my-plugin.jar:?]
at com.eclipsesource.v8.V8.createV8Runtime(V8.java:125) ~[my-plugin.jar:?]
at com.eclipsesource.v8.NodeJS.createNodeJS(NodeJS.java:58) ~[my-plugin.jar:?]
at com.eclipsesource.v8.NodeJS.createNodeJS(NodeJS.java:45) ~[my-plugin.jar:?]
at io.customrealms.runtime.Runtime.<init>(Runtime.java:51) ~[my-plugin.jar:?]
at io.customrealms.jsplugin.JsPlugin.setup(JsPlugin.java:39) ~[my-plugin.jar:?]
at io.customrealms.jsplugin.JsPlugin.<init>(JsPlugin.java:29) ~[my-plugin.jar:?]
at io.customrealms.MainPlugin.onLoad(MainPlugin.java:30) ~[my-plugin.jar:?]
Any solutions on that?
;-;
J2V8 native library not loaded
Ye how to fix that
why the boolean in the foreach? maybe you want filter and later check if the stream has elements
load the J2V8 native library?
But how
no im just trying to see if a directory contains a folder
Whatever you're doing with j2v8 doesn't sound like a basic thing
Sir if we were on google store rn id give this opinion 0 stars
To be clear you're trying to make a plugin to load other plugins in JavaScript?
Well im just making simplest plugin
Its my first ever actually
I can send the whole plugin if u want me to
Oh yea
What is customrealms? Is this you?
Im using customrealms to program
Would help if you didn't cut out the whole error
Its site simmilar to eclipse and stuff
surprisingly enough, they arent the first person to do this
Otherwise we can help you program a plugin in java
Well as i mentioned im a newbie, so where would you guys reccomend to write plugins
you dont need to sign the cla
you can just clone the thing directly through the web
The home of Spigot a high performance, no lag customized CraftBukkit Minecraft server API, and BungeeCord, the cloud server proxy.
Idk or YouTube or something
Customrealms has nothing to do with spigot
You can use it, but unlikely anyone here can help you
Try their support
git clone https://hub.spigotmc.org/stash/scm/SPIGOT/craftbukkit
Okay ill figure this out, thanks
Oh btw is java easier to code in than javascript?
how to get server tps
/tps
in java
Don't think there's an api method for it
You could always measure the ms per tick manually
?xy
Asking about your attempted solution rather than your actual problem
And then use that to figure out the tps
he want to modify tps command i guess
I'm using the 1.8 Spigot API:
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot-api</artifactId>
<version>1.8.8-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
When Using the sound enums, my options have names of newer sounds:
e.g "ENTITY_ENDERMEN_TELEPORT" instead of "ENDERMEN_TELEPORT"
which throws an error:
Caused by: java.lang.NoSuchFieldError: ENTITY_ENDERMEN_TELEPORT```
Anything I can do about this?
You have a newer version in your classpath from somewhere else
not sure if I know what class path means, what should I do?
Remove your other dependencies till it works
how to change proxied player to other server
Look at the bungee plugin message channel wiki page
link?
I'm sure you can find it on Google
md_5 did you see my ping from earlier 
finded
Looks like it says the sound is from "Maven: org.bukkit:bukkit:1.9.4-R0.1-SNAPSHOT", even though I do not have it in my maven dependencies
.
Idk colon works for me on linux
Odd, why would the Linux and Windows options be different lol
But yeah according to even the java -help list it's semicolon, on Windows atleast
?paste your pom
how to verify if a bungee server is online?
neofetch right now
linux --class-path <class search path of directories and zip/jar files> A : separated list of directories, JAR archives, and ZIP archives to search for class files.
so lol
wonder if there is a cross platform way to do it
Fixed, turns out FAWE was downloading the newer spigot apis
Looks like that option is just straight up OS dependent https://stackoverflow.com/questions/4528438/classpath-does-not-work-under-linux
the syntax is OS dependent
not that the option is
That's what I meant
is there a way i can force a tree to be grown somewhere similar to when you bonemeal a sapling
org.bukkit.World.generateTree() ?
guys nms so gud i can make a custom advancement tab for my own advancements with resource pack boissss
ok

Help, this code has error ( BungeeCord Command )
sender.sendMessage(TextComponent("Test").setColor(ChatColor.DARK_RED))
None of the following functions can be called with the arguments supplied.
sendMessage(vararg BaseComponent!) defined in net.md_5.bungee.api.CommandSender
sendMessage(String!) defined in net.md_5.bungee.api.CommandSender
sendMessage(BaseComponent!) defined in net.md_5.bungee.api.CommandSender
EntityExplodeEvent to get the entity responsible for the explosion 🙂
So... Someone called me out for not supporting lower than 1.13 am I doing the right choice?
its your project so its your decision
personally I only support latest
whats the matter with that?
test with sender.spigot().sendMessage
Use ComponentBuilder and learn java
I see no point in using legacy versions.. They want me to support 1.8
Kotlin 
ok
ban him!1111
?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.
yeah
i use kotlin
He left my discord cursing when I told him to upgrade to 1.16 or something
Kodydev TextComponent::setColor returns void/Unit right
welp whats the matter?
Here are some links to get you started on learning Java:
he did being agressive right?
Which is not a type any function takes
the reason anyone would want you to, is because those are the people who dislike combat mechanics after 1.8
I don't know if I'm messing up not supporting that version
however there is no reason to support a buggy version like 1.8
I see no difference in combat lol
or even significantly older versions in general
Swords swing the same
click spamming is one of the major differences here
Just click faster?
i personally is one of them, but in general if you look out of pvp and performance, you can see newer versions have lots of contents to play with
You can set the hit cooldown of an item and boom
I see no issue in it being rate limited feels fine
well sure, it just means you can't spam 20 clicks and have all 20 clicks be registered
only about half those clicks will be
no
1.7.10 can
Pvp is a waste of time tho lol
but not 1.8.9
Well if you change the hit cooldown it might be possible
then they can say the opposite to us
like generally speaking, it’s possibly to replicate all provided functionalities of 1.8 in 1.17 or 1.18
cOdInG wItHoUt 1.8 Is WaStEtImE
either way @next stratus just know you are not alone in not supporting outdated versions 😛
whether it is the right choice or not, that is personal preference XD
plenty of us here who do not support outdated versions in their projects. I am one of them 😉
people not knowing how 1.8 pvp belike
.
.
I mean that's how it works so
Why can't mojang just reverse changes and keep the pvp wanna be kids happy
ok, i will tell you a story about my grandfather so you will know how 1.8 pvp-
actually people nowadays can pvp better and they can just use 1 cps to combo people
and that is even possible with 1.9+
but to combo people
you need to first combo lock him
and that is why the spam click is good there
https://www.youtube.com/watch?v=_A-9S7c5Zks
for example this is the gamemode for 1.8, combofly
Imo pvp should just go it's a waste of space
and on 1.9+ the gamemodes mostly disappear
and you can only use axe, shield, not even rod or lava lul
why even have a game, I don't play minecraft, it should just be a platform to which I push my plugins
the problem is, people keep treating MC like its designed for pvp league or whatever
which it isn't designed that way XD
Ah yes, just remove pvp all together, genius plan
that is the way MC started out
It also started out as Cave Game whats your point
graphics are cringe, I basically just use the in-game chat, turn minecraft into a chatroom app
that isn't what I meant, when MC was released for people to download and play, it didn't have pvp
So we should go back to alpha...?
not sure why you keep going with the extremes o.O
I mean it didn't have a lot of things that it has now, I don't understand what you're getting at.
it did perfectly fine without pvp
I wouldn't say pvp was the overall cause of that though lmao
Minecraft without pvp wasn’t bad or anything just a bit less engaging
I can guarantee that if minecraft did not have any form of pvp it would never have gotten as popular as it has
PvP was basically added when Multiplayer was added
Agreed
I would have to disagree on that given how many game modes don't involve pvp at all
no bedwars, no hunger games, no sick pvp montage videos, no idiots on youtube smacking each other for what I believe youtube has just notified me was a trillion views earlier this month
Notice how many popular gamemodes are PvP based though...?
Skyblock being a recent exception, although it still has combat elements.
Sure pvp has evolved into a substantial genre concerning the game, although as frostalf said I also think the game would have done fine without any emphasis on pvp and its mechanics
there is a big difference between fine and the most popular game of all time according to a few metrics
I think it would have done fine without PvP, yes, but I don't think there's any argument that PvP has hurt Minecraft's popularity, and by no means should it be removed.
This also depends on what you define pvp as, I mean players could create pvp even without any explicit hitting and shooting
since MC had no competitor they would have probably been just as popular
don't think they have a competitor still
if minecraft refused to add player versus player combat someone else would've added it and ran with the money
Terraria can be considered a competitor
And Terraria beats Minecraft to all hell when it comes to engaging gameplay.
I don't think minecraft would have even 50% of the userbase it has without the pvp scene
and I think that's lowballing it
not because those people play pvp but because the people that play pvp keep pumping out videos which in turns feeds the ad machine
aren't some of the top yt video creators heavily into pvp even now?
probably could consider it to be, but they are not the same in any way
Technoblade is PvP 
pvp does more to minecraft than the sum of its parts
I didn't say they were the same. But they're still competitors, technically all video games are competitors to Minecraft.
well yes when you get down to fundamentals lol
But I meant direct competitor
They're both sandbox pixelart-ish games. Still pretty similar in some regards
if mc isn't sandbox then I can't imagine what would be
It's a sandbox. LOL
mc is the only sandbox you can fill with literal sand blocks
and wikipedia is not the authority on that
if you wanted to say minecraft creative mode is sandbox I would agree
but survival mode wise it is open world
why?
in pvp it is cancer world
people killing their mice by using some german pvp techniques
gtaV, hitman, elite dangerous, kerbal space program, arma 3, just cause 3, eve online, red dead redemption, don't starve are all sandbox games and if anything they give less of a degree of freedom than minecraft does when it comes to purely messing with the world you're in
I mean, if you don't define Minecraft as a sandbox game, what is?
Sandbox games are more similar to sim's then anything
for instance elite dangerous is a sim game
I'd say that's an arbitrary definition but it is not a definition in the first place
and it is contrary to how everyone else defines these games
fun fact a game can have multiple genres
Eve online is not open world because it doesn't let you interact with the world except in limited capacity and not because of limitations
that's not what a sandbox game is
here's one definition
A video game with no linear storyline or specific goal, the player deriving amusement from a range of open-ended interactions or situations.
you gotta be faster on the draw my dude
I prefer my definition
Yeah we know, frost is arguing that Minecraft doesn't fall into the Sandbox genre.
the minecraft trailer says its a sandbox game
minecraft is the most sandbox game of sandbox games imo

mojang says it's a sandbox game, wikipedia says so as well, so does pretty much every gaming website out there
if you look for sandbox games on google, it is the first result
not a joke
Lmao you're right
so like I was saying, I can't imagine what would be a sandbox game if minecraft isn't one
well we can disagree then
can I hear your opinion on why its not a sandbox game, just curious @wet breach
MC adheres to everything that an open world is
its only limitation is the game itself
Isn't that the definition of sandbox 
but it can be a sandbox and open world 
it's a sandbox open world game
gta 5 is open world, while being sandbox
these things are not mutually exclusive
it's even a procedurally generated open world sandbox game
we can keep adding affixes without them stopping it from being a sandbox game
the only affix we can't add is linear
I would agree on the sandbox part if we are talking about creative mode because that perfectly fits the definition of sandbox
the survival side does not
what makes them materially different?
A sandbox game is a video game with a gameplay element that gives the player a great degree of creativity to complete tasks towards a goal within the game, if such a goal exists.
legit even survival minecraft fits the definition of a sandbox game
because creative mode is the very definition of sandbox where you are not inhibited by anything to freely create as you please
so gta 5, just cause, kerbal space program and so on are not sandbox games?
What's preventing you from creating whatever you please in Survival
actually let's make it easier, here's a list https://www.thegamer.com/best-sandbox-games/
so none of those games are sandbox games because all of the main game modes are not "creative"
they might have a creative mode in it
but it is not the main mode
gta5 I wouldn't say is sandbox because you can only interact in a limited fashion. You are not exactly free to do whatever you want
it's a pointless thing to argue because that's not what a sandbox game's definition is
no game lets you do what you want
I want my game to bring me coffee irl
that isn't what I meant
How do y'all handle running unit tests on plugins? if at all
apply that standard to literally anything frostalf
alright people are asking questions this is where I ask the discussion to be moved
in creative minecraft you can't demolish a house with realistic physics either
don't, question answered
mentioned nothing of the physics
yeah it feels like a real pain in the fucking ass
even with stringent unit testing odds are some plugin will find a cool way to mess things up regardless
time to recompile the plugin and reload the server every time anything changes I suppose
I mean if you have decent hardware that process is fast anyways
it's not a hardware bottleneck, it's just irritating
its just a pain to do it because you need to include the entire server in the test so it can run it, and then you need to fake things if your plugin requires player inputs etc
library plugin
isn't there like
the bit about faking is a nightmare
that unitbukkit or smth for testing plugins without a server
that'd be useful
think of all the things other plugins can modify
if you want to hotswap your jar while the server is running, that is definitely a thing, however the tools to do that are not free however you are free to create your own just a pain to do that too XD
and comes with its own bugs and limitations
you can in fact hotswap by just replacing the file in windows
and reloading the server
it's free
while that works, that doesn't refresh the classpath
i wouldn't trust a runtime hotswapper because part of this library literally involves hotswapping modules
i mean, I don't really need the classpath refreshed anyway
mockbukkit
i'll check that out, thanks mate
I've never used mockbukkit but ppl say its good for testing
mockbukkit will break severely tho if u use something like version checking Bukkit.getVersion or smthing
for nms
f
lol
well that's a nonstarter for me
my config files are initialized via reflections because I am a cool kid and I program with hacker sunglasses on
and also there's about 1k config files in there I think
anyone down to build a bunngeecord Minecraft server and develop together dm if your down
wrong place buddy
^
this is a developer help chat not a recruitment chat
yeah here you show up to ask people to feed you code for your plugin line by line
🌚
where would i find a discord server of something like that
Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.8.1:deploy (default-deploy) on project Deploy-Test: Failed to deploy artifacts: Could not transfer artifact dev.alex.net:Deploy-Test:jar:1.0 from/to testing (http://127.0.0.1/maven2): Transfer failed for http://127.0.0.1/maven2/dev/alex/net/Deploy-Test/1.0/Deploy-Test-1.0.jar 405 Method Not Allowed
Nice btw
Why i cannot transfer artifact to local web server?
Can we see ur configuration?
And also you made sure the repo actually exists right
(dont include passcode and username in build configuraiton please)
lol
Whenever I try to get the entity object from a uuid it doesn't work for some reason.
System.out.println("addingentity");
System.out.println(UUID.fromString(e));
entries.add(Bukkit.getServer().getEntity(UUID.fromString(e)));
(entries doesn't contain the entity at the end)
what is e
Repo?
I dont remember who told me that you can deploy artifacts direct to a web server
Yeah its a Apache2 server running on local
if u go there do you see folders or anything?
yes i see the folder
e is a string (from the entries of a team)
This is my config
ArrayList<Entity> entries = new ArrayList<>();
for(String e : team.getSingle(event).getEntries()){
System.out.println(e);
if(e.contains("-")){
System.out.println("addingentity");
System.out.println(UUID.fromString(e));
entries.add(Bukkit.getServer().getEntity(UUID.fromString(e)));
}
else{
entries.add(Bukkit.getServer().getPlayer(e));
}
}
return entries.toArray(new Entity[entries.size()]);
"full code"
getSingle returns the team value btw (so that I can do things with that team object) so just ignore that
the command: mnv deploy
Its correct right?
Im getting a 405 error
Im seeing that its a server problem
no
your <version>
youll get 405 if you already deployed it
you need to add -SNAPSHOT to it
actually yes, keep that snapshotRepository too though
So it will be like this
yes but also fix <version
ok
also might need different IDs for each
wonder what will we name this?
JsonArray requirements = // some code here
String[][] whatToName = new String[requirements.size()][]
And config should be change?
.
if the id changes then yes
but which id i use there? snapshot or repository?
I was looking for how to use the /execute with plugin commands and it didnt work. You said that it is a wontfix for you. So there are no ways I can do this ?
Inside my http://127.0.0.1/maven2 there no jar/artifact
So i dont know what happening
well did you install a repository server like nexus there
you cant just point a webserver there
well you can, but you need to deploy to a file:// and have the webserver serve it
you cant just deploy over http to apache/nginx
Ahh okay. So either need to use file://webserver-path or made a custom deploy plugin?
yes
And then i can use it as <dependency> in other projects?
you dont need any of this to use dependencies in other projects on your pc
that works automatically with mvn install
No
I didnt explain
I want to deploy files to web server so other friends can use them from their pcs
yes then you need to do this
or just give them the source and let them compile lol
may be easier for small projects
Yes but if we can do it automatic its better
because the dependency system its a simple get
Which do i need to use "/" or ""?
We need 1 week
a little limited but it does the job
cause how are u gonna make ur friends be able to get the deps of your local server
Lol
i have the port opened
Im running the web server on a server machine that its in my home
OMG
I have do it
Really thanks md5!!!!!!!!!
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/
im aware however im a college student with little money and paying for a server core to be developed we all know isnt cheap xd
In general is not cheat because java its a expensive languaje
Let talk dm
Any http client for files upload that you recommend¿?
player.sendMessage(ComponentBuilder ("Connecting you to the lobby!").color(ChatColor.RED).create());
// i use kotlin
mention me pls if you have a solution
@quaint mantle
PR has been merged, Material#getDefaultAttributeModifiers
How do I put a position or a VarInt/Long into a ByteArrayDataOutput?
@quaint mantle
just as I finish the map.. oh well.. may as well restructure it to work properly
could someone help me out with this
now how do I get this from a bee hive
@EventHandler
public void onSsgLeftClick(PlayerInteractEvent event){
if(event.getAction() == Action.LEFT_CLICK_AIR) {
if(event.getItem() !=null){
if(event.getItem().getItemMeta().equals(ItemManager.sniper.getItemMeta())){
if(ssgAmmo.get(event.getPlayer()) == 0 && canReload.get(event.getPlayer()) == true){
event.getPlayer().sendMessage("§aReloading...");
canReload.put(event.getPlayer(), false);
new BukkitRunnable(){
@Override
public void run(){
ssgAmmo.put(event.getPlayer(), 5);
event.getPlayer().sendMessage("§aReloaded!");
canReload.put(event.getPlayer(), true);
}
}.runTaskLater((Plugin) this,20L);
}
if(ssgAmmo.get(event.getPlayer()) != 0) {
Player player = event.getPlayer();
Arrow bullet = player.launchProjectile(Arrow.class, player.getLocation().getDirection());
ssgBullets.add(bullet.getEntityId());
bullet.setVelocity(bullet.getVelocity().multiply(10));
ssgAmmo.put(player, ssgAmmo.get(player) - 1);
player.sendMessage(ssgAmmo.get(event.getPlayer()) + "/5");
}
}
}
}
}```
my bukkit runnable
just isnt working
Learn to use the javadoc https://hub.spigotmc.org/javadocs/spigot/org/bukkit/block/Beehive.html
omg thats annoying I didn't see the EntityBlockStorage part
Whats bukkit runnable
People gotta stop using bukkit runnable and also gotta learn early return
if (e.getAction() != Action.LEFT_CLICK_AIR || !ItemManager.sniper.isSimilar(e.getItem())) {
return;
}
Player player = e.getPlayer();
UUID id = player.getUniqueID();
if (ssgAmmo.get(id/*Never use players as the key to a map, use their UUIDs instead*/) == 0 && canReload.get(e.getPlayer())) {
player.sendMessage(ChatColor.GREEN + "Reloading"...);
canReload.put(id, false);
Bukkit.getScheduler().scheduleSyncDelayedTask(this, () -> {
ssgAmmo.put(id, 5);
player.sendMessage(ChatColor.GREEN + "Reloaded");
canReload.put(id, true);
}, 20);
return;
}
if (ssgAmmo.get(id) <= 0) {
return;
}
Arrow bullet = player.launchProjectile(Arrow.class, player.getLocation().getDirection());
ssgBullets.add(bullet.getEntityId());
bullet.setVelocity(bullet.getVelocity().multiply(10));
int ammo = ssgAmmo.compute(id, (k, v) -> v - 1);
player.sendMessage(ammo + "/5");```
This is how I would rewrite that code to be much cleaner
You can avoid deeply-nested if statements by returning early at the start if conditions to run are not met
Then you can store the player in a local variable so you don't have to write event.getPlayer() so many times
Exit conditions
You should use the UUID instead of the Player object as the key to a map
You can pass a lambda to scheduleSyncDelayedTask which is much cleaner
Then you can return once that is complete
Just getting started with mongoDB. I can connect to the database just fine with my credentials but whenever I try to add object to a collection I get Caused by: com.mongodb.MongoCommandException: Command failed with error 8000 (AtlasError): 'bad auth : Authentication failed.' on server mc-shard-00-02.ncrmn.mongodb.net:27017. The full response is {"ok": 0, "errmsg": "bad auth : Authentication failed.", "code": 8000, "codeName": "AtlasError"}
Then you can check if they don't have enough ammo to fire, in which case you return
Then finally you do the logic for firing
Much cleaner
The authentification failed
thats pretty neat
I know that... just cant figure out why.
Yeah, try to keep all of that in mind when writing code
It makes it much cleaner and easier to maintain
Double checked my passwords and usernames. No special characters or anything like that.
Been researching for about an houir now haha
I did mongodb as my final assignment this semester but I didnt know we could implement it in minecraft
What class are you in?
Computer science
Fun
Every language
SO
If my credentials are messed up and the authentication is shit
How come I can connect to the database
Just not put anything in it
Thats what doesn't make sense to me
How your connexion to your database looks like in code
Just started figuring out mongo coming from SQL. So I basically just copied the Spigot guide for using Mongo
I tried that but ill try again
"mongodb://localhost:27017“:
Oh connection string
Should look something like that
in my opinion its quite backwards in the US in regards to computer science
Both
Im in canada
It says best program in the province
But I feel there are a lot of things missing and outdated
what I mean is, computer science isn't really the ideal thing for learning computer languages. its mostly about theory not application
if you want application portion, that is more in the engineering side
Im not at the university yet but if I go yeees
In quebec, you must go at cegep before university so you do theory and a lil bit of both
Then you decide ur path
not sure why in the US people think computer science = programming though I mean yes you can learn some programming but the overall subject isn't geared towards that
Shiiii
Love the duck pfp
mc-shard-00-02.ncrmn.mongodb.net:27017 on start mc-shard-00-02.ncrmn.mongodb.net:27017 on error
It is though
I mean, as a term, "computer science" sort of lends itself more to theory than practice
But my college's CS program has very heavily focused on programming
In the US that's what computer science means
this is exactly my point
Though there are other colleges where the same degree are more theory oriented
in the US, you might touch on topics of computer programming and you only learn computer programming if you specifically take a class for one
computer engineering requires it
you can't do computer engineering without knowing programming
We really don't call it computer engineering here
Does anyone know if there's a more efficient way of rendering particle images in minecraft? Any way I've tried until now, it essentially works, but it's really lagging the server out
We call it software engineering
Not really, other than just making it more sparse
there is hardware you know o.O
Well you can know the hardware side without much background in programming
Computer engineering talks about hardware much more
as sparse as I can get it while it still resembles what it should look like
not really
My god that's a lot of particles
Yeah that's not gonna be viable any way you slice it lol
Does look very cool though, so props
only other way is holograms
holograms, as in armor stands or?
the project I worked on that helped make holograms be a thing in MC, used a horse
Yes
not an actual feature?
well its a feature now
thats sad
wait
how then
from mojang, not from spigot-api i mean
armorstands provide it as a feature since armorstands are allowed to be invisible, the nametag is still used for the hologram
pwahhhhhhh
so how exactly would I render an image in relation to a hologram?
well the downside of holograms which is counter to what you are trying to do
is that holograms are 2D
the image is 2d as well, everything 3d that I tried crashed the server
I suppose you could use an armor stand with a custom image o.O
there is already hologram plugins
that would be way too small, and adding more armor stands would again lag it out
not if you use fake armorstands 🙂
anyways, how the holograms started was there was a bug with horses
specifically its age
if you set a horses age to a negative number it turned invisible all except its name tag
the bug was not found out by the group who worked on HoloAPI
however we made it popular
holographic displays?
popular enough that when Mojang decide to publicly state they were going to patch it, everyone was upset
so that is how we got armorstands
HolographicDisplays was created after HoloAPI
HolographicDisplays won in that it is still alive/maintained but when HoloAPI was alive and thriving
they had a hard time competing 🙂
HoloAPI as far as I know is the only plugin that allowed for touch holograms
that is, you can interact with the hologram to do things just by touching it in certain areas 😄
have what now? Touch holograms?
interesting I will have to see if it compares to what holoapi had
I don't care for outdated versions
oh btw
i just found this
still maintain somehow on dev bukkit
lul
ahh yes
this is what i talked about
similar, but not quite sophisticated XD
so HoloAPI allowed for multi-touch in a single hologram
so depending where a player touched on a hologram it did something different
I asked that in #general, but I think that here is more appropriate place
Okay then, so let's say I have a plugin which is aimed to be 1.16+. Should I keep API version on 1.16 or should I use the latest one. What is the best practice here?
1.16
do you intend to support 1.16 all the time? or you just going to support the lastest?
because it should always compatible with 1.18
no changes from 1.16 - 1.18 that can broke (only the remove biomes which idk meh)
I mean, for now I have no intention to drop 1.16 support
yeah see, still no plugin that replicates that one feature that HoloAPI had 😛
then keep the API version at 1.16
it is time to steal codes 🙂
The reason I ask is because recently I've seen one plugin which is 1.16+ using the 1.18 API
it is open source good luck though
And thought that it may be something everyone does, and I just don't know
Okay, so it means that everything is how I imagined, good to know
Your plugin is that old damn
it isn't just mine. It took 3 dev's to make it
DSH105, CaptainBern, and myself
Hawkfalcon was later added but mostly did code cleanup/style updates
Do you know which minecraft servers use your plugin
If any, it would be any server that is 1.7
Damn, that looks cool
plugin broke when 1.8 came out
Riiiiip
because that is when we got armor stands I am pretty sure
and we got those because like I said, Mojang publicly stated they were going to patch the horse bug
Yes
which meant no more holograms
everyone got upset
so Mojang made it so holograms stayed as a feature 😄
I am just happy that I was able to make a small bit of history possible 😛
without HoloAPI and even HolographicDisplays(they were our competitor) holograms probably would not have become popular or a thing
Thats kind of cool ngl. Would be a good content for minecraft youtubers
wait did it got patch now huh?
Hahaha
probably yes bit idk
Yes horse bug was patched, but holograms got to stay as a feature
wait they created it? like what u mean?
So atm you working in sweden? @wet breach 🤣🤣
No I don't work in Sweden lol
You wish
Holograms relied on a bug, that bug was if you set a horses age to a negative value, it made the entity invisible except for its name tag. Name tag was only visible if you set a custom name.
Crazy how a bug became a feature
no
i mean what did mojang add?
Armor stands.
