#help-development
1 messages · Page 78 of 1
my mom wanted to pay because its for school ahaha
how do i change the tab list?
scoreboards
but then how am i meant to add a sidebar scoreboard and tablist scoreboard to 1 player
So i use NMS to change the tab list
Developer Life in one setence
public class WhateverSpiralRenderer implements Runnable {
private int frame;
private final UUID playerId;
public WhateverSpiralRenderer(Player player){
this.playerId = player.getUniqueId();
}
@Override
public void run() {
Player player = Bukkit.getPlayer(playerId);
if(player == null) {
// handle accordingly
return;
}
frame++;
int angle = frame * 10; // 2 deg offset per frame
Location loc = player.getLocation();
float radius = 0.9F;
for(double y = 0.01; y <= 1.81; y+=0.05) {
angle += 10;
double radian = Math.toRadians(angle);
double z = radius * Math.cos(radian);
double x = radius * Math.sin(radian);
player.getWorld().spawnParticle(Particle.VILLAGER_HAPPY,
(float) (loc.getX() + x), (float) (loc.getY() + y), (float) (loc.getZ() + z),
0, 0, 0, 0, 1);
}
}
}
Bukkit.getScheduler().runTaskTimer(plugin, new WhateverSpiralRenderer(player), 36, 36);
its making the particles in strands for some reason
and its making 2 strands simultaneously
how to give an effect without showing particles, theres no paramter for that
did you schedule it twice or something
hey guys, anyone know why it doesnt set the item to helmet slot and just double the thing that cursor holds?
public class SpiralCosmeticsHandler implements Listener {
private final CosmicCosmetics plugin = CosmicCosmetics.getPlugin(CosmicCosmetics.class);
public class WhateverSpiralRenderer implements Runnable {
private int frame;
private final UUID playerId;
public WhateverSpiralRenderer(Player player){
this.playerId = player.getUniqueId();
}
@Override
public void run() {
Player player = Bukkit.getPlayer(playerId);
if(player == null) {
// handle accordingly
return;
}
frame++;
int angle = frame * 10; // 2 deg offset per frame
Location loc = player.getLocation();
float radius = 0.9F;
for(double y = 0.01; y <= 1.81; y+=0.05) {
angle += 10;
double radian = Math.toRadians(angle);
double z = radius * Math.cos(radian);
double x = radius * Math.sin(radian);
player.getWorld().spawnParticle(Particle.VILLAGER_HAPPY,
(float) (loc.getX() + x), (float) (loc.getY() + y), (float) (loc.getZ() + z),
0, 0, 0, 0, 1);
}
}
}
@EventHandler
public void onPlayerJoin(PlayerJoinEvent e) {
Player player = e.getPlayer();
Bukkit.getScheduler().runTaskTimer(plugin, new WhateverSpiralRenderer(player), 36, 36);
}
}
I dont think i am scheduling it twice
what am i doing wrong with the Y
you can assign your Y to scale with teh frame so that it doesn't make a verticle slab of particles
so like, not increase it in the for loop?
yea
let's say
y = frame * 0.05
or y = frame/37 * 1.81, for example
then frame %= 37
for example
same as frame = frame % something
+=, -=, *=, /=, %=
ye, most ik, just never saw the last one before
can i shade paper in my plugin to run it on a spigot server?
seems fine, try it out
would be cool setting the count to 1 but it doesn't really matter
lmfao
I hadnt been reloading for the past like 4 tries
it looks funny
🤦
idk man I have been working on spirals for the past 4.5 hours
also it was only the past 2 times not 4 times
its moving
slow and steady
too less green now and too slow lol
if you want, I got a bit of code that uses vectors to determine creating 2D circles in a 3D enviroment in any direction, if you are interested
set it to render every tick now
Can I change boat speed on land?
oh yeah I forgot I made it render only every 36 ticks
almmooost done
the next spiral renders a bit too soon (it should render right as the first one is going away)
What are you trying to do?
Ah new messages didn't load somehow
uhhh
well
this is tricky
as the particle count is directly tied to tps
you can lower the frame count to like 30
it will increase the Y level a bit more aggressively
so change all references of 37 to 30
lets assume that the tps never goes below 20
changed it to 30 but its basically the same thing still
you can see that the next iteration starts juuuuuusst a little bit too early
ohhhhhhhhh
I'm an idiot then
thought you wanted it earlier
set everything back to 37
frame %= 50
and if frame is above 37, just return
How can i make the %player% variable for a config?
?
Hey, what is 1.17 NMS Entity#setPosition in 1.19 NMS?
ymlConfig.getString(<PATH>).replace("%player%", player.getName());
```?
Thanks
lol
is there a way to edit the lifespan of a particle effect?
@Override
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
if (sender instanceof Player) {
ProxiedPlayer bp = (ProxiedPlayer) sender;
bp.connect(ProxyServer.getInstance().getServerInfo("lobby"));
}
return true;
}```
so whenever i do /lobby it returns null (full error: https://pastebin.com/FFpk6sCc) and says "An internal error occurred while attempting to perform this command", any idea why?
a spigot plugin cannot call bungee cord API classes.
yeah you need to make a bungee plugin
someone else told me earlier something about that
The home of Spigot a high performance, no lag customized CraftBukkit Minecraft server API, and BungeeCord, the cloud server proxy.
or just use that
and here you are trying to do it in a spigot plugin
plugin for a simple connect is overkill
Woah, this actually helped me A LOT
Thank you very much!
not exactly sure what im supposed to do with this
read the page ?
the whole thing for a simple connect?
programming is fun
it really isn't that much
well ig imma just make a new plugin for that cause im lazy af, thanks though!

ik lmao
gl with that
hmm
enum maybe
would just wrap those
so now i uhh have this, why tf, almost every tutorial says it like this
uh thats not a constructor
does anyone here know an intellij plugin which shows the count of todos in a class in the project structure?
theres a todo tab normally
yeah but i want a little number next to my class file name
i once had that but lost it somehow
hmm
i think you mean marks
@hybrid spoke
so now i realized i forgot to extend Command, but it says this
no
constructors need to have the same name as the class
thanks
?learnjava
Here are some links to get you started on learning Java:
- https://www.codecademy.com/learn/learn-java
- https://www.sololearn.com/learning/1068
- https://www.learnjavaonline.org/
- https://programmingbydoing.com/
- https://docs.oracle.com/javase/tutorial/java/index.html
The last one is the only official one, however some of those concepts assume that you already know a bit about programming.
hey guys, anyone know why it doesnt set the item to helmet slot and just double the thing that cursor holds?
Does someone know what EntityInsentient is in the deopfuscated version of spigot?
Mob
Is there a site where you can see this?
ij not knowing english
ty
Anyone know why i get this error when trying to compile this java file?
ShopUtils.java:69: error: -> expected
return list.stream().filter(value -> Arrays.<String>stream(value.split(",")).anyMatch(())).map(list::indexOf)
This exact code was in the .class file so I don't know why its giving me an error when i try to compile it again
Your anyMatch() is empty...
how do i export a function from one class into another
i have a function in one class and i want to use it in another
how do i do so
Depends how you want your method to be. Show us your code
Sounds like time to learn Java
im currently making the class
it's just a blank class rn
package me.deveroonie.PCHL;
public class CanBypass {
}
hi. is ENTITY_ATTACK only about mobs? or is it also about players? https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/entity/EntityDamageEvent.DamageCause.html
i thinks its only mobs
Well if you want your method to be object specific, just make it public or package-protected and call it upon your instance variable. If you want something "global", make your method static.
as i believe players are a sep event
And if you didn't understand me
That's a bad name ngl
hmm what i got so far https://paste.md-5.net/demupomeri.java
?learnjava
Here are some links to get you started on learning Java:
- https://www.codecademy.com/learn/learn-java
- https://www.sololearn.com/learning/1068
- https://www.learnjavaonline.org/
- https://programmingbydoing.com/
- https://docs.oracle.com/javase/tutorial/java/index.html
The last one is the only official one, however some of those concepts assume that you already know a bit about programming.
thanks!
are zombie attack and skeleton arrow attack both ENTITY_ATTACK?
Package and class
meh
I'd use byte instead of int for VANISHED_STATES
0x1, 0x2, 0x3
Zombie yes. Skeleton only if it's a melee attack otherwise it will be Projectile
(well... projectile goes for Zombie if it's using a bow to shoot you...)
and projectile is also about players, right?
int = 4 bytes
i mean when a player attacks with a bow
Yeah
Probably
hmm ye im storing them as ints but setting them as a byte in the pdc
changed it
why does passing in 0x1 into a method lets the compiler think its an into tho?
kinda stupid that casting
could it be BLOCK_EXPLOSION instead?
or is it just TNT etc?
how would i clear all armor slots of a player??
how do i see if a player has an elytra equipped
Check if its chestplate is type ELYTRA
get the chestplate armor slot and check if item type is elytra
player.getEquipment().clear()
^ might remove items in hand
not sure
for some reason this doesn't seem to be an issue in the class file I took if from. I don't know what I would put in there because nothing is referenced there in the original file.
what class does player.getEquipment return?
player.getInventory.getHelmet().getType() == Material.ELYTRA
put that in an if statement
Helmet != Chestplate
yea it does and i only want to remove the armor
yea right lmao
not a spigot question, but im having issues with pushing local repo to git anyone help? it says permission denied but the repo is public
Then remove the pieces manually from the equipment
wait would that work?
p.getInventory().setChestplate(new ItemStack(Material.AIR));
public repo doesn't mean anyone can push stuff to it. You can probably create a pull request tho
just put null
^^
thanks!
im following the guide which is shown after i create a repository
so it's your own repository?
yes
Did you logged in to git before pushing ?
it should prompt you when you try to push
Firstly, are you using git with CLI or doing it through IntelliJ or other IDE?
command line
just testing it out
created a new folder with a txt file
Create project -> clone project -> change readme -> commit -> push
this is what im running in order
git init
git add .
git commit -m "first commit"
git branch -M main
git remote add origin git@github.com:yadadev/test.git
git push -u origin main
Try pulling out the repo
I usually create a project with a readme and do it how I just mentioned. But it looks like you have a wrong key set up
Then you should add an ssh key
now to clear a specific slot i would do p.getInventory().setItem(4, null); right?
wheres the .ssh folder?
C:/user/name/.ssh probably
uhh why does this not clear anything from my inventory?
Player::updateInv maybe
alright lemme try
i tried using the http linkinstead of ssh and i have a prompt to sign in now
still nope
lets see
ItemStack.AIR when
alright got it, thanks!
Setting slots to null works for me
the reason it didnt work is prtty embarassing, null would probably work too
i forgot to register the event lmao
Something like getting the Item and each slot and setting the material to Air should also work
💀
keeps happening to me
Me2
Just register it before you start coding the actual logic. No way to forget it this way
Anyone know in what spigot jar i can import this? (#getItemMeta().getAsString()) I imported it before but now I lost it.
spigot api
https://prnt.sc/esb8IkdRVcaz nothing
So what's the problem ?
Can't import
must add correct spigot jar
and there are many jars and i cant find the correct one
If I well remember you can change their speed
how do i fix this
java.lang.NullPointerException: Cannot invoke "org.bukkit.inventory.ItemStack.getType()" because the return value of "org.bukkit.inventory.PlayerInventory.getChestplate()" is null```
code:
```java
if (player.getInventory().getChestplate().getType() == Material.ELYTRA) {
// do stuff
}
what's your code for putting the particle in the world?
it says it in the stacktrace
you should learn how to read stacktraces if youre unfamaliar
yeah
ik
how would i catch it
to stop it from being an issue
i read the stacktrace
"org.bukkit.inventory.PlayerInventory.getChestplate()" is null
can i use player#setResourcePack in PlayerJoinEvent or do I need to delay one tick
i read it
player.getWorld().spawnParticle(Particle.valueOf(effect),
(float) (loc.getX() - x), (float) (loc.getY() + y), (float) (loc.getZ() - z),
1, 0, 0, 0, 0.5);
effect is the particle name
so the chestplate is null
add a null check
if(player.getInventory().getChestplate().getType() == null) ?
that will produce the same npe
how den
if(player.getInventory().getChestplate() != null)
alr
?learnjava
Here are some links to get you started on learning Java:
- https://www.codecademy.com/learn/learn-java
- https://www.sololearn.com/learning/1068
- https://www.learnjavaonline.org/
- https://programmingbydoing.com/
- https://docs.oracle.com/javase/tutorial/java/index.html
The last one is the only official one, however some of those concepts assume that you already know a bit about programming.
this.getConfig().options().copyDefaults(true)
instead of calling get config how i can I work with a custum Yaml file where i saved something else than config but custum server data ?
so the speed is in blocks per tick
so that code says the particle will go 0.5 blocks per tick
or 10 blocks per second
i would decrease the speed
but I dont want a config.yml ... its a custum data storage where I will be storing user's passwords
but plugin configs
this is just to show you what type of data i will be storing
lmfao most passwords are stored in text formats
I can use hashs too, but that isnt the issue
im trying to use a custum file where i will be saving data using (yaml) that has nothing to do with plugin configuration
just use persistent user data and store the hash there
harder to access the hash and decoding on top of it
also who said anything about public yml file lol?
right that's what I am looking for, is dataFolderOfPlugin a pre made variable ?
and store it in a const ?
still throws the npe
thanks
whats the code
it's a playermoveevent
show the code
package world.netherite.prycat.events;
import org.bukkit.Bukkit;
import org.bukkit.GameMode;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.player.PlayerMoveEvent;
import me.deveroonie.PCHL.CanBypass;
import org.bukkit.inventory.ItemStack;
public class PlayerMove implements Listener {
@EventHandler
public void PlayerMove(PlayerMoveEvent e) {
Player player = e.getPlayer();
Location blockUnderPlayer = player.getLocation();
blockUnderPlayer.setY(blockUnderPlayer.getY() - 1.0);
if (player.getLocation().getBlock().getType() == Material.AIR) {
//haxing
//check
if (player.getAllowFlight() == true || player.getGameMode() == GameMode.CREATIVE || player.getGameMode() == GameMode.SPECTATOR || CanBypass("fly", player) == true) {
//do nothing
} else {
if (player.getInventory().getChestplate() != null) {
//FLY HACKS
Bukkit.dispatchCommand(Bukkit.getConsoleSender(), "ban " + player.getName() + "31d --sender=PryCat [PryCat] You have flagged the fly check in PryCat and have been banned as a result. If you believe this is in error, contact Deveroonie#9998 on Discord!");
} else {
if(player.getInventory().getChestplate().getType() == Material.ELYTRA) {
//dont do shit
}
}
}
}
}
public boolean CanBypass(String check, Player p) {
String c = check;
if (!p.isOp() || !p.hasPermission("pc.bypass." + check)) {
return false;
} else {
return true;
}
}
}```
//FLY HACKS
Bukkit.dispatchCommand(Bukkit.getConsoleSender(), "ban " + player.getName() + "31d --sender=PryCat [PryCat] You have flagged the fly check in PryCat and have been banned as a result. If you believe this is in error, contact Deveroonie#9998 on Discord!");
} else {
if(player.getInventory().getChestplate().getType() == Material.ELYTRA) {
//dont do shit
}
}```
hopefully you can see what is going on here
?tas
Bukkit.dispatchCommand(Bukkit.getConsoleSender(), "ban " + player.getName() + "31d --sender=PryCat [PryCat] You have flagged the fly check in PryCat and have been banned as a result. If you believe this is in error, contact Deveroonie#9998 on Discord!");
i would not recommend banning people using dispatchCommand
Use their api
litebans should have an api
ok then use a different ban plugin lol
Banning / unbanning players, muting players, etc
This can be done by executing commands.
If needed, the console can run these commands on behalf of players while still attributing history & broadcasts to the targeted player instead of console.
If you want to override the executor's name, you can use the --sender= argument, for example, /ban Player --sender=MyCustomPlugin <reason>
If you want to override the executor's UUID, you can use the --sender-uuid= argument, for example, /ban Player --sender-uuid=5421d526ef51374db09e78ed11f4394f
(Dashed and undashed UUIDs are accepted, 32-char or 36-char)
It is recommended to specify both arguments for consistency. The sender name affects broadcasts and the sender UUID affects history (/history, /staffhistory, web interface, etc).
The sender that you specify will be created for you automatically if it doesn't exist.
// Bukkit
Bukkit.dispatchCommand(Bukkit.getConsoleSender(), "ban Player123");
// Bungee
ProxyServer.getInstance().getPluginManager().dispatchCommand(ProxyServer.getInstance().getConsole(), "ban Player123");
// Velocity
server.getCommandManager().executeAsync(server.getConsoleCommandSource(), "ban Player123");```
yeah
lmao that is pretty bad
ig they cba to add it to the api
omfg
wtf
[16:01:45 INFO]: Player does not exist.
its spamming console with player does not exist
sounds like a litebans issue
does this have any specific object type I have to specify ?
e.g
File dataFolder = this.getDataFolder();
do... you understand how constructors work
me ?
...yea
yea
Oof
new Anything(...) will always be of the type "Anything"
didn't knew that, nice to know, I'm a javascript/python/go dev I'm quite new to java
Player does not exist.
(its a litebans issue deveroonie)
Just use an interface
Use a generic
public abstract class SuperClass<E extends Event> {
public abstract void hello(E e);
}
then java public class A extends SuperClass<PlayerInteractEvent> { public void hello(PlayerInteractEvent event) { } }
Also, definitely use an Interface if you can
how do i make a report
recieved a sus dm
https://i-own-a.blacklisted.store/AnzVBgxK
@quaint mantle lmfao caught dead
lmao
is it not allowed ?
😅
lol
no
no youre literally asking for someone to pirate software lmfao
you know what youre doing
^
^
litebans isn't a pirated software ?
but having someone send you a copy is
I was asking for litebans
not his plugin
._.
🤦
can you give me liteban plugin
litebans is a premium resource
that is asking for the plugin
i paid real money for it
yea litebans not "his"
so giving it to you is piracy
They have one just not for creating bans 😂
I already said thanks, why make it a big deal bruh
lemme send him a fake jar
fuckign chill out yall toxic for no reason
There is a good reason
PIRACY = BAD
Guys please continue this somewhere else
where did you say thanks
but ok
also i would be breaking the litebans eula
lets send him malware
I reacted to his message
/s
yes
not your problem so stfu
ah, didn't see the reactions
yea dont get involved please
?report
okay I've gtg anyways
whats the event for when a player sends a chat message?
welp... it works?
[16:11:20 INFO]: iusepepsi[/yes:55400] logged in with entity id 146 at ([world]-1808.5, 66.0, 202.5)
[16:11:23 INFO]: Previous ban for iusepepsi removed.
[16:11:23 INFO]: PryCat tempbanned iusepepsi for 31 days for '[PryCat] You have flagged the fly check in PryCat and have been banned as a result. If you believe this is in error, contact Deveroonie#9998 on Discord!'
[16:11:23 INFO]: PryCat tempbanned iusepepsi for 31 days for '[PryCat] You have flagged the fly check in PryCat and have been banned as a result. If you believe this is in error, contact Deveroonie#9998 on Discord!'
[16:11:23 INFO]: iusepepsi lost connection: You are banned from this server!
Banned on: 2022-08-21
Banned by: PryCat
Reason: [PryCat] You have flagged the fly check in PryCat and have been banned as a result. If you believe this is in error, contact Deveroonie#9998 on Discord!
Expires in: 31 days
[16:11:23 INFO]: iusepepsi left the game
[16:11:23 INFO]: Previous ban for iusepepsi removed.
[16:11:23 INFO]: PryCat tempbanned iusepepsi for 31 days for '[PryCat] You have flagged the fly check in PryCat and have been banned as a result. If you believe this is in error, contact Deveroonie#9998 on Discord!'
[16:11:23 INFO]: PryCat tempbanned iusepepsi for 31 days for '[PryCat] You have flagged the fly check in PryCat and have been banned as a result. If you believe this is in error, contact Deveroonie#9998 on Discord!'
[16:11:23 INFO]: Previous ban for iusepepsi removed.
[16:11:23 INFO]: PryCat tempbanned iusepepsi for 31 days for '[PryCat] You have flagged the fly check in PryCat and have been banned as a result. If you believe this is in error, contact Deveroonie#9998 on Discord!'
[16:11:23 INFO]: Previous ban for iusepepsi removed.
[16:11:23 INFO]: Previous ban for iusepepsi removed.
[16:11:23 INFO]: PryCat tempbanned iusepepsi for 31 days for '[PryCat] You have flagged the fly check in PryCat and have been banned as a result. If you believe this is in error, contact Deveroonie#9998 on Discord!'
[16:11:23 INFO]: PryCat tempbanned iusepepsi for 31 days for '[PryCat] You have flagged the fly check in PryCat and have been banned as a result. If you believe this is in error, contact Deveroonie#9998 on Discord!'
[16:11:23 INFO]: Previous ban for iusepepsi removed.
[16:11:23 INFO]: PryCat tempbanned iusepepsi for 31 days for '[PryCat] You have flagged the fly check in PryCat and have been banned as a result. If you believe this is in error, contact Deveroonie#9998 on Discord!'
lots of bans
imma def need to check if they are banned before rebanning
can someone like send me code or tell me code to make a equip armor event?
I'm working on a plugin that creates custom item abilities for already made items. I had a working version but needed to add a cooldown. It then completely broke the system. I proceeded to remove the code for the cooldown(leaving whats currently their) and test and it still doesn't work. I added logging messages to tell me where it stops and it doesn't appear to be able to detect the item in my hand as it doesn't ever show that log event. Anyone know why it wouldn't detect?(By the way I am using an item with that EXACT name)
Player p = e.getPlayer();
if (e.getAction() == Action.RIGHT_CLICK_BLOCK || e.getAction() == Action.RIGHT_CLICK_AIR) {
getLogger("TimeBoundItems").info("Right Click Detected");
if (p.getInventory().getItemInMainHand().getItemMeta().getDisplayName() == ChatColor.BOLD.GRAY + "Ability: " + ChatColor.BOLD.DARK_PURPLE + "Dark Mist") {
getLogger("TimeBoundItems").info("Dark Mist Detected");
if (!p.hasPermission("timebounditems.darkmist")) {
//plugin.msg(p, "You don't have this ability yet!");
p.sendMessage("You don't have this ability yet");
e.setCancelled(true);
return;
}
p.addPotionEffect(new PotionEffect(PotionEffectType.INVISIBILITY, 800, 0, false, false));
p.getNearbyEntities(20,20,20).forEach(entity -> {
if(entity instanceof Player) {
Player target = (Player) entity;
target.addPotionEffect(new PotionEffect(PotionEffectType.BLINDNESS, 600, 0, false, false));
}
});```
How can i replace a chat message?
Error?
bruh you literally knew what you were doing
to account for jumping should i make it look 4 blocks below them
wdym ?
why would you want to ask someone for litebans if you could literally go on the website yourself
that makes no sense
if it's not clear im making a fly check lmao
Why are you feeding le troll with le reaction
I didn't know about that plugin
then... why ask for it? lol
to account for jumping should i make it look 4 blocks below them
because I want to use it 🤦
then go on the spigot website lol?
Anyone have Crystalpvp kit plugin dm me i want to buy
🤔
Search the world's information, including webpages, images, videos and more. Google has many special features to help you find exactly what you're looking for.
I was looking for a good one but ones I looked didnt look promising, but he mentioned another plugin and I wanted to check it out ? anything else officer ?
heavy
so... you wanted to just pirate the software instead? youre not making sense
Mans is obviously a troll tf you still doing wasting your time
ive got time on my hands lol
bro stfu why making such a big deal, I didnt ask for his jar I asked for litebans now go and touch grass instead of making such a big deal
whats the code to send a title on your screen when you type a command?
bruh i know you asked for litebans and thats the issue here lmfao
thx
so why saying I want pirated sofware or what not ?
piracy is a crime
hey
cuz litebans is a paid plugin lol
how will i fix lots of bans
when i cancel onInventoryClick it also cancels when in blue zone in image anyone know how to check if he is clicking just in the chest ?
Check if the click is top using Inventory#getView#getTopInvwntory
Please be explicit
SO what ? what's the deal here ? I can pay for it. I asked for the plugin because I never heard of it, I aint going to repeat myself here because there is no point, you're stuborn af
I don't use pdc because its meant to be a vanilla item. Also I was previously using the == to determine the name, it was working fine before. I switched to .equals and didn't change anything.
you asked for the litebans jar for free, which you have to pay for, that is the issue lol
when did I said I want it for free ? 😂
"can you send me litebans"
yup
so you wanted the jar?
i didnt say his litebans
tf is this conversation
i said litebans
here
Martoph versus Troll
Just put a boolean to true when the player is banned 👦
and when ban check if the boolean is true?
yes I was given it and you keep going about a problem which doesnt exist anymore
Before banning check the boolean yes
"can you give me liteban plugin if you dont mind" lmaoooooo
lol
reeks of piracy
alot of trolls today
your a troll goodbye
and then once banned wait like 10s and set the bool to false
Prob a group of friends or something
says you
you're the only troll here mr. 404
ok 👋
Thanks it works
No, when the player is banned, he shouldn't be there anymore x)
whos mr 404 😳
the troll
server owner who's wondered about a ban plugin someone owned, and wanted me banned for it when I asked for it
the chat has feelings too
I'm already thinking about the pain of Choco to remove all the chats here... Good luck
how will i make 1 var per player
well you are asking to get a premium plugin for free, which would be piracy, which isn't allowed so you really should get banned lol
/ban does the job
Bro I'm sorry but how can you code an anticheat without knowing that basic stuff ? x)
Sorry to interupt I just don't want this lost. Does anyone know why this isn't working? Keep in mind I was already told about pdc's, and I changed the == to .equals.
I didnt asked for it for free, that's the thing people want to make it like I wanted to do piracy when I didnt even know the plugin was premium
bro just piss off
literally unnecesay
no one cares anymore
you too ✌️
you have an @EventHandler?
yes
im unable to see anything in that ugly code
if you really need to use its api, you should just make your own punishment plugin lol
registered it?
As I explained I have a logger that tells me when things are called and it detects the right click but doesn't detect the item. I have the exact item
this is also true lol
but between the line of shitty and custom punishment plugins, thats where id say litebans fits
Whats wrong with it?
I do like it as a plugin, but wouldn't run it if I had a custom option
yes
well == on strings wont work and idk what ChatColor.BOLD.DARK_PURPLE is
dear god that code
Just create an attribute to the player, with PDC or just a map or even a player object, and adds a boolean to it
Thats a formatting thing so that I can use colors in the name of the item. and == was actually working before
the java knowledge here is sometimes worser than in a coding server dedicated to java lol
== is unable to work
not using PDC as for one thing I haven't entirely learned that and for another the items are created and meant to be more vanilla created than not
I can prove otherwise.
actually might work but never use == on strings lol
I wasn't aware of that. I was informed and have changed that
So now it is using .equals instead of ==
do you know the difference between == and .equals
== compares two objects where .equals is for strings(from what I understand that is really the difference is that one is for specifically strings)
not quite
== compares the reference in memory
.equals compares the contents of the object (when applicable)
default .equals behavior is ==
but some objects override .equals
ok
I appreciate that but it doesn't entirely relate to the initial question of why its not working...
isnt this a thing?
i.e. i could do
UUID uuid1 = new UUID(1L, 0L);
UUID uuid2 = new UUID(1L, 0L);
Cause your String is an object, has an address. And you can create two same strings but with two addresses
uuid1 == uuid1 is false
no because typos are not compiler warnings
well you really need to know the difference so i dont see you in here every day, unlike some other people that refuse to learn java basics
You use intellij? Probably some setting you can disable
Computer Science basics*
I hate typo warnings in programming perry much everything is a typi
ye i can but then it disables it for everything 💀
It's more of a Java thing, almost any other language allows you to use == for string
well
its not just strings tho lol
i literally demonstrated the same concept for UUIDs
?jd
declaration: package: org.bukkit.event.inventory, class: InventoryClickEvent
and then
cuz strings are primitives there
or they dont have the concept primitive/ object
declaration: package: org.bukkit.event.inventory, class: InventoryEvent
It's not primitive but they basically are higher level
mmh expected that
then you have InventoryView#getTopInventory and InventoryView#getBottomInventory
strings in rust weird
is there a beacon activate event?
"hello" is a &str where if you want a String object you need String::from("hello")
I mean in Java strings are very intrinsic to the jvm
there is not
actually im not too sure
it might be under a different name
You may also initialize a String using new in C# while also comparing it with ==. I think it's also the same for kotlin
Anyway, it's better to have the Java distinction
I mean in Java sometimes using just == on strings work when you know the string will get interned
mmh in C# my teacher always used String and i string so i always changed his source code 💀
classes were fun back there
me just being the help desk
all the girls asking for help 💀
hmm just refactored 400 lines in 100 lines
compare the inventory with the view's top or bottom inventory
final var merchant = ((MerchantInventory) event.getClickedInventory()).getMerchant();
[19:51:32 INFO]: [AeroQuests] [STDOUT] merchant.getClass() = class org.bukkit.craftbukkit.v1_19_R1.inventory.CraftMerchant
[19:51:32 INFO]: [AeroQuests] [STDOUT] (merchant instanceof AbstractVillager) = false
[19:51:32 INFO]: [AeroQuests] [STDOUT] (merchant instanceof Villager) = false```
So I use InventoryClickEvent to detect the trade with a villager and I can't seem to be able to access the villager entity, any idea why `merchant` is not an instance of Villager?
i have an issue i cant get rid off
it just dont save
everything
in mysql
ill try to do sqlite database
it might fix it if not i guess ill give up
i tried use hikaricpi to abuse the connectionpools to be able to do many things by the same time
but it just stores still 1
Are you sure your queries reach the database ?
ugh thats strange
How can I convert a location instance into Vec3D?
yeah
it just dont store it
i have no idea why
i have a check message if it reached
it happens
but when i connect the database
i see it wasnt saved in reality
and only the first object gets saved
@desert sedge idk if u solved it, but in worst case you might have to reflect the nms merchant from the craft merchant
I didnt make this
I only maintain it
Arnuh is the person who originally made the ArmorEquipEvent
but they stopped updating it a long time ago
Any ideas?
hi, i have a problem with my code, when i right click this error comes https://pastebin.com/0kgXKEWW
someone can help?
un thats annoying @ivory sleet
Yeah, Im a bit bemused concerning the design rn
Hello I have a question I tried to make a clickable text in a written book but it don't work , in the book I have "TextComponent{text=BaseComponent(color=..."
Player p = (Player) sender;
String Author = "Antasia";
String Title = "Grade Personalisé";
String message = "\n\n§r [§9Choisir mon grade§0]";
TextComponent component = new TextComponent(TextComponent.fromLegacyText(ChatColor.translateAlternateColorCodes('&', message)));
component.setClickEvent(new ClickEvent(ClickEvent.Action.RUN_COMMAND, "/setcustomrank"));
component.setHoverEvent(new HoverEvent(HoverEvent.Action.SHOW_TEXT, TextComponent.fromLegacyText("§bClique pour choisir ton grade !")));
String Pages = "§c§lGrade Personalisé\n §6§l30 Jours\n\n§rMerci de votre achat, vous pouvez maintenant choisir votre grade juste en dessous !\n" + component;
ItemStack book = new ItemStack(Material.WRITTEN_BOOK, 1);
BookMeta meta = (BookMeta) book.getItemMeta();
meta.setTitle(ChatColor.translateAlternateColorCodes('&', Title.toString()));
meta.setAuthor(ChatColor.translateAlternateColorCodes('&', Author.toString()));
meta.addPage(ChatColor.translateAlternateColorCodes('&', Pages.toString()));
book.setItemMeta(meta);
p.getInventory().addItem(book);
pls
wtf is a Vec3D?
there is no such thing as Vec3D in NMS code
are you on 1.16 or older?
public static Vec3 toVec3D(Location loc) {
return new Vec3(new Vector3f((float) loc.getX(), (float) loc.getY(), (float) loc.getZ()));
}
^ mojang mappings ^
hi, i have a problem with my code, when i right click this error comes https://pastebin.com/0kgXKEWW
someone can help?
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
when you rightclick "what"?
rightclick with an item
with what item?
oh wait, your minecraft version is 5 years old
I'd suggest to update to a supported version, then see if it still happens
if yes, we can talk again
i want to do in 1.12.2
I understand
anyway, my suggestion is to see whether it still happens in 1.19.2
if yes, we can try to figure out the problem
i don't want to use 1.19.2
if no, it's one of those "old version quirks"
I did understand this
I still stand my ground
try whether the same code works in 1.19.2
if it does, it's a 1.12 quirk. if it doesn't we can talk again
ma dio porco
english pls
anyone know how to make clickable line in written book please ?
I think it's fair to ask you to try on an up to date server to understand the source of the problem you are experiencing
if you wanna hate on gays, do so elsewhere
no scherzavo
homophobic messages will get you banned here very quickly
do you really think that I didnt take screenshots? lol
no one asked
wtf is wrong with everyone here today
no one asked your opinion
I tried to help people here. Now I'm getting random anti-gay-hate out of nowhere?!
are you all you homophobic jerks upset because you all never get laid? wtf
welcome in 2022 soon 2023 sadly
sadly I'm used to it
:\
All I did was ask them if the same error happens in 1.19 too 🥲
because if yes, it's a problem in their code
and if no, it's a spigot 1.12 problem
that's all I wanted to say haha
🥲
If a listener extends another listener, do event handlers from both classes get registered?
sorry to ask for third time but can you maybe help me with my code ? 😅
good question, and it depends
it depends on whether the other class has its own HandlerList
Oh, how do I see if it has a handler list?
99% of the times yeah static factory methods are just so much more robust
yo @tender shard don't waste your effort on unappreciative randoms online, it's not worth your nerves
ill answer to you in a minute
Thanks
take a look at this: https://github.com/JEFF-Media-GbR/CustomBlockData/tree/master/src/main/java/com/jeff_media/customblockdata/events
the super class is "CustomBlockDataEvent" and it has its own HandlerList
Yeah a god ascend design pattern
that means, all subclasses also call a listener listening to the CustomBlockDataEvent
Component.text is godlike indeed 
the subclasses do not even need their own handlerlist
if you do it the other way around, then the "super" event will never be "called"
ik, it happens every day. thanks god, not very often here
what exactly "is not working"? any stacktraces or similar?
Oh okay, so I don't want the super event to ever be called and I haven't defined a handler list so that should be fine right?
I can't send screen of what's my code doing in the book, can I send you screen in DMs ?
please no DMs. You can verify within a minute, then you can send screenshots here
!verify
Usage: !verify <forums username>
!verify Antasia
A private message has been sent to your SpigotMC.org account for verification!
why don't you want the "super event" to be called?
x)
it looks like you're just passing the "serialized" string directly into the book
one sec, lemme try to find your code again
I tried to found out by myself how to fix that but i didn't found so i still was on the forum x)
myList.stream().sum();
How can I let a cow attack the lastdamager of a player? ```package me.tim.customentities.PathfinderGoals;
import net.minecraft.world.entity.LivingEntity;
import net.minecraft.world.entity.Mob;
import net.minecraft.world.entity.ai.goal.Goal;
import org.bukkit.event.entity.EntityTargetEvent;
import java.util.EnumSet;
public class DefendOwnerGoal extends Goal {
private final LivingEntity Owner;
private LivingEntity Target;
private Mob pet;
public DefendOwnerGoal(Mob pet, LivingEntity Owner) {
super();
this.pet = pet;
this.Owner = Owner;
this.Target = Owner.getLastHurtByMob();
this.setFlags(EnumSet.of(Flag.TARGET));
}
@Override
public boolean canUse() {
if (this.Owner == null) { return false;}
else if (!(this.Owner instanceof LivingEntity)) { return false;}
this.pet.setAggressive(true);
this.pet.canAttack(this.Target);
return true;
}
public void start() {
this.pet.setTarget(this.Target, EntityTargetEvent.TargetReason.TARGET_ATTACKED_OWNER, true);
}
public void stop() {
this.pet.setTarget(this.Owner, EntityTargetEvent.TargetReason.CUSTOM, true);
}
}
How can I do that ? I saw some things like that but it didn't worked for me
Oh well because I have this class called a "GenericWorldManager" which looks at worlds and makes sure that when they're loaded, the proper game rules are set, but I've extended that to a "LobbyWorldManager" which is a special kind of world where user inventories are configured. I don't want the generic world manager event handlers to go through because if i wanted them, I'd just instantiate a GenericWorldManager class by itself and register it
tbh I dont know out of my heart right now.
All I can tell you: you use the setText() method or whatever, that takes a string. Paper API probably has a method for this. Do you actually need to use components? Or do you just wanna use colors in a book?
IntStream has a sum() method. Stream<Integer> does not
I'd just opt for a for loop tbh
okay I see, but that seems like a bad design pattern
if you don't want your super event to be called, you shouldnt extend this class
actually I need a clickable text that make a command
ah I see. Sorry I cannot help you with that
I am very bad at using all these component things
spigot already has methods for that
Mhm okay, I guess remove the event handlers from "GenericWorldManager" to "GenericWorldListener" ig and then extend it
BookMeta#spigot
declaration: package: org.bukkit.inventory.meta, interface: BookMeta, class: Spigot
It’s ok thank you I will use direct chat so 😂
yeah you could move all your EventHandler stuff to the subclass, and make the super class abstract
then noone can "listen" to it
list.stream().mapToInt(Integer::intValue).sum()
gotcha thanks
why the actual hell is my plugin having a heart attack with this ``` Inventory inventory = Bukkit.createInventory(null, 45, t("U-GUI"));
inventory.setItem(8, buildItem(Material.DIRT, "&7Go", "", 1));
inventory.setItem(17, buildItem(Material.DIRT, "&7Go", "", 2));
inventory.setItem(26, buildItem(MMaterial.DIRT, "&7Go", "", 3));
inventory.setItem(35, buildItem(Material.DIRT, "&7Go", "", 5));
p.openInventory(inventory);```
https://pastebin.com/tbESa0D4 <- this like 10x
Hola
erm wait sorry
Tengo una duda
with EventHandler stuff, I meant the getHandlerList() stuff, etc
ah okay
send the full stacktrace, and not just parts of it
okay, I see but
its just that like 20x
you should at least have a line that says "Caused by: ..."
Hello
nope
take a look at your latest.log file
ello
latest.log doesnt show anything that happened after that
wassup
yeah, it's BEFORE this
not after it
doesnt show any part of the error
?paste your full latest.log pls
its just the server starting up
Do you know if the texture pack of combat weaponry is for bedrock?
theres no logs involving the plugin
I have no idea what you're talking about, but I don't have any knowledge about resource packs anyway
I am a resource pack noob
Oooo ok ok
I know how to write a tool to merge resource packs, but that's basically all I can do regarding resource packs lmao https://www.spigotmc.org/resources/resourcepackmerger.103875/
Ok ok
Do you know of anyone who knows about that?
Does some of you guys know how i could make a cow atatck the last damager of a player?
This is my code:
https://pastebin.com/Q5jnqjx1
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
you want to make a cow attack a player?
as axample
I dont think that cows are able to damage players at all
or a zombie
Beware of cows, they could be more dangerous than you think
add the MeleeAttackGoal maybe?
idk there are ton of goals that entities use
I know, but how can i delet one specific goal?
ooh okay
well you can get all goals from an NMS entity from their goalSelector and/or targetSelector fields
and then you can remove them by iterating over the list and checking if its instanceof (WhatEverGoalYouWannaRemove)
Okay thank you
e.g. myNmsEntity.goalSelector retirms their goalSelector
and then you can do sth like this:
okay wait, I think it requires reflection
what version are you on?
mojang mappings, or spigot mappings?
1.19 deopfuscated
so mojang?
Yes
GoalSelector has a private field "availableGoals"
that is a Set<WrappedGoal>
you gotta iterate over that
then check if the wrappedGoal's "goal" field (also private) is instanceof whatever you wanna remove
so yeah, quite tedious
if you need further help, lemme know
Maybay a lin ktot a iterate tutorial do not have any experience with that
oh wait
bullshit
I was talking bullshit
the GoalSelector class already has removeGoal(Goal)
so if you know which goal to remove, you can do that directly
which goal exactly do you want to remove?
MeleeAttackGoal
ah I see... yeah that's complicated I guess, I think you can't get around looping over the existing goals, check if any of those is instanceof MeeleAttackGoal, then remove that one
so yeah I think you definitely need reflection to loop over the WrappedGoal collection
you cannot just remove goals simply by their classes, you need to find the exact instance of that goal class to remove it
why isnt this working?
bungeecord
21.08 17:47:58 [Server] INFO Command not found
something like this SHOULD work. No guarantuee, I wrote this without an IDE:
nmsZombie.goalSelector.removeGoal(nmsZombie.goalSelector.getAvailableGoals().stream().filter(goal -> MeeleAttackGoal.class.isInstance(goal)).findFirst().get());
this would / should remove the first goal that's instance of MeeleAttackGoal
Myeah tho u probably wanna use ifPresent or orElse instead of raw get
but looks nice else wise
Maybe Predicate.not instead nitpickingly
https://pastebin.com/Q5jnqjx1 can i just do this?
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
https://pastebin.com/0mJiuasy just got the whole error
just making the goal a variable and creating and deleting teh variable
what's "ugui" line 222?
and what's" InventoryCloseListener" line 18 ?
this the open invenyoruy part
okay, but
what's "ugui" line 222?
and what's" InventoryCloseListener" line 18 ?
the exact line
p.openInventory(inventory); line 222
inv.open() which calls ^
what does inv.open() do?
looks like both methods keep calling each other again and again
Inventory inventory = Bukkit.createInventory(null, 45, t("U-GUI"));
inventory.setItem(8, buildItem(Material.DIRT, "&7Go", "", 1));
inventory.setItem(17, buildItem(Material.DIRT, "&7Go", "", 2));
inventory.setItem(26, buildItem(MMaterial.DIRT, "&7Go", "", 3));
inventory.setItem(35, buildItem(Material.DIRT, "&7Go", "", 5));
p.openInventory(inventory);```
yeah, you see
so
let me try to explain
- you do p.openInventory(...)
- which calls inv.open()
- which calls p.openInventory(...)
- which calls inv.open():
- ...
🤡
your methods keep calling each other
because you put that into your code?
i dont want players to be able to close the gui
i checked this https://www.spigotmc.org/wiki/creating-basic-command-functions-in-bungeecord/ toturial of bungeecord commands and i dont understand this part
what does super() do?
i only call inv.open() when the gui is closed which re-opens the gui
have you googled that
then listen to InventoryCloseEvent and reopen the inventory then
like for a second
inv event isnt cancellable you you'd have to reopen it
i have another problem
thats what i already do
it makes LynxPlay make him wanna type ?learnjava
yeaaaa xD
The constructor Object(String) is undefined
lmao
Well, I'd presume you fiucked up the class declaration
super calls the constructor of the super class
and did not extend command
do it
aaa right
public void onInventoryClose(InventoryCloseEvent e) {
UUID uuid = e.getPlayer().getUniqueId();
UGUI.guis.get(uuid).open();
}```
public class Jerk {
final String name;
public Jerk(String name) {
this.name=name);
}
}
public class AgedJerk extends Jerk {
final int age;
public AgedJerk(String name, int age) {
super(name);
this.age = age;
}
}
this is what super does ^
can someone link this guy ?learnjava when he does not understands anything?
?learnjava
Here are some links to get you started on learning Java:
- https://www.codecademy.com/learn/learn-java
- https://www.sololearn.com/learning/1068
- https://www.learnjavaonline.org/
- https://programmingbydoing.com/
- https://docs.oracle.com/javase/tutorial/java/index.html
The last one is the only official one, however some of those concepts assume that you already know a bit about programming.
fuck
Anyone here who knows a bit about ProtocolLib?
you can always do that yourself, you know 😛
yes
im not here 24/7
what are you trying to do?
ProtocolLib is one of the shittiest, most bullshit libraries EVER
There are sooo awesome alternatives
there's the Player Chat Message packet
for example PacketEvents by @alpine urchin
Just forget about ProtocolLib
you will never need it again
consider using PacketEvents instead
There's only one thing I need, so if packetevents supports it idc
Player Chat Message has a UUID field with the original sender's UUID
PacketEvents is basically "ProtocolLib in better"
more typed
and easier to use
I guess
In ProtocolLib it seems that this never gets passed through
yeah PacketEvents actually wraps packets
Altho it might be one of my other plugins messing with it now that I think of it
You know how in MMO's you can type something like [Big Dong] in chat and you can hover over it and see the stats?
that's what I need
And yes I know about chat events, but another plugin of mine kinda interferes with it so that's out of the question
You can listen the AsyncPlayerChatEvent
and then replace that part with a BaseComponent that has a "hover" part thingy
but why do you need packets?
because the chat plugin I currently have doesn't have any way I can properly do this through chat events
it's CMI btw
cmi 
and why can't you just do Bukkit.broadcastMessage(...) or loop over all oneline players and do player.sendMessage(...)?
tbf their portal system is nice
but yeah otherwise, CMI sucks ass and not in the good way (I know I always say this, but it's required to always mention that since there also nice ass-sucking things)
why so?
ye
about 9 months ago, I reported a bug because the "global bungee" chat wasnt work
still no reply 🥲
Is it possible to have invisible lights?
kinda anecdotal
yes, just do not set any lights
yeah but
they want the light to be invisible?
then just dont use lights
lol
or did I misunderstood
I want like invisible blocks that emit light
?
that thing is invisible
That's what the light block is.
I open this channel, first thing I see
It's only visible in creative mode. Similar to the barrier except without an outline.
Is there like a premade plugin that handles that? If not would I need nms since it's a client side thing?
what did you expect me to answer to such a message
That's easy lol
cursed
once placed, you can right click it to adjust the light level
i guess LightAPI is officially dead now
omg my heart just skipped a beat, I hate it when this happens
wdym?
ADD what?
a new column?
I think that this is actually NOT possible in sqlite
hi
im busy making music
send
FL studio?
which thing?
