#help-development
1 messages ยท Page 341 of 1
.forEach(existingLore::add)
Its build tool, It build Spigot, why should I add the dependency?
addAll is better then forEach
love it how batch addAll isnt more optimized
use lore.addAll
it is, it doesnt have to resize the collection 20 times
thank you very much, very useful to improve myself
๐
You can do this better if you have a method to auto color
StringUtils::color
or smt
to do that you have to make a static class in Utils that returns the string with ChatColor.translateAlternateColorCodes() ?
yes
static method
I'll do it
eg like this
private static class Utils {
public static String color(String string) {
return ChatColor.translateAlternateColorCodes('&', string);
}
}
public void onEnable() {
List<String> existingLore = new ArrayList<String>();
List<String> loreToAdd = getConfig().getStringList("lore")
.stream()
.map(Utils::color)
.collect(Collectors.toList());
loreToAdd.forEach(line -> existingLore.add(line));
}
@tender shard addAll ๐
why by putting void after static it is impossible to return ?
void means what in java?
for arraylists, addAll is definitely better, it can just do an arraycopy
ye jsut looked at it
that it doesnt return sth
and if we don't put void we have to return something?
I used addAll - forEach is only in the second example that's about the Utils::color method because someone suggested it and I wanted to see whether intellij complains about forEach(... add
in a gson type adapter, what is the proper thing to do when the data you're reading is invalid?
it returns, but not a value 
can u just throw any runtime exception and gson will deal with it?
here ๐
I mean really depends on the application
Though not sure about their internal handling
instead of creating a file in the utils folder, you prefer to put it directly in the main class?
because void means "this does not return anything"
nope it stiil doesnt work
no, it was just an example so I can send it in one class
uhh, loading some internal data which shouldn't fail so I don't want it to be silently ignored
JsonSyntaxException
and gson will handle it, says chatgpt
this stuff is better than stackoverflow
@austere cove
well then its on your side to validate that BEFORE throwing it into json nor?
how to remove that warning:
anti popup
good one
I am loading it FROM json, not serializing it
thx
oh then i read that wrong. yeah gson handles that and throws you a syntax exception
or JsonParseException
?paste
bro why tf do i get an exeption when i start the server and load worlds????https://paste.md-5.net/qupezogume.sql
Cannot create additional worlds on STARTUP
yes but like how do u fix thid?
wdym?
Chat.java
package pl.playgroudhc.chat;
import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import org.bukkit.plugin.java.JavaPlugin;
public final class Chat extends JavaPlugin{
@Override
public void onEnable() {
Bukkit.getConsoleSender().sendMessage("Uruchamianie czatu ");
}
@Override
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
Player p = (Player) sender;
if (command.getName().equalsIgnoreCase("pomoc")) {
p.sendMessage(ChatColor.YELLOW + "================POMOC================");
p.sendMessage(" ");
p.sendMessage(" ");
p.sendMessage(" ");
p.sendMessage(" ");
p.sendMessage(ChatColor.YELLOW + "=====================================");
}
if (command.getName().equalsIgnoreCase("regulamin")) {
p.sendMessage(ChatColor.YELLOW + "================REGULAMIN================");
p.sendMessage(" ");
p.sendMessage(" ");
p.sendMessage(" ");
p.sendMessage(" ");
p.sendMessage(ChatColor.YELLOW + "=========================================");
}
return false;
}
}
...
because you "Cannot create additional worlds on STARTUP" yet you still attempt to
...
plugin.yml
?paste mate
main: pl.playgroudhc.chat.Chat
name: PlaygroundhcChat
version: 0.1
api-version: 1.16
commands:
regulamin:
aliases: rules
pomoc:
aliases: help
?scheduling delay it
dont
unchecked casts, love it
for how long
1 tick
you don't register command
?
you never set the executor
getCommand(name).setExecutor(this);
watch him copy n paste this
in a minute then "getCommand(name).setExecutor(this); error"
tbh i'm waitn for that
ChunkManager.java
package de.jeff_media.angelchest.handlers;
import de.jeff_media.angelchest.Main;
import org.bukkit.Chunk;
import org.bukkit.block.Block;
import java.util.HashSet;
public class ChunkManager {
private static final HashSet<Chunk> CHUNKS = new HashSet<>();
private static final Main main = Main.getInstance();
public static void keepLoaded(Block block) {
if(CHUNKS.contains(block.getChunk())) return;
CHUNKS.add(block.getChunk());
block.getChunk().addPluginChunkTicket(main);
}
public static HashSet<Chunk> getLoadedChunks() {
return CHUNKS;
}
public static void reset() {
for(Chunk chunk : CHUNKS) {
chunk.removePluginChunkTicket(main);
}
}
}
??
HelloWorld.java
thx it worked
you sent a random class without any context or asking any question, so I did the same
i have one more question tho
you forgot your pluginyml
oh my bad
in onEnable?
maybe (jk)
or in command?
plugin.yml
main: ${spigot.main}
name: ${project.name}
version: ${project.version}
description: "${project.description}"
prefix: ${spigot.prefix}
api-version: "1.13"
website: https://www.spigotmc.org/resources/angelchestplus.88214/
authors:
- mfnalex
- JEFF Media GbR
database: false
load: POSTWORLD
#libraries:
# - org.slf4j:slf4j-api:1.6.6
softdepend:
- Oraxen
- Multiverse-Core
- Multiverse
- Vault
- WorldEdit
- WorldGuard
- Slimefun
- InventoryPages
- Minepacks
- PlaceholderAPI
- EliteMobs
- ChestSort
- ProtocolLib
- ExecutableItems
- EcoEnchants
- ItemsAdder
commands:
# acadmin:
# description: "Manage a few AngelChest settings"
# permission: "angelchest.admin"
acgraveyard:
description: "Manage Graveyard settings"
permission: "angelchest.admin"
permissions:
angelchest.use:
description: "Players with this permission will have their items put into a chest on death by an Angel"
default: true
angelchest.protect:
description: "Players with this permission have their AngelChests protected from other players. They can unlock their chests using /acunlock"
angelchest.protect.ignore:
description: "Players with this permission can open other player's protected AngelChests"
angelchest.unlock:
description: "Players with this permission can unlock their protected AngelChests using /acunlock"
default: true
angelchest.tp:
description: "Allows players to teleport to their AngelChests"
angelchest.preview:
description: "Allows to view your AngelChests' contents using /acgui"
angelchest.fetch:
description: "Allows players to teleport their AngelChests to them"
angelchest.toggle:
description: "Allows players to enable/disable having AngelChests spawned using /actoggle"
angelchest.others:
description: "Allows you to run /aclist, /actp and /acfetch for other players"
angelchest.reload:
description: "Allows to reload the configuration using /acreload"
angelchest.debug:
description: "Allows to use the debug command /acdebug"
angelchest.version:
description: "Allows to use the version command /acversion"
angelchest.admin:
description: "Allows to use /acadmin, /acgraveyard, /acreload, /acdebug and /acversion"
children:
angelchest.version: true
angelchest.debug: true
angelchest.reload: true
angelchest.others: true
yes in enable
why does the getMainScoreBoard part gimme exception?
?notworking
"Does not working" is a useless statement. Please describe what exactly is not working, what you expect it to do, and what actually happens. If you get any console errors, also ?paste the entire stacktrace.
(that method is called in onEnable)
thanks for not giving any info about the error
smh
no acf
how about you actually send the exception
most commands use ACF
as you see I only registered one command in plugin.yml
scoreboardManager is null
Method invocation 'setExecutor' may produce 'NullPointerException'
I register about 50% manually and other 45 with acf
great you have your answer
Method invocation 'setExecutor' may produce 'NullPointerException'
really?
yes
2 bad
how do i fix it tho?
?
by making it not be null
ignore it if your command is defined in your plugin;yml
ok
check if it's null before using it, or use Objects.requireNonNull or suppress that warning for this statement or method if you are sure it cannot be null
@SuppressWarnings("ConstantConditions")
?
you should learn java first
command not working
?notworking
"Does not working" is a useless statement. Please describe what exactly is not working, what you expect it to do, and what actually happens. If you get any console errors, also ?paste the entire stacktrace.
?notworking
"Does not working" is a useless statement. Please describe what exactly is not working, what you expect it to do, and what actually happens. If you get any console errors, also ?paste the entire stacktrace.
wait
?
why u didn't implements CommandExecutor
im dumb
good to know
i've never created command inside Main class
that's why you just get the usage when you do not register your own executor / override onCommand - it's set to the plugin by default, and TabExecutor has
public interface CommandExecutor {
default boolean onCommand(CommandSender sender, Command command, String alias, String... args) {
return false;
}
}```
wtf
what's your problem
oh my bad, the "return false" comes from JavaPlugin, it's NOT a default method in CommandExecutor
but the result is the same
how do you detect if a chat message is really sent and displayed on the players screen? so it isnt cancelled maybe by another plugin
not working
?notworking
"Does not working" is a useless statement. Please describe what exactly is not working, what you expect it to do, and what actually happens. If you get any console errors, also ?paste the entire stacktrace.
you havent described nor given any errors
you just paste the same link over and over again
Did your plugin even get enabled?
You never registered your own commandexecutor, just declared an inner interface class
Don't need to set the executor if it's your main class
But they dont have any onCommand method overridden
They just declare an inner interface called Chat.CommandExecutor
why this plugin not works?
Because of this
Oh i see, yeah nvm.
override the onCommand(...) method in your class that extends JavaPlugin instead of just declaring an inner interface
public class Test extends JavaPlugin {
public void onEnable() {
getCommand("commandName").setExecutor(this);
}
@Override
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
// Do something
return true;
}
}
just use this code:
import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import org.bukkit.plugin.java.JavaPlugin;
import java.util.Objects;
public class Main extends JavaPlugin{
@Override
public void onEnable() {
Objects.requireNonNull(getCommand("pomoc")).setExecutor(this);
Objects.requireNonNull(getCommand("regulamin")).setExecutor(this);
Bukkit.getConsoleSender().sendMessage("Uruchamianie czatu ");
}
@Override
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
Player p = (Player) sender;
if (command.getName().equalsIgnoreCase("pomoc")) {
p.sendMessage(ChatColor.YELLOW + "================POMOC================");
p.sendMessage(" ");
p.sendMessage(" ");
p.sendMessage(" ");
p.sendMessage(" ");
p.sendMessage(ChatColor.YELLOW + "=====================================");
}
if (command.getName().equalsIgnoreCase("regulamin")) {
p.sendMessage(ChatColor.YELLOW + "================REGULAMIN================");
p.sendMessage(" ");
p.sendMessage(" ");
p.sendMessage(" ");
p.sendMessage(" ");
p.sendMessage(ChatColor.YELLOW + "=========================================");
}
return false;
}
}
yml
api-version: 1.16
commands:
pomoc:
aliases: ['help']
regulamin:
aliases: ['rules']
also it's pretty weird to use the same commandexecutor for two different commands
create other class which implements commandexecutor
yeah that'd be a way better idea
he wouldn't do that (ig)
also why do you cast the CommandSender to Player when sendMessage is declared in CommandSender and not in Player?
or better way is using any depency for manage commands like litecommands
you can just do sender.sendMessage(...)
no need to cast it to Player. and if you wanna cast it, then at least check if it's actually instanceof Player before casting it
the sender could after all also be a ConsoleCommandSender
kann mir jemand helfen habe diesen fehler
invalid plugin.yml
you declared that your main class is called "Main.Main" although it has a different name
or invalid package
it would be a very bad idea to name your main class Main.Main
at least call it me.myusername.mypluginname.Main
or better, me.myusername.mypluginname.MyPluginName
convention
so how is your main class actually named?
?main
I personally see nothing wrong to call your main class main ๐คทโโ๏ธ
I still think that ```java
package com.jeffmedia.angelchest;
public class Main extends JavaPlugin implements AngelChestPlugin``` is totally fine. But calling it Main without any proper package name is ofc... bad lol
how do i change the main class because this is a source code i downloaded and wanted to make it to version 1.19
my god
Well if package structure is like that... You probably don't want to use that source
I think it's this one
you take a look at the main class, then check how it's actually called, then you change it accordingly in plugin.yml
show the main class' source code, including package and class name
damn wtf
๐
well if that's actually the name, then you didnt include the Main.Main class in your .jar
which makes sense, IntelliJ doesnt show the "java class file" symbol
your sources root is messed up
classes should be inside src/main/java and not just in the root folder
Snake case mm
not working
?notworking
?notworking
"Does not working" is a useless statement. Please describe what exactly is not working, what you expect it to do, and what actually happens. If you get any console errors, also ?paste the entire stacktrace.
"Does not working" is a useless statement. Please describe what exactly is not working, what you expect it to do, and what actually happens. If you get any console errors, also ?paste the entire stacktrace.
just not working bro ๐คก
like this. and if the "java" folder isn't blue, then it's still messed up
yeah well he keeps ignoring everything we say the whole time anyway, obv it's "not working"
wait are you saying you cant read minds?
public class Test extends JavaPlugin {
public void onEnable() {
getCommand("commandName").setExecutor(this);
}
public interface CommandExecutor {
default boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
return true;
}
}
}
Obviously this ^ will not work
I wonder why people ask questions here anyway if they ignore all answers they got
So rubbish source code
Hi, I would like to compile a PAPI addons for java 8 but I don't know how to do it because with github workflow it asks me to set the version of gradlew but I can't ^^
how does your workflow file look like?
doesn't all gradle projects have gradle binary included ? Why would it need version
usually yes, but it's not required
I presume the target java version is the issue ?
idk they claimed the issue is that github action complains that there's no version defined for gradlew
like, they are using some gradlew workflow that wants you to specify a gradlew version?
tbh I'd just upload the gradlew file to the repo and then use a "normal" action that just calls your included gradlew
however it'd be way easier to just upload gradlew yourself and just use the generic setup-java action
lol so that's why IJ always asks "Do you trust this project" lol
indeed
correct.
however without gradlew in the repo, nobody who clones it would be able to run it anyway without downloading it themselves
yes just don't accept random binaries from random people 
(almost = most people)
IJ will automatically execute the build tasks by default
Hence even opening a gradle project is dangerous
getDisplayName() returns the nickname (modified or not)
getName() returns the real nickname
is it true ?
lmfaooo
real nickname is an interesting way of putting it
Probably not wrong if you mean the username with that
getDisplayName() will return whatever another plugin set it to in setDisplayName(), or the same as getName() if it wasn't set to anything
Ugh, apparently paper is deciding to break a bunch of plugins right now - time to investigate whether my awful hack is affected by it.
much better explained, thank you
I have this error
did you add the with: gradle-version stuff?
Plugin[] plugins =Bukkit.getServer().getPluginManager().getPlugins();
this code stores only loaded plugins or all?
- uses: gradle/gradle-build-action@v2
with:
gradle-version: 7.6
- run: gradle build
sth like this should work
I think so too
only loaded plugins, regardless of whether enabled or not
normally i see people starting with maven and swapping to gradle
I add this or ?? ^^
Yeah, I also started with gradle and swapped to maven
And even outside of bukkit work I am more or and more working without gradle
yeah but you also have to run gradle afterwards
btw is 7 a valid version or should it be 7.0? idk
and you are NOT supposed to run gradlew, but gradle
unintelligible
so just add another
- run: gradle build
``` at the end
You'll want 7.6
what are those gh workflow things?
7.0 was released two or so years ago - at least it feels like that
in short terms: it can run some scripts after you pushed changes
e.g. compile it and check if it failed
o
is there anyway I can store plugins without loading them? or I just want to read plugin.yml of a unloaded plugin. is it possible?
wdym "store plugins without loading them"?
?notworking
"Does not working" is a useless statement. Please describe what exactly is not working, what you expect it to do, and what actually happens. If you get any console errors, also ?paste the entire stacktrace.
I am afraid we cannot work with that
why does EVERYONE ignore ?notworking today
yes, it's unfixable
because you do not answer our questions
I have an addon loader that use Bukkit plugin loader system
so on my plugin, I want to get all depend of addons & add them
wouldnt it be easier to make people put their addons into your plugin's folder instead?
I mean, why do the addons for your plugins need to be bukkit plugins in the first place?
I am afraid that that is not possible to do out of practical concerns
then addon will not work properly .-.
I did it and I still have the same mistake ^^
You have to properly work with classloaders
uh
it is a bit weird to work with classloaders at first but ultimately very much possible
show the full file pls
whats you command code look like
but does YOUR plugin have to load the dependencies of your addons? If your addons have them as depend, then bukkit will already load them in the correct order?
send the command you are trying to use
if you are using a plugin go to #help-server
and what is the problem? just spawn an ArmorStand, then add resistence in the consumer
myWorld.spawn(myLocation, ArmorStand.class, armorstand -> {
armorStand.addPotionEffect(...);
}
are you actually making a plugin?
is there even a resistence enchantment or attributemodifier?
dont think so
yes/no @quaint mantle ?
use #help-server
gradle-version, not version
then why you are in the development channel
why don't you just ask on that plugin's discord
you asked in the itemedit channel
didnt you say the plugin is called itemtag?
there's literally two channels there:
1st Plugin
and
2nd Plugin
And you asked in the 1st Plugin channel "I need help with 2nd Plugin"
what is the problem with format.lastLogin?
SimpleDateFormat doesnt have a field called "lastLogin"
You are just using it all improperly.
oh
formater.format(lastLogin)
I still miss THE little thing, thanks a lot
no clue. I always try to use both gradle and GH actions as few as possible, both are a pain
with player.getExp() to get the level you have to do what math operation?
that is just progress to next level
if you want level, use getLevel
huh where?
.
if I had used logger I would have had some answers ?
Oh, yeah that looks like java
then subtract their current level XP
and whats with people not using Arrays.asList for lore
love u
I guess sth like this would do:
public static int getXpLeftUntilNextLevel(Player player) {
int currentLevel = player.getLevel();
float currentLevelProgress = player.getExp();
int xpRequiredFromCurrentLevelToNextLevel = com.jeff_media.jefflib.ExpUtils.getXPRequiredForNextLevel(currentLevel);
int xpTheyAlreadyHaveInThisLevel = (int) (currentLevelProgress * xpRequiredFromCurrentLevelToNextLevel);
return xpRequiredFromCurrentLevelToNextLevel - xpTheyAlreadyHaveInThisLevel;
}
what can I do then?
I'd just upload your own gradlew file to github, then simply run the setup jdk action, then do run: gradlew build
@haughty granite havent tested but should work fine
as a legend
when I use player.getPlayerTime() to know my total playing time, is it the server that returns it to me or is it my local statistics?
ew
yes i know
#getMaxDurability() returns 0 for blocks, and some items (like potions) have inconsistent data values
It's materialdata
shit
stuff like this
Idk much more
I know there is this dumb stuff too https://github.com/CryptoMorin/XSeries
you can have the player time being offsync
yes
e.g. in angelchest you can have a per-graveyard local time, so for players it'll always be midnight when they enter your scariest graveyard, while the time runs normally on the server, and only for players inside that graveyard it looks like midnight
or you could use it to have monsters not burn in daylight
just set the server to night but the player time to day
it just sends a packet to the client "yo the current time is now XX"
iirc
Ugh why do people insist on hosting their own maven repo when its down 50% of the time
that doesn't tell me what data values are valid afaik
Yeah its pre 1.13
yes :(
It was already deprecated when i uploaded my first plugin 5 years ago lol
i need it for a thing
Which thing?
a thing
I also added it to jefflib now, actually I always thought it was already included lol https://github.com/JEFF-Media-GbR/JeffLib/blob/master/core/src/main/java/com/jeff_media/jefflib/ExpUtils.java#L69
when I click on my item in my gui menu, I want him to confirm in the chat his teleportation, how can I do?
TextComponent?
what is the best?
create a command like "/mypluginconfirm". then send a Clickable component to them that runs this command
clicking on text component does not execute the command immediately :(
basically you wanna have a Map<UUID, PendingData> where PendingData is a data class that holds all the information you need. then your commandexecutor does whatever it wanted to do in the first place, and clear the player from that map again
it does for commands
only for chat messages, it doesnt
isnt there only SUGGEST_COMMAND?
I will try to find examples
?jd-bc
?jd-bcc
net.md_5.bungee.api.chat.ClickEvent.Action
alr
wasnt it always experimental?
import org.bukkit.Material;
import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.meta.ItemMeta;
public class ItemBuilder {
public static ItemStack createItem(Material material, int anzahl, int subid,boolean unbreakable, String displayname)
{
short neuesubid = (short)subid;
ItemStack i = new ItemStack(material, anzahl, neuesubid);
ItemMeta m = i.getItemMeta();
m.spigot().setUnbreakable(true);
m.setDisplayName(displayname);
i.setItemMeta(m);
return i;
}
public static ItemStack createItemWithID(int ID, int anzahl, int subid, String displayname)
{
short neuesubid = (short)subid;
@SuppressWarnings("deprecation")
ItemStack i = new ItemStack(ID, anzahl, neuesubid);
ItemMeta m = i.getItemMeta();
m.setDisplayName(displayname);
i.setItemMeta(m);
return i;
}
} ````
I have an error with m.spigot
Too old! (Click the link to get the exact time)
because ItemMeta doesnt have a spigot() method
How do I fix the error now?
by not invoking a non existent method?
do not call methods that dont exist
doing someItemMeta.spigot() is like doing somePlayer.asdawizfawuwafawfkuawvf()
That's gonna work tf
void means the method returns nothing, if the type is anything else other than void you will have to use return
Also, do note that in newer versions of java, if you have to use a switch statement you can just
return switch(thing) {
case a -> object;
case b -> {
// processing
yield object;
}
}
yield is a special keyword in switch blocks to set the switch block's return type
If I am not mistaken, this can also be done with variable assigning
Do not get confused with Void, which is a class, sometimes used in generics as SomeClass<Void>
yield is for things like this:
int value = switch (greeting) {
case "hi" -> {
System.out.println("I am not just yielding!");
yield 1;
}
case "hello" -> {
System.out.println("Me too.");
yield 2;
}
default -> {
System.out.println("OK");
yield -1;
}
};
Note that a lot of other default types, such as boolean, int, double etc have their object counterparts to be used in generics, Boolean, Integer, Double etc
Exactly
it's the same as doing
int value = 0;
switch (greeting) {
case "hi":
System.out.println("I am not just yielding!");
value = 1;
break;
etc
Just cleaner
yeah
oh yeah I meant to not use ->
oh lol
this is what I meant
you still need brackets
Also, @haughty granite, very nice thing you probably might need:
label: {
// Code inside this codeblock is special, if you use "break label;" you can return out of this block, leaving the rest of the function working normally
System.out.println("Hello!");
if(condition) break label;
System.out.println("I will only print when condition is false!");
}
label can be named anything that's a valid variable name
the { blocks } are needed if you wanna reuse local vars / redeclare them
ah yeah
Is there a way to make it where a player has no hitbox? Like you can shoot arrows through them?
declaration: package: org.bukkit.entity, interface: LivingEntity
And:
declaration: package: org.bukkit.entity, interface: LivingEntity
Perfect, thanks!
Np
Another question... Can you remove the ability of flying for people in creative?
look like its not possible to add depend/soft after plugin is loaded.
then if my plguin's addon need another plugin to run, how can I handle it?
setAllowFlying false iir
pdc
hey, I changed the config.yml file manually on intellij, added the arguments I'd like. But when I compile to the jar, the config.yml stays the same as before the changes, how can I debug that?
i tried:
-deleting the config folder
-messing with saveConfig()
wheres the config
saveDefaultConfig()?
you have to overwrite the old one in the plugins folder
i have it in all like my plugins lol
so
this final FileConfiguration is the edited config?
i'm doing that
onEnable =
saveDefaultConfig();
saveDefaultConfig only saves a config.yml to the plugins folder if it wasnt there already
List<String> nickList = plugin.getConfig().getStringList("FlyAccess");
for (String nick: nickList){
if (nick.equalsIgnoreCase(p.getDisplayName())){
plugin.getConfig().set("FlyAccess",plugin.getConfig().getStringList("FlyAccess").add(p.getDisplayName()));
plugin.saveConfig();
}
}
so it would be plugin.saveDefaultConfig() instead of saveConfig()?
why are you saving in a loop?
i was just testing
i tested after aswell
ok
but that isn't working
what are you trying to do?
idk if it's the best use of config, but i'm trying to make setAllowFlight(); persist on death and relog
ig you were storing uuids before
?uuid
what
i'm trying to make this but with uuids lol
sorry
what?
i mean store a boolean in the persistent data to indicate whether they have flight allowance or not
ok
but I wanna know why this isn't working anyways
I mean, i'll need to use config at some point
in that case i'm trying to make a list of players with fly access
oh sure
i'll fix that
look like its not possible to add depend/soft after plugin is loaded.
then if my plguin's addon need another plugin to run, how can I handle it?
it can be happend that dependency plugin will load after my plugin
just depend or soft depend on it, if soft depending, you can check whether its actually present
why is that whole stuff in the load block
If only booleans were builtin ๐ฅฒ
byte
Yeah ik
takes the same size
jvm isnt even aware of the existence of booleans
just fancy number
i love wasting 7 bits
now i'm confused because that worked, but the config didn't change
Ahh, I can easily add soft/depend on my main plugin. but what if my addon need it?
wat
boolean takes a byte of memory
yea ehm, you are not going to allocate a single bit ??
as the os does not support it yes
store a single binary
so what the fuck would the JVM do
beyond offering you a shared pool of booleans
which, BitSet exists 
Its not in my main plugin. it will be for my plugin's addon.
wat
depend on the main plugn
like one of my addon need Plugin A but its not in soft/depend on my main plugin
so it can be happend that Plugin A load after my main plugin.
make it depend on plugin a?
Plugin A is not my plugin. its random
make your plugin
like from other dev
depend on plugin a
love it how crunch does some of the exact same things as i do
without me even have looked at the code
Wait. let me fully explain.
so one of my addon need BedWars1058 plugin. but BedWars1058 is not in my main plugin's depend list.
so it can be happend that my plugin loaded fiirst. then BedWars1058
I can add that depend on my main plugin. but what if another person want to make an addon of my plugin that need another plugin as depend ?
No good way around that
config.yml :
FlyAccess:
- Player
code:
p.sendMessage(getConfig().getStringList("Admins").get(0));
output:
Player
My whole config doesn't make sense, or I'm messing something up very badly
i told you to use pdc
but the problem is, I have a different folder for addons & it needs to be loaded when my plugin get loaded. can't change this because, it store many data from addons then work with it on my main plugin
i'm trying to understand that first
then i'll move to pdc
check how combatlogx handles its expansions
@chrome beacon can probably explain more
pdc is much easier then this
its simple, you just get a data type, create a key and map it to a value
I just want to understand how to update and write the config.yml works, nothing else
The Configuration API is a set of tools to help developers quickly parse and emit configuration files that are human readable and editable. Despite the name, the API can easily be used to store plugin data in addition to plugin configuration. Presently only YAML configurations can be used. The API however was designed to be extensible and allow ...
spigot docs are shit
they are fine
The home of Spigot a high performance, no lag customized CraftBukkit Minecraft server API, and BungeeCord, the cloud server proxy.
Is there a way to make multiple armor stands follow the same path as one armor stand but just farther back in the path? I want to make it so that one armor stand has vectors to follow a player but the rest of the armor stands will follow in the same path but behind it. (sorry for making this sound confusing, it's kinda hard to explain)
We just add every plugin as a soft depend
I'll read all this, because i read the spigot one and didn't get why this is happening, brb
If you want your plugin to depend on another but don't want spigot to force that dependency, add it to softdepend and check if it's loaded in your onenable
Which is why I said there isn't a good way around it
With JavaPlugin.getPlugin("name")
PluginManager#loadPlugin
Alternatively, you can just load dependencies 1 tick after startup
Which is worse imo
Wait this exists https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/event/server/PluginEnableEvent.html
declaration: package: org.bukkit.event.server, class: PluginEnableEvent
๐
Didn't know that
looking through stash is fun
Is there any player join and quit event for bungee?
No bro, I still didn't get why my config.yml isn't updating...
Right, but i have seen in bungee you cant get the proxied player directly, so without pp i cannot get their uuid
wait, maybe i added Velocity instead of Bungee
Yeah it was tho
PlayerDisconnectEvent is called only when left complete the proxy right?
ok, thanks morice
Yes i was meaning that
๐ค
What is that
Suddenly appeared on my idea projects folder
@remote swallow still don't get why this is happening, any ideia?
What are you doing?
Because there you getting the "Admins" list, but your config doesnt have any "Admins" list
๐ค
How do i kickd a player if they have texture packs disabled and kick if they declined it?
i know right?
on intellij:
Admins: ['Player']
FlyAccess: ['MyNick']```
this is when i open the folder
public void onJoin(PostLoginEvent event) throws InterruptedException {
ProxiedPlayer player = (ProxiedPlayer) event.getPlayer();
String uuid = player.getUniqueId().toString();
}```
oh weird, i was trying to use something like that but there wasnt any getPlayer() was just a connection method
public void onResourcePackStatus(PlayerResourcePackStatusEvent event) {
Player player = event.getPlayer();
public void run() {
switch (player.getResourcePackStatus()) {
case DECLINED:
player.kickPlayer("You have been kicked for declining the texture pack.");
break;
case FAILED_DOWNLOAD:
player.kickPlayer("You have been kicked for failing to load the texture pack.");
break;
default:
break;
}
}
}```
I do have one like that, but the issue here is that the second i join i get insta kicked. I have my texture packs enabled
Its Bunge or Bungee? Im currently confused haha
config yml
In a player move event, is the player's location still the same while the event is executing? (So does player.getLocation().equals(event.getFrom()) return true?)
is it somehow possible to have more events in a single EventHandler?
I would've otherwise lmao
A class is a listener, you can have as many event handlers in a listener
i believe a move packet it sent every x ticks even when thhe client isnt moving
just heard that somewhere
Yeah it does
You can listen all the events you want, doesnt matter if you doing it alll in the same class or single class
Every second
Though this is not the point, I meant is the player's location the same in the event, and updates after the event?
player location is event.getFrom() iirc
getFrom will probably not be equal
i forgot
hence u see anti cheat plugins teleporting people back
when illegal movements are made
yes you are right Epic
has anyone tried to create custom vanilla glsl shaders here?
It worked for people that decline it, but people that have set there texture pack to disabled in server list dont get kicked. This might be that they dont even activate the event, but idk
Maybe i should tp all to black box and if they accept cuz thats the only thing i can confirm properly. And then i tp them to spawn
Hey, Can enyone tell my why I get a java.util.ConcurrentModificationException when calling the refreshAllScoreboards() Method?
public class StatsScoreboard {
private Scoreboard scoreboard;
private Objective objective;
public void refreshScoreboard(Player player){
MapList mapList = new MapList();
Map map = mapList.getByPlayer(player.getUniqueId());
this.scoreboard = Bukkit.getScoreboardManager().getNewScoreboard();
for (Team team : Bukkit.getScoreboardManager().getMainScoreboard().getTeams()){
Team tm = player.getScoreboard().registerNewTeam(team.getName());
tm.setSuffix(team.getSuffix());
tm.setAllowFriendlyFire(team.allowFriendlyFire());
team.getEntries().forEach(e -> tm.addEntry(e));
}
if (scoreboard.getObjective("stats") != null) {
scoreboard.getObjective("stats").unregister();
}
this.objective = this.scoreboard.registerNewObjective("stats", "stats", ChatColor.GREEN + "" + ChatColor.BOLD + " Stickfight ");
this.objective.setDisplaySlot(DisplaySlot.SIDEBAR);
int index = 0;
ArrayList<MapPlayer> pls = map.getPlayers();
Collections.sort(pls, new Comparator<MapPlayer>() {
@Override
public int compare(MapPlayer o1, MapPlayer o2) {
double kd1 = (o1.getDeaths() != 0 ? ((double)o1.getKills()/(double)o1.getDeaths()) : o1.getKills());
double kd2 = (o1.getDeaths() != 0 ? ((double)o1.getKills()/(double)o1.getDeaths()) : o1.getKills());
return kd1 < kd2 ? 1 : -1;
}
});
for(MapPlayer pl : map.getPlayers()){
this.objective.getScore((pl.getUuid() == player.getUniqueId() ? (ChatColor.DARK_PURPLE + "" + ChatColor.BOLD) : ChatColor.LIGHT_PURPLE) + Bukkit.getOfflinePlayer(pl.getUuid()).getName() + " " + ChatColor.GRAY + (pl.getDeaths() != 0 ? String.format("%.2f", (double)pl.getKills() / (double)pl.getDeaths()) : (double)pl.getKills())).setScore(index);
index ++;
}
this.objective.getScore(ChatColor.BLACK + " ").setScore(index + 4);
this.objective.getScore(ChatColor.WHITE + "Map: ").setScore(index + 3);
this.objective.getScore(ChatColor.YELLOW + map.getName()).setScore(index + 2);
this.objective.getScore(ChatColor.BLACK + " ").setScore(index + 1);
this.objective.getScore(ChatColor.WHITE + "K/Ds: ").setScore(index);
player.setScoreboard(scoreboard);
}
public void refreshAllScoreboards(int mapId){
MapList mapList = new MapList();
Map map = mapList.getById(mapId);
if(map == null)
return;
try{
for(MapPlayer pl : map.getPlayers()){
if (Bukkit.getOfflinePlayer(pl.getUuid()).isOnline())
refreshScoreboard(Bukkit.getPlayer(pl.getUuid()));
}
}catch (Exception e){
System.out.println(e);
}
}
public void removeScoreboard(Player player){
player.setScoreboard(Bukkit.getScoreboardManager().getNewScoreboard());
for (Team team : Bukkit.getScoreboardManager().getMainScoreboard().getTeams()){
Team tm = player.getScoreboard().registerNewTeam(team.getName());
tm.setSuffix(team.getSuffix());
tm.setAllowFriendlyFire(team.allowFriendlyFire());
team.getEntries().forEach(e -> tm.addEntry(e));
}
}
}
Please!! for long code use
?paste
anyone know how i could fix this problem? i know i need to add mysql library to my plugin , but i dont want to add it directly , my plugin size will increase rapidly .
RuntimeException: java.lang.ClassNotFoundException : com.mysql.cj.jdbc.Driver
spigot ships and older mysql driver iirc
or well, older version would ship older ones
what version of spigot are you using
I will suggest something like a dependency loader, you can either use Spigot one or another library
spigot have one?
What version are u coding, because its something for newer spigot versions
my plugin version is 1.8.8 , but i added support for all newer version

yeah
?1.8
Too old! (Click the link to get the exact time)
i know
1.8 ๐๐คก
but yea, 1.8 does not have that feature
please don't
Yes
So definitly best option is use a library for custom dependnecy loading
thank you i will look into it ๐
Right if need else just ask
And sorry for 1.8 i was being stupid because im 1.8 dev so i understand you. But now i only looking for 1.16+ comissions
its oky ^
i just use it , i know its very old , i just don't really need all the new minecraft / bukkit features in the newest version 1.12.2+ for the plugin iam devoloping .
how do you make an end world (i know that part already) that has no ender dragon?
kill it? xD
oh, sorry
Create and apply NBT tags to an item.
How to create your own NBT tags and apply them to custom items that are created through the ItemStack? And also how to apply them? For example, I want to create a tag in which it will be possible to enter a string value and with it I can issue an item using a command on the server. Version 1.8.9
I must say right away that I searched the Internet for guides, but I did not find a suitable one ๐ฆ
Ping me please
?1.8
Too old! (Click the link to get the exact time)
I would suggest moving out from legacy versions, your best option is to code 1.16 up
Because mostly people here only code on newer versions and you wont get much support as working with newer versions
I like her for pvp
Pvp pluginsss
No no
Yes yes 
So if you dont use newer versions u cant expect to get much support, cuz a few ppl use legacy versions
๐
anyone thats used bstats know why this for some reason doesnt send any data for the storageType```java
private void setupBstats() {
Metrics metrics = new Metrics(this, BSTATS_ID);
metrics.addCustomChart(new SimplePie("onlineMode", ServerUtils::getMode));
metrics.addCustomChart(new SimplePie("storageType", this::getStorageType));
}
private String getStorageType() {
return storageType;
}
Dropping "legacy" is literally just an excuse for bad design which doesn't allow you to unify those hand full of breaking api changes in your codebase in 90% of cases. The few specific exceptions there are are completely obvious.
Oh yeah, that why you must use newer versions ๐
cant
if (event.getPlayer().getWorld().getEnderDragonBattle().getEnderDragon() != null)
event.getPlayer().getWorld().getEnderDragonBattle().getEnderDragon().damage(1000);
How would I do it if I wanted to send a message when a player joins on a specific server which is connected to bungee but I can set what the message is in a single bungeeconfig depending on what server I want the message to be sent on.
Like:
BungeePlugin: Config has server list/messages to display
SpigotPlugin: Just listens for event and then communicates with bungee to display the message?
plugin messaging channels iirc
The home of Spigot a high performance, no lag customized CraftBukkit Minecraft server API, and BungeeCord, the cloud server proxy.
Thanks ebic will look into it. Just finishing some stuff here before I continue
Go live on in your little dream world, :).
I don't know why people find it so hard to understand that using legacy versions is worse for them, because it makes programming much more complicated. Since as the versions advance the apis are getting better and better. But they always said to me, every master has his own little book.
how to make a player join a different world when joining? (do i use PlayerJoinEvent or PlayerLoginEvent?)
Supporting legacy held back the development of the spigot api for years... Supporting legacy versions is undisputably a step in the wrong direction.
declaration: package: org.spigotmc.event.player, class: PlayerSpawnLocationEvent
7smile7 appears after like 3 months
thx, i didnt know that
Semester is over :)
party
Not quite. Still have one more exam and then i start with my thesis 
i have another question: how exactly does Player#hasPlayedBefore work? in the docs it just says that it returns true when he had played, but how does it know that and can i modify it?
This is saved in the players data file. On default its in the main world folder.
in playerdata?
\server\world\playerdata\<UUID>.dat
Yes
i see
Whats your overall goal? Maybe you shouldnt rely on "hasPlayedBefore()" if you need to delete the playerdat file
love bstats 

my overall goal is that when a player first joins a server, they spawn in a void-type world where they have to type in chat what world they want to be on (its a little more complicated, but basically a player only spawns in that world when they join the first time)
Did you
- Add the respective chart on your page
- Log your callback methods (just sysout and see if they get called)
- Wait a bit. Bstats is sometimes slow when it comes to updating their charts
chart exists on the page, no idea what you mean by the 2nd one, and its been like 45 min since i restarted to add it
oh wait
my brain just brained
ill add a sysout now
and basically the reason i asked whether you can modify it is cuz i want to test if it works
Alright then just delete it ๐
alr
?paste
Hey,
Can anyone tell me, why I get a java.util.ConcurrentModificationException when calling the refreshAllScoreboards() Method?
https://paste.md-5.net/ecihelefis.cpp
You are probably modifying a collection while iterating over it
I don't have a hard time understanding it at all. If it makes your codebase so much more complicated to add support for older versions, your codebase is structured poorly in the first place. I know from my own experience that you can support the majority of features plugins nowadays bring to the table on 1.8-present with ease, as long as you know how to abstract properly and don't just throw that buzz-term around to act like you do.
It's all about the principle for me. These versions exist, and if I choose to want to support them, I will. Every plugin-developer is free to choose. But when you guys start to suffocate that free will, I'm just not going to watch silently. But again: None of us is going to change their opponent, that's for sure, :).
Why would I care about spigot devs and why would they care about me? They can do whatever they want, no matter of what the users think they want to achieve. Seems like they could have needed a bit more courage in those past years, ;).
Wait im seeing something ugly here...
several things in fact
}catch (Exception e){
System.out.println(e);
}
->
} catch (Exception e) {
e.printStackTrace();
}
For once
this fukin sods law
So you're saying we should spend more time to support legacy versions because of close-minded customers that don't care about you?
I get this error when trying to loop over a hashmap
https://paste.gg/p/anonymous/b9045748767c436582e0e531a6d9d68f
line 27 is for(Map.Entry<Vector, BlockData> vector : s.getBlocks().entrySet()){
this was just for testing
I don't mind supporting old versions, but the newer APIs are a lot easier to work with because it just had a lot more development time
I didn't want the try catch at all
if possible, use ConcurrentHashMap
It's not at all about the customers for me, as - in fact - I don't have any. That's a totally egocentric reason, I just want it for myself.
Again, you are free to draw the line where ever you feel about it, I'm not telling others what to do.
Structure s = CopyBuild.clipBoard.get(player.getUniqueId());
HashMap<Vector, BlockData> blocks = CopyBuild.clipBoard.get(player.getUniqueId()).getBlocks();
for(Map.Entry<Vector, BlockData> vector : s.getBlocks().entrySet()){
int new_x = -vector.getKey().getBlockZ();
int new_y = vector.getKey().getBlockY();
int new_z = vector.getKey().getBlockX();
Vector newVector = new Vector(new_x, new_y, new_z);
BlockData blockData = blocks.get(vector.getKey());
blocks.remove(vector.getKey());
blocks.put(newVector, blockData);
}
Can you print the whole stack trace pls? Makes it easier to search
If it's all a choice why are you here, advising people? It's their choice if their code is bad or not
ok
You can modify regular HashMaps the same time as you iterate over them
ikr
Hence either use ConcurrentHashMaps or use a helper collection where you store your changes until you apply them on the main map
I'm here because people think it's their right to tell off others who want to operate on 1.8 because they think it's legacy. That crosses a boundary for me. If you don't like it, don't support it, don't answer it. But don't feel encouraged to tell others that their ideas are stupid, if that's what they want to do.
Too old! (Click the link to get the exact time)
Depending on the size of the collection it might be a better idea to copy the entry set into an immutable list.
So
for(Map.Entry<Vector, BlockData> vector : s.getBlocks().entrySet()){
->
for(Map.Entry<Vector, BlockData> vector : List.copyOf(s.getBlocks().entrySet())) {
Often yields a better performance than concurrent maps
we arent?
We're here to talk about benefits of updating, or how dumb it is not to
We aren't, by calling an idea stupid you're not implicitly calling the person behind that stupid. We all have good and bad ideas, which are still: free will.
If someone wants to use 1.8, and they have a valid reason, they're still worthy of being helped
Where does List come from
Yeah probably
Exactly.
I swear this argument is stupid asf
java
stupid intelij wouldnt import it for a second
Before that you can use ^
Because you don't care about what I care about. That's fine! :) Different people are going to value different things.
Calling ?1.8 when somebody wants to operate on 1.8 is still disrespectful and provocative.
?1.8
Too old! (Click the link to get the exact time)
?1.8
Too old! (Click the link to get the exact time)
?1.8
Too old! (Click the link to get the exact time)
โค๏ธ it works

Oh god, spigot is degenerating too much these days...
Virtues cannot be faked, :).
Perhaps it always was degenerated
Stupidity always shows in the end.
mans too philosophical
im gonna steal this
you really love the clown
?paste

@lost matrix
Here is the Stacktrace:
https://paste.md-5.net/apigosayoy.md
Just use CopyOnWriteArrayList \s
Well there is very little reason to build a new project on 1.8 spigot in 2023
If you are looking for performance then there are better (multithreaded) platforms.
There is only one valid type of server for 1.8 spigot: One that uses many vanilla, survival features.
Or if you are not super serious about your server then 1.8 is also fine.
Is \s something like kappa?
Yeah
ok ^^
I mean, COW ArrayList works, but probably not ideal
XD yes
I mean... lobby servers can be lightweight if you just want to slap existing plugins and not bother about switching to third-party server software
But I don't know the code so ยฏ_(ใ)_/ยฏ
and you don't care about new stuff
Reeeeeeeeeeeeeeee Minestom
Those always fail in the end
Yeah
I would support such an effort - sure but I don't think that will work in the long run
Especially since Minestom has no longer any Mixin support
Which line is StatsScoreboard.java:72
I really liked their Classloading system - as broken as it was
the for loop
in refreshAllScoreboards
for(MapPlayer pl : map.getPlayers())
Alright then
for(MapPlayer pl : map.getPlayers()){
->
for(MapPlayer pl : List.copyOf(map.getPlayers())) {
Will fix it without me rambling about this code structure and how you could design it more robust...
ok, xD
It's spelt "custom" for reference
my bad
my code
mojang code*
*e
error: Does not compute.
smh, not perfectly looping
I probably can develop a Good, Cheap and Fast product.
Just give me a few years for that
me doing 5$ commissions because I ordered dessert with my pizza
lul
I think my quickest 5$ commission was done in 12 minutes
damn, an hourly wage of 60$. That is good
Anyone know how to turn on log levels above INFO in Spigot?
how can I hide someone from displaying in Players TABList?
that's not an hourly wage of 60$
Well still below industry standard, but still decent
it's more the opposite

I cannot do maths, okay
You just need a big fat core lib which handles UIs, holograms, NPCs, persistent block data etc. for you and you can
write some pretty cool stuff in a short time
oh I have one of those
I just can't bother importing stuff
and writing code nowadays
I did 5 * (60 / 5) = 60. Not sure where the 12 went
my UI lib is like writing stuff in MS-paint
60/5 = 12
5 * 12 = 60
yeah it sums up to 25/hr
my damn pizza has been sitting for like 15 minutes wtf is this
The pizza is awake
idk why I'm ordering pizza again, they ran out of nice dough yesterday and the replacement italian dough gave me food poisoning last night
not good
imma do it again
i love when people use my software in a completely unsupported environment and tell me it isn't working and that i need to fix it asap
Ah, could be me
Im so tempted to try tackling an rpg server again after mojang announced those...
Alternatively be like sponge and say that everything is working as intended
whos the first plugin to remove the netherite upgrade one
Me
Honestly, 1.18 is the last decent minecraft version
we should make a plugin that it literally only lets you use old features of the game
After that it is just a downwards spiral
like OldCombatMechanics but it applies everywhere
the new blocks are disabled
just because
Viaversion be like:
forcefully remove them from the game
viaversion is a packet translator
I mean like
1.19 performance but with 1.5 features
Lol
Uh oh. We gonna divide again, arent we?
1.8 | 1.12 | 1.16.5 | 1.18 | latest
How was 1.16.5 a divide lol
There is little need for 1.16.5 imo
any clues what Player#hidePlayer or Player#showPlayer does?
It does nothing to me..
1.18 has all but replaced it
the only hard part is doing the quests in such a way that you could change it or add more. That would probably be the most complex part. Only feasible way I could really see it be done is by having a custom server version where you can add a scripting engine to aide with this.
Only 2 divides I know of are 1.8 | the decent humans
Is its for hiding players to a specific player
1.12 is considered "decent" to you???
only TabLisT?
there's some that stick to 1.12.2 because of performance
Yes quests are really hard to do right and modular. But i would go with the OSRS route and focus more
on grinding and numbers going up than questlines that go too deep.
ah ok
quest systems are very peculiar
It's like you have active stuff and passive stuff
active stuff be like
kill 25 enemies in the span of 3 seconds
where you gotta track multiple stuff
like how many enemies, in how much time
I guess active is not the right term but whatev
well with scoreboards you can easily have quests being tracked displayed
there's also just those that are like
"click 5 times"
I guess what would be ideal is more of an Objective system
with an ObjectiveType enum where each value has a trigger type deal
and then like... some criteria for time or place
I'd call it Restriction maybe
pdc
woah opengl is so cool ngl
i need a gif that i can send for pdc
needs to have a dude beatboxing in it
that just smacks a postit on someone
once all filters pass, you can add progress towards the objective or something
This was a system i wrote for a server last year. I whish i would have mad it scriptable but it was more than enough for their needs.
I know the right guy
smackig postit
its sounds so difficult but its only an api, the difficult part is the math equations
nice
woah this is hardcoded
click 6300 times in 5 minutes
Sure but there was also a quest generator which could use the builder to dynamically generat daylies.
And the strings are hardcoded because translation was not by job ^^
you just demonstrated an example why java is so much hated
๐
too much boilerplate, but its so readable
i prefer writing more than not understand it at all
thats kotlin without a Doubt 
my teacher cant read java so i have to describe my work to him
oh god not java vs kotlin again
java is fun until u use generics
unsafe
personally i __fastcall all my methods
When valhalla comes i will be fine with javas generics (probably)
Modified ending.
Original audio by fasterthanlime: https://www.youtube.com/watch?v=G7LJC9vJluU
Original video by Cinememer: https://www.youtube.com/watch?v=Snr113r5ocY
they overcomplicate so much and just remove em on compile
best one i've ever watched
Even tho I executed Player#hidePlayer for every player
I still can see other players in TabList
API Version: 1.8.8
CraftMagicNumbers
After that it probably is DataOutputStream
๐
that's not a problem in 1.19 
not as useful
my fav nms class is probably uhh
use protocollib and see if remove player packet is sent
entity? idk
mines EntityPlayer
#if defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__))
- Makefiles made me hate C a bit. For embedded its nice.
or ServerPlayer whatever it is now
they are absolute dogshit compared to maven or let alone gradle
how do i actualy rotate a block not just its position
my favourite class is Monster
Thats why i switched from c++ to Rust for my low level/high performance projects. Cargo is a gift.
BlockData iirc. Check if its an instance of Orientable
sometimes i miss gradle... but alas... i will never look back!
Block#setDirection
ig
Sadly maven cannot do everything
Or well maven can do everything but the IDEs refuse to accept that
can it fix my broken marriage?
I need some help to design my command framwork tab completation. I was planning something like this, but im not really sure how to code it tho:
List<Command> commands = getCommands().stream().filter(sender::hasPermission).toList();
Completer completer = new Completer();
completer.register(0, commands.stream().map(Command::getName()).toList());
completer.complete(args);
you are asking a bit more than "everything".
this seems like it could be less streamy
Streamy? ๐ค
or done within one stream at least idk
are vertex calculations being done on the cpu or the gpu
fuck around and find out
ik fragment shaders fills the polygons with color
Could be something like this
public void orientBlock(Block orientableBlock, Axis axis) {
BlockData orientableData = orientableBlock.getBlockData();
if(!(orientableData instanceof Orientable orientable)) {
throw new IllegalArgumentException("Only apply this method on orientables");
}
orientable.setAxis(axis);
orientableBlock.setBlockData(orientable);
}
But its been a while. Could be Directional as well.
depends on what exact vertex calcs
Hey, does anyone know a way to check if a player is touching a certain block sideways?
Bit hard to do efficiently
What do you mean by certain block? A Unique block or a type of block?
vector.getKey().rotateAroundZ(90) seems to exist but idk where from
type of block
and if it should work or not
Do you know csgo surf? i want to make that a gamemode but with honeyblocks

