#help-archived
1 messages ยท Page 66 of 1
1024M = 1G
can i put 5?
it's saying it can instantiate it
inb4 wrong import for Pair. That or the constructor is private
Pair.of() most likely
sorry that im such an idiot, I have never done this before and I get frustrated quickly. I hope this works.
I'm just taking shots in the dark. Don't remember off the top of my head
I'm using this one?
import org.bukkit.craftbukkit.libs.org.apache.commons.lang3.tuple.Pair;
Internal dependency
more errors
Shouldn't be relying on craftbukkit libraries
show your bat file
normally I think you have to edit something inside windows path or something
That's arguably worse lol
;-;
If you want to use a Pair, I advise creating your own. They're not too difficult to create
what is scrollable strings
sorry for these phone pictures, I don't have discord on this laptop
this is a clean windows install, wiped all the drives
@formal nimbus
Quick easy c/p and you're good to go. Throw it into a utils package 
host services is welcoming you
I don't have money for those. And the amount of RAM they give you is ridicilous
don't use craftbukkit or mojang pair, both are terrible ideas
I turned off my laptop, I don't think this can handle a minecraft server anyways, it's a 2 core i5 M520
this is a probook from 2010
the issue is that you prob. have a 32bit java version
try and to java -version , if it doesn't contain "64-Bit" it is 32bit
I could host it on my main PC, but I can't leave that running 24/7
alright
will do
later though, I need to do something else lmao. I get tired quickly.
k
hey, does anyone know about bungee?
i changed the ports of my Servers and now i cant connect to the fallback?
https://pastebin.com/kDcMumj5
https://pastebin.com/BGUigzW8
https://gyazo.com/f743a23eddb563bf6506ebfc46a2539c
make sure you also updated those mc servers config file to use those ports
i did ๐ฆ
hey guys so I have a server and for some reason im an alex skin on the server, even though my skin isnt an alex
Any way I can fix?
online-mode: true
ah someone managed to spot the problem
I am coding a plugin and when I put the jar in my plugins folder, nothing shows up in /pl
pleas help
errors?
Wdym
this is what i have
open up the jar with 7 zip
in luckperms, does the parent inherit the childs permissions or is it the other way around?
so if i set the rank vip to have the parent default, will the vip rank get the default perms?
you would think children inherit from the parents, no?
thats weird @vestal patrol
look in ur dms
should be 1 way, but i never used luckperms
i send u code and things
"displayName" is both chat and nick I assume, if im looking for a plugin that modifies only the players name that hovers above them, what am I looking for?
why does ENDER_EYE not work in my plugin when its put item: ENDER_EYE but every other item works
Best way to prevent falling block from falling? I've tried:
@EventHandler(priority = EventPriority.HIGHEST)
public void onBlockPhysicsEvent(BlockPhysicsEvent event) {
Block block = event.getBlock();
if (block.getType().equals(Material.SAND)) {
event.setCancelled(true);
}
}
But it has no effect.
And it doesnt seem like I can get to its gravity either. I've tried casting it to a falling block, but it will allow me to do so because I cant cast it.
so another thing
i have this plugin
and when i try to do some troll commands it says
"This command has been disabled because there is no recognized backing library available."
any solution?
?
I dont know what a backing library is ok
To be fair the plugin overcomplicated the language a bit
well to administrate a server you should have the minimum knowledge..
?paste
Use that instead
fk me i clicked on it
lmao
Yes. It is the full log
Anyone know why this code is throwin this error?
Code:
https://hastebin.com/coceyunawu.java
I'm trying to sort HashMaps
i mean what full log it stops at some commands
no error or anything
hmm why would it say
i mean what full log it stops at some commands
@vernal spruce I dont know
ur casting comparable to a player
@vernal spruce me?
yeah somewhere
Where
Caused by: java.lang.ClassCastException: org.bukkit.craftbukkit.v1_8_R3.entity.CraftPlayer cannot be cast to java.lang.Comparable
sadly doesnt rly say exactly where
This is my data file
Is this why?
I'm using UUIDs in the flatfile
And I'm using Player in the HashMap
are you converting them to player from them?
Oh shit
player.put(Bukkit.getPlayer(UUID.fromString(players)),
I changed <Player, Integer>
to <String, Integer>
String being the UUID
And it worked
k then
I need ideas for how to show player private messages in chat
Like the chat format
@earnest grove are you developing this yourself or looking for a plugin to do it?
myself
I mean what formatting do you really need o.O
You can get the player's instances and use TargetPlayer.sendMessage(ChatColor.GRAY + '' + ChatColor.ITALICS + "Whatever you sent");
Same with the sender.
Just format sendMessage however you want. You can use chat formats and string manipulation, placeholder api, etc.
sendMessage would include who it came from and such as well.
sendMessage would include who it came from and such as well.
You're thinking ofchat()
sendMessage() sends a message to a player, chat() sends a message from a player to the server
(erhm - it imitates a client sending a message to the server lol)
How can I get an index in Set of Entries?
Set<Entry<String, Integer>> entrySetSortedByValue = sortedByValue.entrySet();```
Such as this
But if I have this:
Bukkit.broadcastMessage("HashMap after sorting entries by values ");
Set<Entry<String, Integer>> entrySetSortedByValue = sortedByValue.entrySet();
for (Entry<String, Integer> mapping : entrySetSortedByValue) {
Bukkit.broadcastMessage(Bukkit.getPlayer(UUID.fromString(mapping.getKey())) + " ==> " + mapping.getValue());
}```
How can I get the 4th entry?
Or would I just to a for statement and stop when I want to get the value
A set doesnt have the 4th entry
think of it like a bag
you cant order stuff inside a bag
you cant get the "4th item in a bag"
But I have an ordered list.
Let me show you my full code, it might make more sense.
This code is a method to get values of players in my flatfile, and order them.
looks like you would be better off with an object instead of a bunch of maps
Set<Entry<String, Integer>> entrySetSortedByValue = sortedByValue.entrySet();
this is not sorted
Its a set, it has no order
even if you sort it first, it wont be sorted in the set
also you should try hitting the Enter key here and there ๐
it helps readability xD
I think that has already been covered ๐
but that's different altogheter
@subtle blade
You're thinking of
chat()
No, I just worded it weird. You would want to include who it was from and sent to in sendMessage. They we're asking specifically for private messages.
Unless I misunderstand chat()
how do I check if a CommandSender is the console?
i dont see an interface for the console command sender so i cant do an instanceof
ConsoleCommandSender
That's not in the api
It most definitely is lol
uh no
Oh well you could have said you were on Bungee
Can bungee send commands through the console? I thought that was just players?
yes
yeah you can
Clearly I'm not familiar enough with it
Hi! Im making the bridges minigame like mineplex have with plugin which i found. I want to know how should I set randomly spawn ores on islands? Do I need put some code in plugin or? If anyone know please reply
Do I need put some code in plugin or?
Yea, if you're making a plugin, generally you need to put some code into it. ๐
Its not my plugin, i buy it on spigot
How do i get how mant sugar cane blocks a player has broke?
imagine the day we get plugins that writes themself ๐ค
But plugin get removed
It's not quite that simple
You would have to decompile it and edit that. If you're a novice with Java, you will struggle
I'd also put money on it being obfuscated because screw premium resource authors
return ProxyServer.getInstance().getConsole().getClass().isAssignableFrom(subject.getClass()); so i assume i will have to do this
hacky
to check whether a subject has a permission
int scane = p.getStatistic(Statistic.MINE_BLOCK, Material.SUGAR_CANE_BLOCK); this throws an error there is no statistic same for SUGAR_CANE how do i fix that
That looks horrendous
That's all for the lack of the api ๐
Version, christo?
1.8
Choco, is there any site which can explain it? I know how to replace it
But idk how they would spawn in groups
Like 5 diamondores togather
The issue is that in decompiling the plugin, the source is going to be in significantly worse shape. Not to mention there may be decompile errors you would also have to resolve
And if it's obfuscated, that's a whole other hurdle
That wont be problem
Can't we edit the face the block will be?
Just ores in groups
int scane = p.getStatistic(Statistic.MINE_BLOCK, Material.SUGAR_CANE_BLOCK);this throws an error there is no statistic same forSUGAR_CANEhow do i fix that
@true anvil
1.8
And what's the error?
hold on let me get the full error
?paste it preferrably (or some other paste site, whatever)
im in the middle of a test for school so it may be about 10 mins before i can recreate it
Sounds good. Take your time
Hello, I have a pb with my LinkedList my nickname is duplicate when I write the command /classement
I don't even know what you're asking
^ Atleast show the code
wait ^^
LinkedList<String> classement = new LinkedList<String>();
@Override
public boolean onCommand(CommandSender sender, Command cmd, String msg, String[] arg3) {
if(sender instanceof Player) {
Player player = (Player) sender;
classement.add(player.getName());
for(int i = 0; i < classement.size(); i++){
player.sendMessage("\nPlayer Classement");
player.sendMessage("-----------------------------------");
ListIterator li = classement.listIterator();
while(li.hasNext()){
player.sendMessage("TEST : " + li.next() + " with " + player.getStatistic(Statistic.PLAYER_KILLS) + " player kills.");
}
}
}
return false;
}```
@subtle blade
No reason for that to be a linked list. An ArrayList would suffice would it not?
I need ideas for how to show player private messages in chat
Like the chat format
Though you have to understand that List implementations allow for duplicate values
Anyone for blocks direction?
Not really. There's no justifiable reason for it to be one
Yes. Lists can hold duplicate values
So if you run it a third time, you're going to see three of those Player Classement messages with 3 entries
classement.add(player.getName());
for(int i = 0; i < classement.size(); i++){
player.sendMessage("\nPlayer Classement");
player.sendMessage("-----------------------------------");
ListIterator li = classement.listIterator();
while(li.hasNext()){
player.sendMessage("TEST : " + li.next() + " with " + player.getStatistic(Statistic.PLAYER_KILLS) + " player kills.");
}
}```
What you're doing here is, "Send this message x amount of times, where x is the amount of entries"
If you have 3 entries, it's going to send that message 3 times. 4 entries? 4 times. So on and so forth
ok but i have only 1 entries no ?
lopps
I need ideas for how to show player private messages in chat
Like the chat format
You add an entry every time you send the command
So you can ensure before adding it that they are not already there. That, or you may use a HashSet though I'm not sure that's necessary
I pref to verify if is already exist
I too would do the same
and
when i kill a player
wait xd
on my st account
on my nd account
1st and 2nd
Hi!
Does anyone know how to swap biomes on 1.8.8?
For example, I would like to replace Ocean with something else
I've tried everything from spigot
Nothing worked
you'd probably have to download your world into MCEdit
idk of a way to do it in game.
Nope, I need to do so from a plugin
can't help ya
I have a question though: It seems to have been a common one, but i havent seen it answered yet:
*** Error, this build is outdated ***
*** Please download a new build as per instructions from https://www.spigotmc.org/go/outdated-spigot ***
*** Server will start in 20 seconds ***
This keeps popping up even though i have the latest spigot
You likely don't
Just because you're on the latest version of Minecraft does not mean you're on the latest version of Spigot
For any given major Minecraft release, there are hundreds of Spigot releases
I'm guessing it means that someone has to manually review your page or whatever, and you will have to wait as long as it takes for someone to review your page
then your paypal probably isn't verified, or its a new store
they ran out with your money
Anyone know a plugin that automatically transfers any items picked up to a chest if the player's inventory is full? Please ping me ๐
anyone else have problems with worlds getting overwritten when you start up a server?
player.addPotionEffect(PotionEffectType.INCREASE_DAMAGE.createEffect(Integer.MAX_VALUE, 1));
Bukkit.broadcastMessage("Applying potion effect");
Can confirm the potion effect is not applied
Though the debug message does come up :^)
Try player.addPotionEffect(new PotionEffect(PotionEffectType.INCREASE_DAMAGE, <duration in ticks>, <amplifier/strength of the effect>))
@dusty topaz
where do i enter this command for build tools java -jar BuildTools.jar --rev latest
That's what you use to run it
I have this error which suddenly appeared whereas since the last time I launched the plugin I have modified it very little.
Open a command line and run that command
(in the same directory as BuildTools - preferably its own)
Do you know why ?
my server is through a hosting site
YES
OK
@subtle blade LinkedList duplicated my list xd
but i use Array
and i's fix ๐

