#help-archived
1 messages ยท Page 109 of 1
Statistic plugin
statistic plugin
And holy, that's big.
https://www.github.com/DreamExposure/DisCal-Discord-Bot
Specifically the website-rewrite branch
whoever doesn't have Nyan Progress Bar is not a real dev
NovaFox161
how did you open the statistic page from that plugin
I'm not finding it )=
View > Tool Windows > Statistic
https://owo.oooooooooooooo.ooo/i/sl5b.png so many things
Which program do you recommend if I am learning, IntelliJ IDEA, NetBeans or Eclipse?
Caused by: java.lang.IllegalArgumentException: Plugin cannot be null
Ok, 1) Not NetBeans. It's outdated and insecure.
- If you want features, expandability and integration, IntelliJ.
I mean if you know how to do stuff any of those 3 is fine
but if you're lazy
get IntelliJ IDEA
I was planning to try IntelliJ DEA, it seems more comfortable
IntelliJ makes my life so much easier with Gradle.
And Git
Why would someone recommend eclipse
IntelliJ is just better. Eclipse, netbeans, bluJ are all terrible
@frigid ember does your IDE not tell you you must input the plugin lol?
NovaFox161 NetBeans is actually better than Eclipse, and I say that because I've used it for 2 years now
@sturdy oar Never said it was better/worse than eclipse. Just that IJ is better than all 3 of those
๐คทโโ๏ธ dumb way tbh
Because so many people making spigot plugins still compile on J7 for some damn reason
Still shocked Eclipse didn't tell you you were missing values.
IntelliJ wouldn't let you compile with that.
I have to stick with Java8 because people just won't update
I mean, I just force the use of modern java. The server supports j8+, so you can even run it all the way on j14.
IntelliJ is just better. Eclipse, netbeans, bluJ are all terrible
I too like opinions
According to your code.
Yeah but you can't compile with Java 14 features or no one will ever download your plugins
You never set plugin.
You just did Main plugin, never actually setting it.
plugin is null.
You never set it.
That doesn't set it.
Well, you need to get the plugin.
So pass it in with the class' constructor.
public ClassName(Main plugin) {
this.plugin = plugin
}```
And you can also make the plugin variable in that class private and final.
private final Main plugin;
Hey if anyone in here is familiar with how Multi Proxy Bungeecord setups work, please DM me, I have a few questions to ask.
I'll answer it here, but I keep my DMs closed TheRealMrWicked.
or @odd knoll well the question is how i do this
Yes, but I recommend doing some cleaning up.
How would I go about having my commands be like:
/c test
/c test1
/c test2
@hoary idol you just create two bungees and configure them with the same Spigot sub server
have one domain name link to 2 servers
Instead of:
/test
/test1
/test2
ik that roller
I dont think u can link a spigot to 2 bungees
but the domain thing
You can then either use a DNS level software service to distribute them between the two servers or you can use wild card DNS.
ah ok
WildCard DNS is the easiest
So you just add two IPs under the same record, for instance, two IPs under play as an A record.
There will be a 50/50 chance of them getting either of the IPs.
round robin dns
@worn temple shhhh i will switch sometime
Oh yh, round robin.Not wild card.
poor man's load balancer
@hoary idol its free... and easy
It means there's no load balancer element, but it's cheap.
You could still end up with 200 people on one proxy and 50 on the other.
lol
@tiny pebble you create one command then use the arguments String array list that is passed in. You can then just use if statements or a switch to match it (after of course checking args length)
ah got it, thanks
so literally you want me to create 2 A records both with the same prefix (play for eg) pointing to 2 different ip's
yes
Generally yh.
yeah you'd need to take tps, players, etc all in consideration
Yep.
ah ok im not for that rn
quite expensive to do as well for just jining
Or more just, any data you want to affect how many people.
Probably cheaper to just spin up another 5 proxies.
Yeah, its why servers like hypixel don't even use a known fork of bungee or spigot.
or another question
Bear in mind player count won't sync.
use redis for that
@odd knoll Unless you have a bungee plugin that fixes that. There's a bungeeRedis plugin that allows for that
^^
and make your own playercount thingee
yes i have reddis bungee already setup
Nice.
redis server in a vps
Its a premium plugin I think, I bought it, kinda regret it because it was broken.
if proxy 1 is brought down all players on that proxy will get kicked but the other proxy will be unaffected
Should have just made my own lol
Yep. And lol.
correct?
As long as the issue is specifically related to that proxy instance.
You could still have the machine crash (unlikely).
Yep.
Another thing with round robin dns.
It doesn't take into account offline servers. If one of the proxies is offline, it may still give them that IP to connect to.
because you require to pass in the class in the constructor and you don't.
new SpawnCommand(this)

so they could try to join the offline proxy and just see the offline screen
Yep.
lol
So you'd have to make sure all of them are online.
Although, there would be a chance they get given an online one.
50/50
That's what happens with round robin. If you use a proper load balancer, it will see the offline instances and make sure players are always sent to an online instance.
basic compsci
google
@bronze marten ...
I'm 100% self taught
not true u learned from others
@bronze marten ...
@hoary idol no fr xd but theres no documentation for it, its a broad subject so u just have to see a lot of things and relate them
like theres a tutorial for specific things
I just messed around for ages.
but not for how to set up a minecraft server with round robin dns, exactly 5 bungee servers, 50 plugins etc
when i learn i will make a full post
train in your google skill i'd say xd
like to help people
train your google fu
most helpful, know where to find stuff xd
Kung google fu
like i dont plan to use load balancing multi bungeecord setup
but i wanna know how it is done
magic /s
the real question, How much time do i want to waste?
... you know what i mean
experience
it took me half year to just figure out everything needed for a single bungeecord setup with data being well synced between all servers, for stuff like parties, friends
ik the struggle
when i first learnt about bungeecord i was like WHAT!!!
how is that possible
magic
i thought multi world was the top of it all
@odd knoll is there a way where you can setup the bungeecords, in which when you take down proxy 1 it doesnt kick any players and they fallback to the second proxy?
basically what happens with spigot servers
Not sure. Don't think so.
dont think you can for the case when bungeecord pops out
like when the server crashes or sth
Like, I know how to do this stuff but I've never messed around with things related to it heavily.
Nice @frigid ember ๐
oh ok
bcs that would need active listening from the other proxy I think
If the proxy crashes, you'd need to have a system other than that proxy to move them over.
./effect clear
That works with Spigot servers crashing because they're logged in through the proxy.
right because the proxy manages player location
yeah so basically you need a bungeecord for bungeecord
yeh lol
Or some super system above it all that's custom.
i dont mean in game ๐คฆโโ๏ธ
@frigid ember lol im meming
@frigid ember https://zak.pink/2020/05/Obedient-Camel-7440.png
can I ask a quick spigot plugin dev question here or do I have to make a post?
yeah so basically you need a bungeecord for bungeecord
@bronze marten dude that makes no sense, meaning, if the "bungeecord for bungeecord" crashed its the same single point of failiure
so its an infinite problem
That's why issues occur with things.
thanks! trying to print an arraylist UUID into chat using p.sendMessage(). It work with e.getPlayer, but I'm using it in the onCommand class with my command so the object is cast Player p = (Player) sender so when I type p.sendMessage it will print strings, but when I try to print the ArrayList<UUID>.toString() it just prints []
There's a limited amount of redundancy you can have.
you cant have it all
Where's that ArrayList<UUID> coming from @toxic valve?
thats comp sci
If you're literally just doing that, there isn't going to be anything in it.
it's a global variable in my CommandExecutor class. the same class @odd knoll
Can you screenshot it.
Are you actually doing ArrayList<UUID>.toString(), because if so, you're not referencing the variable.
ima watch the SpaceX launch now.
public ArrayList<UUID> jumpDamage = new ArrayList<>();
p.sendMessage(jumpDamage.toString());
Player p = (Player) sender;
You sure you add to jumpDamage?
that's the variable, i'm assuming it has something to do with casting?
yeah I have another class that prints the array list to the console
Do you ever jumpDamage.add or set it to another array list with something in it?
it's just not printing into chat with the command class, another class prints to chat fine
Because if not, it's empty.
@odd knoll
I was going through a spigot thread (https://www.spigotmc.org/threads/multi-bungeecord.14193/) and i found this -
You can use the RRDNS to make a load balancing with an unique IP, send people to one "login server" and then send players with signs or portals to the "main server lobby" or the "minigames lobby"
To do that you may create two SRV records with this configuration:
mc.yourserver.net ----------> priority 10, weight 1, port 25565, target yourfirstbungeecord
mc.yourserver.net ----------> priority 10, weight 1, port 25565, target yoursecondbungeecord
If you know what he is doing then explain.
They're just doing exactly what we explained.
Not sure about how SRV records will affect it, but I'm pretty sure it can change the chance.
If @bronze marten is free, it'd be better for them to explain. They'd definitely know better.
srv record wont affect your round robin dns
just having 2x a record is also fine
but yeah the weight makes the randomness
@odd knoll fixed it. arraylist was global variable but it needed to be static ๐คฌ
thanks anyway
Hello! I've been messing with scoreboards recently and for some reason I get kicked from the server I test on when I join, it seems like the error is related to having over 40 characters in a string though the strings one by one don't have over 40 charactersl, can anyone help?
?cba
?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.
Read the bot message. One of the strings has over 40 characters. Maybe you could post the code and the error lol.
there has to be more to that exception
I don't think so
Something is eating the error. This is more too it
Sorry for the question I asked that Nova responded to
rn its just repeating the caused by and the environment
I found it!!
PrisonScoreboard.java:51?
I get an error when I'm using scoreboards that's only a kick message
Says io.netty.handler.codec.DecoderException: The recieved String length is longer than maximum allowed (57 > 40)
Each line of my string has less than 40 characters though in the scoreboard
Here's the scoreboard code: https://hastebin.com/ixivegahuk.js
The comment saying characters can't be 40 characters long or more is what I thought'
After the error though it seems like it isn't\
Debug itm comment out one line at a time till it doesn't kick you. Then you know which it is. Because it clearly has a line over 40 characters.
There is a way to check when player login the server if this the player first login?
ok thanks!
Thanks Nova, I found out I was an idiot
I tried assigning a hashmap without identifiying what part of it to use so it tried printing out everything
Though 1 really weird thing now
In here:
website.setScore(1);
discord.setScore(2);
blankLine.setScore(3);
microStars.setScore(6);
blankLine3.setScore(5);
onlinePlayers.setScore(4);
blankLine2.setScore(7);
rank.setScore(8);
username.setScore(9);
It all works though the only blankline that appears is 7
Oh wait
Yep nevermind I';m fine
please use pastebin/hastebin
Y u do an instanceof check?
Fist off, don't do this: https://owo.oooooooooooooo.ooo/i/4yq4.png
it'll error before you even get to the instance check
second, your formatting is terrible, but that's just a formatting issue
When the command runs, keep some sort of list of players that just used it that is cleared out after a certain amount of time. Then just always be listening to the event and only do the action if the player' s ID is in that list
But don't all do that in the same class
That is very very simple
XY problem
When the command runs, keep some sort of list of players that just used it that is cleared out after a certain amount of time. Then just always be listening to the event and only do the action if the player' s ID is in that list
He should use a set
@zealous yoke a map, but same idea. was just quickly explaining what to do.
Why a map? He just needs a set indicating which players used the spawn command. A set is the perfect collection for this
You know google?
Then why dont u use it?
I accidentally made a bug in Spigot where my walking speed is permanently increased, is there anyway I can delete something like a player file to reset data?
Check out that site for amazing java resources
@frigid ember you don't. Stop. Learn java. Then come back to spigot.
okay dude, but how the heck can I listen for the event inside the if statement
You cant
It is as simple as that
Again XY problem here
Yep
And occum's razor
As well as a fundamental misunderstanding of programming principles.
@frigid ember Yes. learn java, then we will welcome you back into the dev community will open arms.
The issue with mc dev I constantly find is people who have no knowledge of programming at all just trying to just head first into the literal ocean that is programming. Start out in the kiddie pool first or you're gonna drown.
don't use eclipse. and just import it into IJ.
There's literally zero reason to use 2 IDEs for the same project
Hello, how to remove a element from TabComplete of command ? ( I register my commands without plugin.yml )
like: /example Element_ToRemove
I use this for register my command : https://gist.github.com/redsarow/46a9eb30991bf6007508f72aba7da89f
@frigid ember just open the project in IJ plain and simple.
and i've heard intellij is better
Whichever one you prefer is better
Try it, switch back if you don't like it
Hello, how to remove a element from TabComplete of command ? ( I register my commands without plugin.yml )
like: /example
Element_ToRemove
Don't constantly repost the same question, especially when its still on the screen and visible. If you don't get a response, or the people here don't know the answer, open a thread on the forum, where you can then bump it after 24 hours instead of spamming chat. Thanks.
return to Intellij you
?
๐
When the PlayerJoinEvent set the join event message on the server, there is a way to check what plugin did that?
No
Oh:(
ArmorStand armorStand = (ArmorStand) loc.getWorld().spawnEntity(loc.clone().add(0, 1, 0), EntityType.ARMOR_STAND);
armorStand.setVisible(false);
armorStand.setCustomName(title);
armorStand.setCustomNameVisible(true);
armorStand.setRemoveWhenFarAway(false);
I have this, but how would I change it so players can still hit entities through the armor stand
When I join my server (even without plugins installed) the server says PLAYERNAME joined the game
There is a way to remove that?
Someone?
Chill. Allow people some time. Its been a whole 8 minutes.
its a built in minecraft behavior. a plugin has to override and cancel that message event.
ok
yo is there a utility function that takes a string and returns it without any ChatColor data?
ChatColor.stripcolor
ty!
If I want to create a plugin that is compatible in version 1.8.8 as in 1.15.2, is it enough to add those 2 JAR files?
And doesn't it matter the order in which you import the JAR files?
so im trying to subtract an amount from a itemstack in a players inventory if the size is greater than 1, but the problem is it doesnt subtract
anyone know of any good free queue plugins with donator priority support?
@fathom shard show code
Sorry forgot to comment, its resolved i wasnt updating the stack after
getting confusing results, for custom death messages is it better to use EntityDamageByEntityEvent or PlayerDeathEvent?
@dusty topaz I'm trying to get the killer "xx was killed by xx" etc, so I would use PlayerDeathEvent over that? Wouldn't I have to use EntityDamageByEntityEvent
yo how do you make a compass track someone
anyone with experience of the plugin EasyBackup I can borrow a few mins off?
hello can someone respond
@green skiff CMI can do that
anyone know of a plugin that lets you know which bungeeserver you connected to?
that doesnt broadcast to everyone else
so not a custom join/leave msg
Does anyone know of a plugin that'll allow me to use unbreaking past 3? Like, that'll make unbreaking 10 work
I've seen a lot of servers with unbreaking IX on custom items to make leather sets viable, but I haven't figured out how to get it to work.. whenever I enchant past unbreaking 3, unbreaking either stops working or only does level 3
@toxic valve on playerDeathEvent you can getKiller and getVictim
No
can you change the ClickAction of a TextComponent after you already sent it to the player? IE disable it
public void onPlayerDeath(PlayerDeathEvent event) {
Player killer = event.getEntity().getKiller();
Player player = event.getEntity().getPlayer();
event.setDeathMessage(player + " was killed by " + killer);
}```
Example i just tested
hey choco, is the codemc nms repo legal
if i were to include it in my maven project that is
.
anyone know of a plugin that lets you know which bungeeserver you connected to?
that doesnt broadcast to everyone else
so not a custom join/leave msg
not specially a return current viewed server plugin
doesnt /server tell you what server your already on?
i mean it does
and i can just edit tablist
but i want it as a chat msg
or titlemsg idc
just dont want the rest to have to see it
dm if you need something like that doing, its really simple to do
i will keep that in mind
Question: Why is isOnGround deprecated ?
Deprecated.
Inconsistent with Entity.isOnGround()
Checks to see if this player is currently standing on a block. This information may not be reliable, as it is a state provided by the client, and may therefore not be accurate.
hey choco, is the codemc nms repo legal
NMS can't be publicly mirrored. So... no
even Spigot's Nexus doesn't have NMS
Just the API. That's it.
ok thanks
Running BuildTools will local install the server jar
i was wondering because of whether or not i would be allowed a project to maven central because of it
didn't want to go pulling any illegal moves that would be troublesome
does anyone know how to define a player? if it is not the sender?
I would aprecciate the help
๐
@strange grove from what
well
the player is the sender
but
it's not registering
so
i'm asking about entitys
I don't understand are you trying to get the sender as a player
Bukkit plugins & Maven Central are generally a big no no because Bukkit itself isn't on central
Or get the player from an argument or
well
jitpack is a good alternative afaik, but again, but NMS
A CommandSender can be cast to a Player, just make sure it is a Player first.
what i'm trying to do is make the code deploy a hologram @dusty topaz
wat
but it goes for the itemframe
and places itself there
or at least it's location
do you know how to do this
i have been stuck for over an hour i think
i have no idea what you just said, but to get the players location just use Player#getLocation
and to get the player, Player player = (Player) sender;
yes i know this
but
i wnat to get the itemframe
that's getting deployed
how do i do that
getting deployed?
show some code lol
ok
well
it's not mine
it's someone elses
i'm editing the code for personal
use on my server
and this plugin is called animated frames
but i can show you the afcreate command i want to us
e
@Synchronized
public AnimatedFrame createFrame(String name, String source, ItemFrame firstFrame, ItemFrame secondFrame) {
if (frameMap.containsKey(name)) {
throw new IllegalArgumentException("Frame '" + name + "' already exists");
}
JsonObject meta = new JsonObject();
AsyncFrameCreationEvent creationEvent = new AsyncFrameCreationEvent(name, source, firstFrame, secondFrame, meta);
Bukkit.getPluginManager().callEvent(creationEvent);
name = creationEvent.getName();
source = creationEvent.getSource();
AnimatedFrame frame = new AnimatedFrame(firstFrame, new Vector3DDouble(firstFrame.getLocation().toVector()), new Vector3DDouble(secondFrame.getLocation().toVector()), name, source);
frameMap.put(frame.getName(), frame);
frame.setMeta(meta);
return frame;
}
put it in a code block
how so ?
ok
' ' '
' ' ' @Synchronized
public AnimatedFrame createFrame(String name, String source, ItemFrame firstFrame, ItemFrame secondFrame) {
if (frameMap.containsKey(name)) {
throw new IllegalArgumentException("Frame '" + name + "' already exists");
}
JsonObject meta = new JsonObject();
AsyncFrameCreationEvent creationEvent = new AsyncFrameCreationEvent(name, source, firstFrame, secondFrame, meta);
Bukkit.getPluginManager().callEvent(creationEvent);
name = creationEvent.getName();
source = creationEvent.getSource();
AnimatedFrame frame = new AnimatedFrame(firstFrame, new Vector3DDouble(firstFrame.getLocation().toVector()), new Vector3DDouble(secondFrame.getLocation().toVector()), name, source);
frameMap.put(frame.getName(), frame);
frame.setMeta(meta);
return frame;
} ' ' '
dang 5t
you need a newline after the ```
@Synchronized
public AnimatedFrame createFrame(String name, String source, ItemFrame firstFrame, ItemFrame secondFrame) {
if (frameMap.containsKey(name)) {
throw new IllegalArgumentException("Frame '" + name + "' already exists");
}
JsonObject meta = new JsonObject();
AsyncFrameCreationEvent creationEvent = new AsyncFrameCreationEvent(name, source, firstFrame, secondFrame, meta);
Bukkit.getPluginManager().callEvent(creationEvent);
name = creationEvent.getName();
source = creationEvent.getSource();
AnimatedFrame frame = new AnimatedFrame(firstFrame, new Vector3DDouble(firstFrame.getLocation().toVector()), new Vector3DDouble(secondFrame.getLocation().toVector()), name, source);
frameMap.put(frame.getName(), frame);
frame.setMeta(meta);
return frame;
} ``
sigh
dang 5t
im bad at this
sry
for my bad spelling
and the heck of a hassle im causing you
@Synchronized
public AnimatedFrame createFrame(String name, String source, ItemFrame firstFrame, ItemFrame secondFrame) {
if (frameMap.containsKey(name)) {
throw new IllegalArgumentException("Frame '" + name + "' already exists");
}
JsonObject meta = new JsonObject();
AsyncFrameCreationEvent creationEvent = new AsyncFrameCreationEvent(name, source, firstFrame, secondFrame, meta);
Bukkit.getPluginManager().callEvent(creationEvent);
name = creationEvent.getName();
source = creationEvent.getSource();
AnimatedFrame frame = new AnimatedFrame(firstFrame, new Vector3DDouble(firstFrame.getLocation().toVector()), new Vector3DDouble(secondFrame.getLocation().toVector()), name, source);
frameMap.put(frame.getName(), frame);
frame.setMeta(meta);
return frame;
} ` `
why isn't it working?
@Synchronized
public AnimatedFrame createFrame(String name, String source,
ItemFrame firstFrame, ItemFrame secondFrame) {
if (frameMap.containsKey(name)) {
throw new IllegalArgumentException("Frame '" + name + "' already exists");
}
JsonObject meta = new JsonObject();
AsyncFrameCreationEvent creationEvent = new AsyncFrameCreationEvent(name, source, firstFrame, secondFrame, meta);
Bukkit.getPluginManager().callEvent(creationEvent);
name = creationEvent.getName();
source = creationEvent.getSource();
AnimatedFrame frame = new AnimatedFrame(firstFrame, new Vector3DDouble(firstFrame.getLocation().toVector()), new Vector3DDouble(secondFrame.getLocation().toVector()), name, source);
frameMap.put(frame.getName(), frame);
frame.setMeta(meta);
return frame;
}
hmm
mind not spamming the channel
hi, if my server is dropping 5~ ticks per second down to 15TPS when there are two people on the server with 40% ram being used would the TPS drop be from the hardware at that point?
sry sry
um
hmm
well i think i've reached a new milestone "Dumber than a box of Rocks".
um
so what do i do to get the item frame @dusty topaz
as the places location
hm
so you literally already have the item frame
so what do i do then
to tell it to get an item frame and place the hologram there?
whatever you need with the itemframe
hm
(1)
```java
insert your code here
```
(2) Use a hastebin for large snippets of code
if (Entity instanceof ItemFrame){ ((ItemFrame) Entity).getLocation(); }
hey guys would you do this?
why not?
Why? Entity has a location method ;P
^
well
The cast is unnecessary here
im trying to spawn a hologram in that specific loaction
@subtle blade
if you want to know what I want to do
That's fine, but as far as your snippet goes, it's unnecessary. entity.getLocation() accomplishes the exact same thing without the need to cast
Entity defines getLocation()
how do I define
entity
i'm very bad
at this
and i forgot which video it was
so
yea
i would rly aprecciate it man
if you told me
how to define it
You don't define one. You get one from some source. Whether that's an event or some other getter
Entity-related events, etc.
You can spawn one if you'd like
how so?
for some reason when a player clicks in my gui, it clicks twice
for example if they click open settings gui, then it opens the settings gui and clicks an option in the settings gui
hey i'm trying to get the location but the codes not working and i've got no clue how to fix it any pointers?
` ArmorStand hologram = ((ItemFrame) Entity).getWorld().spawnEntity(ItemFrame.getLocation, Material.ARMOR_STAND);
``
`` ArmorStand hologram = ((ItemFrame) Entity).getWorld().spawnEntity(ItemFrame.getLocation, Material.ARMOR_STAND);`
and can't seem to give it a loacation
location
hello @anyone?
๐ฆ
ItemFrame is that a variable name?
no
it is the material
``ArmorStand holograph = (ArmorStand) ((ItemFrame) Entity).getWorld().spawnEntity(((ItemFrame) Entity).getLocation(),EntityType.ARMOR_STAND);
holograph.setVisible(false);
holograph.setCustomNameVisible(true);
holograph.setCustomName(ChatColor.BLUE+"hello!");`
this is my new one
but
it still does not work for some reason
What is Entity ?
That is your problem. You will have to get location from a declared entity. You can't just get a location from a class because it doesn't actually exist.
hmm how do i do this friend?
Well it depends on the function parameters that you are creating the armorstand in
Are you trying to create an armor stand on a command? or an event?
on a command
but
well actually let me send you the full code
f (Entity instanceof ItemFrame){ ArmorStand holograph = (ArmorStand) ((ItemFrame) Entity).getWorld().spawnEntity(((ItemFrame) Entity).getLocation(),EntityType.ARMOR_STAND); holograph.setVisible(false); holograph.setCustomNameVisible(true); holograph.setCustomName(ChatColor.BLUE+"hello!"); }
f is not part of the code
i was just typing quickly
ok?
If you are unaware of what a parameter is and how to properly pass variables in functions then it is obvious that you need to learn java.
yes
but right now
I would like an answer
plz
thx in advance
i'm halfway done
I just need this little bit and i think i got it covered
I understand that you would like an answer and I would happily give it to you but you are not going to learn if people keep spoon feeding you. You are going to keep asking the same questions over and over again.
yes
that is true
but i have been surfing the web for weeks now
trying to find an answer
so you would understand correct?
You need to learn rather than trying to find a specific answer.
If you learn it then eventually you will come across the same answer and be like oh heh I know this now.
What is your preferred method of learning?
well i like to be hands on
It can be watching videos, reading things, taking free classes.
and be given a challenge
so i watch a video
then do a diffrent thing using the stuff i know to create it
There are quite some nice hands on coding classes online that are for free
where you have to solve certain questions by writing code
yeah
I thing that would best suit your way of learning
how do you make a compass tracksome on the simple compass plugin
probably
but
is it wrong to ask a question
I know
and I got a stop being spoon fed
but i need help
this is the last strectch @velvet halo
the very last part
and i'm finished
can someone answer
It is completely fine to ask questions. However some questions indicate the experience of a developer and it is a huge help if they know a bit of java so simple problems can be solved
Mainly the questions asked here should be in relation to the spigot api rather than java itself.
yeah
can yall just answer
and if we can see that you can't do something because your java experience is stopping it from doing so then we suggest you learn java.
Because in the long run it is going to help your journey using spigot.
yeah
for some reason when a player clicks in my gui, it clicks twice
for example if they click open settings gui, then it opens the settings gui and clicks an option in the settings gui
@green skiff If you are asking for help about a certain plugin then I suggest you contact the author of that plugin. If you want to create a compass plugin that tracks people yourself then I am afraid you will have todo it yourself.
Also @strange grove I recommend codeacedemy java classes as that gives you a hands on experience.
ok
You pretty much learn the reason why you are typing certain code
and what the code you have typed does.
You will see once you learn more programming languages that they have a lot in common.
Most languages have if statements and data types.
and lots more
Hey guys, in eclipse is there any way to make it so when I export a file it does that last save name for the project im working on instead of the last name that I exported with? (Please no use IntellIJDEA responses)
https://hub.spigotmc.org/stash/projects/SPIGOT/repos/spigot/browse What license is this?
i didnt have a plugin folder so i just made one; will that work?
the server should automatically create it for you. also you should try if its work or not.
okay thanks
i can't cancel my repeating task, it throw IllegalStateException: Not scheduled yet and still repeat
What are you initially trying to accomplish
Well the exception from BukkitRunnable#cancel() is because the task wasnโt scheduled yet
Does it have to be โasyncโ otherwise you might just want to go with BukkitScheduler#runTaskTimer()
int count = 0;
Bukkit.getScheduler().runTaskTimer(plugin, task -> {
if (!(count >= 10)) {
count++;
// if count is 0-9
} else {
task.cancel();
}
}, 0L, 20L);
Not the best code but you get the idea
Then just call task.cancel() if inside the consumer or else just create a reference variable as the runTaskTimer() returns a BukkitTask
have an error
thats definitely not valid bukkit code conclure
there's no method that takes a task like that'
Consumer<BukkitTask> ?
You can do a lambda instead
oh I stand corrected
its a relatively recent edition though, theyre probably using 1.8
From what I know legacy versions doesnโt have Consumer<BukkkitTask>
Yeah
Might want to use runnable then
Oh it is a new addition, that is super helpful!
BukkitTask task = Bukkit.getScheduler().runTaskTimer(plugin, ()->, 0L, 20L);```
Just changed my spell code, how did I not know about this >.<
plugin.getServer().getScheduler().runTaskTimer(plugin, task-> {
if(spell.finished) task.cancel();
spell.process(player);
}, 0L, 0L);
It is actually a protected field

:(( how can i fix it
You could probably cancel it with the id
Thatโs certainly the easier way of doing it
error
i have a new forums account can i link it?
Create a reference for the task and get the id from the task and cancel @wheat pumice
hello??????
No clue
You should not have a new forums account unless you got prior approval.
how do i get approval?
What's the reason for a new account anyways?
the other one is with my old email i no longer have access to
Yo real talk i need help identifying an asian tik tok song who can voice chat?
the other one is with my old email i no longer have access to
@vagrant hornet last seen: 21 minutes ago
I'm calling BS
you can change your email, that's not a reason for making a new account
MY SERVER KEEPS CRASHING WHEN NEW PLAYERS JOIN?!?!?!? Is this a spigot bug or something?
P which plug-ins do you have and what is your console.log say
Recently I've been trying to get into coding Spigot plugins for my personal Minecraft server, however I had a little question about this line in the IntelliJ guide.
"Warning" Scroll up, read all the steps again, and Add a server.jar to your external library list, before continuing to step 3. Otherwise, the IntelliJ idea program will not show the auto type suggestion popup for JavaPlugin.
When it says server.jar, does that mean the one from Minecraft.net or does it mean I can use like a paper Spigot one?
Also, if I'm completely honest I have no idea how to get a normal Spigot server jar
ok nvm I'm running into this weird bug no when I try to get Spigot from BuildTools
no matter what I do and how much memory I specify, it always says that I have less memory available than the max
and it never changes unless I change the max
hello
no matter what I do and how much memory I specify, it always says that I have less memory available than the max
@violet peak What are you trying to do?
Oh, I guess that somehow fixed itself
I was trying to run BuildTools.jar
and it was being weird but I ran it for like the 10th time and it started working
on my server if i select AUTO UPDATING: spiggot 1.15.2 (locked to 1.15.2) will it automatically update?? im using shockbyte
If Shockbyte is your host, which I am assuming it is
then yes, it'll automatically update
ok thanks
How can u add a permission to a player ? Does player.addPermission('lp.perm') exist ?
Vault
Never understood the massive interest people give to Vault
Simple
If you're developing for yourself only, I see literally no point in using it
Just for learning purposes perhaps no
Most perm plugins have their own API
Why learn something you'll most likely never use
:๐ด
Making it very annoying to support multiple perm plugins if you going to add each one as a dependency
If you're developing for yourself only, I see literally no point in using it
@sick citrus
You never seem to read everything
:p
Maybe if bukkit's perm system didn't suck, we wouldn't need this
How hard would it be for them to add string based perms
I mean Vault has its place not only for that but I mean most people use it on their own server for the chat and economy stuff so why not just use the API as well?
Let's be honest, I know no one who develops their own plugins that stick with Vault for economy/chat stuff
Not saying they don't exist
But recommending the use of Vault to someone who doesn't have a need for it is a bit silly
If you literally only need to add a few permissions, the easiest would be to use your perm plugin API...
Or to learn how to use permission attachments. It's not that hard and you can have a helper class handle then big work
Even tho it sucks
If you think so 
Well I mean if you know have a perm plugin with itโs own api go with that or learn how to make your own perm system if itโs personal business but didnโt really know the purpose at first and still donโt know and well Vault has support for many plugins which is why Iโd probably use it but I am agreeing what youโre saying
Why invent the wheel if it has already been done for you
Its not like vault is bad
Its super lightweight
And useless
Not everything needs to be โcustomโ because you dont want one feature of the plugin
And useless
@sick citrus then fork the project and add your stuff to it.
Eww no
Make a PR, maybe others can enjoy from it as well
Why do that when you can just attach a permission in 5 lines
With vault its 2
Luckperms its a few more, but thats because it can be setup in a distributed fashion
Just saying, dont spend a lot of time on stuff that already exists lol
Thereโs a nice book about this type of thing: โfrom zero to oneโ
Does BungeeCord have RCON?
With vault its 2
@bronze marten
... You forgot to count Vault code in there. But you know...
It's 5 lines of code with bukkit api.
How can i use vault to add permissions to players
Show me how you do it in Vault without the bukkit api. I'm all ears.
??? Are you trolling
How can i use vault to add permissions to players
@worn gate Thereโs the VaultAPI on github which contains a nice example :) https://github.com/milkbowl/Vault
It contains methods how youโd obtain thePermissionobject, and then that has the method https://github.com/MilkBowl/VaultAPI/blob/master/src/main/java/net/milkbowl/vault/permission/Permission.java#L183
Weet iemand of BungeeCord RCON heeft?
@naive mountain deze discord is engels makker
Yeah apparently it's not supported natively than
For open-source plugin should i include .idea folder and .iml file?
nah
Most ppl will say no
Some ppl will say yes
It makes sense to include run configurations for example
Or if the project has special settings, etc
Generally, this means you have ide specific stuff, so it might be frowned upon
But intellij is the only ide worth using anyways
๐คฆ
Aikar is an example of somebody who straight up commits all ide configs
hi, is there a guide to let you know how to start coding plugins, im new at this and im confusedn, thanks
or you can watch many the tutorials on youtube; TheSourceCode, Noah Rubin - formerly Pogo
.-.
without tutorials there wouldnt be this many people knowing how to make plugins
Seen lots of bad tutorials and the bad thing is that most people who doesnโt understand will end up copy paste into their ide
yeah if you're going to copy, at least get proper code to copy from
Is the server boost permanent or you have to pay it every month?
Every month
Anyone wanna tell me why this isnt working
if (Modifier.isPrivate(field.getModifiers()))
{
field.setAccessible(true);
field.set(this, conf.getFile().get(profileID + "." + field.getName()) );
Main.instance.postConsole(field.getName());
Main.instance.postConsole(conf.getFile().get(profileID + "." + field.getName()) + " ");
}``` I'm getting a can't set int field to null value but when i print it to a log it gives me a non null value?? lmao
primitives cant be null obviously
yes but I'm printing Main.instance.postConsole(conf.getFile().get(profileID + "." + field.getName()) + " "); and it gives me the correct output, its not null
So it shouldnt be spitting out the error?
Hi, can anyone help me with cloning players? (When someone joins a minigame, 2 players join, but they clone to 3, and then the problem is, for example, that the game never ends or breaks)
Or does anyone know a good plugin on the Menu?
wanna elaborate on that a bit more? I don't understand your question
for example I play with a friend on my server, there are two of us, so we're going to play BedWars, but it closes us to 3 players
hey all, does anyone know how using buildtools to stop it from downloading portable git? I want it to use my local git installation?
I can't send image to this channel :/
maybe you need to verify?
also it keeps changing my git username which is annoying, can that also be disabled?
Yes, i verifed
does it allow now?
Yeah, done
My menu, after click on game After clinking it sometimes closes me to 2 (I have a BungeeCord)
@limber moth I think the --dont-update flag is what youre looking for
idk why your name is resetting though
could be because a random exception is thrown
hey! i want to create trails for arrows, but this code doesn't creates enough particles. what can I do to increase the number of particles?
Arrow arrow = (Arrow) e.getProjectile();
BukkitRunnable task = new BukkitRunnable() {
@Override
public void run() {
//particle util
Utils.fromStringEffect(rs.arrowEffectName).display(new Vector(0, 0, 0), 0.1f, arrow.getLocation(), 50d);
}
};
task.runTaskTimer(main, 0, 1);
you can do a for loop to spawn e.g. 5 particles each run() ?
for (int i = 0; i < 5; i++) {
//spawn particle
}
but theres also a count variable in Bukkit.spawnParticle() ?
does that utils method you have also have one?
does that utils method you have also have one?
@bronze marten yes it has
my concern is that if I spawn more particles, they all will be in the same location, and the general outcome doesn't change
so what is what you want then? A smooth arrow trail?
well a kinda continous trail
like the original trail
just with custom particles
then you would need to spawn particles in the direction of the arrow
like this runnable can only spawn each tick
after a tick the arrow has moved
so you need to spawn particles in between the arrows old position and new position
well yeah
@limber moth I think the
--dont-updateflag is what youre looking for
@bronze marten Is there a list of flags somewhere that is documented?
oh I see it, thank you @bronze marten !!
I want to disable this ->
I have git installed, I do not need portable git installed / downloaded every time I run buildtools
is there a flag for that? I dont see one
what it should do is, if it cannot resolve git or a specific version, THEN download portable git
Ah I see it checks that after
should check that first, if it fails then get portable git ๐
hmm interesting indeed, dont have windows myself ยฏ_(ใ)_/ยฏ
sure I think so?
but maybe make an alternative flag for it, so it doesnt break already in place installations
In my eyes, the logic does not make much sense
In think the main goal of that final check is to know for sure if git has been installed after all tries to check for current git installation + try to download
You could add a flag option to disable the git portable download
I think that solves your issue + does not break current installs
thats really a patch vs an actual fix xD
But yes you do have a point about not breaking current installs but I dont see how it would tho
I dont see it as well, but if it could its better with the flag, idk tho
you could make a description msg asking if it was the right logic or sth
im suprised not anyone else brought it up, everyone must be using linux then! ๐
yeah ill take a look into it and experiment with it
nobody is forcing you to use buildtools
might as well just use the scripts manually
Hello! I have recently bought and downloaded โtreasure petsโ if someone could be so kind and help me out thank you! (Just pm me)
Does Bukkit.getScheduler().runTask() run synchronously?
@quasi harness contact the plugin developer would be your best bet
yes, it schedules a sync task
yup
I pmโd him about 15 hours ago no response
runTaskAsync() then would be async from the main thread
maybe a longer response time for him in these times, maybe leave it go a day or two? After that maybe try again? Does he have a support discord or something?
I pmโd him about 15 hours ago no response
@quasi harness its weekend tho
true that
I sometimes take up to a day to respond, life does not revolve around minecraft xD
Sorry ๐ I live in a diff Timezone to everyone rlly
Is it possible to limit/stopping chunk generation in Z-Direction? So that a player can run endless in ยฑX-Coords, but the world just is generated to Z=ยฑ100
CE(S)T gang
Is it possible to limit/stopping chunk generation in Z-Direction? So that a player can run endless in ยฑX-Coords, but the world just is generated to Z=ยฑ100
@high minnow I think you would need a custom generator for that, just "cancelling" a chunk generation is not possible I think
but never messed with chunkgens, so dont quote me on that lol
yeah, you would most likely want a custom chunk gen for that
I created an API that allows delegation to vanilla, that would be perfect for this
I use it to generate plus shaped worlds of any size https://camo.githubusercontent.com/c2b95dc3e0fdf20474363f61774e73211f6cd819/68747470733a2f2f692e696d6775722e636f6d2f374b4966786a312e6a7067
Setting up perms is seeming near to impossible for me I am paying this guy to set it up but need to give him perms that the ranks can use
F
Well, yea. You're basically paying someone to write lines into a configuration file for you
and you're telling him what to write lol
How can i do custom mob spawns?
So that i make a custom mobs, which spawns like normal zombies (Lightlevel and so)
you'd either need to do the spawning and the checks yourself, or, basically, hook into the spawn events and replace them with your own mobs on a chance or something
Creature spawn event?
wow really? can i become a professional file writer? ๐ค
is there such thing as a unique server ID for a spigot server? Before there used to be getServerName or getServerID but that is removed since last year
?
They had no real definition
So, no. There isn't. Nor is there much use for one either, really
okay, i am a complete noob at spigot,
but how do you do comments in config.yml file?
with "#"
oh okay thank you!
e.g ^
if your using windows, notepad++ will pickup that as a comment and highlight it in green
np
So, no. There isn't. Nor is there much use for one either, really
@subtle blade True but I have a use case so there is use for it xD
any good editor does that
true
That use case is?
because I can't think of anything aside from DRM
Which isn't a valid use case imo lol
oh and also, is spigot backwards compatible? this is my plugin: https://www.spigotmc.org/resources/airjump.79475/
no not DRM
Spigot is forwards compatible
only forwards?
and backwards compatible in a way
ok
not a bad idea minidigger
thats what bstats does for example
If you're using something added in 1.14 for instance, more often than not it will work in 1.14 and above
true
Also, please actually push your code up to GitHub instead of just having an empty repository with a README 
A README is not open source
lol
hey, why it creates 2 different entries for one player, who was on two different servers? What do i have to do? (opteco)
in mysql
how do I get plugin from a Listener class? I want to use plugin.getConfing(), but plugin is not defined. From the main class I can just use getConfig(), but not here
https://hub.spigotmc.org/javadocs/spigot/org/bukkit/inventory/Inventory.html#setItem-int-org.bukkit.inventory.ItemStack- this method refers to a inventory index, how is this index defined? Like which numbers represent which slot of the inventory?
fastest copy in the west
Same image too ffs
If I want to distribute the load by connecting players to different lobbies, is it correct to compute in the PostLoginEvent (Bungee plugin) and connect to the calculated server?
how do I get plugin from a Listener class? I want to use plugin.getConfing(), but plugin is not defined
I define it like this Plugin plugin = PluginName.getPlugin(); but it needs one argument and I don't know what. In all the examples it doesn't have any arguments
Pass an instance through the constructor
which constructor?
Wherever you want to use your plugin? Your listener?
yes
Create a constructor that accepts an instance of your main class
In your listener class
Assign the passed value to a field
oh, my bad. Now it works ๐
can someone help me, ive made a plugin (not really made because i followed a tutorial) and it does not load. My local server Ive sat up runs craftbukkit
hey guys!
i have just released my first plugin, and i want to know if i can optimize something in the plugin! Heres the source code: https://github.com/daantechdevs/airjump/blob/master/Main.java
yes
use methods to color strings, instead of calling translateAlternateColorCodes each time
store config values in another class so you don't have to read from the config each time
wut?
public static String color(String input) {
return ChatColor.translateAlternateColorCodes('&', input);
}
okay
or just use ChatColor constants
๐คทโโ๏ธ yeah
ok
oh they're configurable messages nvm
yeah
Tell users to use the special chatcolor char in config ๐
no
are there any reasons that plugins wont load?


