#help-archived
1 messages · Page 89 of 1
Like in an empty generator
Oh Bukkit's Chunks won't be null in any cases, no
Even if the chunk is empty, it's still a chunk
I meant chunk claiming in general I like nicer
Even when not loaded
If it's not loaded, Bukkit loads it
Null safety. I like it.
I have a simple way to display a nicer border
Then again the method is something you guys could look into because I am just not good at vector maths
2020 and mojang didn't figure out that we want to be able to sort the scoreboard manually
I just setup bungeecord, and when I connected to my spigot server all inventories, perms, and spawn points were reset. What could cause this?
On bungee how could i disable the send message?
Sorry shade, can't help you
Why tf does scoreboard still have those ugly ass numbers on the side
You know how F3 + G shows a chunk grid
They could have an option like that for the scoreboard
to show and hide the numbers
Or a proper empty scoreboard that you can with whatever
true
Anyways this is what I have for showing chunk borders that are always on the ground xD
Location point = new Location(location.getWorld(), location.getChunk().getX() << 4, 0, location.getChunk().getZ() << 4);
for (int x = 0; x <= 16; x++) {
for (int z = 0; z <= 16; z++) {
if (x == 0 || z == 0 || x == 16 || z == 16) {
if(location.getBlockY() > 60) {
Location newPoint = point.clone().add(x, 0, z);
if(newPoint.getWorld() != null) {
int y = newPoint.getWorld().getHighestBlockYAt(newPoint.getBlockX(), newPoint.getBlockZ());
locations.add(new Location(newPoint.getWorld(), newPoint.getBlockX(), y, newPoint.getBlockZ()));
}
}
locations.add(point.clone().add(x, 0, z));
}
}
}
Thx for dealing with that 1-star review spammer
Also interesting they render it from bottom to top
Do you know what is interesting, the border doesn't show correctly on Paper Spigot
but it does on normal
Thx for dealing with that 1-star review spammer
Literally the third time I've dealt with that bugger lol
I banned all three of his accounts
Unfortunately I have the pleasure of opening like 30 tabs and deleting each review manually
That's xenforo for you
Chrome likes that
Mozilla
However V8 is really good
It's still chrome.
Telnet?
🕵️
Telnet is my daily driver
Ok
Brilliant piece
I feel very bad for you is this was ever true. Even for a day.
Windows script kiddies be like
Net send
Look I hak u
On bungee how could i disable the send message?
Well yeah
The net is https only now
Thanks let's encrypt
You twats
For deprecating telnet too early.
@frigid ember you could make a log filter
I think such plugins exist
Or you could make one
how so?
Well
Just a bungee plugin
@velvet halo i would test it a bit with large claims tho, maybe you should only light up parts of the border where the player is nearby
Hey there.
I'm trying to find a good way to get something like this from a yaml config:
someConfig:
key1: value1
key2: value2
However I can't seem to find a way to do it with the recommended config library.
Does someone here happen to know a way to do it without having to reinvent the wheel?
This is for a bungee plugin btw.
Error:(13, 58) java: cannot find symbol
symbol: method size()
location: class org.bukkit.entity.Player[]
``` why is this still happening?
i am just using spigot?
Use .length
Compiling your plugin against what and running it on what?
because that ambiguous call is only present in 1.7 and below
Arrays dont have .size() :)
Plugin compiled against 1.7?
Hey there.
I'm trying to find a good way to get something like this from a yaml config:someConfig: key1: value1 key2: value2However I can't seem to find a way to do it with the recommended config library.
Does someone here happen to know a way to do it without having to reinvent the wheel?
This is for a bungee plugin btw.
@obtuse cairn you could look into MemorySection, getKeys() will get the respective keys from which you can take the values
is there any rank plugin for server networks so the ranks will be sync? I tried luckperms but it doesnt work. Any suggestions?
Double check because that's the only way you'd be getting that error
Compile against latest
(or at least minimum you support). That method was removed in 1.8
your talking about my java or spigot?
Spigot
i am using 1.15.2 spigot?
Yes but what is the plugin compiled against?
is there any rank plugin for server networks so the ranks will be sync? I tried luckperms but it doesnt work. Any suggestions?
With which API version is your plugin written?
please i need help
1.13?
and i googled it
is there any rank plugin for server networks so the ranks will be sync? I tried luckperms but it doesnt work. Any suggestions?
Hey, I was wanting to get into spigot plugin development and wanted to know a great place to start, I know the bare basics of java and not much else. Although I’ve dipped my toes into plugin development already. Anyone have a good place to start?
So... i have an output from the json in console.log
but when Im trying to print it at html it dsnt appear.. why?
Choco??
is there any rank plugin for server networks so the ranks will be sync? I tried luckperms but it doesnt work. Any suggestions?
@finite belfry you sure luckperms don’t work its what i use, are you using mysql?
yes
**Error:(13, 58) java: cannot find symbol
symbol: method toArray()
location: class org.bukkit.entity.Player[]``` can someone help?
I prefer to use mariadb for luckperms
does anyone know how to set up dynmap?
Hi. I´m using spigot 1.12 server. I installed a plugin "NickNamer", but i´m having a problem "[Server thread/ERROR]: Error occurred while enabling NickNamer v3.18.2-SNAPSHOT (Is it up to date?)". Could someone help me? https://hatebin.com/vywpwzudmt
How do I get dynmap to only show a certain world
@wanton vine you think you could help me by any chance
So, anyone know why my flying speed wont change with essentials?
is it outdated?
i dont know
i sent you a friend request @wanton vine
other speeds work
cant get essentials off SpiGet anymore, but let me check
ok, from /ess reload, I got version 2.17.2.66
can someone help me? Error:(13, 58) java: cannot find symbol
symbol: method toArray()
location: class org.bukkit.entity.Player[]
what are you trying to do @frigid ember ?
ooh thats the wrong one
Bukkit.getServer().getOnlinePlayers().size()
it gives me the same as toArray()
Would anyone know how to block creative mode nbt changes made by hacked clients?
it means you have something using that address and port
https://www.spigotmc.org/resources/creativeitemcontrol-with-saved-toolbar-support-for-1-12-and-above.30778/ I found this but it's ofbuscated 😦
if on windows open task manager and kill the java processes
well either that or change the server.properties
you have something using that port, that is what that error means
domains != ip addresses and ports
Domain is just an domain to an ip address lol
or sometimes just to other domains
and port
ehhh
anyways, the port it is trying to use is 25565 which is the default MC port. Bungee normally listens on that port
if you want both to use that port, then you need to assign different ip addresses to them
would recommend using the loopback ip
for the MC servers
How can I get all of the itemstacks in a chest?
loop through them
for(ItemStack stack : inventory.getContents()) {
}
i think
or just use a Consumer<ItemStack>
can someone help me? Error:(13, 58) java: cannot find symbol
symbol: method size()
location: class org.bukkit.entity.Player[]
bruh because an array doesnt have .size() method
then how would i get the amount of players lmfao
Bukkit.getOnlinePlayers().size()
Ah sorry @tough viper you cant use Consumer<ItemStack> on inventory.getContents() because that returns an array
just loop through the itemstacks in the chest
alright
i'll iterate over it then
and should I use getContents or getStorageContents?
no idea
check the docs
lol
I think its because getContents() returns armor slots and all that shit
if its a player inventory
and getStorageContents() returns only the slots where items can be stored only, according to what ive understand from the docs
I don't know what it is you are trying to do @frigid ember or what your setup is. I can only tell you what that error means.
You have something already on that ip and port being used
are you using windows or linux?
then open task manager and kill all the java processes you see
once that is done try running the application again
also don't double click on jars
@brisk mango thats what i am using...
length isnt a thing.
.size()
size doesnt work.
.<
kill the java processes now
gives me a compile error
now you should be able to run your application
How is it not a thing
sometimes java processes get stuck in windows and you have to go in kill them sometimes. Often this happens when you double click on the jar
you need to open command prompt, and run your bat file there or use the java command
tbh temedy i have no clue why it doesnt work
bruh just look in the method
Bukkit.getOnlinePlayers()
what does it return, i have no fucking clue how can not .size() be a thing as it has always been, atleast in 1.8.8 and up
has been always Collection<? extends Player>
and the decompiler says its an array
ive been trying to do something for like 3h now... and im really pissed off... im trying to get info from the api to print it on my html... and I f*cking can't... i'll share a piece of code, tellme where am I missing something or where am I failing:
function JSONRequest(){
let XMLHttpRequest = require("xmlhttprequest").XMLHttpRequest;
let request = new XMLHttpRequest();
request.open('GET', 'https://api.spigotmc.org/simple/0.1/index.php?action=getResource&id=78993');
request.send();
request.onload = () => {
let JSONFile = JSON.parse(request.responseText); // Full JSON file
let downloads = JSON.parse(JSONFile.stats.downloads); // This gives the downloads (tried in console.log)
document.getElementById("output").innerHTML = downloads; // Trying to print the download number in html
}
}
JSONRequest();
pls halp🙏
i am using 1.15.2 lol
do you even have the api as a dependency?
in my plugin.yml?
the info loads, but not in my page
🤦♂️
it shows in the console
no I am talking to you @frigid ember you are the one with compilation errors
u said u have 1.15.2
should be set to 1.15.2 but that isn't the cause of your problem either
er 1.15
Are you using IntelliJ?
yes.
try clearing the caches and restart intelliJ
somewhere in the menus there is a place to clear caches
File menu
it should fix your problem especially if you are using maven
Its called `Invalidate Caches and Restart
There we go
Sorry I don't use that IDE, I just remember how to help with certain issues sometimes 😛
what IDE do you use then lol
netbeans
ah fine, worst IDE ever
lol
Netbeans is comparable to IntelliJ
no its not
how so?
its not even comparable to eclipse so how can it be comparable with intellij
it doesnt even have such features as intellij does
such as?
its worse than eclipse
it didnt work.
I mean intellij has so many features that no IDEs have
Ok well we could discuss ide's all day buy somone could also go look at #general and give me a hint
Well list some of those features so I can tell you whether or not netbeans can do it
I know one feature off the bat that IntelliJ has built in that Netbeans doesn't but most people don't need it lol
Does netbeans have automatic generating of constructors, setters/getters?
@frigid ember link me the POM.xml and the error
most IDE's don't
in intellij, it gives you warnings about things that it wouldnt in netbeans/eclipse
I use that decompiler all the time
I hate the fucking fernflower decompiler
it gives me warnings about everything o.O
I dont know about netbeans, but eclipse is slow as fuck and laggy
@silver basin https://pastebin.com/X1JsvX85 heres the pom.xml
main reason I don't use eclipse 😛
but from what ive heard is that eclipse/netbeans/VSC are like the worst IDEs for java
Netbeans lets me configure the resources for it 🙂
Error:(17, 64) java: cannot find symbol
symbol: method size()
location: class org.bukkit.entity.Player[]
``` error
i mean noone uses netbeans so maybe there is a reason for it
MD uses netbeans too 😉
afaik
there is no reason
to use anything other than IDEA
really bigoted towards IDEs though
Jetbrains > Microsoft > anything else
Well same can be said with Netbeans
@frigid ember link the file that is causing that error
Netbeans can handle kotlin as well, just not out of the box
but I don't care about kotlin anyways
IDEA can handle it better
probably because they are the ones that created it if I remember correctly
correct
Ok so I am attempting to rollback a broken chest
BlockState state = block.getState(); //currentstate
state.setType(Material.Chest);
state.setBlockData(getBlockData()); // {Block{minecraft:chest}[facing=south,type=single,waterlogged=false]}
then I go about resolving any custom changes that existed...
((Nameable) state).setCustomName(actionData.customName);
}```
However what I have discovered is the state is not apparently an instance of nameable...
The state debugs at this point as
```state = {CraftBlockState@12097}
world = {CraftWorld@11953} "CraftWorld{name=world}"
chunk = {CraftChunk@11954} "CraftChunk{x=0z=-1}"
position = {BlockPosition@12109} "BlockPosition{x=3, y=4, z=-14}"
data = {IBlockData@12071} "Block{minecraft:chest}[facing=south,type=single,waterlogged=false]"
flag = 3```
So how do I actually achieve the goal of setting the chests custom name
Oh at the end I do call
` state.update(true, physics);`
@silver basin https://pastebin.com/7QnMrZU7
@frigid ember thats not the entire file the line numbers are off
well to me it looks as where ever the api you are using came from its corrupt
....runmvn compile -U
...um yes .. hangon how was that error happening?
if you were not compiling with maven how were you compiling?
build
can i do that then?
yeah let me find it
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.7.0:compile (default-compile) on project HubCore: Compilation failure
[ERROR] No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?
[ERROR]
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
``` thats from maven...
ah
ok i built using the way you showed
it worked !
now i am getting errors...
Error:(7,36) java: package net.minecraft.server.v1_7_R4 does not exist
@silver basin
Hi, izzit possible to have spigot and forge server tgt?
@frigid ember there you will need to paste the entire error aas well as the file its occuring in
is this your plugin?
yes.
...is it on github
so I could see the whole code base
i mean you dont have net.minecraft.server as a dependency so thats a problem to start with
but honeslty ....you need to reconsider why you need to use NMS
tbh i dont know what the maven is for a net.minecraft.server
well there is no repo for it
typically if we used nms we would depend on
<artifactId>spigot</artifactid> as opposed to the spigot-api
the spigot jar has the nms inside it
but you have to ?buildtools
?buildtools
....really cafebabg
!buildtools
lol
The home of Spigot a high performance, no lag customized CraftBukkit Minecraft server API, and BungeeCord, the cloud server proxy.
there it is
ok one sec i am building
i dont think so
Intellij doesnt provide a JDK actually
...you just might not want to use it
...you should install one yourself
ah
the JDK provided by Intellij is JDK 11 and its customised
interesting that it is customized
Ok, i finished the build tools what do i need from this?
you should get 8
I should make my plugins only compatible with 11
see how many servers decide to update their JVM
XD
....dont be suprised if you get some wierd security errors
Java 9 does that
Crypto is so freakin inconsistent across jvms
haven't had any other versions past that raise any weird security stuff
currently I run MC on Java 14 just fine 😉
yeah but you know what bstats shows re which jvm is most common
only because developers don't push for using updated LTS's lol
maybe
if many plugin developers decided to just compile against 11 many servers will follow suit as well
but don't worry that will happen here towards the end of the year when Java 8 is EOL
I had an error _ I was using 1_8_161 server had moved to 201... and oracle changed the default crypto size
...not even a major incrementation to let you know
interesting
so
you are going to need a JDK
...we cant write a plugin for you @frigid ember
choose which ever you want, most people use Java 8 others use more updated versions. Just don't try to use something below jdk 8
what did i need build tools for?
You should learn to compile java first
spigot-1.15.2.jar?
correct
What will i do with such jar
but buildtools will install it in your local repo
if you use the spigot jar, you don't really need to have the API as a dependency either
and let you use it as a dep
...I think you need a tutorial on java compilatio
seriously i do
yeah this isnt the place to get one
they need a tutorial on setting up a workspace for java
think there is one on spigot
yeah I think it will go over his head because he need to understand differences between local non maven projects and maven
i dont thats the thing maybe if someone would explain it would be alot easier to understand.
same way you added the spigot-api dep
i use the minecraft development so i dont add it.
yeah well that didnt teach you anything and now you need to learn about maven dependency
for
<groupId></groupId>
<artifactId></artifactId> do i just put the name of the jar?
<groupId>org.spigotmc</groupId>
<artifactId>spigot</artifactId>
<version>1.15.2-R0.1-SNAPSHOT</version>
<scope>provided</scope>
i understand that part now. but i dont get how its going to find this jar off my desktop using ```xml
<groupId>org.spigotmc</groupId>
<artifactId>spigot</artifactId>
<version>1.15.2-R0.1-SNAPSHOT</version>
<scope>provided</scope>
because that is what maven does
....because you used buildtools like we told you too
maven has a local repo where it will search first and then it will attempt to search remote repos afterwards if it still didn't find it
buildtools will populate the local repo
but because buildtools was ran, buildtools put it in the local maven repo for you
🥇
where would it put that repo i am a dumbass tbh
the repo is automatic but its located at <HOME>/.m2 usually
on windows it is located at C:\users\(user for your desktop)\.m2
its under the user not documents
.m2 is under user, then inside it has a repository
fixed 😛
yes i get that.
I mean you could, but odds are maven will complain about it or ignore it
or corrupt itself
did you get a JDK installed?
perfect. Now follow that wiki guide that was posted earlier
and you should be able to compile afterwards 😄
but again ...using NMS is NOT for the faint hearted
keep in mind every time spigot is updated the NMS might change
even in between major versions
might change
It will change XD
am i retarded or it just gives the same thing?
sorry same thing how
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot</artifactId>
<version>1.15.2-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>``` you told me to put this in the POM.xml right and then compile pretty much and it still gibes the nms
?paste the compile log
compile log is the same..
Its in the bottom window cut and paste it
I see you are trying to update something
me?
😛
i am obviously just stupid
no your just not experienced
it needs to be changed to 1_15_R1
oof let me change the build to 1_7R4 for a reason
no its not a build thing
no you dont have that version
its in the class files
every class import has to be updated
ok
tbh with you the plugin is for 1.8/1.7
Well, you are going to need to hunt down 1.7 CB then
wonder if CB still hosts that version
1.7 and below is pretty much hard to get your hands on as only very few people actually have the sources for those versions lol
well I should say, pretty much hard to get from a reputable source
will 1.8 do the job?
possibly. Depends on what that plugin you are trying to compile does
and whether or not updating the imports is sufficient
most of the nms is for tablist
you might even have to remove class files if they are specifically for 1.7
just depends
I have 1.7.10
you have the sources ? or just the jar? lol
in my repo
...
I think I still have the sources for 1.7
yes yes naughy be good
think I might have it stored on an external somewhere
found CB 1.10
but I am pretty sure I have earlier versions going back to 1.5
yea i need 1.7.10
well, I can give you my repo link since I have it there, but I know have the sources around lol
@silver basin does intelliJ install dependencies for you?
like if you have the jar, can you tell intelliJ to import it into maven repo that is
yea intelj sync with your pom.xml and installs for you
I know it will pull dependencies from remote repo's
but that isn't what I am asking though
I know how to install artifacts with the maven command, but I don't rbuh has maven installed
so, curious to know if IntelliJ will install artifacts for you
hmm ok
o.O
tbh i cant read that lmfao
then probably better then if you let intelliJ install it for you lol
how tf does Intellij do that because rn intellij just likes to fuck with me lol
@keen compass Intellij will parse a POM and autoload the deps
ie it will actually resolve the project without using maven compile
if your asking will it automatically install a file in a maven repo no
it wont
Yes, but the artifact isn't going to resolve though if they don't have the dependency in the local repo and if it doesn't exist remotely
I was asking how do you tell IntelliJ to install one
XD
shrug I use maven
in netbeans I just right click on the dependency to install it locally if I have a jar I want to specify
mvn install -file
probably just better off specifying my repo then as a repository in the pom @frigid ember
?
I would agree
<repository>
<id>spigotmc-repo</id>
<url>https://hub.spigotmc.org/nexus/content/repositories/snapshots/</url>
</repository>
``` like this?
yes, copy that and paste below that, rename the id and put this URL
<url>https://repo.frostalf.net</url>
yeah the spigotMC one isn't the issue
whats the ID?
whatever you want to name it
ah ok
but putting my repo in there will help with the 1.7 resolving issue 😛
if you run the build process it should pull that into your local repo
then u can remove it if you want
do i need to download the jar?
maven does it for you
maven will download it and install it into your local repo for you
1.7 isn't subject to the DMCA
wasnt it post 1.7.4
1.7 and below are exceptions only applies to 1.8 and beyond
so 1.7.10 was
so i put the repo
Idk
then i compile?
1.7.10 and below can still be distributed as they are not subjected to the DMCA
it was everything beyond that
But, I mean, if someone wants to send me a DMCA they can though
have yet to get one XD
lol
build might not be successful when you compile but that isn't import
did you see the troll ...someone posted that MD-5 had a warrant out from Mojang...and 1/2 the forge team had been arrested
the important thing is getting that dependency
ok yea the build didnt work but now what.
@silver basin Private entities can't issue warrants fyi
well they can ...sort of ...
they issue the DCMA - as a summons - the person doesnt respond...t
they get a warrant
Well, Mojang is in the Netherlands isn't it?
if you fail to appear it court for a summons in au ...you get issued with a warrant
Not sure how that works between countries
either way Highly doubt that is the case
oh it was a complete troll
I could see Mojang going after someone in the same place they are at
but in a different country they are not likely to do so unless you are doing something pretty severe that it warrants them to spend that kind of money on court
international lawsuits are not cheap at all
Not that is an issue for M$
but even they are not known to just outright go after individuals over something petty
@frigid ember once maven pulls that dependency in, you can either remove my repo or keep it either way it doesn't matter. My repo is public 😉
then what would i do?
well once you have the dependency, fix whatever problems intelliJ says there is
i dont think i have the dep
is it listed in the pom?
no..
<groupId>org.bukkit</groupId>
<artifactId>CraftBukkit</artifactId>
<version>1.7.10-R0.1-SNAPSHOT</version>
<scope>provided</scope>
put that as another dependency
and then run the build process and then it should pull it in
not found
should have found it, especially if you have my repo listed o.O
nope..
Hmm while on the topic,whats diff between maven dep and library one?
Frostalf its in my local
nice so intelliJ did grab it
Nope
try reloading the pom in intelliJ
nope.
@vernal spruce there isn't one. Just that maven takes care of putting it on the class path for you vs you doing it yourself. Also maven makes it easier to update your dependencies if you wanted to change the version because the maintainer of that dependency updated it. instead of you manually grabbing it. Also if the project is a public one. IE on github you don't need to distribute all the jars for your project if you use maven.
i only have 1.8.8 craftbukkit
Idk do apis usually change that much to affect it though?
So far the apis i used remained the same for years
ok manually download the jar. Where you put it, right click in that directory and type
mvn install:install-file -Dfile=craftbukkit-1.7.10-R0.1-SNAPSHOT.jar -DgroupId=org.bukkit -DartifactId=craftbukkit -Dversion=1.7.10-R0.1-SNAPSHOT -Dpackaging=jar
well when you download something
oh
it gets stored somewhere
where do i wanna put it?
anywhere doesn't really matter
just as long as you can right click in that directory and open command prompt
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-install-plugin:2.4:install-file (default-cli) on project standalone-pom: The specified file 'C:\Users\s1025\Desktop\CraftBukkit\craftbukkit-1.7.10-R0.1-SNAPSHOT.jar' not exists -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
'cmd' is not recognized as an internal or external command,
operable program or batch file.```
ah
rename the jar you downloaded
remove the last bits of numbers from it and the - after SNAPSHOT
the CB jar you downloaded has extra numbers in its name
i copied what you sent?
yes I know, but you need to download the CB jar from my repo first
Oh boy..
oh i am retarded
but there will be extra numbers added to its name
yes
just remove the extra stuff that is after SNAPSHOT in its name and then re-run the command I told you
btw there is no SNAPSHOT
should i add SNAPSHOT
mvn install:install-file -Dfile=craftbukkit-1.7.10-R0.1.jar -DgroupId=org.bukkit -DartifactId=craftbukkit -Dversion=1.7.10-R0.1-SNAPSHOT -Dpackaging=jar
Wait 1.7
yeah, person needs 1.7 CB for whatever project they are trying to compile
Let me get the torches and pitchforks out
build success
ok now the jar is in your local repo 😄
ah good
ok, now we can get back to intelliJ you can try compiling now and see if it works
if it doesn't it should tell you what needs fixing
only 1.8.8 is still coming up on maven
Also why not simply add the jar instead? It wont ever get updated..
well they are using maven
can't add the jar and use maven at the same time don't think o.O
but I also never tried that either
its in my local repo i am gonna restart intellij
I am surprised I am even able to help this much considering I don't even use IntelliJ 😛
ah fuk
IDEs are all the same mostly..
well not really, in Netbeans I could just right click on the project to install artifacts with maven
this guy doesnt have a maven and i need it :( https://github.com/ThatKawaiiSam/Assemble
i could just add his source to my source tbh
like i did for the tablist
how?
You can also just install it into your local maven repo
i am retarded and still dont understand maven
Please dont tell me your copying Hub - All in one Hub Core 1.7.x - 1.13
because just to be clear the authors licence doesnt allow it...(even tho all bukkit plugins should be GPL)
well, if you been paying attention to everything we have told you thus far
you should be able to do some of these things on your own now
discord keeps a chat history too, so can just scroll back up for references lol
yea no
@silver basin
Error:(45,69) java: cannot find symbol
``` ?
tnt explosion sound 1.15.2? I only found primed tnt. https://hub.spigotmc.org/javadocs/spigot/org/bukkit/Sound.html
Heya,
Looking to upload my first premium resource. If I set a price now, am I able to increase/decrease that price in the future?
Sweet, that's fair enough 🙂
Thanks
@keen compass yo
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.7.0:compile (default-compile) on project HubCore: Compilation failure: Compilation failure:
[ERROR] /C:/Users/s1025/Desktop/mcp908/eclipse/HubCore/src/main/java/me/l3ilkojr/hubcore/TabProvider/Azazel.java:[67,69] cannot find symbol
[ERROR] symbol: method removePlayer(net.minecraft.server.v1_7_R4.EntityPlayer)
[ERROR] location: class net.minecraft.server.v1_7_R4.PacketPlayOutPlayerInfo
[ERROR] /C:/Users/s1025/Desktop/mcp908/eclipse/HubCore/src/main/java/me/l3ilkojr/hubcore/TabProvider/Azazel.java:[86,61] cannot find symbol
[ERROR] symbol: method getVersion()
[ERROR] location: variable networkManager of type net.minecraft.server.v1_7_R4.NetworkManager
[ERROR] /C:/Users/s1025/Desktop/mcp908/eclipse/HubCore/src/main/java/me/l3ilkojr/hubcore/TabProvider/tab/Tab.java:[46,69] cannot find symbol
[ERROR] symbol: method removePlayer(net.minecraft.server.v1_7_R4.EntityPlayer)
[ERROR] location: class net.minecraft.server.v1_7_R4.PacketPlayOutPlayerInfo
[ERROR] /C:/Users/s1025/Desktop/mcp908/eclipse/HubCore/src/main/java/me/l3ilkojr/hubcore/TabProvider/tab/Tab.java:[93,78] cannot find symbol
[ERROR] symbol: method getVersion()
[ERROR] location: variable networkManager of type net.minecraft.server.v1_7_R4.NetworkManager
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
tnt explosion sound 1.15.2? I only found primed tnt. https://hub.spigotmc.org/javadocs/spigot/org/bukkit/Sound.html
how could that change something?
because spigot and craftbukkit are not exactly the same
yeah but 1.7..
yeah...
well fixed it all and added all deps thru maven
Is there an open source Discord bot to verify Spigot account -> Discord?
@frigid ember only link or sync ranks?
Syncing ranks would be nice, so I can know what premium plugins of mine that they own
wait a sec im searching mine
@frigid ember This one works great for me: https://www.spigotmc.org/resources/ranksync.61393/
@frigid ember i think you will need the wiki for help too: https://github.com/Chickenpowerrr/RankSync/wiki
Ah, I see. I'm looking for a plugin that specifically syncs Spigot accounts with Discord. Like what @tawdry lily does.
ah sorry
no worries 🙂
i think thats something only spigot needs
anyone know how to check if player has premium minecraft account or not useing mojang api?
anyone know how to check if player has premium minecraft account or not useing mojang api?
@frigid ember I think only premium accounts can access multiplayer
why would you need to know that information abhiram?
i am makeing an Login security plugin for cracked server if player has premium account then auto login
that how that plugin works
i am makeing an Login security plugin for cracked server if player has premium account then auto login
@frigid ember Non premium accounts are demo right? As far as i know can the demo only access singleplayer.
When a server is in offline-mode someone can join a server without having the correct credentials
yes
When a server is in offline-mode someone can join a server without having the correct credentials
@opal bay Ah you mean bots?
ok
that why i am makeing login security
no
yea but i want auto login
and auth me dosnt support 1.15.2
@frigid ember you can use tlaucher and other clints to play on cracked servers
@frigid ember https://www.spigotmc.org/resources/fastlogin.14153/
@frigid ember its open source. Just take some code from it.
@frigid ember it also support AuthME reloaded
Haha
Offline servers
Offline servers
@hoary parcel bungeecord?
from what they're saying, they're not using bungeecord
either that or their bungeecord proxy is in offline-mode
the plugin also supports BungeeAuth
🤔
Or you could just only use bungee in online mode and not worry about shit like that
Or you could just only use bungee in online mode and not worry about shit like that
true
??
i just helped someone with his/her problem
whats the problem?
i dont support but just wanna make plugin for servers
whats the problem?
@frigid ember cracked servers are the problem
by making plugins that support offline mode means you support piracy
so, if you don't support piracy you wouldn't support offline mode either XD
that's some killer logic
well the spigot support piracy remove online mode from server.properties xd
what use?
But you shouldn't run a public server without auth
Well, I wrote code on a plane before, need offline mode for that for example
wait since you can't use auth, would it mess up plugins that entirely depend on uuids?
no
oh alright, that's good
Yes, in offline mode uuids are different
oh no.
then make a extra spigot server software for developers which has offline mode
They are v3 uuids, and generated based on the name
yeah they are offline so duplicates entry
i made a swapper for someone tho
to port all that from offline to premium and so forth
Mojang is the one that added offline mode which has a very specific use(s)
generally spigot doesn't remove functionality if its a vanilla behavior
is there a way i can get the amount of keys in a section of a config?
yes
getConfigurationSection("section you want").getKeys(true).size()
don't offline mode uuids get generated this way:
UUID.nameUUIDFromBytes(("OfflinePlayer:".concat(name)).getBytes(Charsets.UTF_8))
yup
Spark maybe
the hell is that
yeah remove it
that thing shouldn't exist to be honest
https://www.spigotmc.org/resources/spark.57242/
this is pretty cool
I never seen t hat before o.O
lol someone fucked you with that one hard
are you giving worldEdit to normal users?
I wouldn't give worldedit not even for 1000€ on my server
Ban him
just enable the clock it will break if you set two redstone torches on two different corners of the clock making his stuff useless
Don't blacklist the block
first you should use something like https://www.spigotmc.org/resources/redstone-clock-preventer.1054/
or just block redstone altogether
I believe it's all well described in the spigot page.
Anyone wanna work as Builder for my server dm meeee!
use the recruitements forum
?services
If you wish to request or offer development/art/building/administration services, please do so at https://www.spigotmc.org/forums/services-recruitment-v2.54/
how do I .. purchase a premium plugin? Each time I try to purchase I just get a popup and nothing else happens:
nvm, I guess the person might have an issue with whatever their merchant service is
yeah looks like a problem specific to them
tnt explosion sound 1.15.2? I only found primed tnt. https://hub.spigotmc.org/javadocs/spigot/org/bukkit/Sound.html
Hey - I wonder if anyone can help. I'm currently trying to serialize an inventory to file, and deserialize afterwards. It seems to serialize something, but then when it goes to deserialize it will throw an EOFException. I'm not really sure what I'm missing here.
Error - https://gist.github.com/AshenGaming/079a3c1769662c504ca3f069757bdca6
ConfigurationHandler.java - https://gist.github.com/AshenGaming/dbb70c3d10652acd951ed22e55e3de5e
Since itemstack is ConfigurationSerializable I think it would best to utilize that and then create a configuration section for a keyset.
Why exactly do you want to encode and decode the inventory?
So basically, the idea is that each player will get access to a number of 'vaults', which are just inventories. I want to make sure those inventories are persistent across server restarts etc. So each player can have like 14 different inventories associated to them
I was unsure whether using the ConfigurationSeriealizable would work if I had multiple things I wanted to check (such as bankID and inventory)
I looked into using gson but was getting issues with StackOverflowExceptions and I couldn't figure out what my issue was
You could make an encapsulation class with an int for bankid and a Set of itemstacks using gson 😛
I made a JsonStorage class if you want to take a look
I actually saw that Husker, but wasn't sure how best to fit it with my needs 😛
I have a Bank class that looks like this, would this work with what you're suggesting?
public class Bank {
private int bankID;
private List<ItemStack> items;
public Bank(Integer bankID, List<ItemStack> items) {
this.bankID = bankID;
this.items = items;
}
public Integer getBankID(){
return this.bankID;
}
public List<ItemStack> getItems() {
return this.items;
}
}```
Is this meant to be more of like a bank account that is linked to a player?
Think vault rather than bank account
but yes
Each player can purchase a new "vault" which is an empty inventory they can store items in
they can have up to 14 "vaults"
Alright a great solution for this is to use a Guava Cache. Since you don't want to store all of this in memory
Ah, I'm not familiar with that
sure
So since spigot api already has google guava built in you also don't have to add extra dependencies or shade anything into your jar which is a huge plus.
that's always a good thing 🙂
//This is how you declare a cache
//I use it similar to how a map would work.
private final Cache<UUID, Set<User>> usersCache;
//You do this in a constructor or method to instantiate
//This is how you can assign a cache by making a builder
usersCache = CacheBuilder.newBuilder()
//When you write or add data to a cache you can set an expiry time.
//After 5 minutes it will clear an element that was cached.
.expireAfterWrite(5, TimeUnit.MINUTES)
//You want to create a listener when a cache expires or you invalidate a cache and then clean it.
.removalListener((RemovalListener<UUID, Set<User>>) notification -> {
//notification is pretty much the variable for the cache.
//notification.getKey() will return uuid;
//notification.getValue() will return Set of users.
//We write our data to the cache for the player that we cached data for.
JsonStorage.write(getPath(plugin, notification.getKey()), notification.getValue());
}).build();
private Set<User> asSet(UUID uuid) {
try {
//The cache checks if the key (UUID) is already cached.
//If it is, it returns the data from the cache
//else it adds to the cache
return usersCache.get(uuid, () -> { //UUID here is the key
//So when a key isn't cached you write to the cache
//We read from our json file.
Set<User> users = JsonStorage.read(getPath(plugin, uuid), new TypeToken<Set<User>>() {}.getType());
if (users == null) users = new HashSet<>();
return users; //We return the value for the key.
});
} catch (ExecutionException e) {
return new HashSet<>();
//Worst case scenario we return a new hashset if something has gone wrong.
//This mainly happens when you haven't done file reading correctly in this case.
}
}
I hope this makes a bit of sense 😬
Not immediately, but I'll have a read through and see if I can figure it out
//We do this method onDisable just to be sure all the cached data is saved properly.
public void serialize() {
//We invalidate the cache and expire all entries.
usersCache.invalidateAll();
//We have to do this because otherwise the removal listener does not get called.
usersCache.cleanUp();
}``` Lastly we do this method just to be safe.
This is in your onDisable function to make sure all our data gets serialized from the cache when the server shutsdown
It is wise to use a cache for thinks like reading big chunks of memory.
If you have 40 players online with 14 inventories stored and each inventory has like 24 itemstacks
That is a big chunk of data
yeah, that makes sense
Players are not going to open all their bank vaults, maybe just the items they need
Then after 5 minutes it is cleared.
They also don't need access to that data all the time.
I can help you figure it out for your system btw. Feel free to pm me.
Sadly I have to head of now 😦
I'll definitely give you a shout if I need more help with this, thank you for helping 😄
@fiery scroll an question, why is that integer in the declaration primitive type and in the constructor and return method its non-primitive?
lol
you know, that's a great question - I forgot to change one of them
I mean Integer is just an wrapper
oh right, yah (that's what I get for being braindead)
How do you cancel a packet with netty(nothing to do with spigot), I am using the latest version of netty.
How do you cancel a ByteBuf or how do you do it with the channelhandlercontext
@Override
public void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception {
ByteBuf buf = (ByteBuf) msg;
if(someReason) {
//cancel
}
}
How do I cancel for example
Hello, can someone help me with [Crackshot] plugin plz.
@frigid ember, just don't do anything with the packet so just return the function? unless I'm misunderstanding.
send a packet back to say "Hey, I cancelled this"
after the client sends the packet, if i check
ChannelFuture f = channel.writeAndFlush(packet);
if(f.isCancelled())
it false
f.isSuccess() is true
sending a packet back is going to make the server do more work
imagine handling 1000 players and i for some reason need to cancel a lot of packets
it will f the server
sending to each client?
is there no other way, so the client can check if(f.isCancelled()) //and it says true
@jaunty night
Hm..
I don't really understand what the goal here is, so maybe you can design the client in a way that the client so it doesn't need to know that the packet was cancelled?
the client needs to know
for example in bukkit, when you try teleport a client back
you cancel
without letting the client know it makes no sense, his position won't be the even close to as the server expected
the thing is
craftbukkit doesn't send a packet to the client for each cancel
in bukkit when you teleport a client it doesn't actually move the player until it knows the event hasn't been canceled
so for example
it first sends the onTeleport event with the location
then it checks if it has been canceled
if it has then it stops the teleportation
PlayerMoveEvent is a good example
if it hasn't then it continues running
cancellign it must inform the player that something has been cancelled
no?
ooh
areu saying in playermoveevent bukkit sends teleport
I mean unless it follows the same logic I outlined
but that will be lag fest
although PlayerMoveEvent is known for being a lag fest
I don't know
to cancel playermoveevent it sends some tp packet
and doesn't actually cancel
...
well then the problem doesn't solve, i still am doing extra work server side
yk what i mean
The teleportation packet is different from the move packet
ik
im not blind
xd??
just like it would be possible to send a teleportation packet, as a disguide to "cancel" the move packet
@jaunty night PlayerMoveEvent is fine
Ehh, it's known for being quite a lag fest if it's used incorectly
in netty they mention some bytebuf.discard() method but i don't know what it does
netty docs
tell me how can u use PlayerMoveEvent incorrectly, lol
I tried discarding and it didn't work
what are you doing @frigid ember
PlayerMoveEvent is run whenever a player move packet is sent (duh) but consider that a player movement is whenever moves by a 0.1th of a block it can get considerably laggy
can we stay on topic bruh
especially because holding Ws causes swafts of move packets
bruh it cannot get laggy
which is fine that's intended
are you guys going to answer my q or na
hold on
however, if you have too much running in a PlayerMoveEvent it gets quite laggy
bruh stop saying non-senses it cannot get laggy with the move event
i know spigot performance is shit but it cannot
Retro here's my final answer if it's running on a per client basis I'd say just send a response packet
Lemme complete sentence mini I was gonna tie it back and say I don't have enough information to know what he is attempting to do.
I wasn't meaning you atom
ah
who is spreading bullshit then @hoary parcel
bruh stop saying non-senses it cannot get laggy with the move event
@brisk mango ^
thats true though, it cannot lol
To simulate a demanding task
u would never use Thread.sleep() though
A better player movement event is just to do a Runnable and put that on a loop
so it doesn't run whenever a player moves 0.1 of a block
Nah, the event is fine, just make sure you return early and don't do heavy stuff
I mean you're right if you need something that doesnt run instantly, but for flyhack detections and etc its good to use the PlayerMoveEvent
But when you do heavy stuff, it will bite you in the ass
bruh I still dont get your point, why would you use Thread.sleep() do to a delayed task lol
Yandere dev 1000 line update() unity function
@brisk mango 🤦♂️ it was meant to be an example to simulate a demanding task
very bad example
Temedy- It's an example to simulate an expensive task.
The PlayerMoveEvent isn't inherently "laggy". It's just that some people start doing things in there that can take more time then the server can afford. Since this event can run every tick for every online player, if you spend 1ms per player in here, 20 players would mean you're spending 40% of your tick in the event (which is not a good idea).
I.e I wouldn't recommend doing I/O in the event.
It is entirely correct to point out that this event has the potential to be a performance hog.
I mean you didn't even need to explain this, anyway everything in spigot is pretty shit tbh, and it makes sense you're not gonna run shit ton of code in there
If it's shit, then what are you doing here?
Some people love to swim in it
Then leave? I'm not sure why you'd be spending your time in a pile of shit.
this is just a discord
OK; I stand corrected.
Guys it's a troll move along
For example, have you seen the code of BukkitRunnable?
The spigot dev too
every method throwing 5 exceptions
And what's your point?
a) I never said that
b) Throwing exceptions is not inherently a sign of a bad codebase - you often want the user to know what went wrong
Guys it's a troll move along
I'm bored - sue me 🙂
👨⚖️
It's wrong though in the case of BukkitRunnable and it can be sign of a bad codebase
Tru
Is it wrong that your car breaks when you hit a brick wall?
would be
