#help-development
1 messages · Page 705 of 1
He literally said that
If it's too big use the pasting service

if its too big ur generally doing something wrong as well 
imo
Nah discord limit is pretty small
Isn't it like 2000 characters
10$ nitro is 4000
public class bosscommand
Yeah okay am out
.......
this is what happens when you refuse to learn the basics :)
Funny how half of this could be converted to a config and be actually readable
There's only the plugin instance you are injecting
oh well at least it works for you
Fr
the wither skeleton "ent" variable
How could i implement the method isSafeLocation into calculateArea, because with a while loop its just crash the server https://paste.md-5.net/idifigesuy.cs
What is the idea? Do you want to find a safe location in a distance X around another location?
i use this for spawning zombies around the player
COUGH COUGH*
?
that one
nothing :>
ok
Finding a safe spawn location can be done completely async.
You should also do it discrete and not continous. (Meaning block wise)
its already in async the function that call it is already in async
the method is separated only to make the code clean
and how should i do it not continuos but at the same time get a good location
uhh there are multiple approaches yet again :)
And it really depends
For example, on my zombies minigame, I had a bunch of map "regions" where each region had its own spawn points, and regions were connected by "doors", so I'd pick a random spawn point in any of the regions that was adjacent to the player's region
I've also had a gta plugin where I scanned the map and made a bunch of "safe locations"
in this case there are no doors or nothing just litteraly a bland map one block high and nothing else, you just need to survive
Or you can use something like a flood-fill with some safety rules to come out with a "safe" location that the zombie can pathfind back to the player
So yeah, it depends
tried that but everytime they spawn on the void so f
to make it simple, i could just add a section where they spawn and just don't care but then if the player is smart they can kill them at spawning even if its hard
Then make them not spawn in void...
What are the rules for a viable spawn location?
none just they go into a block
that's it in this world they cannot place or do anything so
Wait. If the world doesnt change then you even have a predefined height map?
In that case it should be trivial
yes
i have a map cloned everytime
The just calculate all viable spawn points once...
and how?
But if you dont want to precalc the locations you can just do a simple flood filling algorithm.
and how v2
You start at a block and visit all neighbours. Continue this recoursively until you reached the distance limit.
ok thanks im gonna do it in this way
p sure I made a flood fill that used chunk snapshots before
zoink
doesn't really suit your needs unless you want to flood-fill the floor
Pretty sure I used it to scan prison mines
i like the non recursive version better, so nice job
I mean this is recursive
but adds iterations to a list of tasks
it's weird
iterative and recursive at the same time
oh nvm im blind
oof
its a hybrid
prolly because you are using futures and stuff right?
yeye
if I weren't it'd be single-threaded
this is multi-threaded
And uses the main thread to cache snapshots sometimes
Ouh. I see some things i dont like in there.
I wrote it like a year ago
If it works it works 🙂
think it did like 300k blocks per second
Just for the next time you need to pass collections like that as method params, think about creating a new class for it instead 
Understandably
I also have a class for mass block replacements
which is not fun because I create new threads instead of just pooling them yikes
good ol' 2 year old code
Yeah my old code makes feel the same way
It's a constant improvement process
my 5 year old minigame code 
hmm I wonder what's the best way to do an audience thing
that just means you have vastly improved 👍
Not a fan of how it goes right now
whats an audience in this context
basically a multi-platform CommandSender or whatever
That's used in a few places,
Such as the command tree, for filtering out tab completion based on permission
Or my languages system, for sending messages based on language
Anyways it's used in commands n such
I have to revamp the messages system
Next time im able to write a green-field project ill translate messages on a packet level and only send a key, like some.msg.that.needs.translation
so is it a collection of players?
yeye except that this is multi-platform so I have to interfere somewhere
Either in the audience itself or somewhere else
But for API sake I'll just have a separate lang system
As this'll be public
constructor abuse
a little bit
factory
uhh I might need an example
I might have an idea
but
probably like I did here, right?
Does .build() register your command?
yes
Hm
this sounds like it should be saved in come kinda json anyways
This looks similar to a quest chain builder ive written
true
but
I'm not paid enough for that
As in
I'm paid to hardcode it
Converting it to json or whatever would just be mapping a bunch of strings to constructors
yeah this is kind of a quests system
"Talk to this dude" and then a dialogue plays
help how get itemStack List from config.yml
list dont exists
oh wait
dont exists
Unchecked cast: 'java.util.List<capture<?>>' to 'java.util.List<org.bukkit.inventory.ItemStack>'
really?
why
You probably do want to check the type before casting
Watch user error crash the plugin
Yeah
Already asked this question a year or two ago, but is anyone aware of a concurrent int hashset implementation?
ConcurrentHashMap::newKeySet is the closest i can think of
But otherwise I think MAYBE fastutils
It doesn't need to be a hashset but it'd need to be able to store massive (~4 million?) amounts of unique unboxed ints
Or trove
ConcurrentHashSet?
Not a thing
The problem with CHM is that it's boxed. And for what I'm doing it simply is too expensive
Yeah
I could of course allocate all the Integers ahead of time but that'd be really cursed
A concurrent (no synchronized schenanigans - at that point I might as well run it all in a single thread) unboxed map/set/whatever. Not sure what no-corrosion is
I'll take a look at trove. But fastutils and eclipse collections are all not concurrent from what I know
trivago had some fastutil RWlock
but yea, fastutil only has sync for "thread safe"
aw
never heard of thse ones
what a shame
Well I mean a Set is not too different from a Map (in fact this is what Java does with it's sets). So I guess I'll eat the added overhead
Yeah but it doesn't contain that type of map
So you'll still need to make your own map impl you can use the above implementation as reference ig
I mean, at 4 million ints, you are close to the point where implementing your own would be better anyway
I just realized that I actually want to store 4 million longs but it's probably the same thing
yea ehm
I'd go with implementing this yourself
you'd be looking at like what
30 MB
for just the longs
Only problem is that I have 0 idea at how to write concurrent stuff
I mean, half the fun is just CASing the shit out of it
i thought java map no shit
hey, i want to save data on disable, is there a way to freeze the server or something like that?
file , database etc.
database
I guess I'll write my own impl. I believe I have the minor advantage that these longs aren't fully random (that is they consist of two ints that are between 0 and 1 million) where as each int element of that pair is only connected to at most 9 other ints.
main class have disable metod
Time for RegionatedIntIntToObjectMap the second

I suppose you haven't seen https://github.com/Geolykt/Presence/blob/main/src/main/java/de/geolykt/presence/common/util/RegionatedIntIntToObjectMap.java yet
But its good lol
oracle-level javadoc, nice essay
so many comments horrendous
RegionatedIntIntToObjectMap - bruh
Should've called it ConcurrentRegionatedIntIntToObjectMap
Should we change it to A 🤓
in bukkit api there is such a bulk
Yeah, it was meant to be used by many of my minecraft projects (given that this map can be used for MANY things in minecraft). However I ended up quitting minecraft plugin dev shortly after
hahaha
Are you saying that this map can replace the database?
If you have any Chunk -> Data assignments, yes.
In this plugin I use it extensively to assign Data to Chunks.
However as this map doesn't have an Iterator the Data needs to be stored somewhere else too so it isn't all too efficent with writes. But damn is it fast for reads
who in their right mind would store all chunk data for all available chunks in memory tho
can i store all world locations in List and access it via HashMap ?😱
me
an indexed sql table with lookup and writes on ChunkLoad seems like the less painful way to do this
I always store all available data in memory
skywars?
No, it's a claiming plugin
skywars yes
But even for my purpose it would take a considerable amount of playtime and players to exhaust available heap space to a notable degree
How many
if it is related to chunks tho, why a (long, long) 
"ent" one
a single long would suffice no ? packed from chunk x and z
I use packed x,z hence I need a long -> ? map
you really gotta learn basics
you cant just get a variable from inside a method
wdym
Assuming you have 1 kb per Chunk storage unit and a player moves to a new chunk every minute: You have an exhaustion of 1 kb / player / minute
So at 100 players online at all times you'd exhaust 1 Gb of memory within 10K minutes or a bit under a week.
however my plugin assumes that players remain in their little area and that there are no 100 players online at all times
you'd have to scroll up to his older messages from like 2 hours ago
to know whats going on
You can get parameter from a method
Conditionally.
But aren't chunks cleared in memory? The world has boundaries
then how ;-;
Not in my plugin
I keep all data online at all times. of course chunks are unloaded as usual but the attached metadata is still active in memory and will be reloaded across restarts
metodata not cleared?
Nope. Unless you remove the file that stores the metadata
bruh
The metadata in question are Claims.
It'd be a bit stupid to remove a player's claims
Of course one could make a script that periodically purges inactive claims.
i have a better idea iam ogna give a tag to that entity and check if that entity has an tag
but how do i get the entity AS AN KILLER OM
The always-in-memory policy provides lookup speeds that are necessary to offer the best possible experience
You mean like nametag?
Why not store it as a field in your class?
I just thought what if my memory is also full
Well I hyperoptimized this since I couldn't be bothered to write the necessary APIs to do it better in order to properly support Squaremap
Writing the logic required to provide claim data deltas was simply deemed to take too much time
And in the end that was the proper play as the only server that runs this plugin hasn't seen a player for the better part of a year
Every mc server ever

So the stored data sits at a comfortable 280 kb
I think I've reached the "oh no" phase where I have to test all my untested code
I added JDA dependency into bungee.yml and set its scope to provided in pom.xml
but now whenever I try to use the JDA, it errors out like so:
is it a good idea if I have a lot of functional classes to add them all to 1 big class and get all these additional classes through this class

a
it's just that all these classes are related to 1 big topic
so I'm thinking of combining them or not
you know, like a class object
he has a lot of heirs
How can i get rid of the shop
not citizens
yet another hypixel copy
send remove player packet afaik
base
i sent it
scoreboard teams actually
its not in the tab
if it's your own NPC just create its profile with a blank name
?tas
ig Client information
Hello
hi
I’m on IntelliJ and I’ve started trying to learn some stuff, I’ve made the project and I’m trying to add a command that give gives them 1 piece of dirt, I can not figure it out so can someone help me?
In this episode, I give you a brief overview of what you can expect in this MC Plugin coding series. #Spigot #MCPlugins #PluginTutorial
Java Tutorial: https://www.youtube.com/playlist?list=PLfu_Bpi_zcDPNy6qznvbkGZi7eP_0EL77
How to Setup a Test Server: https://www.youtube.com/watch?v=58MZ4THF73g&ab_channel=KodySimpson
Discord: https://rebrand.l...
Ohh thank!
help, my plugin handles only EntityAirChangeEvent
UPD: If you write the command 'reload', everything works as it should.
code:
private void onEvent(Event event) {
System.out.println(event.getEventName());
hook_call.call(LuaValue.valueOf(event.getEventName()), CoerceJavaToLua.coerce(event));
}
private void setupHooks() {
RegisteredListener registeredListener = new RegisteredListener(this, (listener, event) -> onEvent(event), EventPriority.NORMAL, this, false);
for (HandlerList handler : HandlerList.getHandlerLists())
handler.register(registeredListener);
}
he will get the point when he sees that there are tutorials on YT
What should I do instead then?
I have looked but all I have seen are like 3 years old
I mean the one from Kody Simpson was updates 4 days ago
I personally started with him
or CodedRed
👍
.
ok
what to do I will probably have many classes in the future and now I'm thinking of combining and getting them through a common instance of the class or getting them through Id. I will give an onology: is it necessary to access all engine parts through the engine or get parts according to unique features?
Any reason why you register your events like this?
Manually tinkering with the handler list is very bad.
I see that. But this wont work as the handler list will get rebaked every so often
and then what am I supposed to do?
Are you russian?

yep
Hello
Hello buddy 🙂 how is your programming coming along
bullshit idea
idc. then keep your broken stuff.
Well. I’m trying to learn how to do simple commands and someone gave me a tutorial to follow but there files and that looks nothing like mine
Are you fine with learning from text? Or do you need videos?
if I register this and the name matches up
Text is good
am I running into a hash collision or something
?nms
breh i got this fucking error Unresolved dependency: 'org.spigotmc:spigot🫙1.20.1-R0.1-SNAPSHOT'
yes
Different tutorials are seen here:
https://www.spigotmc.org/wiki/spigot-plugin-development/
I would start with
Creating a blank plugin with:
And then choose one of the IDEs you like.
After that you should try to compile an empty plugin so you understand how it works.
If your plugin loads, you can go ahead and write a command like on this tutorial:
https://www.spigotmc.org/wiki/create-a-simple-command/
i just changed from 1pc to another and this error happened
Didnt build spigot with BuildTools
You need the --remapped flag for special sources to work
Oh yeah i forget
mb
like that ? java -jar BuildTools.jar --rev 1.20.1 --remapped
?
I'm blind ffs
Like
public class MyClass {
private WitherSkeleton myEntity;
public void performAction() {
WhiterSkeleton ent = PseudoSource.getSkeleton();
this.myEntity = ent;
}
}
Yes but you can store it inside a class instead
hold on geol you help me with this
Well not really a class but you should get the point if you know enough java
thats my code
there is a variable "ent"
so i want to accsess it inside an other class inside and event

What do u mean by blank? Atm I’m sure I think I’ve done the setting up right and the only xtra code I’ve put in is system.out.println(“the plugin company has started”); and system.out.println(“the plugin company has stopped”);
And that works and loads fine in the server
Nice. Did you compile this and tested it out on your server?
Ok cool. Then the next step is to follow the command tutorial.
Alr thank and to double check can I send a photo of what the files look like in #general ?
Then do
public class MyClass {
private static WitherSkeleton pleaseDontDoThis;
public void pseudoCodeMethod0() {
MyClass.mySkeleton = PseudoSource.getSkeleton();
}
public static WitherSkeleton getMySkeleton() {
return MyClass.pleaseDontDoThis;
}
}
And before I get bonked by someone for the static abuse: I don't need to know all about this. I'm a trained professional
@quiet ice have you seen my code .....
@chilly hearth Basically the magic lies in static. It will be your friend for the first few weeks of your plugin development carrer. Just ignore all the naysayers (there will be many).
However, eventually you will need to learn to not use static
I did. And I fully know that static works.
As long as you only need invoke onCommand exactly once
Which is where we would go to the big drawback of static: It is global
so basically
Is this what it’s meant to look like or have I still gone wrong somewhere?
i do this
However without much more detail I can only give you insufficent information
net.minecraft.server.v1_12_R1.CancelledPacketHandleException
What is this
i have a menu which can be opened from the npc or from a command
When i use the command and the menu opens, i can click on the items and the menu works fine and all
but when i use the npc to open it, when i click on the item nothing seems to happen and i can take it to my inventory and the error i sent happens when i close the menu and open it again using the npc
if any part of the code is needed, tell me.
Another alternative of what you want to do would be:
public class MyClass {
public static final Map<WitherSkeleton, Object> EVEN_GREATER_SIN = new WeakHashMap<>();
public void onCommand() {
WitherSkeleton ent = PseudoSource.obtainSkeleton();
EVENT_GREATER_SIN.put(ent, new Object());
}
}
// Another class, another file
public class MyListener {
public void onEvent(SomeEvent e) {
if (MyClass.EVEN_GREATER_SIN.containsKey(e.getEntity())) {
// This is a boss that was spawned via a command
}
}
}
@chilly hearth
Ah frick, that doesn't work that way
Here fixed with even more sin points
static abuse is a myth
That won't purge inactive entities
ahh having completablefuture hell
maybe I should test my code more often
rather than coding 7k lines of code and randomly deciding to test it all
it's surprisingly functional
:) JUnit is life
true but
I can just test it myself
in my case I'm tripping over "future hell" but in reality I forgot to call my custom event
BROO NO I BROKE MY CODE
And in true enterprise code fashion
nothing working again 😦
I can't just middle-click around the codebase because I applied dependency inversion everywhere
yay it works
if I create an island
let's see if this work
What ya working on?
multi-platform skyblock core
loads islands from a databse
thing with being multi-platform is that I need to rewrite half of the logic out there
Custom command system, event system
An updated multiverse with skyblock?
not multiverse
Reminds me, I should look into Hypixel's Slime Region Format for some of my own stuff
y'know how hypixel loads islands in multiple servers
Like they don't have a single instance with 20k islands loaded
Yeah my plugin does the same
I started this project like 3 years ago or whatever but recently rewrote it all
And now it's testing day :)
https://www.spigotmc.org/resources/slimeworldmanager.69974/
ig it wouldn't really work too well for skyblock stuff 🤔
?paste
I use my own lib that lets me paste stuff with worldedit or whatever
bro its saying plugin = null
I mean, you could just fork SWM and impl WE support
nah this is fine enough
Just a proof of concept atm
SWM support takes like an afternoon to impl
Might release it as an update once this goes public
what even is the point of slime world
uhh
Doesn’t hypixle use a sort of multiverse fir there islands tho?
better world format
In-memory worlds that are saved to a database
better how
usually around 100kb in size
dev blog 6 is also useful to read
But it’s that multi verse we’re you can have 100s of worlds saved into that 1 world
uhh no
that's not how it works
I think you mean a grid
and even then it's not how it works
Apparently java.util.ConcurrentHashMap uses the jdk internal Unsafe.
This will be fun 💀.
Nope. I assume they load/save islands in a grid format. Not too difficult though
no they just use slime
not a grid
No point in being a grid
Slime is just too perfect for them
Ah, so instead of how askyblock or whatever does it, it's literally just multiple worlds
So you could use this instead of bungee cord?