๐ค
ok lemme find it 2 mins i am kinda slow
the only thing is that i do not have the complete thing on github
only the main class
so i cannot like edit it
I use IntelliJ with GitHub Desktop (easier for beginners), although you can just use IntelliJ on its own.
Ive found something that might help: (also my plugin is named Ping)
[15:07:35 ERROR]: Could not load 'plugins/Ping.jar' in folder 'plugins'
org.bukkit.plugin.InvalidDescriptionException: version is not defined
at org.bukkit.plugin.PluginDescriptionFile.loadMap(PluginDescriptionFile.java:906) ~[craftbukkit.jar:git-Bukkit-18fbb24]
at org.bukkit.plugin.PluginDescriptionFile.<init>(PluginDescriptionFile.java:232) ~[craftbukkit.jar:git-Bukkit-18fbb24]
at org.bukkit.plugin.java.JavaPluginLoader.getPluginDescription(JavaPluginLoader.java:157) ~[craftbukkit.jar:git-Bukkit-18fbb24]
at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:133) [craftbukkit.jar:git-Bukkit-18fbb24]
at org.bukkit.craftbukkit.v1_8_R3.CraftServer.loadPlugins(CraftServer.java:289) [craftbukkit.jar:git-Bukkit-18fbb24]
at org.bukkit.craftbukkit.v1_8_R3.CraftServer.<init>(CraftServer.java:251) [craftbukkit.jar:git-Bukkit-18fbb24]
at net.minecraft.server.v1_8_R3.PlayerList.<init>(PlayerList.java:69) [craftbukkit.jar:git-Bukkit-18fbb24]
at net.minecraft.server.v1_8_R3.DedicatedPlayerList.<init>(SourceFile:14) [craftbukkit.jar:git-Bukkit-18fbb24]
at net.minecraft.server.v1_8_R3.DedicatedServer.init(DedicatedServer.java:179) [craftbukkit.jar:git-Bukkit-18fbb24]
at net.minecraft.server.v1_8_R3.MinecraftServer.run(MinecraftServer.java:504) [craftbukkit.jar:git-Bukkit-18fbb24]
at java.base/java.lang.Thread.run(Thread.java:835) [?:?]
Caused by: java.lang.NullPointerException
Set version in plugin.yml
oh
Usually the errors it throws have the answer written in plain English for ya
o/
Uh what is the difference between scheduleRepeatingTask and runTaskTimer?
