#help-development
1 messages ยท Page 670 of 1
AHHH
very nifty; Thanks :D
"Inventory[0]" was just a string, I wanted to show why I had the second regex
are you referring to the SetEntityDataPacket?
Ye
don't i already have that?
sorry lol, how would i do that?
Is there any grindstone use event?
declaration: package: org.bukkit.event.inventory, class: PrepareGrindstoneEvent
Thanks
MYSQL inquiry:
So I'm using mysql in my plugin and I wish to be able to:
set a value if it doesnt exist
update the value if it exists
the value is locarted in Players.PlayerData.uuid & Playerdata.language
Thanks
yeah we're not chatgpt
INSERT INTO table VALUES() ON CONFLICT UPDATE VALUE ? WHERE uuid = ?
it's just a basic query
omg Stop!
looks like postgres to me
i couldnt be arsed to type it fully
omg so you dare answer his question and not complete it !!! ! !!
Ursus
UrSus
minecraft should add ursuses
well they already got ice ursuses but no other type of ursus
u mean the beer
Baby ice ursus
ursus is such a funny word
what app does that
that is ultimite only iirc
the class diagrams
Ultimate only
while (resultset.next()) {
return resultset.getString("language");
}
'while' statement does not loop
Yeah it doesn't loop
is your result set empty?
o crap
public CompletableFuture<String> getLang(UUID uuid, String lang) {
CompletableFuture.supplyAsync(() -> {
String language = null;
try (Connection connection = plugin.connectionPool.getConnection();
PreparedStatement statement = connection.prepareStatement("SELECT language FROM Players.PlayerData WHERE uuid = '?'")
) {
statement.setString(1, uuid.toString());
ResultSet resultset = statement.executeQuery();
while (resultset.next()) {
language = resultset.getString("language");
}
return language;
} catch (SQLException e) {
throw new RuntimeException(e);
}
});
return null;
}```
How's this?
IntelliJ
they're great
how do I return language? because its atomic
what

3am coding
you return the CompletableFuture created by supplyAsync
ohh
return CompletableFuture.supplyAsync(); then wait for the task to finish and then do stuff with it
no clue why you're supplying if there's nothing to return
also this won't work
oh thanks lo
setOrUpdateLang could return a Future<Void>
.
Hey guys! How can I turn BaseComponent[] to a BaseComponent?
...
BaseComponent[1]
Thanks!
wait [0]
i'm pretty sure there's a better solution
or.. just append them all
// Why not return the future?
public void doSth1() {
CompletableFuture.supplyAsync(() -> {
doSth();
return null;
});
}
// Now the caller can check whether it's done
public CompletableFuture<Void> doSth2() {
return CompletableFuture.supplyAsync(() -> {
doSth();
return null;
});
}
not sure if md has such a method already
that makes no sense
that's like asking "how can I turn mfnalex into a char" and then you just use 'm'
Lulz
Legend says that the first thing that comes to mind is often the worst possible solution
you can't without losing length-1 components
unless the array only has one element ofc
public CompletableFuture<Void> setOrUpdateLang(UUID uuid, String lang) {
return CompletableFuture.supplyAsync(() -> {
try (Connection connection = plugin.connectionPool.getConnection();
PreparedStatement statement = connection.prepareStatement("INSERT INTO Players.PlayerData (uuid, language) VALUES (?, ?) ON DUPLICATE KEY UPDATE language = VALUES(language);")
) {
statement.setString(1, uuid.toString());
statement.setString(1, lang);
statement.executeQuery();
} catch (SQLException e) {
throw new RuntimeException(e);
}
return null;
});
}```
How is this Illusion?
Yeah, did this
still stupid
why would you need this though
your methods should do one task only
It's as if you didn't read your own code
An API that I use returns BaseComponent[], that's why
maybe it's for a reason?

