#help-development
1 messages ยท Page 634 of 1
Hey, I am using Geyser and trying to connect to my server. It is a proxy and have al the via plugins installed yet i can not join on bedrock as it says I am on an outdated client. Please someone help.
You should never have the serverPlayer field in the first place.
Never hold hard references to game objects like players, entities or worlds
oh.. I overlooked that
Why is this method static? You wont be able to properly have more than one npc like this...
i am debugging some basic functions
first of all English, secondly go to #help-server
What's the current way to send a player a message
the methods I used to do are all deprecated apparently
and not much help online
player.sendMessage()
yeah what do I actually give that lol
strings are deprecated, components are deprecated
deprecated doesn't mean unusable
if you want to use a string, then use a string
its perfectly fine
but are there any non-deprecated methods
well I am not aware of it being deprecated unless you are using paper
I am using paper yes
I'll just go ask in the paper discord
that may be wise if you want to use their API ๐
otherwise in the spigot api they are not deprecated lol
I wasn't aware they'd deprecated strings lol
They want you to use kyori adventure text formatter instead
its a mess
you dont event need components most of the time
and spigot has its own components
It's alright but using strings also should be alright
They didn't have to deprecate them for that
yeah I don't think they'll ever remove using strings
you never know
Most probably they will never do that, so use them as you wish
for example what spigot lacks
a lot of stuff to do with events
also you cant post paper plugins on spigot are you aware of that
and it's faster
not really relevant for me
Apparently, an ability to run something on shutdown witout playing russian roulette on which plugins did shut down, and which didn't meh
it wouldn't really make sense to remove the most basic thing
since strings are easiest to work with and messages are well strings really
paper in general is more optimised
arent strings also faster
It would make sense to them I believe, but I think the real reson is that they don't want to break compatimility with spigot plugins
Since their selling point is spigot, but faster
you can run spigot plugins on paper
so you can still take advantage of that
you can also run paper plugins on paper
but you cant run them on spigot
so what does that say about spigot
not necessarily, but they are just extremely easy to work with instead of some convoluted object
Api is no different, it's just a way for your plugin to communicate to server
bro I am aware of what an API is
?whereami
lmao @ you guys start asking me to justify using paper
if you wanna use paper api fine use it but ask about it on their discord
most of us here don't care if you use paper, and some of us also use paper as well, however we are also quite familiar in both as well
but, this is spigot discord
I use paper on my server, but make plugins with spigot api for compatibility
I also like the community here more
I liked paper when Aikar was running things lol
anyways, I am not currently a fan of paper
but Spigot though is basically craftbukkit at this point and its stable and a good starting point for many things
its like Debian and Ubuntu
Spigot would be Debian where it works but nothing too fancy, and Ubuntu is built on top of debian and provides you with all kinds of flashy stuff
and that would be paper
Anyone know why this code isn't working? It says the class rank does not exist when it does:
https://paste.md-5.net/tasumepebo.js
https://paste.md-5.net/dumebukawa.rb
Did you register it
In the main class?
Yea
Yes i did:
static {
ConfigurationSerialization.registerClass(PlayerData.class, "PlayerData");
ConfigurationSerialization.registerClass(EntityData.class, "EntityData");
ConfigurationSerialization.registerClass(RngDrop.class, "RngDrop");
ConfigurationSerialization.registerClass(Rank.class, "Rank");
}

