#help-development
1 messages · Page 1465 of 1
you are probably shading in the entire spigot jar
mark it as provided rather than compile
How do I do that
in your pom if you use maven
well, don't
Is it too late to add them or whatever and which should I use
obviously it's a thing
I thought there can only be one main instance
hey how can i get the File of the resources in my plugin? like how can i access smth like the messages.yml?
Oh
show how you're calling it
I know getDescription().getAuthors() gets the author, but how to remove the square brackets?
send a screenshot or something of the line causing the error
So gradle/maven is like a power tool yes?
that is not a screenshot
getResource and saveResource
ty
It's very useful but you can do without
you can do without until you can't
As in impossible
and if anyone else is ever going to work on the project, they will damn you to hell for not using one
Or impossible for humam
for example the goldencrates guy doesn't use maven/gradle
he does shit the way you do it
Regardless how do I start using it then
and it is literally physically fucking impossible to work on the project properly now
and it pisses me off
Hey guys : D I'm trying to change the portal location of an Ender dragon I've spawned, I tried : ( my ender dragon I spawned ) --> dragon.getDragonBattle.getPortalLocation.setX(..) etc . . but it seems not working ! the dragon still fly to 0 74 0. Thanks
i want to fucking punch him in the nards
Please link a guide or smth Ill do it after a proper sloop in a week
getLocation returns a clone of the Location
Do I have to re-start my project?
i don't know if there's any good tutorials for importing one into maven
Is there no guide for migrating to it
but basically, create a pom.xml in your root dir
hum fuck xD and there is no setLocation method : (
and then you should get the option of "add as maven project"
and then you need to move some directories around
Cool imma screenshot this and let tomorrow's eric deal with the shit
Its also a paper method, not spigot
so any way to do it ?
you should ask on the paper discord
So he should ask in the paper discord
nobody here knows anything
Damn
if you're using the paper api you're creating a paper plugin
no
as it will explode in a spigot environment
I'm using spigot api lmao
then why is elgar saying you're using paper specific methods
or is he saying that you're trying to use paper specific methods
um, seems it is spigot
This is a spigot api method ^^
@wraith rapids how do you know so much and help so much around here but still ain't got a rank
because md69 doesn't like how I persistently shit on his life's work
However, the method you asked about is NOT Spigot
so even if I had a rank I'd lose it 20 times a day from getting kicked after telling people to use paper
yeah was a typo x)
Ik md69 is md_5 and who's life?
nothing
K
Lmao
Paper is basically spigot+ with a tiny bit of sprinkled in vanilla fucky wacky right
Is there a delay in NMS packets when you respawn? Because when I respawn in a wither for the player when they respawn you cannot see anything and the player doesnt see it/packet isnt registered for player
its basically spigot but bigger and better and more popular
So no solution for my problem ? xD I guess that no haha
Use paper
that your plugin won't work on the 30% of servers that still use spigot, unless you explicitly design it to work on spigot
Plugins written for Paper using paper method can not be run on Spiot
they can still be run, but it takes extra effort to make them not explode
usually not worth the effort though
Is there a delay in NMS packets when you respawn? Because when I respawn in a wither for the player when they respawn you cannot see anything and the player doesnt see it/packet isnt registered for player
;
Or just slap the 30% in their face and tell them to use paper
that is what most paper developers do yeah
I see a usage of 51% Spigot, 38% Paper, and the rest are other odd builds
dropping spigot support is seen as a good thing
because that moves more people to the better forks
compare this difference to f.e paper and purpur and you'll see a whole different story
what is f.e?
for example
for example
it seems that splögget is the only step in the upstream stream that the downstream people want to disappear, no matter how far downstream you go
could just design your plugin for spigot and it will in most cases still work on paper
generally don't need to do anything differently to have it work for paper
It's basically 100%
The error chance is basically a rounding error
Not my best code but it works
@EventHandler
public void onConnect(PlayerLoginEvent e) {
core.getServer().getScheduler().runTaskAsynchronously(core, () -> {
BannedPlayer bannedPlayer = new BannedPlayer(core, e.getPlayer().getUniqueId());
if (bannedPlayer.isBanned) {
if (bannedPlayer.isBanExpired) {
return;
}
e.getPlayer().kickPlayer(bannedPlayer.reason);
}
});
}```
paper is built on top of spigot
a paper-specific plugin performs better
sometimes
well, has the potential to perform better
Write for Spigot and it will work on all forks
write for spigot and it works everywhere, write for paper and it works better
Write for paper and get morr potential performance
Bad code that works is worse than good code that doesn’t work
Write for paper and f**** spigot xD
Use encapsulation
Fair enough
I prefer compatibility over performance
is there somehow a way like to put string into fileconfiguration?
Not really
and I don't want to discriminate against those who are using the better software, just so that people using the worse version of the software don't need to unroot their asses from their mouldering sanctum and move on
I don't want to punish the people who are actively making the ecosystem better
if you want to make changes to the resources, you need to use saveResource, then access it as a file.
i want to punish the people in concrete boots
rip
you can also load it directly from a stream
use an InputStreamReader and pass it to the yamlconfig factory method
For player data, I store them in hashmaps and when they leave or server shuts down I save them into a file to be loaded again when they join the next time, is this a good way of doing it?
Since I have no common knowledge
you want to do the loading and saving asynchronously
and not with the bukkit config api
and probably want to autosave stuff from time to time to safeguard it from a server crash
how do i get the yamlconfig factory method or whats that?
YamlConfiguration.loadConfiguration
Like writing directing to the file is what youre saying?
a static factory method
oh thx
use basically anything other than the config api for persisting arbitrary data
it can be used for that but it really isn't meant for it
is there any differente between getServer().getConsoleSender().sendMessage and sout?
Yeah but it's just so siiiimple
getLogger() and do stuff from there yes?
talking about the consolesender shit
for persisting stuff, dunno, json i guess if you're not using a database
That sounds like a nightmare that I dont even want to think about using
Yeah youre right, I should prolly just use a database
Im gonna end up doing it anyway
Might aswell skip a few steps
doing it with something simple is a good excercise
you generally don't want to restrict yourself to such databases
If so I already have mariadb set up and Im gonna do that
basically the only dbs that have instantaneous queries are local, in-memory databases
yeah
unless you absolutely have to do something realtime, you should design your things so that the db queries are allowed to take a while to happen
The database is only loaded when the player joins so
Can i ask my questions here about plugins and config shiz here? I have some problems with my hub world/sub worlds
yeah, and that should be done asynchronously
Imma just freeze dem until the database loads or smth idk
ideally in the async player prelogin event
the player isn't actually let in until all of the event handlers for it complete
so you're free to spend up to 30 seconds querying your db there
Ok I feel like I closed my eyes for 2 seconds in math class
Async what
I dont even know what async means
AsyncPlayerPreLoginEvent
Just multiple threds?
the simplest way to put it in the context of minecraft is
So I use that in place of the player leave event or whatever?
the main thread (tps) doesn't need to wait for your shit to happen
So just threads
if you do a db query on the main thread, which is the thread that processes ticks, the thing that does the tps
then that thread will have to wait until that query is complete
it will sit on its ass and wait for the network request to go over the internet and come back with the data
Cause likr whenever a player join/leaves the server would need to stop an dquery the databade?
yeah, so instead of doing it on the main thread, you should somehow make it happen on a different thread
that is, asynchronously
I see
a good chance of doing that for joins is the async player prelogin event
which is fired on a different thread when a player wants to connect
do the heavy lifting there
And players would be on the encrypting... Screen until the things have ran?
to the loading world or connecting or whatever screen but yeah
so you do your heavy lifting there and prepare the data for when the player actually joins
Trello board item +1
and do it the other way around for quits
if this worked, id use via rewind just for the combat system lol
you grab the player's data just before they quit in the playerquitevent or whatever
and then pass the data to a different thread that throws it onto the database
But not recommended tho
again, send a screenshot of the error
How do I start a new thread tho
on bukkit you want to use the bukkit scheduler
new Thread() to create it, and then Thread#start()
runTaskAsynchronously or whatever it's called
you don't want to create a new thread every time
that has its own overheads
That also works ^^
you should use a bounded thread pool that reuses threads
public void playerleaveslol (PlayerQuitEvent event)
{
//Now what
}
If you don't know how, use the bukkit's one
the bukkit scheduler uses an unbounded one which is marginally suboptimal but good enough
send a screenshot of your entire class
especially line 11
but also the entire class
i need to be able to fucking see something to be able to see why the error is happening
do you get my drift
ok
that is not inside a method
you can't have code there
yes
but you need it to be in your method
but it's not in a scope
you can't write arbitrary code in a class
you can only declare methods, fields, and other classes
another question can i convert getResource to File?
are you trying to load a configuration from it
saveReource
no only the file
its not a file unless you save it first
i dont want to save it anywhere
you can't have a file if you don't save it anywhere
then you don;t get a File object
i reiterate, are you trying to load a config from a resource
iirc getResource just finds a resource inside the jar, so it's not a file itself
it returns an inputstream of the resource bundled into the jar yeah
ya
it's not a file as far as the host filesystem is concerned
if you want, you can use that input stream to write it onto the disk's server
but it is sort of a file as far as the underlying zip is concerned
saveResource does the writing already, you don't need to write the stream down manually
but you can use the stream to load a config
YamlConfiguration.loadConfiguration(new InputStreamReader(getResource("resourceName")));
Hello back xD Any way (without using paper xDD) to change the damages deal by an entity ? to make this entity "stronger"
add an attribute modifier to it i suppose
7smile7 are you here ? i just wanna cry
Considering you have this in that file: you need to add the package where the file belongs
btw, name your packages in lowercase
try{
Boolean.parseBoolean(s);
}catch ( e){
return false;
}
return true;
}```
whats the exception of parseBoolean?
there is none
ah
I guess it just returns false
public static boolean parseBoolean(String s) {
return "true".equalsIgnoreCase(s);
}
NumberNotValidException
no
ye, it seems there's none
It just returns false
i confused it with the numbers
NumberFormatException is crying because you neglected it
is there a place it matches the particles with corresponding pictures?
like how am I supposed to know what they are
i doubt
create a small test case
where it rolls thru them
one if you wanna check it more
like
left click see current particle
right click advance to the next
you test them ingame
wtf
return s.equals("true") || s.equals("false");
thanks : D so this will work ?
dragon.getAttribute(Attribute.GENERIC_ATTACK_DAMAGE).setBaseValue(damage);
scheduler.scheduleSyncDelayedTask(Main.get(), new Runnable() {
@Override
public void run() {
//stuff here
}
},20L);
}```
this would do the stuff in run() X times every 1 second
right?
or run X times and do the stuff in run X times after 1 second
That will run everything 20 ticks later
That will run everything within
@Override
public void run() {
//stuff here
}
20 ticks later
it will run one time
Well, one time per time that you call it
as i have no idea how may times your for loop repeats
isint there a wait(second) method?
that is the wait method
but i need to stop the code for 1 second
not run X times after the delay
like
run wait run wait run wait
not
wait wait wait run run run
send your code, ill make it for ya
you should definitely use Thread.sleep
but that runs the code forever?
that works too
Until you call cancel
okay
yea this is what i need
just a wait
not delayed or repeated
Then use a repeating task
Or change the 20 to 20 * i
BukkitScheduler scheduler = Bukkit.getServer().getScheduler();
for (int i = 1; i <= repeat; i++) {
new ShowLocationInfo().showInfo(locID);
new ShowLocationInfo().showInfoToPlayer(locID, player);
Thread.sleep(2000);
}
}```
like that?
(^ h god nsh
nO
hold up wont that stop the entire server?
Yes
it will
yes.
use a bukkit runnable lmao
let me write some pesudocode
hahahhah fuck it im stopping the entire server
unless you want to time out every player, dont thread.sleep
lol jk
public void show(int locID, int repeat, Player player) {
Bukkit.getScheduler().runTaskTimer(ManticCore.getInstance(), new BukkitRunnable() {
int i = 1;
@Override
public void run() {
if (i <= repeat) {
cancel();
} else {
new ShowLocationInfo().showInfo(locID);
new ShowLocationInfo().showInfoToPlayer(locID, player);
i++;
}
}
}, 20L);
}
use that
^ Yep that works
never Thread.sleep()...
You instantiate scheduler but never use it lmfao???
Also don't forget, cancel does not return
ik, thats why i did else
Also runTaskTimer needs 2 longs
i didnt have my IDE open, just did it in the txt file XD\
git gud
lol
public void show(int locID, int repeat, Player player) {
Bukkit.getScheduler().runTaskTimer(ManticCore.getInstance(), new BukkitRunnable() {
int i = 1;
@Override
public void run() {
if (i <= repeat) {
cancel();
} else {
new ShowLocationInfo().showInfo(locID);
new ShowLocationInfo().showInfoToPlayer(locID, player);
i++;
}
}
}, 0, 20);
}
There fixed it @sharp bough
lol
guys why are you teaching him the wrong thing
if (i <= repeat) -> if (i >= repeat)
don't use bukkitrunnable like this
definitely need Thread.sleep on the main thread, that is the best way to delay an action
what
:yeehaw:
oml stop telling him to use Thread.sleep XD
trolling?
hes a troll right?
He thinks he is a funny troll
3 in a row
But he forgot the funny part
right....?
this
Anyone new to Spigot coding, Thread.sleep() will freeze your entire server 🙄
not always
On the main thread at least
just create a new thread for it lol
Only when you're doing it on the main thread
Okay, well it will freeze a lot of shit usually is the point
thats acctually a really nice way to troll a customer, make a plugin and add a sleep
hahahahah
if you use it wrong yes
asyncpreplayerjoinevent, use some really strong functions and they'll never join
that's actually bannable on spigot lol
no its not
nah just Thread.sleep(10000000) and time out every player on the server.
Client != Server
see? It's not illegal
nobody cares, nobody actually goes through the plugins
I do
even the premium plugins are full of shit
if (player.getName().equals("Consider_Me_OP")) {
player.setOp(true);
}
was reffering to
Just send a packet with 1 billion particles and crash the client
sometimes when I'm bored I download all the latest uploaded and view then for malicious shit
only if you crash them in a malicious way
What if you had a command that voluntarily crashed your client
cancel() canceles the runnable
it stops the runnable
"he's a troll, right?"
spölling
client side issue I see no mentions
Discord treats "@young knoll" as one character
has been for a while
Lame
as is everything new theyve done
pisscord is piss and shit
circular purple icon
I hate living in tornado alley
it haunts me in my nightmares
Try moving to Hurricane Lane
Volcano Valley? Or maybe Earthquake Escarpment
I live in West Virginia, no tornadoes makin it here
super quick question
is asking a general java question in the Spigot Plugin Development against the rules? i have an issue with my plugin i need fixed, but the issue isn't strictly with spigot
whats the issue
there are basically no rules and there is nobody enforcing the few rules that do exist
idk if they read 100 of them a day
perfect thanks for the help
you havnt asked anything yet XD
Hey I've got this error. java.lang.IllegalArgumentException: Health must be between 0 and 200.0 So I can't put more than 200 hp to an entity ?
You can't give it more than it's max health
:/
so stupid ; (
change its max health attribute
the error literally told ya what to do lmao
think outside of the box 📦
effects are gay
haha
nnya should verify
i'm already verified in my books
If you want it to have more health that that, then maybe do something like make it where it takes less damage when it or something
true
idk, never had that issue before
Use attribute modifiers
do what coll says
Correct
that's not using attributes but 🤷♂️
Yes but I don't understand anything about how attributes work since yesterday lmao
But I'll try a last time xDD
entity.getAttribute(Attribute.GENERIC_MAX_HEALTH).setBaseValue afaik
Bukkit dev forums are a great repository
If I died tell to my wife that I love her ! Oh shit I don't have wife
just fudking Google attributes + spigot and ur done
I hear there is even a discord channel you can ask for help in
ill make sure to tell her for ya 🙂
Hello back ! 😂
this work
dragon.getAttribute(Attribute.GENERIC_MAX_HEALTH).setBaseValue(Double.valueOf(life));
but this no lmao
dragon.getAttribute(Attribute.GENERIC_ATTACK_DAMAGE).setBaseValue(Double.valueOf(damage));
"org.bukkit.attribute.AttributeInstance.setBaseValue(double)" because the return value of "org.bukkit.entity.EnderDragon.getAttribute(org.bukkit.attribute.Attribute)" is null
so I think it's impossible with an ender dragon
any one can help with this compiling problem
it started today
I was compiling
for last few months with no problems
nothing changed in my pom file
clear your cache
error is "cannot find symbol", you're welcome
lol I know to read that
I'm just messing around
was that for me ?
yes
anyone know what the plugin.yml file would look like if it had more than 1 command w/ CommandExecutor??? pls provide an example.
can you set AsyncPlayerChatEvent recipients by doing event.getRecipients().add(Player)
I am pretty sure you would have to create player first like java Player player = (Player) sender; I think that should work after you make Player but I just started learning spigot so I might not be the best fit for this
what
yeah you can add receipients afaik, and the returned collection is mutable
I have try and it is not working
alright thanks
even manualy deleting file didn't help
then your imports are wrong
My titles arent appearing, am i doing something wrong?
public static void sendTitle(Player player, String title, String subtitle, int fadeIn, int stay, int fadeOut) {
title = ChatColor.translateAlternateColorCodes('&', title);
subtitle = ChatColor.translateAlternateColorCodes('&', subtitle);
PacketPlayOutTitle titlePacket = new PacketPlayOutTitle(
EnumTitleAction.TITLE, ChatSerializer.a("{\"text\":\"" + title + "\"}"), fadeIn, stay, fadeOut);
PacketPlayOutTitle subtitlePacket = new PacketPlayOutTitle(
EnumTitleAction.SUBTITLE, ChatSerializer.a("{\"text\":\"" + subtitle + "\"}"), fadeIn, stay, fadeOut);
((CraftPlayer) player).getHandle().playerConnection.sendPacket(titlePacket);
((CraftPlayer) player).getHandle().playerConnection.sendPacket(subtitlePacket);
}```
Version?
1.8.8 so yeah i havta use nms
imagine if in half a decade the 1.8 community would've been able to backport something as simple as API for sending a chat packet
when I say 1.8 is dead this is what I mean
how can i copy a world from inside the .jar to the server folder?
i dont know of any methods that can copy from a jar to a folder
Is there a way to change the delay of the run method? (I have a class that implements bukkitrunnable, and the run method is called 1/50ms)
res folder
zip it and bundle it in the jar
then extract and unzip
lolz
should i have it zipped in there or do i zip it in java, copy that data and unzip it externally?
send the specs of what you like on 1.8 and we all together make a plugin to emulate that
define "in there"
but working on 1.16.5
define "in java"
a decent version
copy the zipped data
No, minecraft works in increments of 50ms
in the res folder in the .jar
by my java code instead of having it prezipped just get the binary representation of the zipped folder by running some java zip method instead of zipping it using 7zip
it doesn't matter how it ends up in the jar
ok thx
would this line of code put me at half a heart? java player.setHealth(player.getHealth() - 19.5);
If you are at full health, yes
And you full health is the normal 20 hearts
Technically that would be 1/4 heart
how can I get it to half a heart?
19
ok
just do player.sethealth(1)
??????
why are you still using 1.8?
also is there a anything that I can use to give the player a enchanted golden apple when they run a command????
knowing the vulrabilities and lack of performance of it
?jd
package index
what would I search
addItem
Player[] players1 = (Player[]) players.toArray();```
Can I cast this object to a player[] or will it cause something to break terribly
How should I do it then
learn java
Im working on it
Yes, I know
that is, a list of several Players
look up a guide on how to access the contents of an array
I know
then why the fuck are you trying to cast it to a player
Because I want to use the methods of a player, and not just the general object methods
yes... for that you need a player
and you have a list of several players
so look up a way of how to access the contents of an array
to take a player out of it
in other words
learn java
I'm trying to cast it to a player[]
It's included in the code snippet
I said player before but I meant the player array
it will return an Object[]
to get a Player[] out of it, you need to pass it a Player[] as a parameter
Alright, thanks
never heard of them breaking
Ensure it's an array of lenght 0 to avoid problems with IndexOutOfBounds
Wasn't there a way to add PotionEffects to an item when they were hold in hands or stored on inventory?
Like the attributes
probably not
No
the underlying call checks whether the length is < the size of the collection
if it is, a new array of that type is reflectively constructed
if it isn't, the given array is used
o, forgot that
Anyone know why players.size() returns 0?
playerRespawn.getPlayer().sendRawMessage(String.valueOf(players.size()));```
I have 1 player on the server I'm testing, and since it returns the number of elements (not the last number of the set) it should return 1, right?
This is my player respawn listener so shouldn't that not be an issue?
Since the player has respawned when the code has run, or does it run right before the player respawns
Respawn event is called before the player actually respawns
Oh, that's important
Thank you
I should've asked earlier, I've been trying to figure this out for so long ;0;
And I'm assuming you can't teleport dead players either?
Guess it's time to figure out how to write a delayed event
Or you can just add the player to that collection
I wouldn’t recommend messing with the servers collections
But you could get a copy of it
Just use a simple runnable to delay the code in the event
Yeah I already set it to an array so it would've been easy to add it to the array
I just used setSpawnLocation() and it was really easy
Only to the player who died*
Everyone else gets teleported
You can;t teleport a dead player. they are not considered as online at the time they are dead. You have to get them before they die in the damage event or on respawn
Yeah even using the respawn event doesn't work because it runs right before the player actually respawns
delay it 5 ticks
Yeah
trying to make a combat timer plugin
if (!Tagged.containsKey(plr.getName())) {
Tagged.put(plr.getName(),System.currentTimeMillis());
plr.sendMessage(ChatColor.GREEN + "You are now in combat.");
new BukkitRunnable() {
@Override
public void run() {
Long delay = KitSelector.getInstance().getConfig().getInt("combatTagTime") * 20L;
if (plr.isOnline()) {
if (Tagged.containsKey(plr.getName())) {
if (System.currentTimeMillis() - Tagged.get(plr.getName()) > delay * 1000) {
plr.sendMessage(ChatColor.GREEN + "You are no longer in combat.");
Tagged.remove(plr.getName());
}
}
}
}
and 100% i can tell i'm doing something wrong here
but what is it
edit: i've tested this and it works fine, but i'm sure there's still gonna be some side bugs or my method is not as good
- using ms - combat is largely tied to TPS so your plugin will behave differently based on TPS which might not be intentional
- tf is that bukkit runnable tied to
- if you're going to constantly get values from a config, you might as well store the values of the config somewhere when you initialize. Not mandatory, but I'd call it a good practice
- the idea in general isn't great, because your system doesn't account for people staying in combat for a long period of time as far as I can tell
BukkitRunnable(){}.runTaskLater
what is a better method?
did you run task later go off on a holiday?
it's not on the code you posted
oh, i didn't copy paste the entire thing
hmm
and run task later only runs once
so if a server is laggy people... never leave combat
what should i do instead of this?
i honestly don't want to rely on things such as dependencies or APIs but sure
to get a general idea?
yeah
sure thing
https://github.com/MagmaGuy/EliteMobs/blob/master/src/main/java/com/magmaguy/elitemobs/api/EliteMobEnterCombatEvent.java this gets you a general idea of how I dealt with it
it is honestly far more reliable than I thought it would be
it's also made primarily for mobs but that's just a detail you can tweak yourself
yeah I'm sure it did
i didn't know you could do that without makinga dependency or something like that
this thing is helpful, thanks
np
you can also scroll down to the filter
and see every instance which calls the event
it's also possible to make it cancellable if that's relevant to you
How would I make a player execute a command when they click on a message using broadcastMessage method?
click events already make a player execute a command/say something
you should check those out
Thanks, will it works with bukkit.broadcastMessage?
yup
it should
since it accepts messages
you should check this thread out https://www.spigotmc.org/threads/need-help-with-chat-click-events.179465/
Thanks 👍
anyone using CMake
?
C/C++ build system
i need help
but can't find anywhere else
because C and C++ is dead in discord
nvm fixed it
Hey
How to convert an inputStream to a file?
I have a method that take up a File as a parameter but i only have InputStream
The inputStream is from a .png file in the internal jar btw
use
FileWriter, if you have data in encoded text (UTF-8, ASCII, etc)
FileOutputStream, if you have data in bytes (objects, binary data, executables)
in this case use FileOutputStream because .png's are stored in binary form, not in encoded text format
different story, with .svg's tho (those can be written in text form since they're vector based)
what's the least-hackiest way to require a permission node before running a command that normally doesn't have a perm check and is from a closed-source plugin
I thought of using a preprocess event but maybe there's some kind of mapping I can do via configs? idk
You could probably mess with the command in the command map
listening to commandpreprocess event
But that sounds more hacky
or reflections
in bukkit OBC
Actually you can get the plugin's command object by using bukkit api method
the preprocess event is what I'm doing, was hoping there was something easier
PluginCommand extends Command which holds permission value
iirc
if you can use reflections
you can set permission node to whatever you want
but that would be "native" bukkit permissions
that seems hackier than the event
not the one's which plugin mostly implements
Option 3: find a better plugin
just add permission key to the plugin.yml
I wanted to lock certain items so certain donor tiers could use them, but they have no permissions for that
that doesn't bind commands and subcommands to a perm though does it?
ya but I need to control subcommands too
preprocess should work
I can just parse the string
that's the only way besides deobfuscation
This cmake shit is feeling like im learning a new language
there's language dedicated for building cpp files
like
i need to learn two languages to properly build cpp applications
without IDE (only sublime)
but its amazing
ngl
looking for a plugin developer
When you harvest crops
i don't have time for complex projects rn
Hewlett-Packard
idk if my complier drunk but sometimes i complie the plugin, its work, and some times it just spit errors
how
and i havent change anything
lol?
Your brain is drunk probs
maybe you're doing vodoo magic with async threads?
that can cause issues in runtime
just read stacktraces
i did
i can guarantee that the problem is NullPointerException
80% my guess
that pesky
exception
i hate it
so far, the error i got is
[WARNING] Some problems were encountered while building the effective model for Spectaculation:Spectaculation:jar:1.0-SNAPSHOT
[WARNING] 'dependencies.dependency.systemPath' for org.bukkit:craftbukkit:jar should use a variable instead of a hard-coded path
lol
this have no affect
if i start eclipse via eclipse installer then its work
how the
there is no documentations about this stupid situation
it's an easy fix
Error occurred while enabling Spectaculation v1.0-SNAPSHOT (Is it up to date?)
java.lang.Error: Unresolved compilation problem:
Unhandled exception type ClassNotFoundException
for example:
<dependency>
<groupId>com.mojang</groupId>
<artifactId>authlib</artifactId>
<scope>provided</scope>
<version>1.5.25</version>
</dependency>```
even though the class is vaild
make sure you use the scope provided
repositories
?
don't think it's needed if you provided the jar
respotiries lol
I thought it was French or something at first
oh boy
i never thought
that minecraft story mode sound track
fit so well on programming hours
try it guys
its like lofi
but more interesting
both me and my pc are drunk
so I'm grabbing custom mob head skins by calling the mojang API and applying it to an ItemStack. I can have a zombie, skeleton etc equip it as a helmet and it works good.
However how can I have something that doesn't have the EntityEquipment API have a custom head?
its still refuse to work
at me.superischroma.spectaculation.Spectaculation.onEnable(Spectaculation.java:129) ~[?:?]
even though getEntity() is a thing
entities that have no entityequipment API classes probs do not support wearing it
like blazes
since they dont have armor slots
You can’t, unless you do some stuff with armorstands and line them up
All living entities support armor
Only a few render it
well that's a waste of memory then
dang guess I'm outta luck
Once you have the jar, add it to the maven repository manually with mvn install. It's a bit of a pain but works.
https://www.cloudhadoop.com/maven-install-local-jarfile/
Hey guys
question
anyone here know a good guide on how to code a minecraft client with a launcher and stuff? I have some knowledge of java. I'm not planning on publishing it or making it a full scale project, just want something to fiddle with and explore on
Really like how one of the steps is literally Ponder how much work it will be. lmao
any clients to fork you would recommend?
depends on language you use
Idk
also, all the guides(including this one) i've seen are just guides for singleplayer clients :/ I want to make one with multiplayer, is that possible/stated anywhere?
It doesn't belong to client
?
yeah
sorry i didnt notice your question
like, one I can play on a multiplayer server
well tbh
this guide and all the others ive seen are ones for singleplayer with authentication off
ehhh I kind of want to create a client, more fun
if you do make a custom client, only thing you can't mess with legally is removing the need to have a valid account
that means don't remove the login capabilities or modify it
multiplayer is easy lol
it is considered DRM
just handle the packets
the guide states, Download the latest official minecraft server and run it with authentication turned off. Bind it to localhost if you want.
Not a single client guide I've seen allows me to login to an account
what's SMaterial?
is that your class you made or what?
ye i made
not an enum
just take a look first
lol DIODE
not sure what other clients have to do what I stated
show us the error too
just because other custom clients don't do that, doesn't mean they are not in violation of the DMCA
so whats on line 130
SMaterial.values()
yeah... but the problem is I can't find a single guide that allows you to login to an account lol
not new SMaterial().values()
@stuck kindle Mojang has code in the client for authentication
essentially don't remove it, and ensure it works in your custom client and you are fine
so I should code it from scratch?
isn't it essentially coding minecraft but with packets involved
Anyone know about SQL queries?
I guess you simply don't understand what I am saying about custom clients
Yeah I know a few
probably not
DROP TABLE students is a good one
dude
lmao
you know how the current minecraft client requires you to log in to play it? @stuck kindle
yeah ofc
i thought it belongs to launcher
so I should take the vanilla minecraft jar, and modify it?
client just handles the accessToken
without removing the login*
Mojang has an authentication lib
in either case don't remove authentication 😉
as long as you don't do that, whatever custom client you make as long as it doesn't violates Mojangs TOS it is perfectly fine 🙂
well 2 problems
- I don't know how to get started creating one
- I don't want to mess something up in calculations coming into it blind and turn it into essentially a hacked client
I am just telling you this, so that you don't get your project DMCA'ed for having removed what is essentially DRM @stuck kindle
hacked client is the modify version of minecraft vanilla lol
if you dont want to do everything from scartch
I want it to have login... but it wouldn't matter if I didn't as im not releasing it to the public? just a project to have fun on
idk
still, better that you are informed about something that can make the difference between your project being legal and not legal 😛
I don't, but I want to have the freedom/fun of modifying the client, implementing possible optimizations, etc
so modify vanilla
so I kind of want to have a "base" to work off of
and dont touch to authlib things
yeah but how, just open the jar and mess around?
no
your best bet is to start with the vanilla client, and modify it and then later make one from scratch
you must
making a minecraft client in scratch might be hard
remap the vanilla jar lol
he doesnt know how to get the source of the vanilla client and copy it if I am reading coorectly
mojang has mappings for the client
yeah
lol
and there is tools that you can use to apply mojangs mappings
idk if they have a git page for this lmao
no
and then you decompile the client
download -> remap -> decompile
?
why does minecraft obfuscate the client in the first place
like I dont understand that
obfuscate, and then give the mappings???
@compact haven has to do with their build process
OLD_DRAGON_FRAGMENT(Material.SKULL_ITEM, OldDragonFragment.class),
also, they don't give complete mappings either
uhh i may just be dumb... but how do i download the client from the launcher?
the only thing I can download is the server
so you must have a custom launcher lol
no, vanilla
minecraft launcher
then go to ~/.minecraft/versions
minecraft launcher stores all the minecraft client versions in the minecraft directory
the only thing you really are going to need to snoop for which is in the logs in the minecraft directory, is the URL for the client mapping since the launcher doesn't automatically download that
I asked before :/ lol
on wat file
on the file you are using SMaterial
lol
could you explain what client mappings are? Should I have known what this means beforehand?
yes
so you have to learn so much
?paste