no
Yea, makes sense actually. It's not like you're loading entire worlds in that case
Is this what a plugin files meant to look like or did I go wrong?
LGTM
SWM does not replace Bungeecord is literally any way.
SWM exists as an alternate world format for very specific use cases
Yeah in my case what my plugin does is like
having a world pool
something tells me my session system is dying on me
it just hangs
how fun!
technically you could load the SWM files in a grid format, but there's no point if each world is only gonna be a few 100KB
.
I said technically, it would be hell
I wonder if SWM supports everything listed in the dev blogs 🤔
pomoc
Oh sorry I didn’t know that’s what it meant
english please
Let's gamble - try merge!
Hi , i have problem with mysql ,i use hikaricp , and after 10 minutes of player join / leaving the server the plugin does not load the data
100% of gamblers quit before they win big
(trust me)
i have 8 diffrent profiles each profile have its own data to load and save it have a load from sql , save to save
i got everything setup correctly , but for some reason if player's join and leave few times it stop loading the data
you are not releasing resources between queries
no
auto cloase
only if in a try with resources
i just use good old mysql
lovely found my issue
mans hiding his db
ik the owner told me to not share it xD
Obscurity through security as they say
the table name?
you're not getting through my efficient security system
i really feel like table time isnt compromising anything
looking at SWM ig the general process is
SlimePlugin plugin = (SlimePlugin) Bukkit.getPluginManager().getPlugin("SlimeWorldManager");
SlimeLoader sqlLoader = plugin.getLoader("mysql");
try {
// Note that this method should be called asynchronously
SlimeWorld world = plugin.loadWorld(sqlLoader, "my-world", props);
// This method must be called synchronously
plugin.generateWorld(world);
} catch (UnknownWorldException | IOException | CorruptedWorldException | NewerFormatException | WorldInUseException | UnsupportedWorldException ex) {
/* Exception handling */
}
Player#teleport(Bukkit.getWorld("my-world").getSpawnLocation());
yes its auto close resource
I'd probably just merge it with a private fork, making it easier to work with, but still.
General process ig
each profile have some values for example profile-1 have nickname , tokens, data , profile-2 have game data like wins etc
and each one of them need to be loadded when player join for each player join
there are tottal of 8
the problem is after sometime it stop loading of profiles if new player join , or player's keep log out and log in again ..
oh each profile have its own table to load data from .. xD
i implement the loadProfile in 8 diffrent profiles :
Using SWM means having to do custom versions of any gamemode though 🤔
example :
how many connections are you giving to hikari?
i didnt set any should i give more?
set to 100 and see how it goes
only setting 10
if i set 100 , i will get a problem with to many connections in mysql
when i first join and player joins
after 5 mins , player join , leave it will stop working
it won't load
or get the cached profiles
Still waiting for these 10 minutes to pass so I can actually test my code
Might go take a shower or something
..
after 10 min or less or more it stop getting the data from the getCachedProfile
Is class for name still a thing?
holy shit it works
has to do with jdbc versions
It's either in v3 or v4 that it stopped being a thing
thanks , but will this work for 8 loading methods each one load from diffrent table of mysql?
same database but diffrent tables
yes
not too difficult ig, as long as a gamemode is open source lmao
will it fix my problem ?_?
Yeah i thought it was discontinued in some jdbc version. But alredy a while ago.
does someone know how to check for custom enchant? (eco enchant)
private boolean hasAirTightEnchantment(Player player) {
ItemStack helmet = player.getInventory().getHelmet();
if (helmet != null && helmet.getEnchantments().containsKey(Enchantment.getByKey(Enchantment.AIR_TIGHT.getKey()))) {
return true;
}
return false;
}
Check their API
I believe it should be compatible with regular spigot without using their api
because essentials enchant works too
depends on how they're implemented
(gites majonez)
I need to open more intellij tabs this isn't at 13gb anymore
why does it say 10 I only have like 3 windows open
i'm working on 1 project atm
and its 3
fun
wait, why discord takes 20% of cpu
resource hog
Chrome moment
32 hours on this rewrite and it works better than the original
I call this an absolute win
average electron app right there
VS Code is way better
yo
if i run a task
does task cancel itself after code is executed?
isCancelled() == true?
public void runMyShit() {
var r = new BukkitRunnable() {
public void run() {
System.out.println("Hello, world!");
}
}
r.runAsync(plugin);
}
public void checkMyShit(BukkitTask task) {
if (task.isCancelled()) {
System.out.println("my r is done");
}
}
I wish java had uint128 or uint256. Would make everything so neater.
But sike everything has to be difficult
lol
BigInteger
/s
Or I could be using uint48...
Tempting...
BitSet
java programmers after reading a 17 page npe due to a typo
yes
eh Typos don't compile if you do right
lol it was in my sql statement
for some framework i was trying to make
wrong regex also
and also yml files.
i remember i once spent almost 2 hours rewriting a method for my config
when it was because i spelt a key wrong
cant really excuse myself i think i was just tired
QueryDSL
absolutely no clue what that is
smile knows
time to wait another 10 minutes because my code accidentally saved a bunch of air instead of my actual island
ffs
integration hell
sounds inefficient
classic
sounds type safe
and I did add like 19k lines of debug
the word integration gives me calc flashbacks
but apparently I have so many logs that this just refused to save any of them
static final class Bucket {
volatile Element[] values;
volatile Element[] nextValues;
boolean contains(long element) {
Element[] e = this.values;
if (e == null) {
return false;
}
int idx = e.length;
while (--idx != -1) {
Element val = e[idx];
if (val != null && val.value == element) {
return true;
}
}
return false;
}
}
This has to be the first time ever I use volatile
none of my code is ever safe
no clue what it even does
This is like a quarter of a ConcurrentLongSet
lmfao you can skip youtube premiere timers by just setting the speed
o
You are probably tryin to modify an unmodifiable list
i'm adding a custom object named GangPlayer into a custom object named Gang which it contains a list of GangPlayer in it named members
the intellij said something about that a few days ago but i just ignored it ig
But yeah, modifying an unmodifable List is the most explainable cause
hmm, thanks lemme check
the problem is when i restart the server this command works fine
Don't extend AbstractList unless you know for sure that that is what you need to do
i miss clicked on it, then did CTRL + Z, and the changes reverted
well, i've a
private final List<GangPlayer> members;
in my Gang object class, and the method which causes this error is:
public void addMember(GangPlayer member) {
members.add(member);
}
if you need more information to help, i can share my screen in #695010567907180554
that list is null unless you initalize it on constructor
how is the list initialized
show the constructor
and player npc through NMC is done?
Collections.singletonList() of only 1 GangPlayer on gang creation, and new List of GangPlayers on server load, is this the reason this errors doesn't happens on server restarts?
this method is not used to create a list that can be modified
singletonList will stay with that single Element
Read the javadocs, they are you friend
uh, thanks
ig i found the War plugin problem too (only 1 player is in the war when its started)
i don't have to test it anymore
lol
Is this right so for?
// This method is called, when somebody uses our command
@Override
public boolean onCommand(playersender, Command command, String label, String[] args) {
return false;
}
} ```
chrome casually masking the ram usage
playersender doesn't make any sense, there's no type, so it would have to be CommandSender sender, but yeah
Oh thank you
Just make sure you're assigning it somewhere (preferrably onEnable())
So
Hold up what do u mean sorry?
Your command executors aren't going to just know when to execute. You have to tell them that they should execute by assigning that executor to the command you want
I can't tell if worldedit is being weird or if my code is dogshit
In your onEnable() you can do this.getCommand("company").setExecutor(new CommandCompany());
Then you're all good to go so long as your command is setup in the plugin.yml correctly
why not both?
might be a possibility
I can leave and rejoin fine
but if I leave, stop the server and rejoin the schematic is just air
kekw
I can't tell if it's unloading and then saving
or if it's simply not reading any block data and airing it all out
it's better to create an abstract class😀
wut
wut
just remembered I have to work on an acc checker, so much to do lol
wut
wut?
working on like 5 personal projects is a hassle sometimes grr
But... why though?
I have like 3920483209 personal projects lol
You're not abstracting out a lot
lmfao wallah
if you're going to the effort of abstracting out command stuff
at least do it properly
Luckily something like the acc checker is stupidly simple. I just need to go through all the malware I have and pull user names and UUIDs
wdym this good
I still need to figure out the paid api stuff though kek
not really
why
@override
Public void enable() {
this.getCommand("company").setExecutor(new CommandCompany());
}
Like this?
I forgot I wrote actual checks
doesn't help I have yet to actually finish https://github.com/OpticFusion1/AuthExample though lololololol
base
doesnt abstract much, not really needed
actually no this is fine
https://www.spigotmc.org/wiki/create-a-simple-command/ goes over a simple command example
That’s just a new folder like this called the command inside it right?
quite useful for me
Although... figuring out how to get the paypal api to work will be its own PITA
By the way, I heard that for each class they create their own interface, is this true?
this would be a better abstractation https://github.com/The-Epic/JishLib/blob/master/jishlib-core/src/main/java/me/jishuna/jishlib/commands/ArgumentCommandHandler.java
in bukkit?
bukkit is entirely interfaces while craftbukkit has the impl
I wonder
if I generate an empty world and copy its file structure
and load the copy
How do u get this on your keyboard (I’m on phone and I can not find it)
`
is it faster than just generating another empty world
Fun okay I might've found my issue
and whether the interface is necessary if I do not use polymorphism?
what
android or iphone
`
yeah I have a dedicated key for it
à
grr having this weird odd issue
if I join, leave and wait for it to save it's ok
But if I save, restart the server and rejoin all the data is messed up
fun!
super fun
https://github.com/The-Epic/JishLib/blob/master/jishlib-core/src/main/java/me/jishuna/jishlib/commands/SimpleCommandHandler.java -so filtering is not needed?
there is basically nothing there
beause thats just the handler
it's almost like interface 3
it doesnt need to do anything else
tab complete would be handled by the child glass so would handling
the most expensive one you mean
havent got a clue
omg so much code
this register class?
Yea. Who knew you'd get a lot of code depending on how you do things lmao
I'm putting all my brain cells into this
Hell, I have a project which I believe is a few thousand LOC at this point as well: https://github.com/OpticFusion1/MCAntiMalware
7.8k lines of java
- 11k on one of the dependencies
except it's like all my utilities
this is suitable for those who like to download plugins not from the official site
errr
malware's on the official site too
That's where most of the malware I know of comes from, spigot's forum itself
check to see how many my AV has lmaoo
so pirated plugins
I have had a few people bring up them having pirated plugins in my support server actually
Yes? And what are the chances of them
@override
Public void onEnable() {
this.getCommand("company").setExecutor(new CommandCompany());
}
public class CommandCompany implements CommandExecutor {
// This method is called, when somebody uses our command
@Override
public boolean onCommand(commandsender sender, Command command, String Company, String[] Create) {
return false;
}
Now I think this is right but what do I replace string and string with?
onEnable not onenable
Public hehe
I have over 1000 malicious jars. Roughly 99% of them came directly off the spigot website 🙂
if this is true, then those who check plugins on the site are so-so programmers
current project
What did I replace string and string with tho?
free plugins don't get checked. Only premium ones
what string
those 2 strings are meant to be there
WHAT
So I just leave it be
omg
yep
Thanks
100s of resources get uploaded a day. We're volunteers. It's not feasible to check every. single. one.
A YOU SERIASLY
If we threw literally everything into the queue, it would be constantly backed up
And why you do /Company it should come up with a option to auto finish that’s Create?
.
no
Oh Alr
unless you send it on the tab complete it wont show
its already backed up
Actually, it's not last I checked
What?
Yea, no. The resource queue's super low
Is there a way to make it show?
well then SpigotMC site is another cesspool of pirates (forgive those who work there)
is it that depressing people barely do it every few weeks
How is it a cesspool of pirates exactly?
spigot removes all obvious reuploaded plugins as soon as its seen
Can you help me understand how to do that?
Most malware isn't even pirated plugins lmao
you was say them not check
public List<String> onTabComplete(CommandSender sender, Command command, String alias, String[] args) {
return StringUtil.copyPartialMatches(args[0], list, new ArrayList<>());
}
Just because we don't check every resource, doesn't mean it's full of pirates
.
who say this
optic
free resources get uploaded as wanted
optic will download them after upload and check them for malware
if malware is present, he removes it
7smile you good over there
fk my mouse was highjacked by my program XD
Me. I'm like... the only one who actively deals with the malware situation on spigot.
I'm well aware on how many come directly from spigot, and how many come from third-party methods like being DM'd the jar or it coming from a support ticket or piracy site
Did you... delete my cat image plugin?
Probably not
I literally only deal with malware LMAO
are you responsible for checking?
that is his main reason of being resource staff
Other's only check resources if reported.
I on the other hand, mass download & scan and go about it that way
I mean... it was a plugin to hide the login of players. One single listener.
But it was pumped up to 3mb because it had a copy of the bible and 7 images of cats in it.
Yea. Pretty sure that's the only reason I'm resource staff to begin with. I wanted to be forum mod lmao
well at least thanks for that
I've found a plugin out there that had literally entire craftbukkit compiled on it
XD thats a classic one
So the only thing you change is the list?
public List<String> onTabComplete(commandsender sender, Command command, String alias, String[] args) {
return StringUtil.copyPartialMatches(args[0],Create, new ArrayList<>());
I have a few different jars downloaded which do that actually
you would also change the arg number depending on what arg
https://github.com/OpticFusion1/MCAntiMalware @vagrant stratus - were use it?
but thats the basic
?
And what does it do if I change it?
speaking off mass downloading. I still need to download the entirety of spigot's resource section kekw
error if it doesnt have that arg probably
Do you have knowledge of Java?
It's a plug-in antivirus, isn't it?
same with bukkit
It's not a plugin, but a third-party jar
Yes, in their plugin page they say how to make it work
I uh, know how it works, I made it
that is, is it just an antivirus? Like, should I throw Jar there?
yes. It scans the plugins directory by default
wrote the description myself too
bruh thenk for this
before you just blindly add it to ur plugins dir
its not a plugin
its a standalone app
I did not know that there are such cool projects on github
but what about kaspersky?
oh
listen, do you have any api libraries for all occasions for newbies in development like me
for plugin
There are other spigot resources which attempt what I do. However, mine's the only one with a very large set of detections
api when?
@subtle folio I plan on doing a remote scanner actually. It'll have an API
so uh
whenever that's done?
gmgmgmgn
listen, how can you find all sorts of pranks related to bukkit api in github, I just realized that api is better there than in SpigotMC spread
bruh
what?
translaste
pranks??
wait
iirc the api is something like
/api/v1/scan -> Takes a MultipartFile and returns a json array of hashes & CARO strings
/api/v1/check -> Takes a Base64'd JSON string in the format {"hashes": []} and returns the same output as the other method
pranks = cool - translate error
I plan on taking a VirusTotal approach to the remote scanner. That'll come w/ its own benefits.... once I actually figure that part out
ah so it’ll handle all the logic
you just give it what you got and it gives back what you shouldn’t got
Pretty much. It'll make a lot of things so much easier, given I'm working on so many projects
searching minecraft-plugins on github is a good start
searching minecraft-plugins on github is a good start
The remote scanner makes supporting server hosts easily possible, for example
sounds like i’m gonna make a pterodactyl plug-in when that’s done
Yea, that's pretty much the point lol
optic 
I do need to get the account stuff figured out though still
Again, it'll take a VirusTotal approach. I gotta have some way to handle the free & paid stuff lololol
No way I can support it otherwise
rus?
haha
oh privet bro
privet ✨
It'll have rate-limiting, but the limits would be higher than most server owners would hit
i see
Listen, how many Russians are there?
Something like
300/unlimited
free/paid
or whatever
my vision is a virus check each startup
i don’t live there anymore, but kyiv mainly spoke ukraine
I have a paper fork in the works. It'll do just that LMAO
i moved to the states when i was very young
it'll scan each plugin -> then load -> then enable
ez lmao
i mean in chat
LOL my exact idea
i think one other active person
Partially why I'm moving everything to the remote server
mhm mhm
you use tranlate or not
no i’m fluent in english
The others being better support for ptero, server hosts (and networks), as well as simplifiying the current Anti-Malware project
cool
mhm
Still need to figure out some of https://github.com/OpticFusion1/AuthExample though, given I'd be basing the account handling off that lmao
really?
like if some one wrote on the sign meow, the plugin changes it automaticly to im a cat
is this possible
not gonna handle it another way
yes
or use spring security and some like ldap solution
how /
I mean, if you provide a similar thing w/ Spring Security or LDAP lol
The thing w/ the accounts is not everything is under a single project, so I'd still need some sort of microservice to handle user accounts
so i get the lines and for loop it and check it
then im make set lines for each line ?
i didn't think that bukkit api is so popular in github hmm
e.g. I have an account checker in the works. That'll have rate-limits and rely on the User API to handle free & paid tier accounts
That's a separate project than the Anti-Malware
i see
yep yep that makes sense
i need Optic Connect
well now i found a great source of information and tutorials on bukkit api so good start
I mean, getting them to all work with the user api is a completely different project but like... I'm not worrying about it until it's fully implemented lmao
lol
For the AuthExample https://github.com/OpticFusion1/AuthExample/blob/master/src/main/java/optic_fusion1/authexample/controller/SessionsController.java needs finished as well as https://github.com/OpticFusion1/AuthExample/issues/3
oh and paypal. Figuring that out is a problem too
Once that's all done, I'll most likely update that repo with a proper and useable example
Are there many GOOD bukkit api tutorials on github?
probably not
demm
There's YT playlists though
kinda just half-assed it since I'm not able to fully implement everything LMAO
yes, but I need information not for beginners, but rather for advanced
like?
At that point use the javadocs
well, I don't know NMC for example
NMS you mean?
yes yes
Well I don't think you need that one really
that's outdated every version lol
None of my plugins use NMS. Even the plugins I forked that formerly did use NMS
i need create player npc so need
Well then just use dedicated APIs for that such as Citizens
Probably make some sort of ecommerce example thing once all the open issues are dealt w/
it would be good for projects where you need to do everything quickly, but it's more for learning
What is the point in learning something you never need to use?
then look through their code lol
Are you sure you don't need it?
That is a bit as if I started learning fabric internals. Nice to know? Sure. Do I need it? Not really.
You're likely to have to figure it out on your own anyways because, again, every NMS tutorial is outdated pretty much every new MC version
NNS so it depends on the versions?
yes
Figuring out NMS is pretty much based around staring at decompiled code for long enough until you understand it
the obfuscation and version number changes basically every update
However then mojang comes along another day and everything changes again.
that's why I put the last part lol
relying on NMS guides and videos is useless, unless you're coding for that exact version
I just have a feeling that I know almost everything about the bukkit api, but at the same time I don’t know how to make cool plugins like the recent antivirus you showed or some cool animation
in general, there are skills but not for complex plugins
I'm not using spigot at all for my AV
Antivirus is just java
for example, there is a plugin for cases where there is a cool animation how is it done?
armor stands and a lot of pain
Mostly just math and optionally resource packs
Requires not only learning an entirely new library, but java bytecode as a whole
Java bytecode is dead easy
depends on the animations
But uh, Java bytecode and Objectweb ASM has been my life for pretty much the last two years
lol
Probably not as soon as you get into it, but you learn quickly
Is it menus or what
go write a plugin in it
Basically same here lol
I've used both consistently since 2019
I think I alread did it halfway
It's also why my AV has the most detections, compared to what else is out
rotating small chests
I hate myself
Not exactly sure whether I ended up completing it