imagine Player#setDisplayName() would only accept a char instead of a string
why do you need a BaseComponent instead of a BaseComponent[] ?
but you got timeout
I just read "California" instead of "Caniformia" XD
please give him mute
Hammer call
this event is made for y costum item but it works with whatever item i right click
import org.bukkit.ChatColor;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.block.Action;
import org.bukkit.event.player.PlayerInteractEvent;
import org.bukkit.inventory.ItemStack;
import org.bukkit.potion.PotionEffect;
import org.bukkit.potion.PotionEffectType;
import org.sveaty.items.coustumitems.ItemManager;
public class onRightClick implements Listener {
@EventHandler
public void OnRightClick(PlayerInteractEvent e) {
if (e.getAction() == Action.RIGHT_CLICK_AIR) {
if (e.getItem() != null) {
e.getItem().isSimilar(ItemManager.PotionWand);
Player p = e.getPlayer();
p.sendMessage(ChatColor.GOLD + "Potion Activated!");
p.addPotionEffect(new PotionEffect(PotionEffectType.REGENERATION, 50, 50));
}
}
}
}
๐
return null ๐
I think you forgot an if
should I use runAsync?
why are you doing this uselss isSimilar() check without using it's return value?
supplyAsync
depends what you want to do
huh
Don't.
App.getInstance 
then just use runasync
okay good
???????
im not getting an output
show code
chatgpt takes over the world
also chatgpt: .
public void setOrUpdateLang(UUID uuid, String lang) {
CompletableFuture.runAsync(() -> {
try (Connection connection = plugin.connectionPool.getConnection();
PreparedStatement statement = connection.prepareStatement("INSERT INTO Players.PlayerData (uuid, language) VALUES (?, ?) ON DUPLICATE KEY UPDATE language = VALUES(language);")
) {
statement.setString(1, uuid.toString());
statement.setString(1, lang);
statement.executeQuery();
} catch (SQLException e) {
throw new RuntimeException(e);
}
});
}
public CompletableFuture<String> getLang(UUID uuid) {
return CompletableFuture.supplyAsync(() -> {
String language = null;
try (Connection connection = plugin.connectionPool.getConnection();
PreparedStatement statement = connection.prepareStatement("SELECT language FROM Players.PlayerData WHERE uuid = ?")
) {
statement.setString(1, uuid.toString());
ResultSet resultset = statement.executeQuery();
while (resultset.next()) {
language = resultset.getString("language");
}
return language;
} catch (SQLException e) {
throw new RuntimeException(e);
}
});
}```
omg what did i see
rn
wallah
public static List<Category> getAllowedCategories(Player player){
List<Category> list = new ArrayList<>();
for (Category category : getAllCategory()) {
if (player.hasPermission(category.getPermission())) {
list.add(category);
}
}
return list;
}
Hello, i get my permissions from diffrent custom yaml files, but hasPermission() always return true, even if player hasn't the permission, could you help me pls ?
but this is probably the issue
and if a player should only have 1 language
so you dont need a while
goofy ahh code
debug category.getPermission
omg
thats it
it returns null if it gets past try catch
read his code
what?
if (rs.next()) return rs.getString("language");
help my iq is null
its 0
does anyone know what this "info" thing is for in spiget's author details?
I have seen this code at least once before
lmfao
isRussanIp ๐
imagine using a HttpUrlConnection without try/resources
That piece of code has so many design flaws ๐
impressive considering it's only a few lines of code
naplul bym ci na twarz
Not even the async one ๐
Sir, this is beyond repair
what's preventing you from doing that
Woops wrong channel
ok, i'll try, thx
I'm guessing it's when you changed ur pfp?
hmmm that value would be april 2021 but I changed my profile pic much later
complete guess based on the context ยฏ_(ใ)_/ยฏ
what's the purpose? everyone in russia uses a VPN anyway
what value does my profile have mr mfnalex
Why does Android not allow to open arbitrary files arbitrarily???
let's check
Phones are such a piece of shit smh
1542192969 which is Wednesday, 14. November 2018 10:56:09
You need an anticheat, not a russian people blocker
- it's illegal to use non-russian services or something anyways (at least soon)
for all I know that could be when I first uploaded a pfp
the plot thickens
it's relatively close to my account creation date and I have never changed my pfp on spigot
Multiple ACs?
hmm definitely not true for me, I definitely had a pfp back since 2018. Imma guess I'll ask on spiget's discord if they have any
but use verus and cannot bypass ๐
Ursus = best anti cheat
ursus > verus
I'd just use manual moderation and firewall IP range blocks
Imo blocking a certain group of IPs is just assholeism. Losing legit players and getting people to play with vpns
You can't really control that lol
??
Meh, you only need to attack the providers
People are gonna be using darkweb vpns, calling vpns other names to make those allowed, etc.
Also, as long as there are big companies doing vpns, why shouldn't it be a thing. Tax is coming, money is good, why make it worse for everybody
Open VPNs/Proxies are harder to regulate though
does anyone know why mojang uses a Holder<?> for literally every single line in their code even when they never actually change the value?
https://paste.md-5.net/xulitiputu.java
My /get is not returning anything
it looks fancy
plugin.message.getLang(player.getUniqueId()).whenComplete((language, e) -> {
if (e != null) {
e.printStackTrace();
return;
}
player.sendMessage(language);
});
noted
well why do people use Optional? It looks fancy same applys to Mojang's use of holder
you always return null
"Just incase"
oh wait
if (rs.next()) return rs.getString("language");
i didnt see the return in rs.next
git
I added {
if (rs.next()) {
return rs.getString("language");
}
well it seems like rs.next() returns false
not public, sell this anticheat
add a debug System.out in the if body
to see if it actually returns true
they might not change the value, but they change other things
but that makes the holder obsolete
If anybody needed your code they would maybe
oh right, I didn't notice that holder has methods about tags and stuff
thx
also if they ever hope to allow reloading of worldgen changes without require a restart, holders are vital
because then the value will change, and having a wrapper type instead of updating any state fields in the codebase will be way better
i've seen your code, don't worry, nobody wants it
Have you registered the command?
writing bad code is in its way a drm
of course
rs.next is false then
the command works
also why isnt /set setting it
its not there but I want it to insert it
Well, if it's in plugin.yml it will always return the usage, but you still gotta register it
Not true, iโve even found my worst plugins on leaking websites
Even free ones
oof
I remember a person here complained about their plugin being reuploaded on 9minecraft
I told them to email 9minecraft asking to take it down and the person later came back saying they did take it down
can spigot not do anything about leaking websites?
If that happened to me I'd tell them to redirect downloads to my official plugin page
No, how would you expect them to?
dmca claim
spigot doesnt own the software
They do not own the plugin or any part of it and most plugins are open source
public class spigotplugin extends JavaPlugin {
public final String helpMessage1 = "test1";
public final String helpMessage2 = "test2";
public void onEnable() {
new spigotTask().runTaskTimer(this, 20L, 20L);
getCommand("help").setExecutor(this);
}
public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) {
if (sender instanceof CommandSender) {
sender.sendMessage(helpMessage1);
sender.sendMessage(helpMessage2);
}
return false;
}
}``` why i have NullPointerException on write /help
With a license in the kind of "just use it"
but registered
when write /help
make it implement CommandExecutor
send on console NullPointerException
?paste the error
You registered it to use this, which is your JavaPlugin
override doesn't do anything at runtime
okey
it's just a hint to the compiler, if you are trying to override a method that doesn't exist in a superclass/interface then it won't compile
And you're missing implements CommandExecutor too
javaplugin does not need that iirc
javaplugin has that
Really? Didn't know
I changed and still error NPE
show ur error pls
I have just one question, if(sender instanceof CommandSender) why
i dont know
thats a big mystery!
AI write this
ai did a pretty bang up job then
fancy null check :^)
More like "most useless check to ever exist"
huh
has anyone ever bothered to properly handle proxiedcommandsender?
followed closely by if(cmd.getName().equals("mycommand"))
considering ive never even heard of it.. probably not
this is the first time I ever saw it
A what?
exactly
so please!
FurnaceAndDispenser
enlighten us!
I remember that one
it's when u do stuff like /execute as
ah
Wait, you can actually handle that?
ooh that makes sense
I always thought it'd just use the "as" thing as actual sender
Haha mfs, y'all not sudoing me anymore haha
Lmao true
stonks down
We need usermod -GmbH
i only own a GbR
the thing is, imagine having a command like
@Override
public boolean onCommand(...) {
if (sender instanceof Player) {
// Do stuff
}
else {
sender.sendMessage("You need to be a player");
}
return true;
}
This will fail if you do /execute as @p run <command>
interesting
OHH WHAT?
thank god I let ACF handle my "is this a player" checks
yeah but IIRC aikar hasn't been doing anything in years
CommandSender root = sender;
while (root instanceof ProxiedCommandSender pcs) {
root = pcs.getCallee();
}
if (root instanceof Player) {
// And now you should still use sender.sendMessage("") and not root.sendMessage(""), because a proxied command sender propagates output to the caller, not the callee
}
while? how many execute as do people use lol
if you want to make it work in all cases
/execute as mfnalex execute as mfnalex execute as mfnalex say is this me???
I mean AGs tend to be large
Not the AGs you have at school though - those are tiny
Lol
though, you can't run plugin commands via execute run, can you? or at least last i checked you couldn't, but that was before the commands re-re-mangling
I had to do the mandatory critique of the German education system
dunno, haven't checked
but you can do it through the Spigot API
in any case it's so niche noone cares, just a funny edge case to think about
@EventHandler
public void onjoin(PlayerJoinEvent event) {
while (player.isOnline()) {
player.sendMessage("Welcome on pineapplemc.com!");
}
}
why server crashes when player joins?
Hmm
yea
remove the while loop and instead delay it by 1 tick
but I want to send it everytime when player is online
yeah?
that will
yes
untill the server goes boomboom
why boomboom
cause it's a while loop
no
if(onlinePlayer.getUniqueId().equals(joinedPlayer.getUniqueId() {
return
}
well that will send everyone a message. idk if that is what they wanted
joinedPlayer.getServer, thats a thing?
I want to send it all the time when player is online, should I put while inside the loop?
@EventHandler
public void onJoin(PlayerJoinEvent event) {
Player joinedPlayer = event.getPlayer();
String welcomeMessage = "Welcome to pineapplemc.com!";
for (Player onlinePlayer : joinedPlayer.getServer().getOnlinePlayers()) {
while (onlinePlayer.isOnline()) {
onlinePlayer.sendMessage(welcomeMessage);
}
}
}
you want to flood their chat?
u want to continuously send the same message while the player is online?
yes
declaration: package: org.bukkit.entity, interface: Entity
pretty useless
help, I'm making my api to work with mysql, but writing a method to create a table came across problems. How to accept absolutely any data, I donโt know what they are specifically
send it once a second
i c
huh
๐๐๐๐๐
I want to spam it
cause it's 0ms
you have to do it in separate thread, while loop will suspend main thread
that will also crash
i mean data for create (int, String, char e t c
what are threads?
he has to be trolling
new Thread()?
????
you cant, it will crash
Stupid question, but how can I copy an instance of a chunk and change blocks in it without changing the original chunk?
why
while is sick. Who's using it?
too much for the server
i gave you explanation, while loop doesn't allow code to proccess further, hence blocking thread
if u still want to use while u can run it asynchronously and use Thread.sleep(1000)
or w/e
I dont want to sleep thread, I want to use it
@EventHandler
public void onJoin(PlayerJoinEvent e) {
for (int i = 0; i < 10; i++) {
Bukkit.getServer().getScheduler().runTaskTimerAsynchronously(this, () -> {
while (true) {
e.getPlayer().sendMessage(":DD");
}
}, 1L, 10L);
}
}
here u go
spam
and not 1000 seconds but 1
๐
no
What is wrong with the
player#sendMessage()
spam
how can i get stuff from thew config as a static
Why you are using loops
I want that when creating a table it was not necessary to write a query, but only write what variables and how they will be called in the table. But the class itself does not know what kind of data it can accept and in what quantities, because there are many types of tables
to spam
i literally have no idea what problem you're facing
show ur code
but why would u wanna flood someones chat
Why you want to spam messages ๐ญ
because its lobby plugin
Just send a title
?
thats not an explaination
I want it on chat
Look, there are all sorts of apis that make it easier to work with queries to the database, right?
If youre gonna make sure they'll see it
typical lobby plugin's dont do that
uh-huh
I want to make unique one
alright that will indeed make it unique
Thats not unique
more like an annoying one
so will you help me or no
and therefore there is a simplified version of creating a table
Agreed
but we did..
It needs to be uniqueโฆ and good
ok so what is the problem then
sure i guess what do you need help with
where you DO NOT WRITE a query to create a table, but only the necessary data types and their names for the table
no I want to spam it
you are probably talking about jpa and hibernate
at least 40 messages per second
[20:17:53 WARN]: Unexpected exception while parsing console command "help"
org.bukkit.command.CommandException: Unhandled exception executing command 'help' in plugin spigotplugin v1.0-SNAPSHOT
at org.bukkit.command.PluginCommand.execute(PluginCommand.java:47) ~[paper-api-1.20.1-R0.1-SNAPSHOT.jar:?]
at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:155) ~[paper-api-1.20.1-R0.1-SNAPSHOT.jar:?]
at org.bukkit.craftbukkit.v1_20_R1.CraftServer.dispatchCommand(CraftServer.java:1003) ~[paper-1.20.1.jar:git-Paper-47]
at org.bukkit.craftbukkit.v1_20_R1.CraftServer.dispatchServerCommand(CraftServer.java:966) ~[paper-1.20.1.jar:git-Paper-47]
at net.minecraft.server.dedicated.DedicatedServer.handleConsoleInputs(DedicatedServer.java:501) ~[paper-1.20.1.jar:git-Paper-47]
at net.minecraft.server.dedicated.DedicatedServer.tickChildren(DedicatedServer.java:448) ~[paper-1.20.1.jar:git-Paper-47]
at net.minecraft.server.MinecraftServer.tickServer(MinecraftServer.java:1394) ~[paper-1.20.1.jar:git-Paper-47]
at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1171) ~[paper-1.20.1.jar:git-Paper-47]
at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:318) ~[paper-1.20.1.jar:git-Paper-47]
at java.lang.Thread.run(Thread.java:833) ~[?:?]
Caused by: java.lang.NullPointerException: Cannot invoke "String.length()" because "input" is null
yea thats what i send you
WHYY
that sounds like nosql to me
You spamming think there some rules ya breaking...
but i have no idea what ur trying to do
yes but i want create my api
i literally don't understand
package polska.polska.spigotplugin;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import org.bukkit.plugin.java.JavaPlugin;
public class spigotPlugin extends JavaPlugin {
public String helpMessage1 = "test1";
public String helpMessage2 = "test2";
@Override
public void onEnable() {
new spigotTask(this).runTaskTimer(this, 20L, 20L);
getCommand("help").setExecutor(this);
}
@Override
public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) {
if (sender instanceof CommandSender) {
sender.sendMessage(helpMessage1);
sender.sendMessage(helpMessage2);
}
return false;
}
}
why would u reinvent the wheel
You cant read it??
does anyone now know how to get a static from the config cause
static List<String> allowPets = getConfig().getStringList("allowPets"); doesnt work "Non-static method 'getConfig()' cannot be referenced from a static context"
and what is question ? that is all but easy task
this will spam with about 100 messages per tick
so 100 X 20 messages a second
nullpointer
noo I really want chat :<
how to accept an UNNUMBERAL UNKNOWN number of data types in a class method
what is tick?
Last line ...
1/20 of a second
the time period minecraft servers work with
why is it 1/20 of second
Wrong reply sorry
why cant it be 1/100?
....
dont bother
Message me at dm i can help you.
Because it can't deal with it
have u tried to see if it works?
?tas
how to accept an UNCOUNTABLE UNKNOWN number of data types in a class method
Hey, is there a way to upload / update a ressource on the spigotmc website via a API? For example on every github release, it automatically updates and uploads a ressource on spigotmc?
why???
Varargs? So Object ... X
you're probably talking about NoSQL
to boost performance
but you still need to know the types like
i doubt anyone will understand what you really mean by that
Rewrite the whole server bubye
You want to spam 40 message at 1 seconds and your worried about performance?
pretty sure there actually is a plugin that will allow u to change tickspeed to whatever u want
but still. whyyy
๐คฏ
that sounds like a fucking nightmare
if you want to have void foo(q,w,e,r,t,y,u,...), yeah, those are called varargs as geol said
yes
let's simplify the question of how to accept as input unknown values โโโโfor you in an unknown amount
can I boost ticks to around 50?
no
Why yes?
that makes no sense man
give an example
because the entire server is built to run at 20 ticks per second
what are you trying to store
Hey, is there a way to upload / update a ressource on the spigotmc website via a API? For example on every github release, it automatically updates and uploads a ressource on spigotmc? ^^
so can I rebuild it?
how to do it
you are crazy man
fork paper and have fun
Yes, but no.
๐
This pleb prob never even played the game once or ever touched redstone
what does it do
why no
?tas
The home of Spigot a high performance, no lag customized CraftBukkit Minecraft server API, and BungeeCord, the cloud server proxy.
here u can fork spigot!
Takes 100+ hours
and?
there is a method for creating a table in mysql api, but as an api, I canโt know exactly what data will come to the input, what variables and in what quantities
(Upload) / Update a ressource via a API?
mysql is relational
๐ฅ๐ฅ
Any good mysql lib?
how spring do this?
So I want to shoot an arrow with lead attached to it. Did some research and decided to go with an invisible living entity that is the arrow's passenger and has the lead attached to it. What living entity would be the best to use for this?
so why not wait until you can test it, and test it?
egg
since when does an egg live
egg is inherits LivingEntity??
^
What are these named
egg is not a living entity
silverfish
Was gonna say it's a throwavle
but spring data do this how?
Try asking in a client modding place?
huh
huh2
TabCompleteEvent
When it will trigger?
Can s1 help me which really wants to help :_:
#1139989196388446218
no
oh bro demm right
mellstroy
2 941 732,91 RUB
oh demm
give me money i need this)
where did he get the bitcoins lol
Why should he give you?
Why not giving it to me
Does anyone know why this would happen?
Caused by: java.lang.NoSuchMethodError: 'boolean org.bukkit.entity.Arrow.addPassenger(org.bukkit.entity.Entity)
Code:
@EventHandler
fun onPlayerToggleSneak(event: PlayerToggleSneakEvent) {
if (!event.isSneaking) return
val player = event.player
val location = player.location
val world = location.world ?: return
val entity: LivingEntity = world.spawn(location, Silverfish::class.java)
val arrow: Arrow = player.launchProjectile(Arrow::class.java)
// entity.isInvisible = true
entity.setLeashHolder(player)
arrow.addPassenger(entity)
event.player.sendMessage("sneak")
}
I get a similar exception with entity.setInvisible(true).
You're coding for 1.9+ and running your server on 1.8
Oh wait
P sure that multiple passengers is either 1.10 or 1.12
Too old! (Click the link to get the exact time)
Not that much old my life is older than minecraft 1.8 (but i know people, younger than minecraft 1.8)
pov: you're 9
Nah im 17
brain developing around spigot plugin development
literally me
Wait is it even possible to make an entity invisble with the 1.8 api?
9 yers dev spigot๐ฅถ
โจ packets โจ
it is possible
Its developing at that age, probably pretty good for stimulating or some other shit
nms? ๐
doubt spending ur childhood making spiot plugins is a good idea
I started developing like 7/8
i was coding the second i was born bro
I'm bored give some realties for development in bukkit api
literally didnt even breathe i did psvm first
cap
you're still asking for help with beginner issues
do a 10k piece puzzle
You cam out, hold me my coffee i need this startup to run
i start wthen i was 1 yers
AI generated message
no we just can't get it
it makes sense we just wont get it
With java, because i started 2 years ago and sometimes my memory goes blank
yes
what..?
if ur bored get a 3 meter wide puzzle and do it
when you're bored
this bored too
oh my god
oh demm yuo right
it's the one and only
do stack buf potion
mfw:
Best gif
It describe my daily routine
well yh but i need it to be static so how do i do that xd
no you don't
sounds like static abuse to me
nothing needs to be static
yeah well except the main method (altho i believe that is gonna be changed if it didnt alr happen with some JEP) (:
Fuck OOP ๐
Haskell plugins when?
haskell <3
I had to write compilers using Haskell. Never again
If team.addPlayer is depricated then how to add player to the team?
Team#addEntry(...)
oh ok thx
?jd-s
Yeah i know but i wasn't sure how to add entity using addEntry because it receives only String, but because I don't want to sound stupid for this question, I'll just keep trying to figure it out myself
uuid
oh
or player name
thx
If you have a question, please just ask it. Don't look for staff or topic experts. Don't ask to ask or ask if people are awake or available. Just ask the question to the channel straight out, and wait patiently for a reply. Make sure you use the right channel regarding the topic of your question. Create a thread in case the channel is already in use!
bro legit asked something just to pick a fight lol
lombok is virus
no it isnt?
u wouldnt get it
yes it is
it isnt
it is virus
proof?
lombok = virus
send the link
what the fuck
google it yourself
no
bro dont bother
its virus
they're trolling
try {
field.setAccessible(true);
defaultValue = field.get(event);
} catch (IllegalAccessException e) {
// not sure if this can be reached due to setAccessible(true);
e.printStackTrace();
return null;
}
``` Can the catch ever happen?
SecurityException i think its called
setAccessible throws SecurityException if the request is denied
When would that be denied?
When someone doesn't want you to modify a value
Or better just use trySetAccessible
I think a stacktrace would be helpful in that case so I'll stick with a try-catch. Shouldn't happen anyway
its not really that simple
note that SecurityManager is deprecated for removal
It never is
just write skript u dont need to know this java bullshit accessible reflection generics abstraction u dont need that shit
kek
I'm pretty sure what I'm currently developing is not even possible with script.
Can scripts even have an api for other scripts?
yes for sure
Well. Still it's a very abstract implementation. I don't know script but I doubt it would work
Hi , if i use getInventory().setContents , will this set the correct slot of the item?
@EventHandler
public void onJoin(PlayerJoinEvent event) {
plugin.message.getLang(event.getPlayer().getUniqueId()).whenComplete((language, e) -> {
if (e != null) {
e.printStackTrace();
return;
}
Bukkit.getConsoleSender().sendMessage("debug1");
if (language.isEmpty()) {
Bukkit.getConsoleSender().sendMessage("debug2");
plugin.message.setOrUpdateLang(event.getPlayer().getUniqueId(), "en");
}
});
}
Why is "Debug2" Never getting reached?
and yes it is mysql
Depends on what you mean by "correct slot". It sets them in order. First itemstack first slot, second is second slot etc
Did you try to print "language"?
im setting the player's skin successfuly but the outer layer does not show. how would i show the outer layer?
https://paste.md-5.net/jayefagugu.cs
sounds odd. Does "isBlank()" work? Maybe it's a space. Try to print language.length()
IsBlank is true when your string is " " while isEmpty would return true only for ""
@EventHandler
public void onJoin(PlayerJoinEvent event) {
plugin.message.getLang(event.getPlayer().getUniqueId()).whenComplete((language, e) -> {
if (e != null) {
e.printStackTrace();
return;
}
Bukkit.getConsoleSender().sendMessage("debug1");
if (language.isBlank()) {
Bukkit.getConsoleSender().sendMessage("debug2");
plugin.message.setOrUpdateLang(event.getPlayer().getUniqueId(), "en");
}
});```
Still am not getting debug2
[21:23:00 INFO]: [com.zaxxer.hikari.HikariDataSource] Players-Connection-Pool - Start completed.
[21:23:00 INFO]: debug1
still didnt print anything
wtg
wtf
Bukkit.getConsoleSender().sendMessage(language.length() + "");
nothing after debug1
Bukkit.getConsoleSender().sendMessage("debug1"); if (language.isBlank()) { Bukkit.getConsoleSender().sendMessage("debug2"); plugin.message.setOrUpdateLang(event.getPlayer().getUniqueId(), "en"); } Bukkit.getConsoleSender().sendMessage(language.length() + "");
It should not matter but try to add it after debug1 but before the if
wait ill show you my code for the thing
public CompletableFuture<String> getLang(UUID uuid) {
return CompletableFuture.supplyAsync(() -> {
try (
Connection connection = plugin.connectionPool.getConnection();
PreparedStatement statement = connection.prepareStatement("SELECT language FROM Players.PlayerData WHERE uuid = ?")
) {
statement.setString(1, uuid.toString());
ResultSet rs = statement.executeQuery();
if (rs.next()) {
return rs.getString("language");
}
} catch (SQLException e) {
throw new RuntimeException(e);
}
return null;
});
}
}```
if there is no entry, it will return null as value
Anyone know what the new networkmanager is in new versions?
Wouldn't that end up in a nullpointer when running if(language.isEmpty()) though?
it does
net.minecraft.network.Connection
I would have expected him to see that then lol
but the CompletableFuture is storing it for the continuation
Ohh
?ban @quaint mantle flame bait + trolling
Done. That felt good.
What's a flame bait?
so either don't return null in there, or handle null inside the whenComplete function
saying stuff that will make ppl respond/argue
๐
dont know who that is or what he done
Oh, never heard of that
but that aint look good

link
no package, no build system, Called Main
XD
They clearly know something we don't :>
How do i check if a arg is a player that have played before?
wait where is even plugin.yml
doesnt have one
๐
in a command?
bro just packs shit up manually in the jar
Bukkit.getOfflinePlayer
declaration: package: org.bukkit, interface: OfflinePlayer
id recommened using Bukkit.getOfflinePlayers instead
if you use Bukkit.getofflineplayer you will query the mojang db
since there is no getOfflinePlayerIfCached on spigot yeah I agree with epic
and then loop through that?
what if server has no internet access?
Is there a rate limit to that?
oh wrong message
so smart
XD
quite hard to run a server then id say
doesnt matter, but some may so better to still query getOfflinePlayers
well a localhost server doesn't require internet
yeah
if server doesnt have internet access no one can join it
does offline mode still query mojang?
LAN
ofc people can join it
just thru local network
no, it queries world
server doesnt need internet to run
if you run offline mode
thats why its called offline mode
๐
im just wondering what getOfflinePlayer does in such scenario
didnt getOfflinePlayer query world?
no shot
i bet @quaint mantle is that person
lmfao
@ivory sleet
@austere cove
what the fuck is wrong with people
๐
they continue to send gifs
famous last words
with no embed perms
I was trying to route freshmeat accounts but seems like that feature is gone from cafebabbe
what did it do
?cleanup
Syntax: ?cleanup
โ
after Delete all messages after a specified message.
before Deletes X messages before the specified message.
between Delete the messages between Message One and Message Two...
bot Clean up command messages and messages from the bot in the...
duplicates Deletes duplicate messages in the channel from the l...
messages Delete the last X messages in the current channel.
self Clean up messages owned by the bot in the current channel.
text Delete the last X messages matching the specified text in...
user Delete the last X messages from a specified user in the cu...
we shouldnt have challenged his programming skills
Can we have a message cooldown of like 3-5 seconds for unverified people?
honestly idk how to use the cleanup command I will just manually delete
conclure cant you just ban them and it purges their cache
I banned them
uh oh
Its
but idk, I bet this wont be the last time we deal with them
Adele can u help me delete these messages :>
oh did u alr do it?, or someone did at least
cleanup user (userid) after (messageid)
ah ty
๐ famous last words
yes
why do you even add him
well they have equivalent perms
it seems like you want to talk with him
because i can get him banned on other mutual server
with what he sent me
Wtf is going on lol
trolls
some guy is harassing kacper
Block
dude got banned, came back and told me to kill myself
also md5, maybe we can get the logs channel back working :,)
i suspect why
hello @sullen marlin
well they infiltrated this discord I should say
always fun
yea never gets old :>
uhm guys
what happened leading up to this?

guy flame baits by asking a lombok question, I slap them with the hammer and then alt spamming the server in short
fairly certain he's been doing dumb stuff long before the lombok stuff
he says lombok is bad as he proceeds to then use it
ye def
oh nice
?ban @lost turtle
User with ID 964117617487003698 is already banned.
wasn't he verified? can we ban him on forums too
interestingly enough these accounts they use are verified
yea right
death wishes for criticizing code ๐ฆ
just drop it now, the more you discuss it the more reaction you give and the more they will want to continue
yeah i guess so
time for bedge then ig
@timid hedge did u solve it?
Gn
No not yet
gngn <3
gnight :]
I have this, im trying to remove money from the player
} else if (args[0].equalsIgnoreCase("remove")) {
System.out.println("5");
if (sender.hasPermission("money.remove")) {
System.out.println("6");
OfflinePlayer[] target = Bukkit.getOfflinePlayers();
if (target != null) {
Balance.get().removeBalance(target, Double.parseDouble(args[2]));
return true;
ah okay, Id say you could use Server#getOfflinePlayer(name) but u do that on another thread
maybe even use BukkitScheduler#runTaskAsync since that will append it to the cached thread pool of the scheduler
make removeBalance take something other than an offline player
I believe they use Vault API, which uses OfflinePlayer stupidly enough
actually I suppose that doesnt solve getting the name
yea
args[0] and args[2] what's args[1]
I dont know what i did wrong, but right before it worked with using @Getter but it isnt anymore it just cant resolve lombok, how do i add that or what its called?
Balance.get().removeBalance(target, Double.parseDouble(args[2]));
I mean if I were u Id yeet lombok, but thats just me
Show that method code pls
Have you a other method to do this without lombok?
public boolean removeBalance(OfflinePlayer[] p, double amount) {
if(economy.hasAccount(p)){
if (economy.getBalance(p) >= amount) {
economy.withdrawPlayer(p, amount);
return true;
}
}
return false;
}
```Its used at economy.hasAccount, getBalance and withdrawPlayer
why is it an array
But i just dont know how do it on other methods
public EconomyResponse withdrawPlayer(OfflinePlayer player, double amount); from Vault API
and the author has disappeared into the wild
plyr2.connection.send(new ClientboundSetEntityDataPacket(plyr.getId(), List.of(new SynchedEntityData.DataItem<>(new EntityDataAccessor<>(17, EntityDataSerializers.BYTE), (byte) 0x40).value())));
trying to show the outer layer of a player's skin. not sure what's wrong and why it's not updating the hat?
Sorry if this is a dumb question but it does the same right?
please learn java
why are you using magic numbers?
huh
new ClientboundSetEntityDataPacket(serverPlayer.getId(), serverPlayer.getEntityData().getNonDefaultValues());```
i tried that but it wouldn't update
is your player an actual player or a fake one?
real
should work fine then
not sure, this is my code https://paste.md-5.net/jayefagugu.cs
How to display something in player's action bar?
Player#spigot()#sendMessage
except replace packet with the other one you said
It's chat not action bar
ChatMessageType.ACTION_BAR
oh really?
thank you very much
if (player.getInventory().getItem(8) == null) {
ItemStack lobbySelector = plugin.customItemAPI.createCustomItem(new ItemStack(Material.NETHER_STAR), "lobbySelector");
lobbySelector.addUnsafeEnchantment(Enchantment.DURABILITY, 1);
ItemMeta lobbySelectorItemMeta = lobbySelector.getItemMeta();
lobbySelectorItemMeta.addItemFlags(ItemFlag.HIDE_ENCHANTS);
plugin.message.getMessage(player.getUniqueId(), "lobbySelectorName").whenComplete((language, e) -> lobbySelectorItemMeta.setDisplayName(language));
plugin.message.getMessage(player.getUniqueId(), "lobbySelectorLore").whenComplete((language, e) -> lobbySelectorItemMeta.setLore(Collections.singletonList(language)));
lobbySelector.setItemMeta(lobbySelectorItemMeta);
player.getInventory().setItem(8, lobbySelector);
}
no clue, multi layer skins work fine for me. Even for fake players
what are you even trying to do
yo
OMG
ban
@ivory sleet @ancient plank @sullen marlin
@tender forge @austere cove
WTF
@ivory sleet wakie help help
@ancient plank @ivory sleet @worldly ingot pp alert
its the same person from earlier
Bru
ty Conclube
huh strange. the outer layer updates when i die but that's it
setting the lore and display name of the item
thanks
WTF
I wish I was recording that cuz I seen multiple names but the oddball names msg disappeared before anyone did anything like they removed them selves to hide
@ivory sleet come back
BRO
oh cool
as I was saying...
conclure can you get md or something
mans got all the alts
lol adele
kids found the bots
im always afk when I get pinged
Spigot discord is cancelled
that or remote bots
- use ItemBuilder pleaseee and second there are better way to do this
itembuilder?
It never stops to surprise me how dumb certain individuals of humankind can be
it helps you build itemstacks
is ait an api?
no
like that person saying I wanna spam faster then 20 fps?
its a class
you can make it in 1 class
@onyx fjord the guy came back and he posted a spigot resource with the download linking to a gay porn site
If player.sendMessage is depricated, then how to use player.spigot().sendMessage, how to get the BaseComponent?
its not deprecated
?whereami
?whenami
it's only deprecated in paper & paper forks
Paper api moment
but what about my ItemBuilder, ItemBuilderService, ItemBuilderFactory, ItemFactory, ItemBuilderService.Factory, ItemBuilderBuilder
?1.8
Too old! (Click the link to get the exact time)
no, not in paper
Oh boy and the resource is still up

