#help-development
1 messages · Page 189 of 1
basically a line
I want to rotate it to where I look
I know the existence of the rotateAroundX and YZ methods
but idk how to use them
how do I use it for my purpose
when depending, how do you know what the name of the plugin is? Is it the jar file name or is it what comes up when using /pl?
the name that is used by the server comes from the plugin.yml that is inside the plugin jar
in this manner it doesn't matter what the jar file name is and doesn't affect the plugins name in the server 🙂
👍
I need to do a lot of testing of outputs and such, is there such a thing as a command line interface I can run spigot code directly while running my game
would this be right then? java public void play(Location location) { for (ParticleBuilder particle : particles) { Vector vector = particle.location().clone(); vector.rotateAroundY(-Math.toRadians(location.getYaw())); vector.rotateAroundX(-Math.toRadians(location.getPitch())); particle.spawn(location, vector); } }
particle.location:
try and see
I already tried and it not worked
Tell me, and how to register the playback of your sounds from the resource pack through the plugin?
the issue is resolved
Does anyone know how to color name tags while having luckperms plugin? I need to color name tags red, and I know how to, but it’s bugged with having luclperms plugin (which is vital for my server) any work arounds anyone knows?
& + color (?)
Player name tags
As in I see your name Ingame
I used scoreboard teams
But it’s bugged whenever I add luckperms to server
whats the java code again to make a test case? Iirc it was something along the lines of 'assume' or 'expect'
assert?
Hi all! My question is how to commit what is supposedly the key or not(code below)
is that setence english?
Of course, everything is clear, but can you please help or throw off some tutorials on my question
i dont even know what to help you with
i got told it was smth with scoreboards or smth, to assign a team name to that npc or smth
Yeah use prefix and suffix
how to detect if a player is standing one block behind another player? (dont take this out of context :))
hello?
private boolean isABlockBehind(Entity player, Entity ent) {
Vector pDir = player.getLocation().getDirection();
Vector eDir = ent.getLocation().getDirection();
double relativeAngle = (Math.atan2(pDir.getX() * eDir.getZ() - pDir.getZ() * eDir.getX(), pDir.getX() * eDir.getX() + pDir.getZ() * eDir.getZ()) * 180) / Math.PI;
return ((angleInDegrees <= 60 && angleInDegrees >= -32) && player.getLocation().distance(ent.getLocation()) <= 1);
}
in this case ent is the player in front
is 1 or under
if this returns true the player is behind?
Maybe
Method name is non descriptive
also how would u make it so if u sneak a number of times in 10 seconds it triggers sth
Is there a block event that handles all block changes?
no
Does anyone know how to dispatch a command asynchronously?
Anyone know why if I'm constantly teleporting an entity to a player the entity looks delayed on the client but not for any other players?
Because player movement is clientside
If you're trying to display extra text with an armorstand make the entity a passenger
For other players, the player movement and entity movement is sent at the same time, but for the player, the entity movement is delayed by ping
bump
Don't
why do you even need that
i want to make a command run after a certain amount of time
use the scheduler
how
?scheduling
run it in a sync task
why async
?scheduling
runTaskLater
var runnable = new BukkitRunnable() {
public void run() {
// your code
}
};
runnable.runTaskLater();
How to make it apply to only one player. If another player comes in, then this message is also written to the rest 🙂
just send player a message
and set join message to null
so nobody sees that player joined
Precisely! Thanks!
next time you decide to code
open javadocs on second screen
or on half screen
or just alt tab
?jd-s
And how to do it?
event.getPlayer().sendMessage("hey dummy");
Okay And how to fix the problem that one player's music is heard by another?
As I understand it, I made her play for everyone?
How to make the music play only for the one who has the event
And then what should be done?
Thanks
do any nerds here know what happens if two runnables are going off on the exact same tick
nothing
which fires first
random
random
nanoseconds mismatch
how do i check every 3 or so ticks that if the player is sprinting and execute certain things like a chat message if the player is sprinting
runTaskTimer
k
you want to check if player is STILL sprinting after 3 ticks? or just send every sprinting player a message every 3 ticks
SO BASICALLY
oops caps
so basically
i want to keep checking if the player is sprinting
imagine being me
and if he sprints like 5 blocks
no caps indicator
i will send msg
same
also no language indicator
ok
seriously when tf will they add a quick event list
player can stop sprinting and start sprinting again
within 3 ticks between two checks of your timer
well u could just register the last time the sprint event got toggled
and then check if theyre sprinting
if answer is over 3 sec and yes
you can create a map
less overhead same result
ok
where you store the location where player started sprinting
and have a timer which goes through this map and checks distance between player's current location and location where he started sprinting
so if it's > 5 then do something
tho wouldn't work if player is running circles
?
oh
true actually
oh ye
then we can just make a list, not a map
Oh
why use many code when few do trick
<- probably the laziest person in the chat
we would still need map
ok so how do we setup a how many player kill counter
cuz we need to store sprinting distance when player started sprinting
what that got 2 do with anything
I have a plugin thats gonna be a dependency. How do i make the poml stuff for it? can anyone send me a guide or something, as im struggling to find anything
if your using maven it automatically makes it for you
if its not alraedy made for you check if your on maven
HashMap<UUID, Double> distances = new HashMap<>();
@EventHandler
public void onSpint(PlayerToggleSprintEvent e) {
if (e.isSprinting()) distances.put(e.getPlayer().getUniqueId(), sprintDistance/*which you have to get from player's stats*/);
else distances.remove(e.getPlayer().getUniqueId());
}```
and a task timer somewhere in onEnable
Thanks!
Hey, I'm trying to register multiple aliases and for some reason the command works, but the aliases dont. No errors. Only the commands with 1 alias work (for example, /staffchat's alias /sc does work.)
ok got it!
even if, technically anything with public methods doubles as a library. you just need to 1) import it in the project that depends and 2) put it in ur plugin loadbefore list iirc
hello, do you need a license to sell on spigot?
try string quotes around ur aliases
Aight i'ma try that 1s
theres a requirement but its listed on spigot.org, check there
iirc u need some amount of merit or smthj
thanls
didn't work
put it in a yml checker
im out of ideas
how do you register your command executor
this used to work, i'm not sure why it doesnt work now
I can not find it
getCommand("modmode").setExecutor(new CommandModmode(
new Utils()
, new ItemManager()));```
the command does work, the aliases dont. I always registered commands like this
the aliases dont show up. no sign of em
yeah i tried that the command shows the alias doesnt
/mod returns unknown command message?
cough google cough
honestly if u cant find it u shouldnt code lol
90% of our time is spent searching the internet
for the record, the command /mod has no arguments
thanks
errors in console?
Lemme try something
shit that could be right
shit you were right thanks
it worked thank you
ez
lol
If I’m looking for a plug-in with stuff that I would want is this the channel to ask?
no
here you ask how to learn coding
go to any other channel
tho dm me maybe i can code it in 10 minutes
but i still don't recommend using this kind of plugins @rocky pond
why don't you run local server
you can add like 999 optimizations yourself
yeah i have one
view distance to 3
i run my mysql host thing on my elite amazon server
💵
Why is Bukkit.dispatchCommand() not working
how?
show your code
Having a really strange error with my custom quiver script using bundles.
When I was initially building the script I would get a similar "null or air" error when adding an Air ItemStack to a bundle.
When I hold the bundle in the cursor and right click on a stack of arrows everything works, filling up the bundle to 256 without error.
If I hold the arrows and rightclick them into the bundle however, if the bundle is at or over 128 it explodes with that error without firing anything from my script.
if I could read the "and x more..." lines that it hides I'm sure I could get somewhere.
Error Log:
https://pastebin.com/JK8jy8e1
Script:
https://pastebin.com/y3pWurNR
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
basically stated on javadocs
declaration: package: org.bukkit, class: Bukkit
why is this code so hard to understand
do you have some kind of quiver item?
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
what is the name of the text written with hyphens?
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
like this
isn't that called ASCII art?
Yeah
ily
which line throws the error tho
That's the thing, I'm not sure.
If you see the top of the console error it only fires once when I first pickup the arrow itemstack. The System.out command at the top of my Listener doesn't even fire it just crashes, and I can't see a pointer back to any of my code
why are u using & instead of && everywhere
Should I be?
Whoops
I use | a lot too
if (first && second && third) doSomething();
so if first is false then program doesn't check second and third argument
and for & it still would check them
I gotcha
that why having logic at pre universty is GOOD
Because then you can apply it when u are programming
& is in fact binary operator, it will check other because it will try 1(true) AND 1(true)
&&
& doesnt exists
it does ?
does
It does and I was using it
& and | both exist in java
as i said, its binary operator
which are both binary
&& is logical
yeah
you don't really need & and | in your usual programming cases
I always use the &&, ||
as you should for logic statements
<<
tbh before starting uni I was sure that ^ is power
I feel kind of good that the only standout thing about my code was using inefficient operators.
I've only made a handfull of plugins and haven't touched anything but Java yet.
standout? sout
std is not really used in java terms, is more for other langs like C, rust
I'll probably just make it so the bundle has to be the item on the cursor.
no
you are doing much weird stuff
Okay I figured.
I'm kind of curious what weird stuff I'm doing
I don't know if that's good or bad
extremely bad
Oh lol
decompiled code looks like it's written by some dumb AI just to make code hard to read
What I think I'm doing is making it fail fast
can you explain your idea
I know I also need to split these big methods into smaller fetching methods, but I'm just mapping out the basic functionality first
what are you even trying to do
why don't you just store arrows in bundles
like you should
Then you're limited to 64
Monke
In bundles?
isn't it
They only accept 64 items by default
well who needs 65
Then there's no point to the item I'm creating
A lone stack of 64 arrows would be better
idk what you are creating
java.lang.NullPointerException: Cannot invoke "me.distruzionee.staffpanel.Main.getConfig()" because "this.main" is null
?di
Guide to dependency injection: https://www.spigotmc.org/wiki/using-dependency-injection/
in events work, on commands no
thanks bro
and what is wrong with that
hey stop arguing, this is not the best way to fix issues
i mean just initialize your main variable
in constructor or by reflection
No please!!! that is the worst way, USE DI!!!!
nobody here is arguing
wdym lol
with DI you basically init a field in a constructor
Singleton 🤢 its only intended to be used for libraries
When I try to add a stack of arrows any size from the cursor it blows up.
When I pick up the bundle and click the arrows with the bundle it functions properly and I have no idea what the discrepancy is
tf ?
you need to sleep
Yeah im those guy against Singleton*
you don't get what we are saying
oks
I mean static burns my eyes
now works
nobody here is into singleton
static is good
Oh shit i thought he was using a static getter for plugin instance
👀
go sleep
yes because u are loting my time
yes
you can place armorstand as player's passenger and set it's name
Either packets or PTC lib
that some times get bug
when player has passenger, his nickname plate hides
Okay
So take a look at name tag edit
i think its open source
Why fucked intellij is not putting maven dependencies?
Intellij L
wdym by "putting"
yeah i mean it should the maven dependencies inside jar
every none scope provided, should be shaded by default inside the jar
you mean why do you need shade plugin ?
that my question lMAO}
I asking that why intellij DOESNT SHADE NONE PROVIDED DEPENDENCIES BY DEFAULT
Shit sorry for caps
I didnt realize i toggled
because you need the shade plugin
👉 👈
isnt done by default?
why it doesn't work bruh
for (int i = 0; i < 10; i++){
System.out.println("ciao");
}
🤔
no lol
no
its not
idk
?notworking
"Does not working" is a useless statement. Please describe what exactly is not working, what you expect it to do, and what actually happens. If you get any console errors, also ?paste the entire stacktrace.
?notworking
"Does not working" is a useless statement. Please describe what exactly is not working, what you expect it to do, and what actually happens. If you get any console errors, also ?paste the entire stacktrace.
in commands class works, in main not
first of all why ar eu using that?
👀
Doesnt make sense i mean, atleast describe why, etc
??
stuff to see if in the list there is the nick of a particular player, but to understand in the meantime I did it like this
oh shit dont for int loops
while ?
you can use use for (UUID uuid : listOfUUid)
oh
that doesnt rlly matter
emh
I mean have you learnt java?
it will be compiled to the same
basic basic basic
its just easier to write
i watch the video in my course
Yes epic dont fuck bruh, i mean you never agree
I said white, you said black, and that every time
just saying the facts my man
emh HAHAH
Yeah haha
are you talking about me?
oh okay hahah
verano you need to still practice a lot on your english xD the only time you make sense is when I talk to you in spanish
hahaha
I mean i havent gone to english clases since last month because i dont have enought time to code plugins and get money
put your monitor upside down. makes perfect sense
how do i get the plugin to do something every bit of time?
?di
Guide to dependency injection: https://www.spigotmc.org/wiki/using-dependency-injection/
dependency injection is da way
?scheduling
no its not ?
I mean you can also do a fast research on ?google
oh i read it wrong xcd
I'm watching a presentation on bytecode right now I'm not sure why I thought this would be interesting
no, this is event
its so intuitive to read I should just skip this part
then go google
maven-shade-plugin
get rekt
look at the shade plugin on my lib or like mfnalex's lib or something
than just copy and paste it xD
thats how I do my maven
true
hat?
i'm god
gn
I know that verybody here treat me as idiot but meh im not dumb
your not an idiot your just bad at getting your point acrossed xD
acrus?
the trouble of language bariers
weird sh** closed enligsh
if only everyone just spoke english
You talk a really closed english were != native can understand it
tbh english isn't the best language
Indeed
we just need to use a human engineered language for maximum efficency
i mean its better than my native language
what is ur native lang
dutch
that because you dont speak spanish
💀 dutch
Spanish is really sweaty
idk anything about dutch but I felt like saying that
German right?
dutch == deustach?
ohh i always associated with german
Germany == Deustach
yea xD
yes i know that
i thought that dutch was a short way
indeed maven shade is not working
😡
@sterile token
<build>
<plugins>
<!-- Maven Shader Plugin -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.2.4</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
</execution>
</executions>
<configuration>
<filters>
<filter>
<artifact>*:*</artifact>
<excludes>
<exclude>META-INF/*.SF</exclude>
<exclude>META-INF/*.DSA</exclude>
<exclude>META-INF/*.RSA</exclude>
</excludes>
</filter>
</filters>
</configuration>
</plugin>
</plugins>
</build>
bakka
thats a bad solution
just use shade plugin
is possible to use libraries from bukit with custom repo?¡
Im DUMB not idiot
lol
anybody using something else than package?
? wdym
i mean if you run mvn package will run the build goal
i mean he knows maven
Doesnt make sense wha tu said
I prefer mvn package cuz mvn install installs it to your m2 and I find that annoying for some odd reason
we can't look down upon mvn deploy either its my buddy
install is not donde for that
mvn package - packaging the project
mvn compile - compiling the project
mvn install - installing the project into local repo
mvn deploy - deploying the project into remote repo
😂
alk?
yea alk
😡
its not real 😂
Is shading fucked spigot when has SCOPE COMPILE
😡 😡 😡 😡 😡 😡 😡 😡 😡 😡 😡 😡 😡 😡 😡 😡 😡 😡 😡 😡 😡 😡 😡 😡 😡 😡 😡 😡 😡 😡 😡 😡 😡 😡 😡 😡 😡
don't add scope to spigot
leave blank
provided*
yes
it still shade it
fucked maven***
Definetly maven is idiot
Is doing what his ass signs
hey why are u trolling?
no se?
I could be dumb but i know how to send code and everyting
Oh i just sent the paste thing for convience for you lol
not trying to insult your inteligence lol
oh ok my bad
Sorry man i mreally bad these days
i think i have told u what happened to me
no i dont use SQL
Website and SQL doesnt get together
The combination is WebDevelopement + MongoDB
SQL is heavy dury for working and treating
You should be really mentally prepared
mate could u check the ponm
Its correct
I have parsed it on a website
oh i realize what happenm
the spigot is added cuz of nested dependencies
So the libraries im using doesnt contain provided scope for their own depends
💀 what the fuck
It must be that
Let say i have i use a library which depend on spigot right? So that libraries doesnt contain spigot dependency as provided
So when i use it my project and i shade the project, that nested depedency is shaded
👍
fork it
idk fr tho lol
na i wont lost my time
I have to finish this thing 3d ago
😬
?learnenglish hehe
rood
Hey stop it
I dont have humor and i dont want to swear you
So please i would be really thankfull if you dont disturb my self doing inncessary things
can I disturb you
I mean if smth important no problem
ok 👍🏽
how's your family
if u want to ask me smth or just talk dm me
really important
i mean i just having bad days
the girl i meet is mad with me
Because i did something really stupid
she is so mad that you even forgot how to speak english hehe
not tagging
not disturbing
Why is SQL so fucked I don't understand
PreparedStatement ps = dbc.getDatabase().prepareStatement(query);
ps.setInt(1, 6);
ps.setString(2, "two three");
ps.executeUpdate();
``` I feel like this just shoouldn't work when the second data type is supposed to be varchar with length of 2
JDBC?
well I was just testing out data types on sql tables because I'm going to start working on an API but for some reason it puts in the string "two Three" even though my second table argument is a varchar with length 2
SQLDataType.VARCHAR(1)
it works but I feel like this shouldn't lol
CREATE TABLE IF NOT EXISTS test (id INTEGER PRIMARY KEY, name VARCHAR(1) NOT NULL);
How disable place item_frame?
SQL syntax is okay
not my issue why can I add "two three" if it will only allow 1 char to the table
how do I have a nonstatic thing ran every tick? Im using Bukkit.getServer().getScheduler().scheduleSyncRepeatingTask inside my onEnable of my main
VARCHAR(1) means only 1 character
its saying It needs to be static
is there a way to make it so It well doesnt need to be static?
yea but I was abble to add 8 characters to the table
so fucking jank
no
So im really sure you should be talking about colums
oh another one, i said white, he said black
yes I am but what I meant is that column only allows 1 character so why is it I can add 8 without an error being thrown
Check the table
It should be added 1 char only
You can have duplicate rows pretty sure
You can't. Either your table is setup wrong or you are inserting to the wrong column
here I'll show you everything start to finish give me a second
i mean Varchar only limitate what you can add to the colum
It doesnt limitate how much values you can add to the table
?paste
I just know that varchar(1) limitate how many chars you can add to the colum, not hoy many values related to that colums you can add to that table
Thanks
ok ignore the shitty code I just made builders so I could make statements faster at the beginning as I'm learning sql
https://paste.md-5.net/guwawazomo.cs
The driver name is SQLite JDBC
Connected to database.
CREATE TABLE IF NOT EXISTS test (id INTEGER PRIMARY KEY, name VARCHAR(1) NOT NULL);
INSERT INTO test(id, name) VALUES(?, ?)
first print is the table creation logic
second statement is the insert statement
I deleted my old sqlite file and built a new one from scratch on this run
no errors thrown and no protest even though I set varchar to length of 1
okay good to know lol
oh i didnt know that tho
I was so confused I'm trying to make an API for all DB impl and was confused as hell
thanks ok I think I know a structure that will work now
Is this statement correct? Because its all time returning
put the ! after the (
pretty much
It's why I try to avoid !(a && b) pretty much any instance that I can
It's kind of difficult to wrap your head around
I'm just a smart boy and read the parenthesis first
how do I add noclip to an armor stand
pretty sure you need to get the CraftBukkit version of armorstand and set the field noclip in there
basically is NMS dependent
wdym
the thing is with CraftArmorStand I have no idea what the method is, like is it "a" or one of the 127 other "a" methods or another letter or whatever
then you need to use mappings
Unless you are not on latest version
weird
idk bout other versions
I'm on 1.19
where do I find those?
I just started using spigot for the first time yesterday so I am new to this
oh that why
First of all, have you learnt java?
Its smth really important before starting with spigot
If it is a normal Bukkit ArmorStand just set https://hub.spigotmc.org/javadocs/spigot/org/bukkit/entity/LivingEntity.html#setCollidable(boolean)
Im trying to add my dependency to my other plugin, I keep getting this messange. anyone know why?
Maven or Gradle?
maven
Mind showing us the pom.xml?
I am trying to use the setTabHeader() on the BungeeCord API but I am getting an error that I need to use a BaseComponent... I don't even know what that is. I put in a string. It is giving me errors. How can I fix this? How do I put a "BaseComponent" in?
You know how to use those?
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
I know a little abt the,
Read that
ok
(You need to know about arrays sort of also)
oh, yeah, I got those
@sand vector what repo is colourful tags from?
now you say that ive probably got it set wrong, its supposed to be from the jitpack repo linked to my github
let me make sure ive set it up correctly. im pretty sure I haven't
How do I get the player's body rotation?
version should be Tag
According to jitpack
actually that only works for other entities, I want it to go through blocks, or at least just be able to check if it is touching a block
disable AI and set invulnerable and you should be able to move it anywhere
get the head eye?
I want the BODY rotation
Player#getLocation().getDirection()
ok I'll try that thanks
hmm... I don't see in here how I can fix this.
That was for you to understand what BaseComponent… means
Do I have to like convert my strings to a different object or smthin
new TextComponent("string")^
still doesn't work
BODY ROTATION
but I found it
in the nms LivingEntity
notworking
the armor stand still can't go through blocks
is there a way to check if it's touching blocks?
how are you trying to send it through blocks?
is there a way to do this?
it'll be a lot easier that way
in that case using velocity you will need NMS
generally you teleport stands to simulate movement not using velocity
ah
isnt called blink?
Phase?
Phase is the correct name
it'll just be easier if I check if the hitbox is in/is touching blocks
its noclip, but it's not exposed in the API
simply use NMS so
avoid NMS if there is an alternative
but teleporting doesnt make your resources going down?
I have the NMS thing working, but idk how to use noclip because of the "a" naming thing where every method is named "a"
its called obfuscation
And you should use remapped jar
how do I do that?
which is why you shoudl avoid NMS generally
due to obfuscation you need to build for every version of Spigot
obfuscation is a process for transforming something into a none easy redeable way
one sec
In most of the cases its not really simple
Because you have lot of broken things
And its not recommended
In case of mojang code, u can have legal problems because their code is protected by law
so if we can go to the far easier way to do this, how do I check if the hitbox of the armorstand is touching a block
I have this code and I am trying to run something at the end. It gets to the first part, sending the player a message, but does not get to the very end. I literally cannot figure out why. Anyone know why?
so which line exactly does it stop at
I know it does not get to the end
it doesnt get to the 2nd line to the end
cus tab is not changed
but it does do the outdated client text
I dont know if it stops at the ranks or what
ill check if it stops before tab thing
it does get to the part inbetween the pUUID variable and the if event.getplayer is beatthis101
it does get to part after whole if, else if, and else block of code thing, here
so it must stop at event.getPlayer().setDisplayName(tabname.get(pUUID));
there's ur answer
Line 47:
event.getPlayer().setDisplayName(tabname.get(pUUID));
@drowsy helm
here is whole java class https://pastebin.com/uW8qryMt
why not just put a println at each point it could stop rather than guessing
true
never used println once in plugin development 🤔
also why not optimize your code
it's just a 1 second debug method
and yeah, that could be optimised way more
bro I started plugin development like a month ago
so idk how to optimize
which you need to handle
everything is
no
use a map
why
tabName.put(pUUID, getPrefix(event.getPlayer) + event.getPlayer().getDisplayName());
moving this to separate method
in the method do
I am creating the prefix
Map<String, String> ranks = new HashMap<>();
ranks.put("manager", "[Manager]");
ranks.put("administrator", "[Admin]");
//etc..
for(String rankTag : ranks.keySet()){
if(player.hasPermission("chat." + rankTag)){
tabNameput(pUUID, ranks.get(rankTag));
break;
}
}```
something like that
public class ListenerClass implements Listener {
private HashMap<String, String> ranks = Map.of("vip", "&cVIP", "smth", "&eSOMETHING &f");
public ListenerClass(MainClass plugin) {
plugin.getServer().getPluginManager().registerEvents(this, plugin);
}
@EventHandler
public void onLogin(PostLoginEvent event) {
// your other code
tabName.put(pUUID, getPrefix(event.getPlayer) + event.getPlayer().getDisplayName());
}
private String getPrefix(Player player) {
if (player.getName().equals("your") return "&cOWNER &f";
for(String rankTag : ranks.keySet()){
if (player.hasPermission("chat." + rankTag)) return ranks.get(rankTag);
}
return "NOPRIVILLEGE &f";
}
}```
are maps slow
No lol
u literally were talking about it being slow
that is what I thought u were talkin abt
it's very negligible in this situation
no it's just inefficient code
and takes up way too much space
I'm confused because your ways would take up the same space
not really
make a immutable map
your code is jsut boilerplate thats what we're saying
boilerplate just means it's repetitive
I'm not sure did you debug your code?
use a println and see where it stops printing
okay
Or just use debugger, it's useful to learn
done
that's how it should look like
so now you are able to set 999 prefixes and forget about if else else else else
would be different but I see what u mean
how
the prefixes arent like that
it's an example
return ChatColor.translateAlternateColorCodes('&', s);
}```
println is supposed to print the line where
now you can use & in your code
tf
than just Shift + 7
I use CTRL + shift + a
§
I have autohotkey program
yea
cuz everybody use &
also can bring issues into compilation
I use this plugin for my server tho
there are many reasons not to use §
yea and bold and right colors
basically add vault as dependency
oh yea
and install vault and permissions plugin to your server
yea
LuckPerms or smth
I use lp but not vault
lp doesnt work well with vault
didn't know that
worked fine for me
yea
well switch to Pex if still exists
a lot of plugins require vault
ye
what happened to PeX
cool
tbh i dont rly know how many ppl still use it but idc
luckperms have a wiki page where you can see how to get player's prefix in like 2 lines of code
fancy
String prefix = user.getCachedData().getMetaData().getPrefix();```
User user = luckPerms.getUserManager().getUser(uuid);```
ok uh so I did the System.out.println("text");... where is the printed lines supposed to go
all you basically need
cus I cant find it
in console
console
tho you can do Bukkit.broadcastMessage()
it didnt show up
so it's printed to all players and console
as long as you are solo
it will only be sent to you
look better
this is a bungeecord plugin
Caused by: java.lang.ClassNotFoundException: jerefla.com.smgui.GUI why am i getting an error saying theres no class? <dependency> <groupId>jerefla.com</groupId> <artifactId>sGUI</artifactId> <version>1.0-SNAPSHOT</version> <scope>system</scope> <systemPath>${project.basedir}/src/main/resources/sGUI-1.0-SNAPSHOT.jar</systemPath> </dependency> the plugin jar is in my resources folder
is it meant to be shaded?
oh u were right I did need to look better
maven-shade-plugin google
so uh
i thought it's spigot
it gets past event.getPlayer.setDisplayName(tabname.get(UUID)); but after that it is stuck
and no error?
so it stops on event.getPlayer().setTabHeader(new TextComponent("\n§3§lWild§b§lGames §9Network\n§fYou are currently connected to §e§l" + event.getPlayer().getServer().getInfo().getName() + "\n"), new TextComponent("\n§fDiscord: §9/discord\n§fStore: §a/store\n§fPlayers: §b" + ProxyServer.getInstance().getPlayers().size() + "§7/§b1000\n\n§7playwildgames.net"));
oh... i completely forgot about that
nah no error
because it wouldn't stop for no reason
so you never looked for an error?
well I get a ton of errors from tebex
so its hard to find the right ones
so I thought it was from tebex
are you using Postlogin?
yes
cus I can use methods in that
otherwise there is no bukkit methods
or whatever they are called
ah