#help-archived
1 messages ยท Page 49 of 1
if it's an sql database
It's literally the opposite of simple
It prevents you from writing proper sql queries
ProtocolManager protocolManager = ProtocolLibrary.getProtocolManager();
protocolManager.addPacketListener(new PacketAdapter(this, ListenerPriority.HIGHEST, new PacketType[]{PacketType.Play.Client.TAB_COMPLETE}) {
@Override
public void onPacketSending(PacketEvent event) {
if (event.getPacketType() == PacketType.Play.Client.TAB_COMPLETE) {
PacketContainer packetContainer = event.getPacket();
String msg = ((String)packetContainer.getSpecificModifier(String.class).read(0)).toLowerCase();
PacketContainer pack = new PacketContainer(PacketType.Play.Server.TAB_COMPLETE);
String[] messages = {"1","2"};
for(int i=0;i>=pack.getStringArrays().size()-1;i++)
{
pack.getStringArrays().write(i, messages);
}
try {
protocolManager.sendServerPacket(event.getPlayer(), pack);
} catch (InvocationTargetException e) {
e.printStackTrace();
}
}
}
});
}```
this is good?
@keen compass
well i was also concernec about sql queries
and them lagging the servers or being overloaded
so i did it the json way
cause theres a lot of data i edit with the games i made
if your queries are ran in another thread they won't lag the servers
i would be running like 100 queries for 9 players in a game every 1 minute
instead of doing that i just edit their json data locally
and update when they quit the network
cache?
storing in memory
you can do the same with a proper sql table
.....
if it were me I would optimize the DB and the code better
in fact you can make functions with MySQL
this way you don't need to use a query but just run the function and get the result
which is much faster and recommended for you since you will be running the same query many times
It probably will be fine even with just prepared statements
but i saw how hypixel made an article how they had issues with mysql lag
so if i can limit querying by editing json locally why not
Hypixel uses MongoDB
Hypixel has thousands of players, not a real comparison for something like what you are doing
im a multi millionaire
i have 3000 servers
and in cotact with youtubers
im gonna have the next big thing
lmao
if that is the case, then why don't you just pay people to do this for you ๐
you didn't know he was a multimillionaire ???
i already have 20 games made
hire a developer then
yall are dead now
He's gonna get his dad to ban you on xbox guys
oh shit
this is my hobby i love creating games
I would probably hire a DBA then
but yeah if i can limit queres then i think its better to do so
for your big networks
MySQL can take hundreds of queries per second
As long as you don't do anything stupid
make a function, will eliminate most of your queries you are going to be running
i have my network registered as a single member llc
^
well hypixel had issue with their sql so since ill be bigger than them i figured to take rpecatuinns
while it is unnecessary queries and functions are processed differently in MySQL
functions are more optimal then queries
but why do any of that
that depends
You don't need functions for basic things ffs
and you'd still need parameterisation
Get out
when i can just access the database per player 2 times max. when they join and when they quit?
you can still do that
ratehr than hundreds of times
Use PreparedStatements and fetch their data when they log in, cache that and then when they log out you can save that shit
Then whats the issue
then wtf
idk
if you're talking performance, making a query for every single friend doesn't make your argument loook good
i already cache their data
bro
private Player player;
private UUID uuid;
private String name;
private List<String> previousNames;
private String clanTag;
private String clanTagColor;
private UUID partyUUID;
private List<UUID> friends;
private List<UUID> recentPlayers;
private UUID playerLastMessagesUUID;
private String primaryEmail;
private String secondaryEmail;
private String password;
private String firstJoinDate;
private Membership membership;
private String membershipStarColor;
private Language language;
private boolean hasSelectedLanguage;
private String ip;
private List<String> previousIps;
//translate chat
//settings
//voting
//donating
//referral
public aPlayer(Player player) {
this.player = player;
this.uuid = player.getUniqueId();
this.name = player.getName();
this.previousNames = new ArrayList<String>();
this.clanTag = null;
this.clanTagColor = "&7";
this.partyUUID = null;
this.friends = new ArrayList<UUID>();
this.recentPlayers = new ArrayList<UUID>();
this.playerLastMessagesUUID = null;
this.primaryEmail = null;
this.secondaryEmail = null;
this.password = null;
this.firstJoinDate = null;
this.membership = null;
this.membershipStarColor = "&7";
this.language = Network.getRealm().getPrimaryLanguage();
this.hasSelectedLanguage = false;
this.ip = player.getAddress().getAddress().toString();
this.previousIps = new ArrayList<String>();
}
how do you not get this
Use Set for UUIDs
@keen compass i find this on forum "that this will only work on MC versions up to the latest 1.12, as from 1.13 on, there's a new approach, quoting another thread"
thats what im saying lol
Using a single text property in your table instead of multiple fields is not how you do sql
why are you still worried about hundreds of database accesses?
use nosql for shit like that
i use uuid, name and 1 jsonsting
@prisma basin then use the new approach
thats it
But what's the point of an sql table if all of your data is stored in json
... use an ORM with a java bean and save yourself the trouble
SQL databases are more reliable than NoSQL first of all
they wanted me to use mysql hundreds of times instead of only 2
How are you gonna query on json values lmao
But this is not how you use sql
i use sql so i can have global data across servers
you can't leverage any advantage of sql if you don't actually use its mechanics to store your data
0NF database design xd
any persisted format allows you "global data across servers"
If you acutally need to query data on that json then i feel bad
^
bruh
please tell me the difference
you can persist across multiple servers using SQL, NoSQL, MongoDB, NBT, JSON, TOML, HOCON, YAML, whatever the fuck you want
saved wh a yer quits and downloaded on join
Yeah, but why not just use fields? It's the same amount of data but you'd have separations
^^
So you only query specific things when you need them
because im not displaying anythn ebste
this is literally why you use sql
wat
all leaderboards are inn game
websites
@keen compass please give me example ๐ญ this is too hard
I think you need to look into what databases are
im self taught have patience
I mean, dynmap uses database to store BLOB images
I don't like the sound of having leaderboards and storing only json strings on DB
@prisma basin as I already stated I don't have an example on hand.
i just learn what i need to learn and use what i need to use to get my network ideas a reality thats all
no i have a seperate sql table for leaderboards
The benefit of splitting it up into fields lets you query specific things. If you need to refresh a specific leaderboard you can.
uuid,name,deaths,kills,kdr etc
Then it sounds like fine solution
just hire a few devs and pay them a decent wage, should be possible as a multi millionaire
To some degree
Because if you have a kills leaderboard and you parse ALL of the player data on join, the leaderboard won't update until the player relogs.
@bronze marten that is normal for images, to store them as BLOBS because BLOBS is just bytes stored as is.
@keen compass can you write please ๐ญ
Yes but why use a database to store images
If you split into fields, you can refresh things that update frequently sooner without needing to query EVERYTHING
the kills/deaths oin json are only for th eplayers pratcice stats which arent compared on leaderboards
Why use file system to store images? It's a database in some sense too
because then you don't need physical files @bronze marten
store data as html content and use javascript to get the element via id with nashorn and then use it in java
this is the way
They will still be stored as physical files
why would i hire devs if i hasve fun doing this myself
Its not about WHAT you store in the database. Its about HOW YOU USE that data
Well depends still
renaming them is easier, removing them is easier and takes up less space on the HDD
Then it sounds like fine solution
@iron nebula But it's not, they want to get all friends of a player and sort them and can't use sql for that because of that reason
Get their friends in what sense?
why use sql when you can use plain text
Oh jezz
@keen compass please write to me example tab sugestion packet whitelist ๐ญ ๐ญ ๐คง
lol
Doesn't MySQL have own data types for JSON
yes but idk how to use it
separate your fields with a symbol like # then split the string at the #
Dunno, I work on postgres about this shit
Get their friends in what sense?
@iron nebula see above... that's why the question arised in the first place. they first get a list of uuids from the database and then query each uuid individually and then sort the result in java
public static List<guiPlayer> getTempsInOnlineOrder(aPlayer ap, List<UUID> uuids){
List<guiPlayer> online = new ArrayList<guiPlayer>();
List<guiPlayer> offline = new ArrayList<guiPlayer>();
for(UUID uuid : uuids) {
guiPlayer guiPlayer = new guiPlayer(uuid);
if(guiPlayer.isOnline()) {
online.add(guiPlayer);
}else {
offline.add(guiPlayer);
}
}
online.sort(Comparator.comparing(guiPlayer::getName));
offline.sort(Comparator.comparing(guiPlayer::getName));
online.addAll(offline);
return online;
}```
@iron nebula yes https://dev.mysql.com/doc/refman/8.0/en/json.html
or you can store your data as individual items in The Sims and use python java interop to read The Sims map and check specific coordinates for an item type
Oh okay so he fetches all the users separately okay
btw that code looks ugly
i just wanted to know of any way to optimize the above without doing all the sql stuff
Seperate your friends to another table
I already told you
wait what the FUCK is the point of generating an offline list if you don't return it?
excuse me immediately
he adds offline to online
online shows first in alphabet order then offline in alphabet order
probably to sort them differently
because on my network friend lists are unlimited limit
how about using a map or an object that holds two lists
aye @granite cedar
so it will be hard to find friends
Even without changing anything about the database, you can improve that code https://discordapp.com/channels/690411863766466590/690470011382267904/704727448255987762
EnumMap<OnlineStatus, List<Player>> idfk
Oh jezzz
my brain hurts a bit
don't
quick question, I have a server with 3.75 gigs of ram. How much should I give my server while taking the virtual machine into account
use mysql to sort the list and the stuff that in a list object. in a loop, check if they are online remove those that are not and stuff in another list. Voila two ordered lists without having to do the ordering with Java ๐
ok so how would i do that @fading frost
But if you plan to have unlimited sized friends then you are having big problem
you can sort with sql
Hypixels servers were crashing because they didn't limit their friend list sizes
They had to put the limit to 5k
LOL
xDDD
I can give it more very easily
well you don't use SQL efficiently either
they access sql hundreds of time vs me with just 2 times per player
at least im not overloading sql
it's very arrogant to claim you're doing stuff better than the largest server
very hard to overload it if you optimize your DB structure
This is not about how you read the SQL
which will have the best developers all on a nice pay
Its about how efferently you can process that friend list on the game server
as far as connections goes, MySQL can literally handle thousands of connections per second
im an industrial engineer my job is to innovate
And having 5k friends to process thru takes CPU time
@granite cedar That doesn't matter at all... Just because you only do it when the player connects doesn't mean it won't lag.
Keeping track of their state etc
It just means it will lag VERY HARD but only when they join.
consider this: my toes
lmao
lol....
use PostgreSQL or H2 with the UUID type you dumb bitch
Yeah but like why...?
Comparing dick sizes doesn't help anyone here
because his job is to innovate
i just access sql when player join and when they quit unlke hypixel
its not about DB access
thats why i will handle 100,000+ players while hypxiel is still updating to 1.9
It's the sorting of 5000 uuids.
๐คฆ this is hurting
one hundred thousand
i have a caching thing for that zaxarner
You're not better than Hypixel. They're the biggest server ever.
SQL as stated and its been proven as its continued to be used industry wide handle literally thousands of connections per second if you tune it to do so.
but can it handle one hundred thousand players? that is the question.
if it crashed its saved to flat file if it cant save to sql and when it restartes it uploads to sql
You know the SQL can process hundreds of millions rows in a second as long as you have your indexes set up correctly, SQL is not your problem
it can handle millions, but can it handle one hundred thousand?
then what was hypixels problem with not being able to handle 5k+ friends?
think about that next time @iron nebula
the java code
Lmao
as stated likely
okay I'm done :)
And tracking it
ohhhh i see
if you query for a large enough data set, it will cause some slow downs if no optimizations are done on either end
well idk how they code but my way is flawless
hahah no
lol
okay im really done this time :)
- flawless
im only loading 50 friends a page
if mysql can handle miliions per second whats the problem?
WAUIT OKAY IM BACK
no go away
so you're only pulling 50 from the database at a time?
but I thought you said you get everything when the player connects?
Don, how do u plan to to keep their online status? :)
player objects
how about check if the Player object is null
And where do you store those objects
let bukkit store that
in java
Bukkit.getPlayer() or something
in java
Lmao
- in java
personally I would probably toss redis in between to handle the caching
K
not one hundred thousand?
but you're bigger than hypixel?
i have 3000 dedicated servers from an old colocation that shutdown
will u ever say hi to me
hi
yay
wtf does that have to do with being bigger than hypixel
i have connections with youtubers too
3000 dedicated servers -exasperated sigh-
im about to open a warehouse with a fiber cable
my server is Jenna Marbles approved and James Charles certified
nice don
he iz
thats what the warehouse is for
that you don't have yet
and the tax write off is gonna be crazy lol
i have two fiber cables
So you have 3k decicated servers for peak of 20 ccu
๐
im a multi millionaire so youre gonna see my network probably on tv
hahaha
Bru
working on a partnership with mojang too
if you're a multi millionare why aren't you paying developers instead of hacking together something yourself
and why are you investing in minecraft
how to remove this selection on windows 10? when i move the slider everything is selection
lol well im back to coding PEACE
Oh are you from planetminecraft to inspect my mc server?
If you have money like you said and all this equipment, then why are you even here?
@hasty forge why is your font so ugly
also wdym Windows 10... java is platform agnostic
@dusty topaz this is a hobby of mine. i have a industrial engineering degree this is just whats in my dna to do. come into stuff and innovate innovate innovate
your degree is meaningless if you're a millionare
your dna is spastic. goodbye.
yes I understand that, but you could literally pay someone to teach you this stuff though
i made millions with my degree
@hasty forge Buy a decent monitor that has decent aspect ratio...
lets say I have 4.5 gigs of ram, is 500mb of ram left over enough for just the ubuntu machine
I'm using GCP
should be if nothing else is on it
it just sounds like you want to create it yourself because you don't want to spend the money to have someone else do it even though it would financially be better that way if you are going to launch a very large network.
I don't think that is their situation frostalf
they're not planning to launch a very large network
running no plugins or mods ๐
give money and I will buy) a question. how to remove this selection when i move the slider all the text is selection
You can buy my $5 for $10 ^
getStringList will return an empty list if the list doesn't exist
so the list doesn't exist
so you're likely loading the yaml file incorrectly
https://www.spigotmc.org/wiki/config-files/ give this a read
Guys I'm using a new technique to store millions of users in a database! I'm using txt file that preallocates 2Mb for each user to make sure the player file can be saved at all times and using file pointers to parse the json string as a POCO! Also for fast access I'm using excel for indexing
can LivingEntity#getEquipment ever return null for an armor stand?
sounds like an awesome system @iron nebula
@boreal tiger checked the docs?
Yes, its a flawless!
@frigid ember that is how I have always done it
the doc only says "Gets the inventory with the equipment worn by the living entity."
but an armor stand would always have the equpment invetory no?
@boreal tiger yeah
the API should override that method in all relevant subclasses and annotate @NotNull as appropriate
but honestly who can be bothered to do that
@frigid ember I think YamlConfiguration#loadConfiguration is going to load the file? iirc it will return a FileConfiguration object loaded with the red values and keys from the file.
assert throws an exception if its not what I want isnt it?
assert doesn't do anything at runtime if you don't enable assertions
are there any similar names to datawatcher?
Well it will make the most things for you except creating the file if it doesnโt exist?
https://gist.github.com/frostalf/07c61846b8fe5c5079b42328374a1872
@frigid ember to load custom yml files ^ an example might need tweaking idk.
change mostly to how I am doing it and it should work :p
is there any difference to YamlConfiguration.loadConfiguration(f); and
FileConfiguration config = new YamlConfiguration();
config.load(f);
I've always done it the latter way but it seems everyone else is doing it the former
how to disable this selection when i move the slider all text selection
get a better monitor
with a good aspect ratio
@frigid ember because you're typing loadConfiguration not load
private void loadDataFile() {
try {
dataFile = new File(getDataFolder(), "data.yml");
if (!dataFile.exists()) {
dataFile.getParentFile().mkdirs();
dataFile.createNewFile();
}
data = new YamlConfiguration();
data.load(dataFile);
}
catch (IOException | InvalidConfigurationException err) {
getLogger().severe("Failed to load data.yml file!");
err.printStackTrace();
getServer().getPluginManager().disablePlugin(this);
}
}
this is my code to do it
that I usually use
where:
private File dataFile;
private FileConfiguration data;
@silk bane know Veron?
Frostalf seeems good. But when I load I always make sure to make a new file instance that Iโm loading
Obviously depends on what youโre doing b
I usually just do YamlConfiguration.loadConfiguration(file);
never had problems doing it that way
i wonder if there is any internal difference
you can look at the code
in FileConfiguration
public void load(File file) throws FileNotFoundException, IOException, InvalidConfigurationException {
Validate.notNull(file, "File cannot be null");
FileInputStream stream = new FileInputStream(file);
this.load((Reader)(new InputStreamReader(stream, UTF8_OVERRIDE && !UTF_BIG ? Charsets.UTF_8 : Charset.defaultCharset())));
}
Yes well Iโm talking about the File not the YamlConfiguration itself
public static YamlConfiguration loadConfiguration(File file) {
Validate.notNull(file, "File cannot be null");
YamlConfiguration config = new YamlConfiguration();
try {
config.load(file);
} catch (FileNotFoundException var3) {
} catch (IOException var4) {
Bukkit.getLogger().log(Level.SEVERE, "Cannot load " + file, var4);
} catch (InvalidConfigurationException var5) {
Bukkit.getLogger().log(Level.SEVERE, "Cannot load " + file, var5);
}
return config;
}
looks like they're the same
ยฏ_(ใ)_/ยฏ
But, I also keep a single object though per yml file, but I usually don't have many yml files I need to load. If I had to load many yml files I would probably do it your way
Does someone know how to create a variable named like the return of a Method?
The static method doesnโt make a new File instance from what I can see
@iron nebula explain what exactly went wrong with hypixel and their friend system please
neither of them make a new file
^
probably encountered OOM errors
Indeed
so it's doing it over one line as opposed to two
Well loadConfiguration handles the exceptions for you
they ram out of ran
lmao
Their friend system used 96GB's of RAM
was it today?
gg
No, thats the old system
lol ๐
Does someone know how to create a variable named like the return of a Method?
Why have 96GB when we can have 96YB ๐ฎ
String myVar = myMethod();
lets say my method returns "var1" then should a var with the name "var1" be created
and if the class extends a another class that finalizes a method
no, it doesn't work like that @frigid ember
how did their friend system manage to use 96gb of ram? @iron nebula
what did they do in their code to cause that?
not sure why you would want to do it like that
because they had so much data, that caching it in Java used that much resources
k
Well Imagine having like 70k of online users and all of them having friends
if I was one of the users
Thats a lof of data to keep in memory and process
with an unlimited size friends list
Lets say you have 70k online users and they all have at least 50 users
if each of those 70k players has at least 100 friends, thats 7million players being processed
You need to if they are online
explain
Thats how computers work
Can't access data if its not there you know
you arent explaining
Logical sense ?
it wasn't lag that killed them, literally the servers crashed due to not having enough ram
Yes
how?
You know having no limit and having limited resources is not that great of combination
so hypixel stored a players entire friends list when they join?
even if you are adding data to existing objects, they still use up a small bit more of ram
Snowball its more complicated than that
so hypixel stored a players entire friends list when they join???
yes, but for every single player that joined
thats stupid
lmao
and you tell me they have the worlds best devs
but that is the exact thing you are doing o.O
I'm done
strings are arrays of chars with some extra methods
Here we have our multibillionaire with his degree
millionaire
everything is an object except for the things that aren't objects ๐
U do also know processing strings use more CPU and RAM
but what did hypixel contatsntly track their friends online ststus or something?
Thats how it works...
well said @silk bane lol
well thats stupid
how did they track online status?
hypixel is pulling your data on join
with bungeecord?
that's all
No
probably with redis
They have tens of bungees
how to turn off selection in chat? when I move the slider all the text selection
They have whole seperate application to take care of your friend list because its just that big of network
They track it the whole session they are logged in
how often
Every ns
do they drun checks
right
When you log out -> They remove your status
what does that have to do with tracking friends status
zzz
how often will they track your friends list if you join?
They load it in to the memory
Everything happens only when someone logs in or logs out
Memory and RAM is the same thing
zzz
so a player joins and all 5k of their friends are stored in the memory as online and offline?
what about the unrandom access memory ๐
Don, YES
and when a friend goes offline on a different server how does it work?
Like I said, they have whole separate application for it, microservice
thats stupid
why would they want to cache/track 5k friends when they only need to know a friends stats when opening a gui?
Because imagine when there are 70k of online users there
and?
Fetching it as soon as someone asks for it is too slow
we both gave the same example XD
you are fetching from mysql which can handle millions per second
so whats the issue?
That its too slow for them
fetching and sorting it depending how large the data set is can be too slow
HAHA
They need to go way faster
which is not the same as as mysql couldn't handle it connection wise either
two separate issues there
When you are dealing with 70k of ccu the very simple things needs to be more than just fast
smh this is why us industrial engineers are a rare breed
Keep in mind, that there have been 18 million unique players on Hypixel as well.
not sure what industrial engineering has to do with this o.O
you certainly are a rare breed
i have so many ideas, im taking over the mc schene. industrial engineers are basically professional inventors.
im going to SHOW yall rather than keep talking. laterr 8)
and the irony of those that actually did invent things most of them not being industrial engineers
Well lets say you have 70k ccu, and they perform one action at least once in a minute, thats at least 1k requests to handle PER SECOND
Performing one task in a minute is pretty slow, so you can expect there are shit ton of requests per second
the bottle neck was obviously the mc server/plugin which can't keep up with that
you should let him have his way guys
when his plugin reaches 300% lag he'll know why
:p
lol
Don with 3000 dedicated servers with his 20 ccu: Burn my bby, burn
lol
If I had 3k rack servers, I would probably just open up my own dedicated server hosting
instead of trying to mess with an MC network
and just target MC people
probably a better avenue of approach as far as revenue goes then MC network
If I had 3k empty racks laying around I would just maybe sell them
well, I have been wanting to open my own datacenter. And if I had 3k racks that would certainly help my goal in that ๐
You can have 1 rack and call it data center
nitrous networks moment
lol
I need more then that. need to have a datacenter going with more then just a rack if I want to force the local ISP to compete ๐
Well debends how you want to compete with them, one rack can get it all started
yes it can, but I need the upstream bandwidth
u need decent premises too
Yes, but currently only the local ISP owns the fiber, so goal is to use Local ISP initially for the fiber, then start rolling out my own fiber as I get more racks filled. Once I have enough and rolled out my own fiber, I make PTP to other data centers, then I can switch to being an ISP as well to compete
I have 23 acres of land @silk gate
So, quick question for you guys.
I'm messing around with the EntityDamageEvent, I have my code working so that if pretty much anything, it'll cancel the event. When it touches a cactus or is on fire for too long, it'll disappear, however, I can still walk up and pick it up.
I'm certain this is a visual bug on the client side, is there something I can do server side to push an update to the client to continue rendering it?
we will just let @granite cedar believe he is the only one here who has money @silk gate ๐
I have few euros!
little does he know, i am the ceo of microsoft
I have no idea how much quid is even worth
like 81 cents
I also have 1m of doge coins
:o
๐
well its worth more then Euros
i had 6 garlicoin when they were going for $2.50
I have a 1/10000th of a bitcoin sooo
and decided to hodl
Euros is almost worth the same as USD now
and now theyre worth literally $0.00000
Good, that should teach u a lesson
Quid is worth 16 cents more then a Euro
XD
Might be a good time to invest in some Euros actually
with it being quite low
people invest in actual currencies?
1m of doge coins is actually $2358
except who would buy them
@dusty topaz Yes, because it is cheaper then converting currency
hi, how get bukkit world or send NMS from bungeecord to bukkit?
anyways, I have had my laugh for the day. I have some work that needs to be done XD
;c
Well some other day we have more stupid people here
have fun @iron nebula
yeah I agree
[23:11:06] [Server thread/ERROR]: null
org.bukkit.command.CommandException: Unhandled exception executing command 'test' in plugin DiscordStats v1.0
at org.bukkit.command.PluginCommand.execute(PluginCommand.java:47) ~[spigot-1.15.2.jar:git-Spigot-800b93f-8160e29]
at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:149) ~[spigot-1.15.2.jar:git-Spigot-800b93f-8160e29]
at org.bukkit.craftbukkit.v1_15_R1.CraftServer.dispatchCommand(CraftServer.java:711) ~[spigot-1.15.2.jar:git-Spigot-800b93f-8160e29]
at net.minecraft.server.v1_15_R1.PlayerConnection.handleCommand(PlayerConnection.java:1657) ~[spigot-1.15.2.jar:git-Spigot-800b93f-8160e29]
at net.minecraft.server.v1_15_R1.PlayerConnection.a(PlayerConnection.java:1497) ~[spigot-1.15.2.jar:git-Spigot-800b93f-8160e29]
at net.minecraft.server.v1_15_R1.PacketPlayInChat.a(PacketPlayInChat.java:47) ~[spigot-1.15.2.jar:git-Spigot-800b93f-8160e29]
at net.minecraft.server.v1_15_R1.PacketPlayInChat.a(PacketPlayInChat.java:1) ~[spigot-1.15.2.jar:git-Spigot-800b93f-8160e29]
at net.minecraft.server.v1_15_R1.PlayerConnectionUtils.lambda$0(PlayerConnectionUtils.java:19) ~[spigot-1.15.2.jar:git-Spigot-800b93f-8160e29]
at net.minecraft.server.v1_15_R1.TickTask.run(SourceFile:18) [spigot-1.15.2.jar:git-Spigot-800b93f-8160e29]
Error ^
import org.bukkit.Statistic;
import org.bukkit.command.Command;
import org.bukkit.command.CommandExecutor;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
public class Test implements CommandExecutor {
@Override
public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) {
if (sender instanceof Player) {
Player player = (Player) sender;
int blocksMined = player.getStatistic(Statistic.MINE_BLOCK);
player.sendMessage("You have mined " + blocksMined + " blocks");
}
return true;
}
}
Code ^
Why is it giving that error?
?paste
Whenever I use the command, it gives that error
Can you paste more of the error?
Use that link please.
Read the exception
Look at line 21 in the paste you sent us.
Additional?
Yup.
parameter
The MINE_BLOCK statistic isn't for every block mined.
Oh
It's for mining a specific block. It's asking you to specify which block.
I was actually trying to get total blocks player has mined
Loop thru all the materials :kappa:
Haha no
Yeah thatโs how we do it
Isn't there another statistic for that?
Docs ?
Oh wow I guess there isn't.
isokissa I don't want all materials? I just want the amount of blocks a player has mined
๐คฆโโ๏ธ
can you please be specific?
The statistic is for getting the number of times a player broke a certain block.
So you'll have to get the statistic for every block and add them up.
Oh okay
Or use scoreboard?
Scoreboard?
Wym
Like everytime player breaks or places a block, it will add it to the variable
Huh
You can do that. You need a way to save it though; either a database or a file.
Because variables get wiped on server restart.
The only problem I know with some scoreboard objectives is that they show a value of 0 unless initialized and loaded.
Itโs mainly bad for showing current health
Meaning all players would have to take damage when joining to initalize the score but maybe itโs different here
Also register the Objective if itโs not registered
Does anybody still have spigot 1.7 src with working dependencies? (Paper would work too)
@dusty topaz 1.7 is the best version from a pvp perspective
1.7 jeez ppl still use it
so no thanks
Iโd say 1.8 is
definitely 1.7
i'd say nobody cares what is the best for pvp, use latest or don't expect any support
@velvet hound No. pre 1.9 pvp is garbage
Why is 1.7 better for pvp than 1.8
@radiant pollen post 1.9 pvp is trash unlike 1.7/1.8
Okay some of the animations might be more helpful but still
I disagree
In 1.7 there is a certain serverside lag which allows better hit registration as well as a better enchanting system
Better enchanting system and server side lag?
But I am not asking if the majority of the peoiple here like 1.7; I am asking if anybody still has spigot 1.7 src with working dependencies? (Paper would work too)
Auto clicker doesnโt help
No, thereโs no reason for anyone to still have the spigot 1.7 src
Thereโs a video by tenebrous on 1.7 vs 1.8 pvp that goes more in detail if you want to look it up
let him ffs
jeez judging community
let him get what he wants
It's no longer supported
i stead of saying how bad 1.7 is
and it shouldn't be
why
I need the src with working dependecies tho
just let it be
Because only 1.14 and 1.15 are supported
@velvet hound decompile it?
just this community hates on 1.15 or less users
Is it not obfuscated?
Nms is?
i ask for support on a 1.8 or even 1.13 plugin development
they harrass me
for not using 1.15
1.8 is 5 years old
i said or even 1.13
Because only 1.14 and 1.15 are supported
Also can I then re-compile it with a slight change? @naive goblet
two days ago i was harasse for not using 1.15
Itโs not our fault you choose to use out of date software lol
and apparenty im ruining the community
Why are you being so entitled
Are you looking to make a fork?
Because only 1.14 and 1.15 are supported
Diamond depends on what you mean by supported
people said im a retard
There's no point in supporting old versions especially when they're ass. :]
Exactly
But it means you wonโt get support
So why hate me for not wanting to support 1.8
Thatโs something that comes with it
then dont call people retards
if it's an opinion thing
no what i hate
is i was called a retard for using it
asking support for unsupported versions is infact retarded
But dispite this discussion does anybody still have spigot 1.7 src with working dependencies? (Paper would work too)
no
No
because you know, they are unsupported ๐
i was called retarded for using it
Please make your life harder and support lower versions while I pay you $0 ๐
@velvet hound no
some stuff stay the some up to higher versions
Old I do have it on my old pc which I can access later
aight ty
yes
Itโs not retarded but itโs not recommended
yeah
A voice of reason
im cool with that.
finally
maybe i am part of the snowflake generation
As a matter of fact 1.8 pvp is still not dead because of a reason obviously
ResidentSleeper
I was
many people here are so judging
Mhm
well.
I mean donโt we all?
but i dont call you dumb or retarded for using an older version
no wonder we all use java 8
outdated HA UR RETARD
like cmon guys..
Yeah itโs a difference between being factual and being a d*head
I'm just saying don't complain when you can't find a version that's almost 6 years old :/
i didnt firstly
No one said you did
and im talking about the client bro
^^
BrO
Who da hell put this chat cooldown :/
im focussing on the client so i didnโt ask for support about the client
If you're willing to play an outdated and no longer heavily supported version, don't expect people to still help you out with it. Most of us haven't worked with 1.8 or below since 1.11+ lmao
or who does
i said client so i didnโt ask for support
Chat auto goes on cooldown if there are 8+ messages in 10 seconds
i simply hint im using 1.8, and im insulted
Well even if there is no official 1.8 support itโs still many people who can support a 1.8 developer unofficially due to the fact that itโs still commonly used.
Commonly used is a loose term
Come on now, get your story straight at least
topics change bro
you're in a help channel, asking for support with an outdated version
Youโre not directly making it better Sable?
People are going to ridicule that, that's what people do, it's not great, but that's life unfortunately
jist tryna say outdated != bad
wrong, sorry
many use java 8, lets be real
Thatโs different
i can also complain its outdated as there is a newer version out there
so what?
Right and many used java 7 for years, but that's only because server owners rarely update their java versions so it's easier to develop in the older versions
Using an unsupported version is unsupported
Itโs not necessarily bad Martoph?
Java 8 is supported in most cases
Outdated servers are bad
I get adding support
saying its bad is incorrect
I use to make plugins in Java 7 well into Java 8, because any plugins compiled to Java 8 had a lot of complaints because a lot of system admins wouldn't update java, it's not ideal, but it's something we have to live with, it's not the same when it's 6 years outdated lmao
hypixel for example is bad?
largest server i know?
But running a server on anything other than 1.15 and asking for support isnt welcome
Difference between generalize server versions only comparing to compare outdated in general
java 7 should not be used anymore
Hypixel can afford to pay devs an amount of money that makes it worth working with an API that's 5 years old.
let users use what they want mdm
Hypixel is popular but they would benefit from updating in the long run
100s of features at the sake for legacy pvp
java 7 has major security problems
ok
I bet most players connect with 1.15 protocol
Hypixel's game doesn't use what people would consider 1.8 pvp
Most end users will use 1.15, people keep their profile on "Latest version" more often than not lmao
It happened to be so that a lot changed from 1.8 to 1.9 etc
its split into 1.8pvpers and latest version people
Big servers are a completely different ball game though, their devs have to put a lot of work in to make those servers what they are, and it costs a lot of money
i have no problem with latest version, i even use it in some cases rarely though
nice features
just be a bit more open minded
I think hypixel could easily win back their players if they ipdated to latest version
Lmao
What sre they players gonna do? Just not play their favorite server? Lol
yeah
move to another server
If you've spent upwards of 10k on development, you don't want to be updating to a newer version and having to pay out for those devs to update them lmao
id move to minemenclub
Even if they adopt legacy pvp?
you claim java 7 has security issues i can fight back with minecraft 1.15 has worse performance than 1.8
convince you?
its peoples opinion
thatโs completely different?
Sable thatโs true indeed but itโs proving that hypixel is working with 1.8 more than good or so
@frigid ember are you talking about java 7 or minecraft 1.7?
Getting hacked.... vs performance?
Hay, this has nothing to do with Spigot, but I saw that Spigot uses JLine2. Does anyone know how I use Jline3?
oof
Retrooper said outdated != bad which is true...
thats not a reason to tell me not to use it
i didnโt ask for support
Newer java versions are backwards compatible with anything made in older versions (at least a couple of versions back), so java 7 vs java 8 isn't a question hahahaha
its literally not even allowed to have a conversation about 1.8
@coral fractal why do you ask?
or people will just attack you
saying ew he uses 1.8
retard
youre dumb
1.8 or 1.9
Woah my guy
use 1.15.2
no outdated software
else u bad
any version lower than 1.15 is apparently bad
Yea
unless u have good reason
lol
Guys this is #help-archived not #general
like 2b2t
@wanton delta I will create a cloud.
It's not bad, but the server software is not updated anymore
Defining support for old versions may be tricky. Itโs really the official support that older versions loses but there is many people who still knows and can help people that works with outdated versions unofficially.
@vale slate is right though, this should be moved out of support now, it's just a debate at this point lmao
So if there was an exploit to be found in the software, your server is screwed
If that helps
Yeah
I believe you can String.join
With \n
Or if you wanted the messages to be seperately sent
But there's no need to do that
You could also .stream().forEach()
Try separating the - and the word
^
It should be taken as a StringList and read it
But what @naive goblet is totally correct (but not a good practice having this #getStringList() function)
I can of misunderstood the issue here ๐ฆ
Nope, u understood well I think, his #getStringList() isn't working well so he asked for a way to save all as a string and just parse it.
@frigid ember try putting a space between the - and the word
Pretty sure the space is required
np
Does the lightbans plugin have a license code, so that someone who comes to the plugin folder can just have the plugin without paying?
Hmm unsure
Not that I'm aware of
Are there people who are sure?
@heady shadow I'm pretty sure that if the question is with piracy intentions it is not allowed here.
You'd have to ask the Dev, message them on spigot?
or her, can't just assume one gender >>
True hold up
Where can I ask this question?
You'd have to ask the Dev, message them on spigot?
@frigid ember no
Also if you want to hack his plugin ^^
If you're not willing to ask the dev, chances are you have bad intentions and we're not going to support that I'm afraid
Maybe a stupid question, but maybe you can ask that. I don't know how to do that xd
Also if you want to hack his plugin ^^
@leaden dawn Send me in PM
lol
lmaooooooooooooooooo
I guess the answer is clear on the intentions part
@heady shadow you won't get that plugin without paying for it's license, so no. There's no way to install his plugin without a license.
Pretty sure you're upto no good bud ๐
Does anybody know how to get a players numbers of votes to show up in tab by each others names??
And no, I'm not gonna help you with that. You* can try to hack him for contributing, but not for using his plugin without paying xD
Yes, sorry I'm a Dutchman. My English is not good. Sorry for not understanding or misunderstanding sometimes.
modify the tab list packet unless spigot has an API of it
I figured you were Dutch due to your name ๐
๐
https://wiki.vg for packet needs
Protocollib is good for that
Ty
unless u want to get into reflection
protocollib or reflection either way reflection is done, just one takes care of that for you ๐
Surely there are cracked plugins for that?
surely we don't support piracy
Ok ill try and do it
@heady shadow not a topic for discussion here
@heady shadow stop asking for piracy please.