#development
1 messages · Page 29 of 1
oh my bad
wait
how is that supposed to work
regardless of where the player is looking, the location is still objectively north, south, east, or west of them
maybe you're looking for "left" and "right"
ok im gonna delete it from the other channel, modify, and move it over here
but when i am looking the opposite way of the location then it should return South
when I am looking at it it should return North
see it as the north pole.
its like a compass, but in text.
yea kinda like that
wait
i think i know how to do it
with dot
yea got it
thanks for trying 😉
nice
so im adding worldguard as a dependency to one of my projects
im terrible at this sort of thing
<repository>
<id>sk89q-repo</id>
<url>https://maven.enginehub.org/repo/</url>
</repository>
<dependency>
<groupId>com.sk89q.worldguard</groupId>
<artifactId>worldguard-bukkit</artifactId>
<version>7.0.8</version>
<scope>provided</scope>
</dependency>
i set the <version> to 7.0.8 (this is likely the issue)
then i get this error Could not find artifact com.sk89q.worldguard:worldguard-bukkit:pom:7.0.8 in spigotmc-repo (https://hub.spigotmc.org/nexus/content/repositories/snapshots/)
anyone know what im doing wrong
Do you have worldguard installed on the server?
no, im trying to just compile the plugin
not at that stage yet
i want it as a softdepend
anyone know how i can convert regular worlds into worldguard worlds
nvm, i gotta use legacy
quick look at the worldguard api docs and its BukkitAdapter.adapt(world)
wait how does that work?!?! the website is tied to the gradle project?????
a javadoc jar is generated which is a zip file of the website
then whatever website hosting you use updates the website with the latest jar
i got another dependency issue, anyone know whats wrong here
cannot access com.sk89q.worldguard.WorldGuard
final var
im not even a deLEOPER ASKDJ
i was using java 1.8
(for 1.19.3) and maven doesnt say anything about the worldguard version being incompatible
How do I allow a player to shoot a bow without arrows in the inventory? (1.19.2)
how do you think the html files for the javadocs get generated
Thry don't magically spawn into existence
final variable in kotlin
Is it possible to send a player a message from another server without making a BungeeCord plugin?
For example i am on PvP-1 and want to send a message to a player on Lobby
https://www.spigotmc.org/threads/send-message-to-player-from-another-bungeecord-server.526961/
Saw this thread but its ending with making a whole BungeeCord plugin.
Yes, it is. One way is by using RPC.
RPC?
public static void sendPlayerToServer(Player player, String server) {
try {
ByteArrayOutputStream b = new ByteArrayOutputStream();
DataOutputStream out = new DataOutputStream(b);
out.writeUTF("Connect");
out.writeUTF(server);
player.sendPluginMessage(OorlogSimulatie.instance, "BungeeCord", b.toByteArray());
b.close();
out.close();
}
catch (Exception e) {
player.sendMessage(ChatColor.RED+"Error when trying to connect to "+server);
}
}```
Not something like this?
This is for sending a player to a different server
Yep, that works.
Yes but how does that work with messaging
Without using a bungeecord plugin
Don't want to make a bungeecord plugin for a simple message yk
Welp, yes. You can use a messaging plugin, or a database, else a web service.
Then, just use a messanging plugin.
You can use a plugin like ChatSync.
Ehm oke oke
public static void sendMessageToPlayerLobby(Player player, String message){
try {
ByteArrayOutputStream b = new ByteArrayOutputStream();
DataOutputStream out = new DataOutputStream(b);
out.writeUTF("CustomMessage");
out.writeUTF(player.getName());
out.writeUTF(message);
out.writeUTF(OorlogSimulatie.instance.kgetConfig().lobbyServer);
Bukkit.getServer().sendPluginMessage(OorlogSimulatie.instance, "BungeeCord", b.toByteArray());
b.close();
out.close();
}
catch (Exception e) {
System.out.println("Error when trying to send a message to bungee");
}
}
This wouldn't work right?😂
No, you are sending a message on the channel BungeeCord, that is processed by the proxy itself, and Bungee does not know what "CustomMessage" is, see this page for a list of valid subchannels that BungeeCord can understand https://www.spigotmc.org/wiki/bukkit-bungee-plugin-messaging-channel/, for anything else you need a proxy plugin.
On a side note, you should close the streams in the reverse order you created them (so, first close the data stream, then the byte stream), and then after that use toByteArray.
Ah yes, thank u
what does this mean (Borg.bukkit.command.CommandException: Cannot execute command 'roboref:score' in plugin RoboRef v${1.5} - plugin is disabled.at org.bukkit.command.PluginCommand.execute(PluginCommand.java:37) ~
whats this error telling me
the plugin that provides this command is disabled
Whats the enable command for bukkit?
there is none - by default, plugins are enabled on startup and disabled on stop or if they fail to enable
how do i make it start correctly
look at the logs where it fails to load and fix the bug
[16:07:17 ERROR]: [RoboRef] Plugin RoboRef v${1.5} has failed to register events for class me.notdew.com.roboref.Commands.RegionEnter because net/raidstone/wgevents/events/RegionEnteredEvent does not exist.(B
[16:07:17 ERROR]: [RoboRef] Plugin RoboRef v${1.5} has failed to register events for class me.notdew.com.roboref.Commands.RegionLeave because net/raidstone/wgevents/events/RegionLeftEvent does not exist.(B
That just means i should delete that class and i will be good
right
@sterile hinge
try and see
k
now its giving me this [16:13:45 ERROR]: Error occurred while enabling RoboRef v${1.5} (Is it up to date?)(B
what do i do for that
you don't need to ping me the whole time, also provide actual information (stacktraces, code) if you want help
What specific file should i send i have like 19 classes
and it works on my server when its by itself
but on the other persons server it dont
Also what does it mean when it has (b at the end
there'll be a stacktrace in the logs
how do i find the stacktrace
by looking into the logs
a stack trace is that big blob of error
I don't get it.. isn't there anywhere a full example on how to simply do it
or an api?
unfortunately not
damnit
if ur using plugin messaging then you need a proxy plugin
to handle and redirect the message
btw note that plugin messaging requires a player on both servers (sending and receiving)
just wanted to say that before continuing
but what emily means is that if you want a custom subchannel I think you have to create a proxy plugin
an alternative is to use something like RadioScanner
or something like RabbitMQ
problem with that is that it requires another port
pretty much if you don't want to use plugin messaging you need another port
including rabbitmq
? I think I am reading that wrong but you only need a player on the server where you are running the PluginMessage from.
true but the difference between rs and rmq is that rmq could be done in a single process i.e. one port
no, you need it both
I'm pretty sure
iirc it uses a player to send a "fake" packet
damn
whereas rs port requirements would scale linearly with the amount of servers
didn't know it was so hard to just send a message to a other server hahaha
My serverselector plugin works fine sending players to empty servers lol
yeah but im just saying that it requires at least 1
no matter what
¯_(ツ)_/¯
sending someone to a other server is no problem
i've never used rabbitmq so i can't comment on it on how good it is compared to radioscanner/etc
but sending messages is
thats because you're sending a message to the proxy, not another server
Ah yeah read the convo wrong
theres Message and MessageRaw
you can use those
Without creating a bungee plugin?
but i don't get it how i implement it in this for example:
public static void sendMessageToPlayerLobby(Player player, String message){
try {
ByteArrayOutputStream b = new ByteArrayOutputStream();
DataOutputStream out = new DataOutputStream(b);
out.writeUTF("Message");
out.writeUTF(player.getName());
out.writeUTF(ChatColor.RED + "Congrats, you just won 1$!");
Bukkit.getServer().sendPluginMessage(OorlogSimulatie.instance, "BungeeCord", b.toByteArray());
b.close();
out.close();
}
catch (Exception e) {
System.out.println("Error when trying to send a message to bungee");
}
}```
yeah theyre built into the proxy
how do you have the player instance of a player on another server
🤔
I know its not the cleanest code tho
Just using Bukkit get player exact
(Borg.bukkit.command.CommandException: Cannot execute command 'roboref:score' in plugin RoboRef v${1.5} - plugin is disabled.at org.bukkit.command.PluginCommand.execute(PluginCommand.java:37) ~[patched_1.16.5.jar:git-Paper-794]at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:159) ~[patched_1.16.5.jar:git-Paper-794]at org.bukkit.craftbukkit.v1_16_R3.CraftServer.dispatchCommand(CraftServer.java:826) ~[patched_1.16.5.jar:git-Paper-794]at net.minecraft.server.v1_16_R3.PlayerConnection.handleCommand(PlayerConnection.java:2185) ~[patched_1.16.5.jar:git-Paper-794]at net.minecraft.server.v1_16_R3.PlayerConnection.c(PlayerConnection.java:2000) ~[patched_1.16.5.jar:git-Paper-794]
at net.minecraft.server.v1_16_R3.PlayerConnectionUtils.lambda$ensureMainThread$1(PlayerConnectionUtils.java:35) ~[patched_1.16.5.jar:git-Paper-794]at net.minecraft.server.v1_16_R3.TickTask.run(SourceFile:18) ~[patched_1.16.5.jar:git-Paper-794]at net.minecraft.server.v1_16_R3.IAsyncTaskHandler.executeTask(IAsyncTaskHandler.java:136) ~[patched_1.16.5.jar:git-Paper-794]at net.minecraft.server.v1_16_R3.IAsyncTaskHandlerReentrant.executeTask(SourceFile:23) ~[patched_1.16.5.jar:git-Paper-794]at net.minecraft.server.v1_16_R3.IAsyncTaskHandler.executeNext(IAsyncTaskHandler.java:109) ~[patched_1.16.5.jar:git-Paper-794]at net.minecraft.server.v1_16_R3.MinecraftServer.bb(MinecraftServer.java:1271) ~[patched_1.16.5.jar:git-Paper-794]at net.minecraft.server.v1_16_R3.MinecraftServer.executeNext(MinecraftServer.java:1264) ~[patched_1.16.5.jar:git-Paper-794]at net.minecraft.server.v1_16_R3.IAsyncTaskHandler.awaitTasks(IAsyncTaskHandler.java:119) ~[patched_1.16.5.jar:git-Paper-794]at net.minecraft.server.v1_16_R3.MinecraftServer.sleepForTick(MinecraftServer.java:1225) ~[patched_1.16.5.jar:git-Paper-794]at net.minecraft.server.v1_16_R3.MinecraftServer.w(MinecraftServer.java:1139) ~[patched_1.16.5.jar:git-Paper-794]at net.minecraft.server.v1_16_R3.MinecraftServer.lambda$a$0(MinecraftServer.java:291) ~[patched_1.16.5.jar:git-Paper-794]at java.lang.Thread.run(Thread.java:829) [?:?]
Okay this is my stacktrace whats wrong with it
that won't work since that ignores the other servers
that will be null if the player isnt on the server...
^
I know i know
I will check that later
But I now want just to send a message
send the whole log - you have to send the enabling fail error
?paste
also dont hide the exception message
Paste Services
When asking for help with a config/menu/code issue please use our paste bin:
(we prefer it over pastebin.com)
• HelpChat Paste - How To Use
you gotta fix that code
or else your code won't work
instead of Player player, use String
and then out.writeUTF(player)
and also I'd use try-with-resources
do you have any idea why on my test server its fine by itself but when used with the other plugins on the main server its failing
^
for all we know, it's an NPE being thrown bc player is null but the fact that you're not printing the exception message makes that completely unknowable
public static void sendMessageToPlayerLobby(Player player, String message){
try (ByteArrayOutputStream b = new ByteArrayOutputStream();
DataOutputStream out = new DataOutputStream(b)) {
out.writeUTF("CustomMessage");
out.writeUTF(player.getName());
out.writeUTF(message);
out.writeUTF(OorlogSimulatie.instance.kgetConfig().lobbyServer);
Bukkit.getServer().sendPluginMessage(OorlogSimulatie.instance, "BungeeCord", b.toByteArray());
}
catch (Exception e) {
System.out.println("Error when trying to send a message to bungee");
e.printStackTrace();
}
}
```smth like this
not without the error
print the stack trace!!!!
ah i just copied the code
what would the error look like
like what you have but longer
and above
by whole log i mean latest.log
idk
?list
arrow-code
autosellapi
base64-serialization
best-vps-deal
bug-with-dd
challenges
checkitem
codeblocks
colors
database
dc-fuuid
dc-towny
di
dictionary
discorddev
dm-1.10.5
dm-base64
dm-builds
dm-creator
dm-deny
dm-external
dm-filler
dm-glow
dm-heads
dm-item-data
dm-multireq
dm-open_requirement
dm-requirements
dm-tags```
docs
dry
ecloudblock
enchant-format
enchants
entities
ess-builds
flags
help
hidden-roles
hosting
hosting-free
hosting-paid
hotswap
imgur
javadocs
jdk
js-factionname
js-tag
json
learn-java
libs
luckperms
materials
need-help
nojquery
not-discord
notowner
optimize```
papi-dump
papi-hd
papi-nocolor
papibot
particle-guide
particles
paste
placeholders
player
pls-no
plsnoarrowcode
plsnolombok
roleperks
service
site
slots
solid
sounds
spigot
spigotid
startuplog
tagess
tryandsee
welcome-screen
wiki
xy
yaml```
theres no tag for it ig
Thanks man, i'll try that
can you give me a guess as to why its not working when on the main server?
?startuplog
Startup Log Location
Your latest startup log can be found in the logs folder of your
server directory, labeled as latest.log.
Please copy the contents and paste them to a paste service.
Type ?paste for more information.
uiyghiaushdiukjash
no
you cant just guess things in programming
?startuplog
Startup Log Location
Your latest startup log can be found in the logs folder of your
server directory, labeled as latest.log.
Please copy the contents and paste them to a paste service.
Type ?paste for more information.
it could be a million different things
hm?
welp i gotta wait for the owner to send me the logs which may take hours
Message right?
Message
Message*
The home of Spigot a high performance, no lag customized CraftBukkit Minecraft server API, and BungeeCord, the cloud server proxy.
thats their problem lol
And I don't need to give the server right?
out.writeUTF(OorlogSimulatie.instance.kgetConfig().lobbyServer);
This can be removed i think
oh yeah whoops you don't need that
try (ByteArrayOutputStream b = new ByteArrayOutputStream();
DataOutputStream out = new DataOutputStream(b)) {
out.writeUTF("Message");
out.writeUTF(player);
out.writeUTF(message);
Bukkit.getServer().sendPluginMessage(OorlogSimulatie.instance, "BungeeCord", b.toByteArray());
}
catch (Exception e) {
System.out.println("Error when trying to send a message to bungee");
e.printStackTrace();
}```
yes
make sure you registered it
yes done it like this:
.instance.getServer().getMessenger().registerOutgoingPluginChannel(OorlogSimulatie.instance, "BungeeCord");```
registered*
Use https://paste.helpch.at/ for errors, logs and configs. So we don't spam the discord.
IT WORKS
onEnable(RoboRef.java:209) something is null here @calm loom
@dusky harness @icy shadow thanks
😌 😌 😌 😌
@sharp cove no problem
np
wow
@dusky harness yw
🙂
i put it in the paste helpchat right
did you?
I was looking this up like 2 hours today and u guys have helped me in like 5 minutes🤷
classic
how i do that
ill do it for you
how i reset token

so you did it for me?
i think
or do i need to do it
ok i think i did it
but i think it auto resets if it's sent anywhere / pushed to github
did you get a DM from discord
no
too late, I already hacked your bot
how where is it
yea
.
Integrate your service with Discord — whether it's a bot or a game or whatever your wildest imagination can come up with.
or at least the ones throwing errors
🤨
yeah
i take the public key right
maybe it just takes a while
i didnt generate it
im picking up on a plugin somone else made
you're*
too slow
ping diff
anyways this is why you store tokens in configs/etc
should i just delete that entire part?
it definitely shouldnt be in the source code
i know
doesnt matter
im not blaming it on you
im blaming it on @pallid storm User Who I Just Reset Their Token
oops
lmao
sorry Unknown
bro
how come every time someone accidentally pings someone they never talk
they don't even have tier 1
are these like bot accounts
you dont even have tier 1
is unfortunately not very helpful since im guessing theyve changed some lines in the meantime
yeah im assuming that
however
@calm loom just triple check that all your commands are in plugin.yml, also these lines are suspicious ```
Plugin RoboRef v${1.5} has failed to register events for class me.notdew.com.roboref.Commands.RegionLeave because net/raidstone/wgevents/events/RegionLeftEvent does not exist.
so potentially the other server is missing a plugin
although im not sure that would cause an npe
i've never seen that error
well it's a warning not an error
Also the plugin version is done weirdly
it is but that's unlikely to be the cause of the issue
probably just a typo with the interpolation
if i ctrl F RegionLeave nothing shows up
yeah that is very odd
ghost ping!!!
i deleted that part
then clearly the other server's jar is outdated
$5 says they have an old version with a different name
also why would it throw errors on one but not the other like 2 days ago when i tested and it was the exact same jar
¯_(ツ)_/¯
and why would a discord token disable the entire plugin
i wasnt talking about the discord token?
?
the token is old news bro
scroll up
we've been talking about something completely different
because it's been reset (hopefully)
if that token is on a bot with a discord server of like 20+ then it's worth it
if it's not obvious, what you've done is basically shared the password to your bot
thats what a token is
(bots don't have "usernames" either)
but i dont have the login to the oringal bot
especially if the bot has admin perms
which i do because im lazy
i should've used the token and spammed "boo" in every channel
too late now though
is it?
want me to test?
i dont understand discord bots
way ahead of u
dont
aw
i will get in so much trouble
ok
fair enough
i didnt make the discord bot and i dont understnad this
i just want the commands to run
idk about the discord part
the commands failing have nothing to do with discord
i just need the commands to work
well unfortunately unless you delete all the discord code that's not gonna work lol
🙏
danger averted
for now
okay i think i deleted all the discord related code can i send u it again so you can confirm or deny that
yes
in the origonal error was there anything else i need to fix?
it's hard to tell
.
just do this
ill launch and see what happens
i delted the region leave stuff
and the first bit?
i thought u did it on website side or something. like a program that took the javadoc jar and then turned it into website idk
in theory you could
hey i talked with them and they want the discord in if possible what can i do to fix it or can i not dothat
im not well versed in discord stuff how would i do that
wdym
this has nothing to do with discord
its just loading from a config file
Rather than putting it in your source code
and how would i go about doing that
im so confused and stressed can you give me an example
like in config.yml
Without needing a new jar
i mean the server owner will have to change it anyways because the token is invalid now 🥲
💀
the config doesnt mention a token
you have to add it to the config
if you're using spigot config then you just add it onto the config.yml
unless you do the addDefault thing
the plugin.yml?
no
oh
should i make one?
Yes
you can look up a tutorial on like yt or https://www.spigotmc.org/wiki/creating-a-config-file/
Keeping it in the jar is just asking for disaster
disaster already happened
Again
It'll be the long-awaited sequel
I see
which folder should i have it in the same folder as the plugin yml?
yes
and what should i put in the config
Except the plot is a bit boring, just a rehash of the original
thats it?
then when you start the server
replace PUT-TOKEN-HERE with the actual token
ex ```yml
token: "1h2gh3yui12gt3uyjh12g378612y3781yt2g3j"
so thats all i gotta do?
i made it a config.yml did token: space my token
thats all?
Well no, you have to actually load and read the config
a simple route would be to use a properties file
but for the sake of knowing how to make a config we'll go the config route
found here
AAAAAA this hurts my brain i just wanna remove it but if i remove the discord stuff it puts an error in another file and it just goes on and on and on
Is it possible to just remove all the discord stuff?
but when i do it gives errors in other files
i wouldn't do that
doing the config way makes my brain hurt
this config stuff is gonna make my brain explode
I would suggest doing some reading and understanding how configuration files work. (Probably some OOP things too)
We can tell you how to do it, but we cannot make you understand it by snapping our fingers.
This whole thing is so annoying lol it pisses me off that on my test server its fine but on there main server its broken
it doesnt make any sense
Of course it is but you said you don't want to do that
it makes sense if the environment is different
at this point i want to
can u help me do thaty
becuase when i try to do it
it creates errors across like 8 files
remove all the error causing things then
https://paste.helpch.at/ewunewaquw.java okay so with this i start off with deleteing the jda stuff right
and I thought my code was bad 💀
i wouldn't remove all the jda stuff since you're going to have to re-add it back anyways
nvm its kinda working
can u look at my new error
[18:12:20 INFO]: Connecting to Discord API
[18:12:21 ERROR]: [net.dv8tion.jda.internal.requests.RateLimiter] Encountered exception trying to execute request
java.lang.IllegalArgumentException: Unexpected char 0x0a at 76 in authorization value: Bot (not gonna send this but it has it)
at okhttp3.Headers.checkValue(Headers.java:284) ~[?:?]
at okhttp3.Headers$Builder.set(Headers.java:415) ~[?:?]
at okhttp3.Request$Builder.header(Request.java:184) ~[?:?]
at net.dv8tion.jda.internal.requests.Requester.execute(Requester.java:174) ~[?:?]
at net.dv8tion.jda.internal.requests.Requester.execute(Requester.java:141) ~[?:?]
at net.dv8tion.jda.internal.requests.Requester.execute(Requester.java:124) ~[?:?]
at net.dv8tion.jda.internal.requests.ratelimit.BotRateLimiter$Bucket.run(BotRateLimiter.java:478) ~[?:?]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) ~[?:?]
at java.util.concurrent.FutureTask.run(FutureTask.java:264) ~[?:?]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304) ~[?:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) ~[?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) ~[?:?]
at java.lang.Thread.run(Thread.java:829) [?:?]
there
i posted it
is this what u wanted
is this with or without the config
with
Boys I need serious help.
is "Bot" representing the token?
show the code
?paste
Paste Services
When asking for help with a config/menu/code issue please use our paste bin:
(we prefer it over pastebin.com)
• HelpChat Paste - How To Use
the "(not gonna send this but it has it)" part
the config code?
the main class
ah okay
okay lemme edit that out
also you have \n at the end of the token
which you want to remove
don't have a TOKEN variable
no, you're still not using a config for it
also you already have a config
how do i move it?
look at lines 268 - 272
delete lines 166 and 150
do i move those or just delete them
so i delete them and thats it?
Gentlemen, I am experiencing an issue with one of my 1.8 spigot servers. I have provided a list of the plugins in use (https://paste.helpch.at/jugaqefase.sql) and the startup log (https://paste.helpch.at/sagihapaga.makefile) for review. It appears that two of the plugins have a dependency on FAWE, however, there is no functioning version available for 1.8. The specific problem I am facing is that certain commands, such as /help and /gamemode 1, are not producing any results.
this is for coding help - plz ask in #1007620980627230730
or
@lyric gyro there is a functioning version for 1.8
Yep, already figured that 🤣
it's not supported though
I used one, but still, couldn't execute a single command.
so do i add somthing there
like do i add the token there
What!?
lol line 249
I seriously think it is cursed.
Let me see 🤣
I think it is a host problem.
Latest egg.
so do i add somthing there in the 268 lines
like do i add the token there
Maybe, but I have been trying everything I know for a good 3 hours.
Am using Java 8 for it.
Paper >
I'd say to delete that server.jar and generate a new one
also java 8 = bad
Java 8 is the best one for 1.8 tho.
the only issue I've seen was console adding an extra newline in between logs sometimes
but only for some plugins
odd issue
Any suggestions?
try this
you can keep java 8
okay so what do i do
wait so all i have to do to fix it is launch the plugin then go into the config it makes and put that key in?
then get that config value
either look at the current code to see how the previous developer did it or look it up on like youtube
or look at the link i sent
1.8 = bad
Will do.
so like i open the config it makes add token: blahblahblah save and im good?
How dare you offend my clicking game
Why
lol
I has added all needed api and still get this error https://paste.helpch.at/adilubekej.less
relocate
I did this:
libraries:
- org.reactivestreams:reactive-streams:1.0.4
- io.projectreactor:reactor-core:3.5.1
- io.projectreactor.netty:reactor-netty:1.1.1
- io.netty:netty-all:4.1.86.Final
- com.fasterxml.jackson.core:jackson-databind:2.14.1
- com.discord4j:discord-json:1.6.13
- com.discord4j:discord4j-core:3.2.3
reactor my beloved
Yep, you got a point there.
Get out of here 🤣
?
brister ll i have to do to fix it is launch the plugin then go into the config it makes and put that key in?
right
he did
okay then yes
the plugin already uses a config file
even when i put the token in there it gives me errors so im gonna launch it and open and load the config
[18:31:52 ERROR]: [net.dv8tion.jda.internal.requests.RateLimiter] Encountered exception trying to execute request
java.lang.IllegalArgumentException: Unexpected char 0x0a at 76 in authorization value: Bot 1ODQyNjAwNjk0MTIyMDg3NA.GqW-F0.XkPAfhvxHEk3RXjZdqSW3UUUPl3-9Rqk82wUwk
at okhttp3.Headers.checkValue(Headers.java:284) ~[?:?]
at okhttp3.Headers$Builder.set(Headers.java:415) ~[?:?]
at okhttp3.Request$Builder.header(Request.java:184) ~[?:?]
at net.dv8tion.jda.internal.requests.Requester.execute(Requester.java:174) ~[?:?]
at net.dv8tion.jda.internal.requests.Requester.execute(Requester.java:141) ~[?:?]
at net.dv8tion.jda.internal.requests.Requester.execute(Requester.java:124) ~[?:?]
at net.dv8tion.jda.internal.requests.ratelimit.BotRateLimiter$Bucket.run(BotRateLimiter.java:478) ~[?:?]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) ~[?:?]
at java.util.concurrent.FutureTask.run(FutureTask.java:264) ~[?:?]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304) ~[?:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) ~[?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) ~[?:?]
at java.lang.Thread.run(Thread.java:829) [?:?]
what does this mean
show the code
which class
seems to me like you've copied the wrong token
that has a different error
wich class
hmm
huh
yeah dont do that
main class
also please stop pinging me
and don't DM for support
lol
Do you have any idea what i shall try?
i dont think you need to add transitive dependencies to the libraries section do you?
you're... still using a hardcoded token
i thought you said you were loading it from the config
earlier
either you or dkim is lying
i mean i have it in a config file in the jar
...
so I've said this like 3 times
to either look at how the plugin uses its config already or to look up a tutorial online
also you have () around your token
it's not supposed to
getConfig().set("token:1ODQyNjAwNjk0MTIyMDg3NA.GN_BtY.gRYDd0Md23gCkViCF9SgzQ95vQow03YeytYm9E", "solid"); so this?
also you want get not set
what do you mena tha vlaue
ok
if the token itself is in your project, then you're doing something wrong
in this case, it is
look, maybe you aren't sure what you actually have to do:
putting the token as a string in the jar because it means you cant change the token without making a new jar
the solution is to load the token from a different file, such as the config file
so all you need to do is remove the hardcoded (in the code) token and replace it with one that you load from the config file
frankly if you aren't sure how to do this i would highly suggest looking at some java and/or spigot tutorials
because there's an error on startup
im gonna kms i swear
brister.... please dont hurt me
it may or may not
have been becuase it wasnt compatible with paper
...
what isnt?
why isnt it compatible with paper
show the error for paper
?startuplog
Startup Log Location
Your latest startup log can be found in the logs folder of your
server directory, labeled as latest.log.
Please copy the contents and paste them to a paste service.
Type ?paste for more information.
at this point i wanna just delete everything that has anything to do with discord ever
its gonna give me a seizure
https://paste.helpch.at/fohakefide.csharp if u wanted the paper log
wait nvm
paper works
jiowq doiwqdioqwdq
im sped
@calm loom btw don't handle exceptions like that
just do e.printStackTrace()
no need for handleException
https://paste.helpch.at/gawixitigu.scss this is the last thing im gonna ask
why is this happening
if (!(Teams.contains(args[2].toLowerCase()))) {return true;}
/label args0 args1 args2
How are kills and deaths activated on the scoreboard?
okay completely seperate question how would i make a command do an actual base command like for example /setlos does /setblock 287 254 2 and then the block
How are kills and deaths activated on the scoreboard? Help me please
line through = deprecated
or maybe its because youre comparing strings with == instead of .equals
yes !something.equals(anotherthing)
hover over it, i think itll say deprecated
ye
It says "getTitle() is deprecated"
Will it still work tho or do I have to use something else?
oh its prob favoring adventure
ye
d;paper inventoryview#gettitle
@Deprecated @NotNull
public abstract @NotNull String getTitle()```
Get the title of this inventory window.
in favour of title()
The title.
should I go over to spigot?
no
just change your method to .title()
nice
is there a huge difference between paper and spigot?
just because it compiles doesn't mean it'll work
with text, yes
paper deprecates all legacy (§a for example) which is what you're seeing here
so u prefer spigot?
"when the deprecated line goes away, it's time to end the day"
no
but yeah you should probably use ChatColor.translateAlter......whatever
instead of using the color symbol directly
I am
oh
is the Colors menu your own custom GUI?
For example this is what TriumphGUI does to make a custom GUI and compare it
if you want to compare names, this isn't the best but I guess comparing names could work ```java
LegacyComponentSerializer.legacySection().serialize(InventoryView#title()).equals("§bColors")
it also might not
yeah
ye its mine. I wrote it a few years ago
I think I fcked up my whole intellij
I tried to replace the jar file and now it wont import
why is that?
after lots of trial end error I get this issue java.lang.ClassCastException: io.netty.handler.codec.http.DefaultHttpHeaders cannot be cast to io.netty.netty.handler.codec.http.HttpHeaders https://paste.helpch.at/cucefoqubi.rb
I get this error now https://hastebin.com/ixoxajiduj.properties , don't know if miss some more dependency's.
Hastebin is a free web-based pastebin service for storing and sharing text and code snippets with anyone. Get started now.
I set a pdc key
ItemStack hopper = new ItemStack(Material.HOPPER);
PersistentDataContainer pdc = hopper.getItemMeta().getPersistentDataContainer();
pdc.set(CHUNK_HOPPER_KEY, PersistentDataType.INTEGER, 1);
p.getInventory().addItem(hopper);
but when I try to get it from the listener
@EventHandler
public void onBlockPlace(final BlockPlaceEvent e) {
ItemStack item = e.getItemInHand();
if(!item.getType().equals(Material.HOPPER)) {
return;
}
PersistentDataContainer container = item.getItemMeta().getPersistentDataContainer();
if(!container.has(ChunkHopperCommand.CHUNK_HOPPER_KEY, PersistentDataType.INTEGER)) {
return;
}
}
it does not exist?
you need to re set the meta to the hopper
you're getting it, changing the value, and not setting it back
Ah, weird. Thought it does it on its own.
I've used it on player and I didn't need to do any extra steps, that's why I got confused
i had to do it yesterday with something else, but i forget what for
ItemStack whitePane = new ItemStack(Material.WHITE_STAINED_GLASS_PANE, 1);
ItemMeta meta = whitePane.getItemMeta();
meta.setDisplayName("???");
meta.setLore(Arrays.asList("Click here to try stealing an item!"));
whitePane.setItemMeta(meta);
inventory.setItem(i, whitePane);
yeah
Though I suppose I'm setting it for the copy of the meta, whereas it sets directly on player? If I'm not mistaken
yes
Makes sense. I should've went to sleep instead of trying to figure out this small issue
🥴
bro's getting his brain, telling it to sleep, but not setting it
Yes
java.lang.NullPointerException: Cannot invoke "org.bukkit.command.PluginCommand.setExecutor(org.bukkit.command.CommandExecutor)" because the return value of "io.github.sdxqw.sarelus.Sarelus.getCommand(String)" is null
at io.github.sdxqw.sarelus.Sarelus.onLoad(Sarelus.java:14) ~[Sarelus-1.0.jar:?]
at org.bukkit.craftbukkit.v1_19_R1.CraftServer.loadPlugins(CraftServer.java:429) ~[paper-1.19.2.jar:git-Paper-307]
at net.minecraft.server.dedicated.DedicatedServer.initServer(DedicatedServer.java:278) ~[paper-1.19.2.jar:git-Paper-307]
at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1100) ~[paper-1.19.2.jar:git-Paper-307]
at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:305) ~[paper-1.19.2.jar:git-Paper-307]```
show line 14 of Sarelus
this.getCommand("core").setExecutor(new Command());
its calling getCommand(), you're right about he forgot to add it to yml
name: Sarelus
version: '${version}'
main: io.github.sdxqw.sarelus.Sarelus
api-version: 1.19
commands:
core:
description: core command
usage: /core
yea
hmm
lol
clean rebuild and make sure u dont have any other versions in the plugins dir
???
old versions of the same plugin i mean
oh there no other version xd
[00:13:12 ERROR]: [org.bukkit.craftbukkit.v1_19_R1.CraftServer] Cannot invoke "org.bukkit.command.PluginCommand.setExecutor(org.bukkit.command.CommandExecutor)" because the return value of "io.github.sdxqw.sarelus.Sarelus.getCommand(String)" is null initializing Sarelus v1.0 (Is it up to date?)
java.lang.NullPointerException: Cannot invoke "org.bukkit.command.PluginCommand.setExecutor(org.bukkit.command.CommandExecutor)" because the return value of "io.github.sdxqw.sarelus.Sarelus.getCommand(String)" is null
at io.github.sdxqw.sarelus.Sarelus.onLoad(Sarelus.java:14) ~[Sarelus-1.0.jar:?]
at org.bukkit.craftbukkit.v1_19_R1.CraftServer.loadPlugins(CraftServer.java:429) ~[paper-1.19.2.jar:git-Paper-307]
at net.minecraft.server.dedicated.DedicatedServer.initServer(DedicatedServer.java:278) ~[paper-1.19.2.jar:git-Paper-307]
at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1100) ~[paper-1.19.2.jar:git-Paper-307]
at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:305) ~[paper-1.19.2.jar:git-Paper-307]```
HMMM
that cursed
public class Command implements CommandExecutor {
@Override
public boolean onCommand(@NotNull CommandSender sender, org.bukkit.command.@NotNull Command command, @NotNull String label, @NotNull String[] args) {
if (command.getName().equalsIgnoreCase("core")) {
if (args.length == 0) {
sender.sendMessage("Error: incorrect syntax. Usage: /core list");
return true;
}
if (args[1].equalsIgnoreCase("list")) {
sender.sendMessage("Module Loaded: " + ModuleLoader.modules.toString());
}
}
return true;
}
}```
it's that even right?
you dont need to check the command name if u have 1 class per command
it would give an error if it was wrong since it overrides
and yeah
alright
also the name Command is probably not very good, consider something like CoreCommand instead
CommandHeklocutor
it's not gonna cause any errors but it's unhelpful and means you need that gross import for the bukkit Command class
wait so off topic but if i set getCommand().setExecutor() on a class, is that the only command thats going to be coming through?
by the way, this is also a separate issue but you should be calling args[0] on your second if statement
its work (?)
Yes lol
not args[1]
done
damn im so bad at spigot deleopment
that suggests the executor isnt set properly
oh actually
i didnt touch paper api for so long xd
maybe you need to do it in onEnable rather than onLoad
You should probably do it in onEnable
oke
yeah u should
thanks its worked
!
np
nice
Things like getServer dont work in onLoad too.
I'm not even sure why onLoad exists. I know it's called when you use /reload, I think
so is onEnable
Check instanceof sender
i think the only benefit is you can do things before other plugins have enabled
yes
u ruined my reaction
hehe
sender instanceof ConsoleCommandSender
return what?
return true
ok
👍
Ok guys i need help with guilds
#spigot-linking and then #guilds , this channel is for coding help
ehmm its doesnt work
core list
core
elaborate
lel
?
infinite loop
When multiple plugins are loaded, the onLoad() for all plugins is called before any onEnable() is called
O i c
apple
what?
if(while(true))
banana
fr
can you show the error or code that gets stuck in iinfinite loop
i highly doubt it's an infinite loop
there no error
or code
or code
or code
nice
lol
not code
!(@icy shadow)
?
it worked
yes
thanks
np
yw
too late
too bad java doesnt allow pointer access or i would
if((long)&sender - (long) &Bukkit.getConsoleSender() == 0)
kotlin = "badAndWorstLanguageEver"
no
you'll never guess what else the == operator can do
L
nothing
== operator can only compare to 0
oh obviously
because c was made 50 years ago
sounds utterly awful
yeah, especially since the rest of my tasks were in C#, and we just happened to use this old library
C# also sounds utterly awful
everything in Java is solved with streams 😌
C# aint that bad
Kotlin aint that bad either
Kotlin is another universe of bad
have you heard of-
too many ways to do the same thing, syntax gets pretty ugly, and it has awful conventions
👍
how can you say C# is not that bad but Kotlin is worse? lmao
😋
counter point
the bee movie script can be a variable name
Hoppin on kotlin = bad train
😎
that train exists for basically the same reasons that C# is bad lmao
in addition to the corporate ownership lol
example?
lol
:norust:
:nonitro:
:haskell:
😌
you guys know ocaml

:kotlin: > :haskell:
thankfully not
F# gang
i only use real ML-based languages
my school used haskell, but i took it remotely at another university which did it in ocaml
(for Programming Languages class)
sorry to hear that
i liked it xD
well i didnt particularly enjoy the language, just the class
oh
well in that case, you probably wouldve enjoyed a real language like Haskell much more
we made an interpreter with it
that's fun
and there was a scoreboard for each student based on how many unit tests they passed, but with anonymous names
danimalsdunkem was pretty smart
C# was basically my first real lang I learned (apart from c++ in school), and I really enjoyed it for the most part. It has its pros and cons just like any other lang
Never got around to try kotlin but I'm sure it's pretty nice too when you get used to it
yeah i dunno, i could never get into the C# ecosystem, all the packages strike me as bizarre, some require payment and stuff, the whole microsoft and visual studio integration rubbed me the wrong way, just feels unnatural lol
I mean it's telling that the best way to do C# is with a JetBrains IDE lol
the best way to do most things is with a JB IDE
like when they got rid of the hot refresh from the dotnet cli and JetBrains independently remade their own
then microsoft cheekily added it back in after lmao
or even ReSharper, a tool by JetBrains to make Visual Studio bearable lmao
Rider is pretty good too (duh, JB)
isn't there like a java sql library that requires payment
unless you mean official c# library
from microsoft
i've never paid for a software library in my entire life
a good few of the packages i browsed on NuGet were paid
I'm not aware of any official stuff from ms that you'd need to pay for
although once you're out of school you either have to pay like $200/year or re-learn a new IDE
i will be making a $10/month IsEven package
still an exceedingly good deal for what you get
$15 combo to get both
ehhhh
VSCode or whatever is used is still pretty good and is used by many devs
anyone familiar with XMaterial? i have a Material, my code is written in 1.11, but my server is 1.19.
im trying to use XMaterial to convert that 1.11 Material into its equivalent 1.19 Material, this is what i have rn, but it isnt working:
final Material material = XMaterial.matchXMaterial(block.getType()).parseMaterial();
if (material == null) return;
final FallingBlock fallingBlock = world.spawnFallingBlock(location, new MaterialData(material));```
$200 for every single JetBrains IDE is worth its weight in gold
and plus, once you have a big boy job, that's like, 4 hours of work lol
My job provides the ultimate or whatever or pro plan for everyone 😎
try using VSC for a big java project and see how well it holds up
(it won't)
hey i saw that >:(
oh wow
true
IJ is free tho
which is nice
probably because of kotlin
if ur in a non-freelancer job then ur employer will likely pay for a license
?
i cant think of any other reason why IJ is free
yeah also that
yeah
I should buy a license and stop using open source license for work 
There's a community version