did i mess something up?
Generally looks fine I think ? ๐ lemme see where that error is thrown
Where are you registering this? Top of your main class ?
Yes
can you show your building process
where would i find that
your pom.xml or build.gradle.kts
well what are you currently using?
I suspect maybe you are using maven and quite possibly a shading mishap or rellocation ?
I'd remove the annotation and try
The @SerializableAs("Rank")?
yes
wait brb i got to do something
no problems we will still be here
I mean, the annotation does nothing given they use the alias taking reg method
@abstract sorrel where do you deseriliaze it?
got to wait for them to return ๐
his error says it can't find "Rank" not it can't find "io.github.runtellobama.arcturusrpg.utils.Rank" so It's just a guess its the annotation and his static block
They are using the alias taking method and "Rank"
the FQN is registered only when just passing the type
yeah its an illegal argument exception
not a no class def exception
so you may be right ElgarL
i left their server cuz they put lgbt flag on their logo
W + based
original isnt shaded
why is Sign#getLines() and setLine() DEPRECATED
getMeta first
getMetadata?
oh sorry, sign
what
for some reason I read getLore
wtf is a side
this is dumb
two sides = two different set of lines
you can now
why tho..
I guess someone thought it was a good idea at Mojang
L mojang
in the deserialize function in the code i sent https://paste.md-5.net/tasumepebo.js
Im back
im fairly certain you cant have a constructor in plugin entrypoint class
No, you can't have one at all.
ah
Just move the stuff in your constructor to the #onEnable() method.
sigh
Say the line!
- the constructor is
public TutorialBot() {
shardManager = jda.getShardManager();
}```
2)
?learnjava!
Here are some links to get you started on learning Java:
- https://www.codecademy.com/learn/learn-java
- https://www.sololearn.com/learning/1068
- https://www.learnjavaonline.org/
- https://programmingbydoing.com/
- https://docs.oracle.com/javase/tutorial/java/index.html
The last one is the only official one, however some of those concepts assume that you already know a bit about programming. https://media.discordapp.net/attachments/694661573125472256/998143126373941248/6n0v4g.gif
I- i

Wtf
you would only keep shardManager = jda.getShardManager(); for your onEnable
not the public TutorialBot() { }
Hi, If the mob spawn cap is reached and i summon a mob with spigot will the mob not spawn?
it will spawn
I have plugin and i need to spawn a mob and it works fine in my testing server but in the server with about 100 players it wont spawn
It works fine when spawning an iron golem but not mobs like a spider
I feel like it needs to be said again.
i wonder how many times it Has been said
just remove final from the field then @timid hedge
It's been said more then enough times for this fella ๐คทโโ๏ธ
their name was veerrrryyy familiar when i saw it, lol
?paste the entirety of the class, somethings gotta be missing from what youre sending us i feel @timid hedge
and make sure that you undo any changes you made/tried since the error u sent
thats not the whole class, it has no imports or package declaration at the top
Man needs to learn about splitting stuff into classes
and following directions. 
How many ?learnjava! commands have been sent to him
hiya. quick question - is spigot's broadcastMessage thread safe?
Should be
time to try it and see i guess. shouldn't really fuck up tho.
It's just looping through players and sending a packet so
how does that manage to still not line up... your erroneous line is a blank one according to that past
She means that error doesn't match that code
Maybe your shardManager is null?.
by error im talking about https://paste.md-5.net/viyeracodo.css this
according to JDA, it is possible the ShardManager from JDA#getShardManager can be null
declaration: package: net.dv8tion.jda.api, interface: JDA
so maybe thats it
?jd-s for self
how can i do when a player enters a region between two locations a bossbar will be displayed and his progress will be the distance from the center of the region?
You can use the scheduler to run a check every few ticks
what do u think about using moveevent?
you could use that too but you dont need and want it that frequently
Its the delay in ticks
Can anybody suggest a good use for delay in timers? Like, when you startTimeTask or whatever it was, you provide your plugin, the delay and the interval in between executions. What practical use does the delay have there?
Waiting X ticks to send a message every X ticks?
i only delaied it once because i had some kind of death animation which should be run 1 second later
no
say someone dies and u want to laugh at them, 20 ticks later
u would use the delay
well, thats not a timer tho
oh u wanted to know for like repeating tasks not just in general
Thats what I am talking about ๐คฆโโ๏ธ I explained that in my intial message
ehhh im tired
but the same logic still applies, waiting X ticks before u start performing ur task
all just comes down to use-case, if u dont need it, dont worry about it :P
does any1 know how to fix this, this appears on join, idk what triggers this and where in the code this is. It also appears when i join the server and after joining i reload the plugin
https://www.tabnine.com/code/java/methods/org.springframework.util.ReflectionUtils/getDeclaredFields
but then there should be a stacktrace
Only result of google. The message exactly matches, but Spigot doesn't use Spring
yep this is what i found too :/ also i use my own reflection utils
It does look like something packet related maybe?
ye probably sadly idk where this happens
Ya, that usually happens in the protocol level. E.g. when listening to packets or something
hmm ok
You could try/catch your code and properly print it
It's a delay before the first iteration, for example I have a bomb task in my tnt tag minigame that runs every 15 seconds, with a delay of 1 tick so the first bomber is picked
ye ok was am issue with reflections thanks for the idea with the try catch <3
Well if you want to store data (e.g. blocks mined, distance travelled or whatever) every 5 minutes to not lose too much data in case of a server crash your delay and interval will probably be the same as it does not make sense to save it immediately after onEnable()
hey
how do i check if string is written in valid english? (some people on my server tries to bypass only-english with typing their language with english letters)
Google translate api kek
they probably only check for symbols
honestly outsourcing it to some 3rd party service might be the sanest solution than loading the entirety of the English dictionary + slangs (!!)
"real"? if you mean with String.contains only then no, you're gonna have a bad time with that
Yo just found about commandMap
but any solution is real
Using a 3rd party translate api is prolly the most efficient method if you don't wanna train your own translation model or load a whole ass dictionary + slang
gpt
nah
would be the best possible solution
you just gotta pay a few cents per month
response from gpt will take like 1-3 seconds.
ฤฐ tried chat gpt with chat filter
so players have to wait 1-3 seconds to chat?
But it has rate limit
regex
show me
?bing
Bing your question before asking it:
https://www.bing.com/
no please no help
ah ok. please show me
?bing
Bing your question before asking it:
https://www.bing.com/
?gpt
if you are not going to help me just stop spamming commands
The shorthand for letmegooglethatforyou looks kinda like an LGBT shorthand if you don't look closely at it
?spoon then
Spoonfeed a newbie for a day and they'll come back with more questions. Teach them to find their own answers and you'll both be better off: you won't get stuck answering the easy questions and they'll be much more productive than before.
LGBT shorthand? wdym
You'll need to train an ai
no thanks
Then you don't do that
Hello, how can I create a custom entity with a custom model ?
this can be done with a dictionary database on a single word, but like, sentences will be almost impossible without ai
๐
you could employ the same techniques that were used to crack the german ciphers in WW2
using a resource pack first off all, but besides that im not experiences
i.e. word frequency analysis
They didn't like the answer so they preferred to ignore it
idk how to assign my texture to a custom mob
yes but "detecting if a string is valid english" is a fool's errand
Unless ypu got an AI
esepcially considering things like slang, abbreviations etc
But you can estimate whether a series of string is likely to have been written in english
what if someone mispells
which i am more likely to use over "valid" english in chats anyways
By checking for common words such as (by, for, such, as, the, etc.)
bullying people with dyslexia
Me saying taco in chat with no context to kill the translator
Hence word frequency
i tried this but it fails. unclosed string literal.
Pattern pattern = Pattern.compile("[a-zA-Z0-9_\u200d\u200c\u2600-\u27ff\u0009\u0020\u000A\u000D]+");
is there any repo that uses a db for getting nms? because i cant build bt
Then use the next-best thing and use paperweight
Maven-repos hosting NMS are usually shortlived
ok thank you so much
Oops indeed
eepy
more like oopssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss
let's not char spam
ooooooooooooooookkkkkkkkkkkkkaaaaaaaaaaaaaayyyyyyyyyyyyyyyy
Anyways, could you do my homework? \s
'a'.repeat(99999);
error: char cannot be dereferenced
this regex is horrible
all you're checking for is roman characters its inherently flawed considering a lot of languages use roman characters
that's pretty much what they asked for in the end ^
oh I see I thought they wanted to tell the difference between languages for translation purposes
which is why I reccomended AI earlier
why one would want to stop someone from speaking their language is beyond me, yay for accessibility
how do i check if string is written in valid english
apparently their server is english only and people are typing their langs in roman characters
it makes sense if you can't moderate it, but that's the only case
could develop better moderation tools
how do i check if string is written in valid english? (some people on my server tries to bypass only-english with typing their language with english letters)
This was the original post I saw maybe there was stuff earlier
I think OP also fails to recognize roman alphabet is very common in Europe and the Americas
not everyone is multilingual its hard to develop a filter and such and make sure conversation is appropriate if none of your mods can understand it
I mean you can look stuff up but that only goes so far as far as language goes
which is why you, hear me out, develop better moderation tools
what would you propose to attack multilinugal filters and moderation if you can't speak the language
hiring someone for languages is out of the question for a lot of servers because of budget especially if they're smaller
Hey, I am using Geyser and trying to connect to my server. It is a proxy and I have al the via plugins installed yet I can not join on bedrock as it says I am on an outdated client. Please someone help.
is more appropiate for this question. you also might wanna ask in geyser discord
ok
I mean if you wanna go full balls to the wall there are dozens upon dozens of translation services, analysis tools, etc, but it could be as simple as, provide your moderators with a "click to translate" and query deepl and/or google
I think that works for some languages, but translators fuck up some translations to english
which is why there are other services
I mean if you think about something like Chinese or Japanese to English it gets fucky really quickly
google translate doesn't work very well for Japanese but there are specialized services
I don't really think this is a realistic solution for smaller servers. Stuff like that costs money a lot of times. Sure if you're a bigger server it makes no sense not to offer translations etc. But most people on here asking for solutions don't have that kind of money to throw around on their side project they're likely doing for fun or just as a hobby
ok
if you only want to check if its english words, then just use something like websters dictionary and compare the words
wouldn't you have to query every single word though. I feel like that would get expensive for chat speeds, unless it offers some bulk solution in API
then you compare with percentages, if the percentage of the string matches words in the dictionary, its safe to say its english
almost every one of us suggested to use a 3rd party service and they went "nah bro" shrugs
you could easily cache the dictionary
true cacheing common words would make sense I suppose
the type of cache I would use, is memory mapped file
this way its not memory allocated to the server being used
rather to the file
hmmm seems like a valid solution
I mean I'd say the most effective would be an AI or dictionary service
but either way you're working with outside services
unless you do what frostalf mentioned
yeah that is really the only way and I wouldn't be detecting for correctness in words or misspellings, just count those as not part of the dictionary
most of the string should match the dictionary words
if they do its safe to say its english ๐
if the percentage falls below like 75% or even 50% you could flag it for moderation
then you get to slangs and abbreviations and all the creativity of profanities that barely exist, language is fun
slang and abbreviations exist in webster dictionary
obviously not all slang, but a good portion
and since they want english only, this really is the only feasible way to do it
can't use google translate for this as their API costs money now
unless you want to try and get around their checks
me using jsoup to use translate.google.com :^)
the next thing I would do is check character points
just check that the string uses character points of the english alphabet
this nabs the mandarin and cyrilic characters
i asked ai to write it
Hey, if I put the version 1.19 as the api-version on my config.yml will my plugin work on servers that support multi versions?
AI is really dumb
unless its made for specific purposes
those large language models kinda suck at most things
im not sure if thats a bad thing to say
but people should stop learning asian languages like chinese or japanese
theyre extremely difficult and just sort of redundant at this point, and by learning it youre extending its life time
there are more efficient languages
Its not a bad thing to say its exactly how it is translation from Chinese to English and Japanese to English sucks. That has nothing to do with the language being bad
ah yes, lets stop learning mandarin and pretend there isn't countries that use it
Language has roots in culture and the development of its people taking away a language is like taking away part of a countries culture
no im talking about what i said
yes
eventually they will stop using i t
and if they dont, they can live isolated
English is such a shitty language if we're talking about efficency
and chinese is better?
dude
i speak fucking arabic
english is so much easier
and arabic is often considered to be as hard as chinese
but chinese is a bit more difficult
still
from my experience, english is easier than all of german, arabic, and french
what's you're native language arabic?
yes
arabic can take up to a whole life time to master
just saying
Honestly surprised to hear you say english is easier considering its so different generally it takes longer the further related your languages are
granted the internet is almost all english speakers so it makes sense that you become profficent quickly if you absorb yourself in it
i also learnt french alone
and im learning german currently
and i can gurantee english is the easiest language ive seen
its rules are so simple
sentences are easy to structure
I mean it is probably the lingua franca for a reason
but that's not to say that makes other languages bad
Here are some links to get you started on learning Java:
- https://www.codecademy.com/learn/learn-java
- https://www.sololearn.com/learning/1068
- https://www.learnjavaonline.org/
- https://programmingbydoing.com/
- https://docs.oracle.com/javase/tutorial/java/index.html
The last one is the only official one, however some of those concepts assume that you already know a bit about programming. https://media.discordapp.net/attachments/694661573125472256/998143126373941248/6n0v4g.gif
problem with arabic isn't necessarily learning it
its the fact there is a lot of different dialects
Why would we be?
prob got banned from forge or something xD
i need some help
i have this code
package me.shadow.banplugin.commands;
import org.bukkit.Bukkit;
import org.bukkit.command.Command;
import org.bukkit.command.CommandExecutor;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
public class BanCommand implements CommandExecutor {
@Override
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
Player target = Bukkit.getPlayer(args[0]);
Bukkit.getBanList(org.bukkit.BanList.Type.NAME).addBan(target.getName(), "You have been baned by: ", null, sender.getName());
target.kickPlayer("You have been banned from the server.");
sender.sendMessage(target.getName() + " has been banned.");
return true;
}
}
but how can i make tht when a player that is baned want to join to not let him and give him an error that say a custom message
?
i still cant solve it
@torpid idol Do you know how to use events?
kinda
nah
not really
I, as an algerian
can understand every dialect
pretty easily
not sure about other nations though
and how many different dialects have you heard?
ngl I thought you were russian
all of them
im trying to add a long string of hex color codes mixed with codes like &l for bold. i want to add them as the lore line for an itemstack. im using the bungee chatcolor.translatealternatecolorcodes('&', [text]) but the output i am getting is just what I am putting into the code with the #'s &'s and color codes. this is what im trying to have translated
&#c93cfb&l๊ฐ&#c53bfb&lส&#c139fb&lแด&#be38fb&lษช&#ba36fb&lแด &#b635fc&lแด&#b233fc&lแด&#ae32fc&lแด&#ab30fc&lแด&#a72ffc&lษด &#a32dfc&l- 	f2cfc&lแด	c2afc&lx♥fc&lแดⓓfc&lส⍂fd&lแดc24fd&l๊ฑ⋛fd&lษชⅉfd&lแด Ᾰfd&lแด
this isn't possible
very possible
no I know for a fact it isn't
you can't bs me with the arabic because there is villages so remote in the middle east that have their own dialects that even our translators had a hard time understanding them
no one speaks these tho
You need to use ChatColor#of() to translate the hex codes.
these arent even recognized as dialects tbf
main ones are morrocan, saudian, egyptian, syrian
most of the others are very similar to these 4
e.g algerian is similar to morrocan
so should i just do it like one by one and add chatcolor.bold + ?
but in reality
u can just speak the main dialect
which is just arabic
unlike english
arabic works differently
theres 1 main way to speak arabic
and every arabic person knows it
no matter their dialect
its called fusha

well we consider it arabic still, its fine if you don't want to lol
but its like trying to say southern english isn't english anymore just because you can't understand it
no
southern english is spoken by so many people
one village speaking different doesnt make it their dialect
When using <FileConfiguration>.getInt() for instance, is the value read by opening the config file, or are all config options loaded into memory on server start?
to an extent
they're loaded in memory once when you load the config
just because there is a lot of people speaking it, doesn't mean its another dialect and that just because fewer people speak makes it another language
Awesome, thank you
yes thats how it works pretty much
except you are saying then all the remote villages in the middle east have their own language
when this isn't even true
we have all sorts of offtopic discussions here
it doesnt hurt anyone but if its annoying u ig we can move
It doesn't bother me, I just thought I would point it out since it might clog the channel
depends which config you are talking about. The main config.yml of plugins is automatically loaded into memory upon loading of the plugin
but if it's allowed, carry on
it prob isnt
generally when there isn't a lot going on its for the most part fine, and then when a few come in needing help it gets moved
or we halt the conversation to help out and then go back to it later ๐
but technically you are correct though
then what would you call it?
I believe it's not loaded until you first touch it
with getConfig()
that might be true
which is why you can register classes in onEnable before yoru first access
You are inserting into players table but reading from player_deaths
someone get my ip adress if they join my server ?
Why do you even use shard manager
Anyone got experience with the javadocs tool in intelij?
Using it to shortcut my library's javadocs but have a few issues with it.
What should i use insted?
I assume you don't even know what Shard Manager is
Yeah like even I've gotta admit man there was a better way to answer the question ๐
He is being told inf amount of times that you first have to learn fundamentals, yet still refuses to do it
how to get Player face ?
There are few thing wrong with your code, anyway you set your activity with https://ci.dv8tion.net/job/JDA/javadoc/net/dv8tion/jda/api/managers/Presence.html#setActivity(net.dv8tion.jda.api.entities.Activity)
And don't use ShardManager if you don't know what it is
Oh he has been like it before?
Mb mate.
Just search his meesages here :p
Lmao we really need like a /noob bot
I mean yeah, I agree that was more rude that I intented it to be, but fr
i want to allow all player in my server to use trade how?
Seems like a #help-server question mate
I dont understand, can people not tell the difference between a server and a development question?
just don't prohibit it
i dont get the question lol
why do people always do this
I dont know
if the anwser inst quck enough
maybe
or because I told him to go to the #help-server
We are a server of developers. Someone make a dang bot that can tell ๐
I still believe in timing out or temp banning people who copy paste their question into every single chat.
Hello, if when creating an inventory, I set owner (first arg) to null and I do player.open blabla, the owner will become player?
no
so if I don't specify the owner, I never can get the one who opened the inventory?
Someone link the inventory menu moder approach thread. I'm on phone haha
your inventory can ony be opened by yourself so you should be able to know whom you opened it to?
*modern approach
i don't understand the issue
I mean if you do player1.openInventory you do know it's player1, don't you?
Neither do I, but his question suggests even looking at that thread might solve most his issues haha
Hello, how can I make a fake player (join message, leave message, movements..) that I can control ? (with nms)
i use the "modearn aproche" with gui manager etc...
yes after I can store it at the time of instantiation but I looked if there was not simpler
Not really unfortunately. The whole inventory system in spigot is a bit... interesting haha
This is why I use views :p
so it's better to pass it when I instance my inventory rather than at the time of the bukkit.createinventory?
why do you need to pass it
I mean the ideal way to do it imo is a map of inventories to player uuids
Have an inventory check the map, get the owner
Easy
Hello, how can I make a fake player (join message, leave message, movements..) that I can control ? (with nms) (bump)
any solution for the removal of prefix on pet name?
(cannot do modify Owner UUID as it gonna break the sitting)
to display certain items according to its info in the database
but I think I'll just pass it at instantiation time
why not get inventory which player has open and then modify it
ah with a
inventoryView.getPlayer();?
it is not too simple. you do get that, right?
yes
Control panel does not tell you your java version
check your java path
Yeah thatโs not how it works
Invalid maximum heap size: -Xmx9000M
Well, you are also using M instead of G. soooo
Yeah so you have 32 bit java
Go reinstall java and make sure you use the 64bit installer
i dont remember installing that
I found that running on Windows 7 Enterprise 64-bit, my 32-bit HotSpot JVM can allocate up to 1577MiB
so yeah just install a 64 bit java
and conretemeemnt, specifying an owner at the creation of the inventory what does it bring more?
Mebibytes iirc
Mebibytes
computer terminology try not to be confusing challenge (IMPOSSIBLE)
1 MiB = 1024 x 1024 bytes
1 MB = 1000 x 1000 bytes
i would have 100% said mibibytes
now tell me the diference between mb/ps and mbps
/ps ?
i just apply the formula mb/s = mbps / 10
megabyte/persecond megabitpersecond
why
:(
the difference is too small when i apply it
mebinflation
so idc
Okay so I have 2 of these buttons, 1 for accept and 1 for decline.
But for some reason I cannot send them in a message.
Whenever I try to do player.sendMessage(acceptMessage);
It just sends it as a raw bukkit code, and not as a clickable message, how do I send 2 of them in the same line?
// Clickable Message Components
ComponentBuilder acceptMessage = new ComponentBuilder(net.md_5.bungee.api.ChatColor.of("#08fc20") + "[ACCEPT]");
acceptMessage.event(new ClickEvent(ClickEvent.Action.RUN_COMMAND, "tpaccept")).create();
its the same as converting polish Zloty to eur,
(1 zloty = 22 cents last time i checked)
we divide it by 4. the difference isnt too big
player.spigot().sendMessage
Hello, specify an owner when creating the inventory what more does it bring?
It means getHolder will return the player
It doesn't seem to accept more than 1.
But generally you want to avoid using getHolder anyway
these days people advise you to avoid everything
Components can be .appended
So how would you do it ?
Append your two components together?
Hello, what is the EnumProtocolDirection.CLIENTBOUND's equivalent in nms 1.17.1 ?
ep.b = new PlayerConnection(ep.c, new NetworkManager(EnumProtocolDirection.CLIENTBOUND), ep);```
target.spigot().sendMessage(acceptMessage.append(denyMessage + " ").getCurrentComponent());```Like this you mean?
is this bot going in multiple servers, (over a few hundred)
Something like that
Okay, Another question, defining inventory items in the openinventory event is a bad thing? (in case of big ping, the player can take time to see them?)
why are you also creating a new thread just to run a runnable, as well
once again
?learnjava!
Here are some links to get you started on learning Java:
- https://www.codecademy.com/learn/learn-java
- https://www.sololearn.com/learning/1068
- https://www.learnjavaonline.org/
- https://programmingbydoing.com/
- https://docs.oracle.com/javase/tutorial/java/index.html
The last one is the only official one, however some of those concepts assume that you already know a bit about programming. https://media.discordapp.net/attachments/694661573125472256/998143126373941248/6n0v4g.gif
No only in one
I get net.md_5.bungee.api.chat.ComponentBuilder@6a6fe01b
As a message, and not a text button thingy.
You should just be able to do ComponentA.append(ComponentB)
Hello, what is the EnumProtocolDirection.CLIENTBOUND's equivalent in nms 1.17.1 ?js ep.b = new PlayerConnection(ep.c, new NetworkManager(EnumProtocolDirection.CLIENTBOUND), ep); (bump)
?mappings
Compare different mappings with this website: https://mappings.cephx.dev
thanks
I need to use #getCurrentComponent() to send it right?
No
show us network manager constructor exampl
Append B to A and then you can just send A
I donโt remember if append returns Component or void
it's in the message
Through your JDA instance?
^
jfc just ask in the jda discord server
There is nothing jda.activity or something like that
jda.getPresence().setActivity(Activity.playing("message2"));
what even is this
there isnt a need for the scheduled server executor or the thread
mapping is incredible 
this tutorial use it https://www.spigotmc.org/threads/a-modern-approach-to-inventory-guis.594005/
learn java
Lmao
im not seeing where it puts items in on the open event
oh i am
@lost matrix smh
?scheduling
use bukkit scheduler or ask for help with the errors
@Override
public void onOpen(InventoryOpenEvent event) {
this.decorate((Player) event.getPlayer());
}
inventory gui.java
yes, on the tutorial he does it when he opens it is that right?
depends, in most cases id say add items after you create it
you mean after opening it?
public InventoryClass() {
this.inv = ...;
populateItems();
}
// method to add items
yes, so add them at the same time as you create them?
yeah
but doing it after opening the inventory is by no means a good idea is it?
it might save on some storage because the inventory definately opens
but most of the time you shouldnt need to worry
okay,
and when creating the inventory, better to leave owner on null? or specify?
owner as null
hey guys, im getting this error when starting the server with my plugin.
idk how to fix it
its all it provides
the plugin wont load
?whereami
is it perfectly reasonable to create getInstance() singleton methods for the factory method classes?
thats using configurate on paper, its not Spigot
that way i can switch the implementation of factory method class inside unit tests
but retain the ease of use
from the code side just by calling getInstance()
wait, i thought paper, spigot, bukkit are all kina one thing and support plugins from eachother
nope
its just that the api is different
paper is phasing away bukkit api support
by little
it recently introduced custom system for loading plugins
Spigot plugins run on everything. Other forks do not run on Spigot
but i never had a problem running spigot plugins on paper servers
Yea, that's because paper is a fork of spigot and they allow that to happen. HOWEVER, that will change in the future.
so what do i do to fix this?
what are your guys relationships with static methods
i kinda hate them and love them
you cant test them really
by mocking
Code on Spigot to work on all forks
no you don;t
look at your stacktrace
but you're running it on paper
the server.jar is paper
give a stacktrace from a Spigot server and we can help
but the plugin is spigot
where can i find the stacktrace?
how do i place double chests?
Yea, and you're running it on a fork.
a stack trace is in the error
how?
what kind of server version are you running
1.20?
when you get the error, send the stack trace below the actual error itself
your api-version says 1.14
use api-version: 1.20 instead
in the plugin.yml its set to 1.16.5
where?
your stacktrace says its 1.14
ive read that too and i was equaly confused...
did you add a paper-plugin.yml by mistake?
api-version: field should not be lower than 1.13
open your jar and take a look
show me your plugin.yml
You might want to take it up with some JDA support server, because this is a Spigot exclusive server
all of it
check your jar not your project
alright
what the fuck
Jfc, what's with people and not following instructions lately? It's not like we are asking you to build a rocket.
run mvn clean
i dont have a paper-plugin.yml inside intellij tho
alr
it could be you're using an extension
of some sorts
inside intellij for example
or you have maven or gradle plugin
to autogenerate the .yml files
try it
kk
i have the minecraft extention (i forgor the name)
it helps u create mc mods/plugins
it could be that extension tampers with your project
but i dont use it
it is created by the Minecraft plugin, you have to mvn clean to get rid of all teh junk
i was really surprised a spigot plugin didnt run on a paper server lmao
yeah cuz it wasn't a spigot plugin :^)
yea lol
do you queue it
also, does anyone know why it takes so long for the server to load when im using aikar's flags?
alright, it now works :DDDD
lol
Hello, my class who extends EntityPlayer give me this error:java 'x()' in 'net.minecraft.server.level.EntityPlayer' clashes with 'x()' in 'net.minecraft.world.entity.EntityLiving'; attempting to use incompatible return type(nms 1.18.2)
how can I resolve it ?
thanks guys
Use remapped
ignore it
?nms
or ignore it
maven will work
i had the same issue some multiple times
but when compiling when maven it went through fine
Is there a way to make it so instead of the default essentials /tpa command, the server uses my own tpa command?
Like, loads my own tpa command before Essential's
you can edit the command map
ill dm it bc idk if im allowed to send here
or you can make essentials your dependency
register your command and essentials will give way to yours
Register my command?
Wdym?
What do you not understand about my response?
Where do I need to register it ?
If you mean in the plugin.yml, then I've already done that.
only way to fix this is to use mojang maps, which you should do anyway
I've already registered them then, it still won't work.
olivo sent you the link above already
Why do use getplugincommand. Setexecutor instead of using commandMap
because thats the correct way to use the API
I mean my command functions as it should, but it wont override essential's command.
it will IF yoru command actually works#
Does using commandMap has side effects?
It does work..
Essentials yields commands to other plugins
If you register your command and it works your command will be used
the actual command though is tpall Not sure it will check aliases
is there sort of event to listen to when player jumps on farmland block and it turn into dirt to cancel it
register as tpall with an alias of tpa if you want to use tpa
probably interact event
well with player interact i can get which block he clicked but like not if he destroyed farmland or stuff like that
it shoudl be a physical action in the interact event
do remapped include net.minecraft.* ?
does anyone know something about the mojang api?
i want to check if someones uuid is a legacy mc uuid
not a cracked account
what api?
mojang api
What api?
The classes yes, but they have different names and such
Now ask a question about it and someone will know ๐
okay thanks
i just want to know if a minecraft account (the uuid) is form a real minecraft user
not a cracked account
names seem better
ofc
Can someone help me with my bungee configuration?
sure
c b cv
post in #help-server
you're still in the wrong channel
did ever someone have problem when using intellij and when pasting something or opening brackets it literally just freezes
idk if it is some stupid hotkey
oh
mb
i just wanted to know the url
by name is new URL("https://api.mojang.com/users/profiles/minecraft/" + name)
you could probably omit it
?
Does World::getNearbyEntities(...) also gets entities from unloaded chunks?
no
i just want to know if its cracked or not
?
wdym?
in server.properties, set online-mode to true
how can I keep a chunk loading during an operation of some sort?
no, i just want to check in the plugin
Chunk#addPluginTicket
you can't
i cant?
nvm it's called addPluginChunkTicket
declaration: package: org.bukkit, interface: Chunk
you can query Mojang to see if it's a known UUID is all
but cant i connect to the sessionserver and check the uuid?
yea
thats what i wanna do
and then?
and then so something with the info
I could connect to your server claiming to be md_5
md_5's UUID exists
it's just not me
no, im not checking the username; im checking the uuid
yeah I could just get md_5's uuid by username and then use that UUID to connect to your server
how are you gonna check whether I'm actually md_5
login plugins prevent that
except by using online mode
fastlogin can prevent that for example
well, i just want to know if the uuid is known in mojangs database
and i wanna know how to do that
and i stil dont know ;-;
I gave you a full method to check a UUID and teh link to check by name
check if https://sessionserver.mojang.com/session/minecraft/profile/%s returns sth or whether it redirects you
where %s is the trimmed UUID
anything else than 200 OK is an invalid UUID
a redirect is also an invalid UUID
https://github.com/kyngs/LibreLogin/blob/master/Plugin/src/main/java/xyz/kyngs/librelogin/common/premium/AuthenticPremiumProvider.java @serene sigil maybe this can help
pretty sure it always redirects for ddos protection
https://sessionserver.mojang.com/session/minecraft/profile/4566e69fc90748ee8d71d7ba5aa00d21 is an invalid UUID and redirects to https://sessionserver.mojang.com/session/minecraft/profile/4566e69fc90748ee8d71d7ba5aa00d20 which is a correct one
which is why conn.setInstanceFollowRedirects(true);
if you enter a valid UUID it does not redirect
I don;t remember its been so long since I used it
i have just checked it using ```sh
wget $url 2>&1 | grep Location:
entering a valid UUID just gives you the json result, if you enter an invalid UUID it redirects to the closest actual UUID
I do remember it redirecting and giving a redirect error at some point is all
does anyone of u have a cracked uuid for testing?
00000000000000000000000000000007
alright... lol
basically any number with 32 chars
it might also return "Not a valid UUID" if it can't be a UUID at all
what do you mean?
{
"path" : "/session/minecraft/profile/jesus-is-fake",
"errorMessage" : "Not a valid UUID: jesus-is-fake"
}
yeah because he is real
lol
Hello
hewwo
PacketWrapper throwin error when s the startingerver
Can someone here help me with an arena regeneration system I'm doing. but i'm having a little problem
?ask
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!
what's PacketWrapper? is it this protocollib addition that's been outdated since 2015?
yes
does it have any alternatives
PacketEvents, normal ProtocolLib, NMS
I'm trying to make it so that when a person clicks on a block, they get the drop and it changes according to an enum that I have made. and after a while it will be the original block again.
looks like this. this is called onBlockBreak and PlaceEvent.
ItemType type = ItemType.from(block.getType());
if (type != null) {
Collection<ItemStack> drops = e.getBlock().getDrops();
int exp = e.getExpToDrop();
player.giveExp(exp);
game.typedBlocks.put(block.getLocation(), block.getState());
e.setCancelled(true);
drops.forEach(item -> player.getInventory().addItem(item));
System.out.println("From: " + block.getState().getType());
// Set the block to the replacement type
block.setType(type.getReplacement());
System.out.println("Change to: " + block.getState().getType());
PTC.getInstance().runTaskLater(() -> {
System.out.println("Run Task");
if (game.typedBlocks.containsKey(block.getLocation())) {
System.out.println("Change true");
BlockState originalState = game.typedBlocks.get(block.getLocation());
System.out.println(originalState.getType());
block.setType(originalState.getType());
game.typedBlocks.remove(block.getLocation());
System.out.println("Change " + block.getState().getType() + " to: " + originalState.getType());
}
}, 20 * 5);
}
hey
?paste
why is all underlined
idk, hover over it and read what it says
don't have ANY plugins
remove final
can i ?main you
it's kind of the same..
packages?
reset the checks back to default
it looks like you blindly enabled every possible code check
what theme are you using btw
It's default ๐
bruh
I haven't installed any themes
someone help me?
you haven't asked any question
Well start by telling us what isn't working
I'm trying to make it so that when a person clicks on a block, they get the drop and it changes according to an enum that I have made. and after a while it will be the original block again.
is this
is anyone aware if its possible to change boat's model?
i mean i know for sure it is
but how
Hello, How can I make it so that when I become a rod and an entity is in the way that it goes through the entity, or at least the entity is not pulled to the player when pulling in the rod.
You still haven't told us what isn't working
the drops aren't even calculated during the time someone clicks
what items a block actually drops is only determined after the block has already been destroyed
all you can do is to catch the "default" drops
"become a rod"?
oh sorry my translator xD
i meant when i throw a rod
fishing hooks are projectiles, you can cancel ProjectileHitEvent
that lets it go "through" entities without colliding with them
or at least bounce off
if that doesn't work you can also cancel PlayerFishEvent if the getCaught entity is a player or whatever
In order to make trails I should use the PlayerMove event right? I mean, is there any more efficient way to do that?
Use the scheduler