dritch if you're using a host, it's likely they let you just pick a server software
No need for BuildTools
English server, jusosi, but I see Slimefun & 1.14.4, I'm not sure that's available. It was abandoned to my knowledge
But i have a new problems with the ArrayList
we didn't see the nickaname of other payers
players *
hay algun plugin parecido a el slime fun para la 1.14.4?
is there any plugin similar to the slime fun for 1.14.4?
?
block.setBlockData(Material.BARREL.createBlockData());
Directional data = (Directional)block.getBlockData();
data.setFacing(BlockFace.NORTH);
block.setBlockData(data);
mhm it seems to be not working, it that a correctly way to put a direction?
block.setBlockData(Material.BARREL.createBlockData(d -> ((Directional) d).setFacing(BlockFace.NORTH));
(would make that BlockData a constant though)
Can't we edit this at runtime and update it like customName?
private static final BlockData BARREL_NORTH = Material.BARREL.createBlockData(d -> ((Directional) d).setFacing(BlockFace.NORTH));
// elsewhere
block.setBlockData(BARREL_NORTH);```
What do you mean?
I mean, if I place a block with my own hand, at server runtime or with an command can't I modify directly the facing direction like I've tried to do?
Oh you most definitely can. Though in this case here you have it set to a constant value every time so it's best to create a constant
Alright, I see what you mean
If you're accessing an existing block in the world you're likely better off to getBlockData(), modify and setBlockData()
This way you wouldn't mess with existing states
Though here you're just always setting it to a barrel and always setting it to face north.
Alright thanks
It's a potion effect, you are aware of that, right?
Yeah, also I deleted the message because I thought it wouldn't let me edit it but it was my wifi.
I know it's a potioneffect but how do I set the duration using the api?
PacketContainer packet = plugin.getProtocolManager().createPacket(PacketType.Play.Server.ENTITY_METADATA);
packet.getIntegers().write(0, glowingPlayer.getEntityId());
WrappedDataWatcher watcher = new WrappedDataWatcher();
Serializer serializer = Registry.get(Byte.class);
watcher.setEntity(glowingPlayer);
watcher.setObject(0, serializer, (byte) (0x40));
packet.getWatchableCollectionModifier().write(0, watcher.getWatchableObjects());
try {
plugin.getProtocolManager().sendServerPacket(sendPacket, packet);
} catch (InvocationTargetException e) {
System.out.println("[vCustomEnchants] There was an issue with one of the glowing enchants!");
}
}```
if (block.getType() == _block.getType()) {
if (block.getLocation() == _block.getLocation()) {
System.out.println("Should be the same type & location but nothing here...");
event.getPlayer().sendMessage("error message right here");
event.setCancelled(true);
}
}
https://i.imgur.com/yDV36tQ.png and the code does, nothing, the type is the same and the position is the same, what I've done wrong? ๐ค
send the full method
public void onBlockBreak(BlockBreakEvent event) {
BlockState block = event.getBlock().getState();
for (BlockState _block : blocks) {
if (block.getType() == _block.getType()) {
if (block.getLocation() == _block.getLocation()) {
System.out.println("Should be the same type & location but nothing here...");
event.getPlayer().sendMessage("error message right here");
event.setCancelled(true);
}
}
System.out.println(block.getType());
System.out.println(_block.getType());
System.out.println(block.getLocation());
System.out.println(_block.getLocation());
}
}
also replace "==" with ".equals(your object here)" in the line if (block.getLocation....)
do you have the @EventHandler annotation written on top
In your opinion, what is the best dedicated server provider? I got screwed by my old host
Btw, can I make json objects and save them in the servers data for saving?
Or what is the best method of saving files?
@subtle blade ik that its a potion effect but i dont see the method to set the duration because the object is a packetcontainer
and the packettype is PacketType.Play.Server.ENTITY_METADATA
Could anybody recommend me some top tier free lootbox/crate plugins that are free to install on spigot
For spigot 1.8.8
My next question is, how I can put a nametag or somes on a chest? ๐ค
Does I need to use packet or something?
Because we can show a custom name on a chest right?
its a hologram
What do you mean?
Johnnnny use crazy crates
If you want the inventory name to be changed, you need to rename the chest in an anvil else if you want the name to hover over the block chest, you need an invisible named armor stand. You can also use holograms plugin if you want so. @frigid ember
Okay, got the trick! Thanks! https://i.imgur.com/Vle8ls7.png
Sorry took so long @subtle blade got distracted. https://pastebin.com/z9KHknW6
anyone have a fix for the space at the end of holograms? (holographic displays)
crossed out link so im not banned lmao
you could use my holo class
It's very possible the sugar canes just didn't have a statistic back in 1.8
either stop being a dinosaur or using the BreakBlockEvent to count the sugarcanes that are broke
just saying, 1.8 is almost 6 years old
maybe i should just move to 1.15 i mean player heads dont work nothing
ik but its the best!
1.15 is trash
why? you can get similar pvp mechanics in 1.15
help: my server has a space in the world name, and its incompatible with most plugins, as they look for a single string. any ideas other than renaming the world and all the files that reference it?
'Your name'
i tried to update Furnace BlockState when FurnaceSmeltEvent got fired, but it went wrong in 1.15.2, the smelt item wont get decreased, it ended up duplicating items, this thing works fine in older versions
tried to decrease it manually, but it just create another duplication issue when i tried to FurnaceInventory#setSmelt, it drops the smelt items and its being duplicated
https://hub.spigotmc.org/javadocs/spigot/org/bukkit/inventory/FurnaceInventory.html
you need to set the result instead
FurnanceInvetory#setSmelting sets the item thats being smelted
FurnaceSmeltEvent is triggered when it finishes smelting
Whats a good lobby plugin for 1.8.8
just search on spigot's forums. there are probably so many
Yeah fair enough
https://hub.spigotmc.org/javadocs/spigot/org/bukkit/inventory/FurnaceInventory.html
you need to set the result instead
FurnanceInvetory#setSmelting sets the item thats being smelted
@boreal tiger thats actually what i wanted to do, set the item that being smelted
ah, I think you need to user another event then.
that event is called when it finishes
oh wait
Does anyone know how to disable mob ai
programmatically or by plugin?
anyone know how to remove default join and leave msg
Hello. Anybody know what plugin can cause that, if my money changed this "scoreboard" showing for a sec?
https://imgur.com/a/uGIEPDT
the grid?
Oh sorry no ๐
The "Bank" stuff
I'm using a custom scoreboard (Scoreboard revision), and this stuff hides it for a sec
And it can be problematic for plugins what update more often the money
Like jobs, mcmmo
Or maybe just jobs
But it's super annoying ๐
that look like one of you plugins making the scoreboard so when u get or spend money u can see ur balance bud so have a look at your plugins ๐
LivingEntity#setAi(boolean ai) @silk cape
The method getMaterial(String) in the type Material is not applicable for the arguments (int)
@versed forge yea bot i don't know which one ๐ฆ
i upgate to 1.15 and now im getting this error when i try getting material
List<String> lore = new ArrayList<>();
ItemStack item = new ItemStack(Material.getMaterial(materialId), amount);
ItemMeta meta = item.getItemMeta();
meta.setDisplayName(chat(displayName));
byte b;
int i;
String[] arrayOfString;
for (i = (arrayOfString = loreString).length, b = 0; b < i;) {
String s = arrayOfString[b];
lore.add(chat(s));
b++;
}
meta.setLore(lore);
item.setItemMeta(meta);
inv.setItem(invSlot - 1, item);
return item;
}```
lol wow
no its from a youtube video
There is absolutely no way someone wrote that by hand
@subtle blade Think you could check my PM please?
I did make it but i followed a yt video
https://paste.md-5.net/ejumagikev.cs
It is saying the potion effect is applied and removed, but strength is not being applied
And no, @true anvil, you didn't
lol its from VerveDev
Anyone delt with removing defualt minecraft join/leave msg
that ss is the second time he did it
he saw the code this guy sent
For some reason, my plugin spams the PlayerGameModeChanged i tried to stop the event by using SetCancelled, I change gamemode and just s p a m. I started yesterday so its abit bad.------> Code https://pastebin.com/raw/N3vVZMtP
(No errors, just shuts down the server.
LOG:
--- This is where i typed gamemode survival 4gdatawentto2g
[23:03:37] [Server thread/INFO]: Stopping server
[23:03:37] [Server thread/INFO]: [4gtest] Disabling 4gtest v1.14.4
[23:03:37] [Server thread/INFO]: EndingThePlugin[m
[23:03:37] [Server thread/INFO]: Saving players
[23:03:37] [Server thread/INFO]: 4gdatawentto2g lost connection: Server closed
[23:03:37] [Server thread/INFO]: 4gdatawentto2g left the game
[23:03:37] [Server thread/INFO]: Saving worlds
[23:03:37] [Server thread/INFO]: Saving chunks for level 'world'/minecraft:overworld
[23:03:40] [Server thread/INFO]: ThreadedAnvilChunkStorage (world): All chunks are saved
[23:03:40] [Server thread/INFO]: Saving chunks for level 'world_nether'/minecraft:the_nether
[23:03:42] [Server thread/INFO]: ThreadedAnvilChunkStorage (DIM-1): All chunks are saved
[23:03:42] [Server thread/INFO]: Saving chunks for level 'world_the_end'/minecraft:the_end
[23:03:43] [Server thread/INFO]: ThreadedAnvilChunkStorage (DIM1): All chunks are saved
[23:03:43] [Server thread/INFO]: ThreadedAnvilChunkStorage (world): All chunks are saved
[23:03:43] [Server thread/INFO]: ThreadedAnvilChunkStorage (DIM-1): All chunks are saved
[23:03:43] [Server thread/INFO]: ThreadedAnvilChunkStorage (DIM1): All chunks are saved
Sorry for the long message but ye
thats why he looks like that
send me the video link then @true anvil
I highly doubt someone coded that
That code looks codable
ah, so i'm not the only one who does for loops using byte int comparisons
his is a little different from that lmao, I couldnt get mine working and thats what a friend told me to try
ima recode it
well at first i had what he had in the video
oh ive been in intellij for 4 hours
@dusty topaz sorry for the ping but how do you get ur status like that?
like the playing game
cuz mine is just PluginV6 IntelliJ IDEA
Anyone know why worldguard won't load? WG: 7.0.0, spigot 1.13.2
https://paste.helpch.at/irudacavay.css
java.lang.NoClassDefFoundError: Could not initialize class com.sk89q.worldguard.WorldGuard
its an intellij plugin
Name?
help with deluxe menus??
hey, my server is crashing i think every 22-24hrs, and idk why, here's the code: java.lang.NullPointerException: Exception in server tick loop at net.minecraft.server.v1_8_R3.LoginListener.d(LoginListener.java:155) at net.minecraft.server.v1_8_R3.LoginListener.a(LoginListener.java:151) at net.minecraft.server.v1_8_R3.NetworkManager.l(NetworkManager.java:312) at net.minecraft.server.v1_8_R3.ServerConnection.c(ServerConnection.java:145) at net.minecraft.server.v1_8_R3.MinecraftServer.B(MinecraftServer.java:875) at net.minecraft.server.v1_8_R3.DedicatedServer.B(DedicatedServer.java:378) at net.minecraft.server.v1_8_R3.MinecraftServer.A(MinecraftServer.java:713) at net.minecraft.server.v1_8_R3.MinecraftServer.run(MinecraftServer.java:616) at java.lang.Thread.run(Thread.java:748)
That doesnt tell much tbh
left_click_requirement:
requirements:
Item:
type: has item
material: 'SKULL_ITEM'
amount: 10
deny_commands:
- '[message] &cYou do not have enough heads.'
- '[refresh]'
how to check does player have any skull_item data:3
https://www.spigotmc.org/resources/one-way-blocks.8214/ does this plugin seem to be a virus?
Well, I think the obvious issue here is your poor connection: 4gdatawentto2g lost connection: Server closed ๐
Someone has stolen my plugin from bukkit, and is hosting it on Spigot, despite me already having a version of my plugin hosted there. On the offender's spigot plugin page, he literally links to my Bukkit plugin. What do? Note: I go by ExiFlame on Spigot and SailStun on Bukkit.
My bukkit plugin: https://dev.bukkit.org/projects/portablechests
My spigot plugin: https://www.spigotmc.org/resources/portablechests.77408/
Offender's spigot plugin: https://www.spigotmc.org/resources/portablechests.77473/
Report the resource
Okay I have
is there a way to self-host a server on a VPN?
What are my options for rendering 3d text/graphics? In Spigot, not existing plugins.
@rotund fulcrum Do you mean a VPS (virtual private server)? I believe with some VPN providers you can setup port forwarding, but it would come with the cost of added latency.
a
i don't wanna pay because i am broke
lol
@finite stag but technically yes i do mean VPS
@rotund fulcrum Try the Google Cloud. it comes with a large free trial, and it's pretty ok. You need to be quite experienced with Linux however.
I'm pretty sure you can find some tutorials online for it
Hello how can i remove the dupplicate nickaname pls ?
when i try
if(classement.contains(player.getName)) return false;
it's fix but
we can see only 1 nickname
@mental bone If you don't want duplicates in your collection, use something like HashSet
It wont allow for duplicated entries
Idk what you're showing me
The kills isn't updating?
I think what you're looking for is a hashmap
Idk what you mean
and it's always update
What's your intention here?
To track their kills?
Atm what you're doing is printing the user in the collection's name, and then printing the user who EXECUTED the command's kill's
So:
SomeGuyInHashSet + player.kills + " kills"
Is that your intention?
So "classement" can contain OFFLINE player kills too?
I believe the stats are binded to online players only, and stored inside the player's file.
So you might have to keep track of their stats yourself
classement it's scoreboard in french ^^
arf
Normally player.getStatistic (Statistic.PLAYER_KILLS) does it automatically
and no he can contains offline player kills too ^^
hi, am creating a server for friends
where do I put this command?
crazyenchantments.limit.#
Thank you so much
LEGEND
is there a way to use itemstacks cross class
You can send the itemstack object through a method to the other class, or make the itemstack object global and static and just call on it from other classes. Although the class its stored in would need to be also stored as a static instance. First step is more appropriate.
who can tell me what happened to my AAC plugin?
smh you dont need to put that in every channel
report it to the plugin author maybe?
you probably wont get their id, but I'd assume they include how to contact them on their spigot page
whats the best way to stress test a server? I'm coding a huge plugin and I wanna know how optimized it really is
best way is to create some scenarios in how it would be used. Startup the server that a profiler attached and maybe a GC profiler. Then lets say you want to stress test the commands, just make a whole bunch of fake players that runs commands from your plugin and monitor the usage of resources
incrementally increase the load until it crashes
only you know how to stress test your server since you are the one that made your plugin
@long crow I think your problem is that white square. Looks ominous.
wow, he really did post it in every single channel. Even the spigotcraft channel.
Lmao hacks Discord and posts in announcements XD
Judging by the amount of reflection exceptions it might be a NMS issue, like an incompatibility somewhere.
but it's hard to tell because we can't reference it to the source code
At the end of the day you post everywhere but the discussion thread for AAC....
https://www.spigotmc.org/threads/aac-advanced-anti-cheat-hack-kill-aura-blocker-paid.63195/page-481
Submit there, see what the developer can do about it.
how i can Bold and Give Color at text at the same time, im using
lore1.add(ChatColor.RED + ChatColor.BOLD + "Doubled" + ChatColor.GOLD + "Health Points & Damage");
ChatColor.RED + "" + ChatColor.BOLD +
try putting a + '' + between ChatColor
Yeah, you can use .toString() but "" isn't as long ;P
is does not effect the ChatColor.RED ?
"Doubled" Still red ?
Note that if you are using a lot of chat colours, just make a method
public static String toColor(String message){
return ChatColor.translateAlternativeColorCodes('&', message);
}```
ah can use the "&" too thanks dude
You should get in the habit of making a messages.yml and making all messages configurable .-.
nps
How would I go about giving a boss bar a namespaced ID
so my plugin can display multiple at once
Anyone here have experience with vault api?
If you do, how tf do I check the players balance?
Anyone got experience with luckperms api, how tf do I check a players group
import java.util.List;
public class Test<T extends Test<T>>
{
private List<Test> list;
public void foo(Test test)
{
for ( Test t : test.list ) // ERORR: incompatible types: java.lang.Object cannot be converted to Test
{
System.out.println( t );
}
}
}
why doesn't this compile?
Md_5 ore someone do spigot server exist for bedrock edition
No Nukkit is the closest thing
Nukkit ore bukkit
Where I found it
Nukkit, do plugins for spigot work on nukkit
well I found the answer https://stackoverflow.com/a/11007894/1586404
No it uses a similar but different API
it has it's own plugins on it's site
there is a signifigant community though
@hollow crystal
Thanks
no problem
@blissful verge to check for group just check for group.groupname permission
is anyone experienced with protocollib ?
i want to know which packet is sent when a player spawns
I know
@blissful verge https://www.spigotmc.org/wiki/hook-into-vault/
can... can you tell me?
well I remember spawning players with NMS and I used these packets in order to make them visible
PacketPlayOutPlayerInfo, PacketPlayOutNamedEntitySpawn
i think those are definetively sent when a player joins or spawns
there may be more
yeah according to the protocol wikia
it is player info
and then smth else right after
seems like named entity spawn
thanks
I use AsyncPlayerPreLoginEvent for getting information from database and make a class that contains item stacks from database but timing shows the event is causing delay. What should I do for it?
are you doing it async
I've tested with only database. It works without delay but whenever I use itemstack method it causing delay
Yes I do
I'm %100 sure about it
I only use AsyncPlayerPreLoginEvent for that
I was asking same thing. In paper it shows "playerloginevent". Isn't it weird?
well this is not paper -.-
well this isn't paper help
spigot still has timings v1 am I right
md5, why is the previous names tab from profile public?
because people should know who you used to be
md_5 do you have any idea of how the new RGB support color in text is going to be implemented into spigot
you just use the component api, its not hard
though it is possible to use the old-style API if you're really desperate
md_5, is event priority works with order in async?
yes, why wouldn't it
Oh okay. I'm trying to understand this issue -_-
don't ping dude
bruh use geysermc if u rly need spigot for bedrock
no one here uses bedrock normally this is the spigot server for java edition
its a bridge server
use it as a plugin for spigot
or run it standalone as a proxy
the config file is under 10 lines its very simple
to run standalone just do java -jar like you do for spigot
Ok thanks so much @quartz trench
np
is extending Inventories a bad idea?
is there a way to import authlib only?
Anybody know a good free lobby plugin for 1.8.8
Is depend option in plugin.yaml waits until the plugins load?
so what about loadbefore option?
I use depend for wait core plugin
Should I add it in core plugin?
that description confusing af
i wonder if any of these combinations would freeze the plugin loading
i actually see a good thing
load before vault
so i can listen on pluginloading
How would I softdepend on Vault? What I mean is if I have a field of type Economy in my main class and Vault is not on the server I would get a NoClassDefFoundError, how to prevent it and make Vault optional?
and implement the hook right away
so i won't fight any other's plugin race condition with vault
softdepend it
then just on enable hook or not
@fossil shoal Separate vault into a different class and only load that class if getPlugin("Vault") doesn't return null. Maybe a better way to check if its loaded, idk
and neither disabled
you can't reference vault via imports while softdepending, cause like you got, java will not find the class and error
Thanks, that's what I thought I would have to do @frigid ember
how are you debugging your plugin in idea?
:concern:
but if i go one by one it makes the server crash
lmao
because everything is basically stopped
and also, it's a pain in the ass to go through all those frames to get back to my code which i am trying to debug
just put the breakpoint at your code then
I am
or you can make your breakpoint enable only if another breakpoint (which doesn't need to suspend!) has been reached
And if I stay in a breakpoint for too long I get timed out
oh you're talking about getting timed out
also
can't really do much about that
darn
and after a while the server watchdog will kill the server when you stop the breakpoint or whatever
the horror
a field of mine just resets it's value for no reason
no other code i ran in between
the value is just reset
I run this
then this
After sendDepositMessage is executed shop.item.amount is 2
on the second run it resets to 1
int capitalPercent = (msgLength/capitals)*100;
Should get the percentage of a message which is capitalised.
And then check if capitalPercent >= requiredPercent
capitalPercent often returns numbers like 300, I know it's me being dumb here but maths ain't my thing xD Any help?
you want to do (capitals/msgLength)*100
I'll try that one sec
I really need to do an .yaml file in my resources folder for creating it in my server data?
I mean, if I want to make playerNickname.yml can I do it without creating it in the plugin project?
Strange, double capitalPercent = capitals/msgLength;, returns 0.0 when capitals is 1 and msgLength is 2
Is it good to use async, sync everywhere which includes normal bukkit library? (Like creating 500 new itemstack and give to player etc.)
Strange, double capitalPercent = capitals/msgLength;, returns 0.0 when capitals is 1 and msgLength is 2
try double capitalPercent = (double)capitals/(double)msgLength;
you only need to cast one of them
Hi. I have a question. How to get a name of clicked button?
Cheers, it worked ๐
Hi. I have a question. How to get a name of clicked button?
An actual button? or mouse button
is there any up to date multi world plugins for 1.8.8 around?
multiverse not working?
I really need to do an .yaml file in my resources folder for creating it in my server data?
I mean, if I want to make playerNickname.yml can I do it without creating it in the plugin project?
idk i havnt tried multiverse
@frigid ember yeah
you have it in ur project folder incase you write something to it first
like a custom config file..
Really? If you're coming to my server and I don't know your name, how I'm handling this?
but otherwise you can create it after
Hi. Can i somehow show 2 prefix with LuckPerm?
Like: [StaffRank] [PlayerRank] name
Eg.: [Admin] [Legend] name
Here is my "/lp user <name> info": https://imgur.com/a/4ZRVHZx
And what i really want is to show the two group/rank (default, moderator) prefixes, lik: [Moderetor] [Player]. I use two tracklist aswell for that
@ashen stirrup Stone Button have name "Teleport button" and i must get name o this button when player click
BlockClickEvent, check if the action is right click, check if the block is a stone button and then do whatever
@frigid ember i handle my custom file for players...
i listen to joinevent,i create a custom config file(wich will either create one or load the existing one) then i link it to either the player or a handle or smthng..
so final product is a HashMap containing player as the key,and the config as the value
if you dont feel confident enough rn to make a system i can happly post mine
@ashen stirrup I write plugin on paper 1.12.2 and didn't have this event
Is it possible to return to the original program flow after a breakpoint was hit?
Anyone know of any good tutorials for entity pathfinding. I want to make something follow the player like a parrot or wolf
use paper and you can do so without nms ๐
How does double jump work?
I have multiple classes that extend an abstract class that I want to load
I also have a Map of "human name" -> Class
is it a bad idea to use reflection to call a static method that loads the stuff I need for each class on that map?
Do u know about a npc plugeen for bungeecird
I need one to telepirt npc to tlepor trleports to servers
so put a plugin onto your lobby...
alot of servers do that..
citizens has the feature to execute commands when you press on em
i already created one in half n hours using all the tutorials out there
a packet based npc doing stuff based on right clicking it
but i removed it
because the guy didnt liked how it flashed in tab list ๐
I foud one
@vernal spruce Thanks for your proposal, but yeah, I've done something and, it is working well for now
Not on spigot
@frigid ember the api config is really usefull as it has the create/load
all in one
It needs citizens but it says a priblem occyred
check if citizens have any dependencies
@boreal tiger Why would you need reflection to call a static method?
I'm keeping a map of "human name" to class
I cant just call a static method on Class
I have a feeling this isnt a good design xD
I mean you can definitely call it, I don't know what it would do to your Map
I'm not sure what the Map is or what it does or when it's loaded
The configuration file would have say:
test1:
test2:
the map tells me what class I should use to load test1
You're using different classes to load areas of a configuration file?
yeah
Yeah that does seem like a bad idea
I dont load the config just the section
oh boy
Is it a YML file?
Honestly, I would have a ConfigManager class that handles loading the file, and pass a reference to that to the class constructor you are loading
yaml sort of "does that" by default
yeah thats what Im doing
I just pass the specific MemorySection that was already loaded onto each subclass
I get that, but why do you need the Map of classes then?
why not keep all areas loaded into memory?
they are already loaded into memory thats not the point
the map is so that I can know what class I'm supposed to use to load that particular section
tell from 0 how you handle the arena
yeah I get the section from the YamlConfiguration
so in the end what are you trying to achieve?
Yeah, and you pass the ConfigurationSection to another class. I've done that before, but I didn't need a Map to do it
the map is because I have different classes for each section
if I had test1 how would I know which class I'm supposed to use to deserialize?
You said they are all subclasses, correct?
The constructors don't
If you pass the configuration section to a constructor
The constructor for each class will get it
yes but how do I know which class's constructor I should pass that specific section?
thats why I have the map
The constructor should know what data it needs to load based on the config section name
So basically, the constructor is presented with all the data in the config section
mhm thats a good point but it still seems weird to pass everything onto each class
tbh im surprised you arent just straight up
creating a object to hold these
for each section
ConfigurationSection can contain a lot of info
But it can access it easily, so it's not wasteful to pass it
by that i mean having a hashmap with section as pointer(name) and a object ..
@silent veldt yeah I might just do that thanks
@vernal spruce the map was so that I knew which class to pass the config section
not to store the loaded stuff
No worries, I used the same setup for my YML block protection plugin
๐ thank you ๐
You specify what interactions are allowed, how much each block is worth, what interactions are allowed, etc. It just passes the same config section through it's subclasses and each one checks for and loads the relevant data
Good luck on it!
thanks ahha ๐
Whenever they use it, set the durability to Integer.MAX_VALUE
you dont need the spigot() part anymore
you can just do setUnbreakable in the itemmeta
1.8.8 :p
ah my bad xD
can i gate a command behind an op-level?
i have some economy plugins and since im admin i don't lose any money buying stuff, how can I turn this off?
am using epic spawners with Vault
vault? or like newtshops
frConomy is an economy plugin btw ๐
frShamelessPlug
why not?
it's not like i'm gaining anything anyway
i just recommend something that i know is good
Have any of you guys ever noticed this? https://imgur.com/a/4EPSnaJ - Removing light sources in unloaded chunks seem to cause some issues. The block is gone, but the light remains.
Nothing bad @tiny dagger just one of the best self promos ๐๐
Should i use the spigot-1.15.2-R0.1-SNAPSHOT.jar or spigot-1.15.2.jar
hey, can anyone help me with hashmaps?
I've set one up
but their is an issue
I have an itemstack as a key
I give a player the itemstack in game
an event listens for when they right click that item
the event then passes that item into a hasmap.get
but it returns null
even though they are the same item
I have checked, and when I use the item directly
it doesn't return null
is seems that their is a difference in the item the listener picked up, and the item that I set as the key
anyone have a solution?
You need to iterate through the keyset of the hashmap
And use ItemStack.isSimilar
Map#keySet
@formal nimbus
Use a for loop like you would for an arraylist
myHashMap.keySet()
But you want to get the value value associated with the key right?
yes i do
Right
what
ok
Yes you can
the entry sets are lists of pairs
What does the map look like
get image on clipboad
you need to be verified iirc
cntrl+v
that ContentsList wrapper may not be a good idea, seems a bit much. but anyways ill help with ur original problem
Map.Entry<K, V> entry : hashmap
having to do the List<Pair<ItemStack, Double>> every time
if key is similar to the itemstack, use entry.getValue() to get the contentsList
Yesterday a good guy help me for my pb in my scoreboards and i know how to fix it
soo...
?
00f I've been confused now
@wind dock in your bungee config the server lobby isnt defined as a server
player.getstatistic print only the statistic of player who write the command so
so if I have a similar item
i need to use the PlayerDeathEvent
wdym
and create myself the kilsl count
@wanton delta I called it hub :/
then in your bungee config, there is a priority list
it probably says " lobby"
change it to " hub"
@formal nimbus what do you want to get from the hashmap
Map<K, V>
K is your itemstack
V is your ContentsList
I'm trying to get a contents list
right
yep
so what do I do to get that?
Map.Entry<K, V> entry : hashmap.entrySet()
but V is contents?
entry.getKey().isSimilar(itemstack)
I don't have the contents
entrySet is the whole entry
learn generics ;_;
;-;
yea im just using V for just the example
they're essentials i'd say
you dont need to use V
not rly
right
replace K and V with whatever your map is