#help-archived
1 messages Β· Page 44 of 1
ok
What else can I use?
Just a normal runnable
at port your mc server
imma just use 25565 as port
okay thanks
do it everywhere
ye
enabled = on
yeah apply
restart server
well should i just give people the connection IP
the ip i use in server.properties
you need to give them your internet ip not local one
so...
yup
ok here we go
this is what you give people to connect with
is that ipv6 wut?
i haven't enabled mine :p
IT WORKED
grats
(ipv4)
lol
When building the API im getting this error at the tests
Failed tests: testAll(org.bukkit.AnnotationTest): There 1 are missing annotation(s)
Tests run: 1074, Failures: 1, Errors: 0, Skipped: 3
I've no idea where I'm supposed to look for the annotation that's missed and why its an error?
well
@tiny dagger is my problem chunk gens?
is the mine too big? @tiny dagger
how do I fix
badly made plugin
alright thank you
red check them out and find alternative
i told what are my possible bets
at what level efficiency would it stop being more effective
Does anyone know of a way to send a title to everyone?
without iterating through every online player
I'll do that if necessary, I'm just wondering if there's a cleaner way to do it
i mean you could do Bukkit.getOnlinePlayers().foreach(p -> /*code that sends title here*/);
but that does the same thing
its just nice to look at
Yeah, that's what I was planning on doing if there isn't a way to do so directly in the api
i doubt it, considering that vanilla works the same way
well like when you want to send a title in vanilla, you need to specify @a
its not really the code
its just the idea of how its done
I see
but even when u do broadcast message i think its iterating through all players
Oh okay, I guess I'll just have to do that then
@Override
public int broadcast(String message, String permission) {
Set<CommandSender> recipients = new HashSet<>();
for (Permissible permissible : getPluginManager().getPermissionSubscriptions(permission)) {
if (permissible instanceof CommandSender && permissible.hasPermission(permission)) {
recipients.add((CommandSender) permissible);
}
}
BroadcastMessageEvent broadcastMessageEvent = new BroadcastMessageEvent(!Bukkit.isPrimaryThread(), message, recipients);
getPluginManager().callEvent(broadcastMessageEvent);
if (broadcastMessageEvent.isCancelled()) {
return 0;
}
message = broadcastMessageEvent.getMessage();
for (CommandSender recipient : recipients) {
recipient.sendMessage(message);
}
return recipients.size();
}```
thats what broadcast message is doing, if youre curious
oh so it's literally just looping through
yep
Well it works so might as well
for a bungee cord network, how do I whitelist my bungee cord proxy? please @ me
heyyyy. Spigotmc will not send me a verification email despite me requesting one over and over. My spam is also empty, I am on the correct email. SpigotMC says that making a new account is bannable. This is infuriating because a page I would like access to requires verification.
Is there any way to fix this ?
What email service are you using?
give it some time and check again. the server may be slow
only gmail
Then yea, give it some time. Someone else was also having issues a few days ago
I requested the verification yesterday also
Unless maybe that was you having issues in here lol. Don't remember who it was
I just joined this discord. It was not me.
So yea, I'd give it some time π
They were using gmail as well but it eventually came through
If it's been like 6 hours and you still haven't gotten it, you can contact support@spigotmc.org. Don't know the response time on that email but that's the appropriate place to contact
Because it's premium, we can't do that
Hell, wouldn't do it if it were free either. Not really great to distribute someone else's software without their permission
Hey, does anyone perhaps know how/where the pathfinder/targetselector of mobs calculates whether it attacks a player/entity or not? I want my custom NMS mob to target players through walls/without having line of sight, however I was looking through the source and it's kinda messy and not documented and I'm confused.
Looking at this specifically:
goal
that's just looks at it
or follow
if i remember correctly
you should look at zombie for example
I've got a big problem with my server. Someone DM me pls.
That code is literally from the EntityZombie class. I want the NMS mob to target players through walls without using gimmicky for loops and distance comparing.
I wondered if the flags passed for PathfinderGoalNearestAttackableTarget did anything, but they don't sadly.
i doubt mc does it differently let me see
I do not know if this is the right place to ask but I am looking for a plugin. I am trying to find a plugin that lets players do a command like /helpop but it lets staff claim the request. I have seen it before but I have not found a plugin for it.
@ocean coral i doubt that you are gonna get an answer
ok
I do believe the root is here:
so uhhhh
I think i want to reach the setGoalTarget part
i found something too
1.15
wither tho
i just remembered i had to do a custom wither and i had most done already
right
is it just me or does that code look super unreadable?
oh its decompiled
this looks better
you got used to it that's all
I dont mean the colors
look at the code
its different
I have the original code (so decompiled MC + CB sources), you have decompiled CB
you can see that the breaks are very different
It's the white theme
as the compiler inlined the continue -> break thing
And you know it
do you really not see that the actual code is different? lol
every developer should have a workspace where he can read spigot code
as you can use your IDEs tool to jump to declaration and find usages etc
what can i say i got attached to jd gui's search function
yeah but surely, your IDE has a better one, lol
i noticed
Inorder to jump to references you need the build tools decompiled source though
Which doesn't contain lots of classes
I dont know how spigots dev workspace looks like
I use the fork that shall not be named
and we have a mc-dev folder
where we have the other classes
so it works as expected
work/decompile-somehash
Changed files are in CraftBukkit/src/ or Spigot/Spigot-Server/src
easy fix guys
With the Java class itself from java.lang.Class. Is there a way to check if it is a instanceof another class? been trying to figure out the method I may need to call to check if it's a instanceof to another class.
Okay so I finally got a custom build of the API running but now weird things are happening.. I was trying to check if a block was an instance of Chest but BlockPlaceEvent.getBlockPlaced() is returning a CraftBlock now?
!CraftBlock{pos=BlockPosition{x=223, y=64, z=111},type=CHEST,data=Block{minecraft:chest}[facing=west,type=single,waterlogged=false],fluid=net.minecraft.server.v1_15_R1.FluidTypeEmpty@c9413d8}
Wtf? I'm really confused
Michey, you should get nearby chunk or world at least
Im stupid ignore me
That's gonna be expensive
(just wait until james learns that all Blocks are CraftBlocks
)
Yes
@Override
public void setChestAnimationOpen(Player player) {
CraftPlayer craftPlayer = (CraftPlayer) player;
getTileEntity().startOpen(craftPlayer.getHandle());
}
Okay so you can do something like this
To get the Chest to open
And it works perfectly
List<String> getCompleteCommands();
why?
what does it say when you hover over the red bit
says should Object not String
Open chests! π
have you imported the right string?
java.lang.String
What List are you importing? java.util.List or java.awt.List?
Java.util
So at that point, clear your IDE's caches or restart
@subtle blade
I have a problem and I can't find a solution, can you help me?
It is, though the bot's been hit or miss
If you have a question, please just ask it. Don't look for staff or topic experts. Don't ask to ask or ask if people are awake or available. Just ask the question to the channel straight out, and wait patiently for a reply.
There it is
@crimson sandal am I actually stupid and missed the startOpen(EntityHuman) method in TileEntityChest?
Choco can you talk to me about my problem privately?
just speak here
@subtle blade maybe you looked over it because it required a EntityHuman π
void setChestAnimationOpen(@Nullable Player player);
What method name would make more sense?
You making a PR?
restarted ide, resetted cache nothing changed π
I would like to make a PR yeah, since it's way simpler than I thought and doesn't modify existing methods
james, I would avoid using startOpen() because that changes the viewer count on the server. I would say instead call
protected void onOpen() {
Block block = this.getBlock().getBlock();
if (block instanceof BlockChest) {
this.world.playBlockAction(this.position, block, 1, this.viewingCount);
this.world.applyPhysics(this.position, block);
}
}```
Especially because we also don't want to call a RedstoneChangeEvent
It's a visual change
That wouldn't work though because this.viewingCount would still be 0?
If possible, even just mimicking that call to playBlockAction()
No but playBlockAction() accepts viewingCount. We can set that to 1 for open or 0 for closed π
Oh I see, what if someone wanted to trigger the redstone event though?
Can you help me please!
just tell your problem
He can help you exit the server if you keep acting like this o.o
@frigid ember You should actually state the problem/ question
Like the method is simulating someone opening the chest without displaying an inventory to someone?
So the implementation in CraftBukkit can be as simple as
@Override
public void setOpen(boolean open) {
getWorld().getHandle().playBlockAction(position, block, 1, open ? 1 : 0); // to open
}```
Obviously pseudo because not all of that is available but you can get it from the implementation
You get the idea though
ask your question
I want a plugin for my server called: shopkeeper
Which are for trade ect.
But I can't find it on Spigot's page!
then it doesn't exist
Can you pass me the link or something from that plugin so I can use it? Thank yo
do you read or just keep typing
Not really a help question, but is there any idea how rgb colors will be handled for ingame? Will &x allow rgb values? or is this yet to be discussed? I'm so excited for this!
Actually if you wanted to get even more specific, you could have that open state be per player
https://dev.bukkit.org/projects/shopkeepers/files @frigid ember
what are you even talking about
this.server.getPlayerList().sendPacketNearby((EntityHuman) null, (double) blockactiondata.a().getX(), (double) blockactiondata.a().getY(), (double) blockactiondata.a().getZ(), 64.0D, this.worldProvider.getDimensionManager(), new PacketPlayOutBlockAction(blockactiondata.a(), blockactiondata.b(), blockactiondata.c(), blockactiondata.d()));```
Spanish people say that this plugin is spigot, but it doesn't appear to me!
That's what vanilla does right now. You could send that PacketPlayOutBlockAction in the implementation directly instead
That way you can do it per player
aver I have my survival server and I want the spigot trade plugins
But it doesn't appear to me and people say it's spigot!
But I can't find the plugins, I can't download it, can someone pass me the plugin link please?
https://dev.bukkit.org/projects/shopkeepers/files @frigid ember
please!
But it's from the Bukkit page! It is not from Spigot and my server does not let it install
Spigot is bukkit's fork
you can use almost every bukkit plugin
just use it it will work okey?
No it doesn't let me install it on spigot server because it is from bukkit!
what
what
thats not how it works
tbh it probably builds off spigot
just download...
just uses the bukkit website
they are same files.
Please speak to me, I use a translator because I don't know English and I can't speak quickly, sorry
@subtle blade hmm I can't think of a reason why you would want it per player though?
Honestly, agreed lol. Sticking to the block action is fine then π
and, choco still same π
Then I have no idea. Could be your surrounding code is malformated and causing issues
its in simple method
Well thanks for the help but I will not be able to do anything since my server does not detect the Bukkit plugins
Choco
thanks and see you later!
dw guys im workin with him... i can speak some level of spanish :D
gracias
feliz navidad
Is there a way to fix Firefox support for Spigot?
Firefox support?
i can get on the website just fine
every so often the Website decides to screw up it's html and ccs for the site.
Noob question, how can you turn on keepInventory for all players by default? Is that a Spigot plugin?
/gamerule keepInventory
That only changed it for me though
Also, I am I right in that you have to commit every change you make so that applyPatches.sh will recognise them? Because I have like 12 commits just testing one method...
@subtle blade ? π
wow ive never helped someone in spanish before this is an experience
but i think its workign
@ocean spire normaly if you use /gamerule keepInventory true (with correct syntax) it should turn on for all players ... the gamerule affect all the players by default
Okay, I'll give that a try, thanks!
You shouldn't have to touch applyPatches
applyPatches takes the patches from nms-patches and applies them to source files in src/main/java/net/minecraft/server
You'll want to makePatches most likely
Hmm well I've been git committing then running applyPatches.sh which will copy the modified classes to the Spigot Module from Bukkit and CraftBukkit ?
How else are you supposed to get the modified classes copied to the Spigot module?
Not sure I understand
You make changes in CraftBukkit/src/main/java/net/minecraft/server where necessary, then run makePatches
A patch file will be created in nms-patches (or updated if it existed already)
You include that in your pull request
How often do new versions of spigot get released through buildtools and what not
I haven't made any changes to NMS code though, it's literally just org.bukkit.block.Chest and org.bukkit.craftbukkit.block.CraftChest
So I made the changes in the Craftbukkit and Bukkit modules, but then obviously those changes were not in the Spigot Module? But when I run applyPatches.sh it copies the changes to those classes into the Spigot API and Server modules?
Ideally you'd hold a variable of your enum type
Can just change it as your rounds progress
@subtle blade sorry to only answer now, what did you mean by that?
How are you handling your rounds now?
@subtle blade I have an enum Enemy(EntityType type, int firstWaveNumber)
When a new round begins I iterate over the enum's values and check if firstWaveNumber <= currentRound
but this seems like a weird design
especially the enum
I also just thought about storing in my config something like
enemies:
- ZOMBIE:1
and then I could load this to a map
and then I could use EntityType#valueOf
would this be a better design? or do you have something in mind?
I would still need to check on every round the map π€
I guess I could use a MultiMap of Integer and List of entities to add in that specific round
hey, this is a stupid question, but how do i update my spigot to the latest version? been getting an error message saying the build is outdated for the past couple days, but haven't looked into it since server still ran correctly. I saw on https://hub.spigotmc.org/jenkins/view/RSS/job/Spigot-RSS/ that a new spigot build has been made, but my brain too smol to know how to download it from there
?bt
The home of Spigot a high performance, no lag customized CraftBukkit Minecraft server API, and BungeeCord, the cloud server proxy.
lol
but i have the latest version from there
Latest version of BuildTools != Latest spigot
Spigot is updated 20x more often than BuildTools
so I can have the latest buildtools and it not compile the latest spigot since spigot has gotten a new build since then right?
BuildTools is updated independently from Spigot
Spigot may receive an update but you don't need to update BuildTools
to get the latest version of spigot u need to run buildtools
and usually they are mutually exclusive
latest version of buildtools usually isnt required for latest version of spigot
So long as you run BuildTools, it should build the latest of the version you need
(though BT typically needs an update for major versions of the game)
ahh gotcha ok, ill try that
usually
@subtle blade I have an enum
Enemy(EntityType type, int firstWaveNumber)
When a new round begins I iterate over the enum's values and check if firstWaveNumber <= currentRound
@boreal tiger My thought here would be to have a staticEnumMap<EntityType, Enemy>(in the Enemy enum) so you can quickly fetch by EntityType, then just getFirstWaveNumber()
Have a static method, Enemy.fromEntityType(EntityType), to get an Enemy for you
mhm, I wont know which entitytype to look for though. I need the other way around. A map of round number -> EntityType
Oh, I see
should I use a MultiMap?
Yes. Sounds like a good time for a MultiMap to me
Actually not even
List<List<EntityType>>
I know that looks ugly as shit, but lists have indices so the map is unnecessary here
yeah it does look a bit shit hahaha, but makes sense π
wait what if I want to say
keep the entitytypes as they are in round 2
but add something new in round 3
oh wait nvm I can just use List#add
π€¦ββοΈ
I'm still new to all this and have only been running a server for a few weeks, so I appreciate the help! It gave me the latest spigot and I'm all good now thx ^^
static is probably fine, but encapsulate it, yea
static getter and whatnot
I have access to an instance of the class where the map is so I can just have a normal getter I think
You're iterating over these List<EntityType> right? If you're #contains() checking, an EnumSet is better
for List<List<EntityType>> I would be doing entityRounds.get(currentRound) and checking if there's a new entity to spawn
Yea, so iterating. ArrayList will suffice
right π would the performance difference be significative if I used a MultiMap? i know its unecessary but it just looks slightly better hahah
Maybe. I mean 2 things. (1) the Integer indices would be boxed, and (2) you're still going to have to define MultiMap<List<EntityType>>
mhm, wouldnt it just be MultiMap<Integer, EntityType>?
np ahaha
it just seemed weird that I would have empty indexes in between in the List<List<EntityType>> solution
or is that fine?
I just find the whole implementation to be kind of awkward is all
the round implementation?
the Map wouldnt contain every entity, it would only contain the EntityType to be introduced at that specific round
mr choco, approve my resource
cool, thank you π
Pair π
Mr Choco Bring Me Money
please, if you have the link on hand, grace us once more
Bless this Discord with your voice
how can I say no to a man with such amazing montage skills
tyty
even better, there is a HashMultimap so values would behave like a set instead of a whole listπ
There it is, gents
lmao what is that hahaha
art
hahahha wtf lmao
I hope long after the time of Man is gone and the ayyliens find our planet, they'll still be able to hear the echoes of this song playing in the wind between the valleys
some people believe that seed ships might be a way to preserve mankind, but what is mankind without art?
LMAO I forgot about the "APPROVE IT NOW"
I say replace those seedships with ships made with the sole purpose of blasting my discography
how dare you forget
Okay so I think I'm ready to make a PR just need to wait for my Stash account to be activated π
@subtle blade mhm if I wanted a certain function to deal with nms to be applied to the entity, would it be a bad idea to have a Consumer in the Enemy enum?
I really like how I couldn't even maintain the tempo for 20 seconds
lmao
that's the hallmark of quality
No, that's fine, Attlantiz
π thanks
man some day I need to remaster this
or make a new song
maybe a cover of tachyon, might be easier
which is better; SuperbVote or Votifier
Votifier imo
Votifier is an API
Yea. You need both
This is golden crate plugin
how to fix this, why the apple is in the first slot?
Cause why not
the apple is the default display item for any reward
you haven't changed the display item
does this plugin have a support discord
I change the reward to emerald block, it suppose to be in slot 29
golden crates?
does this plugin have a support discord
no :((
yes?
sad
yes?
yes
oh wait nvm
if the reward is supposed to be an emerald block in slot 29
have you edited the display item for the slot 29 item?
in-game or via config?
if in-game i have no idea
if config then reload the plugin
In game
Anyone here good with the bungee API? How do I stop the bungeeserver. I have a custom plugin that uses the MYSQL Connector and I would like to stop the server if MYSQL Connector fails to connect to the MYSQL Server.
I have tried to call getProxy().stop() but that does not seem to be working
Any suggestions
getProxy().stop(); // Does not work
ProxyServer.getInstance().stop(); // Does not work
Nevermind I am stupid it works
@keen compass was able to fix it IntelliJ is dumb and doesnt update your artifacts with the current shaded maven plugin until you remake it
public List<String> getSections(String primary, String table) {
List<String> sections = new ArrayList<>();
PreparedStatement pst;
ResultSet rs;
try (Connection connection = getNewConnection()) {
pst = connection.prepareStatement("SELECT * FROM " + table + " WHERE " + primary + " = ?");
rs = pst.executeQuery();
while (rs.next()) {
sections.add(rs.getString(1));
}
} catch (SQLException ex) {
ex.getStackTrace();
}
return sections;
}``` Can anyone help me? Im trying to make SQL like a yml config for a friend whos new to coding and idk why this doesnt add anything
use prepared statements eee
well you don't set ?
in the prepared statement
so it is literally checking for primary = ?
i'm going to use that as an excuse for why i thought you weren't using prepared statements
so, use prepared statements (β―Β°β‘Β°οΌβ―οΈ΅ β»ββ»
Im trying to get all the PlayerUUID's in my playerdata table
you should probably also change the primary to a ? though
and then set both
i think it is valid to do WHERE ? = ?
im not sure what to set the first one to?
primary, and the second the string uuid i assume
Yeah but im trying to get a list of all the uuids
then just SELECT * from table
That loops through the primary keys?
If you have a player with an open inventory, can you actively change it, e.g there's a Book with "hello" on it, could you then change it to say "goodbye" or do you have to close the inventory, change the item, set it in the inventory and open it agian
you can update the itemstack in the inventory
Great
Im actually kinda liking SQL now that ive got a better understanding lol
hey can anyone help me with Placeholder API
Anyone got a full cosmic Test server plugins pm me if u do !!!!!!!!!!!
If youβre gonna have an inventory specific to a player while other players also have it open, would you just have a public Inventory rather than a public static Inventory
e.g an inventory players can put items in
A public static inventory is always going to be the same, so static usage should/would be incorrect.
Regardless you created a new "Inventory" for a player anyways
So it should be public Inventory
If you just want 1 inventory, but nothing specific to a player, you could use a static reference then, as that inventory would be the same for all instances of the class
You could always use it like this as well:
public final Inventory inventory
This would ensure you'd use the same inventory for the player if you structure your classes properly and reference them right.
What do you mean?
You don't have to import it if it shares the same package folder
Someone knows how to compile multiple java files into jar packages and use IntelliJ
It looks shady
lol no obviously not
(no pun intended)
Making a little plugin that puts the players head in a gui, but it seems to take a couple seconds for the players head to load. Any ideas on how to fix this?
How do I create a report on spigot if I cant ask for Fourm staff help here.
Oh, I think they just mean to use the forum for issues with the forums.
Scroll down to the bottom of any page on Spigot and look for "Contact Us"
Is it possible to make multiple lines in an ArmorStand or do I need to make another armor stand right below it?
you'll need another armor stand
if you are making floating text though, I suggest using the HolographicDisplays api as it supports clientside stands as well :)
if you want a link just let me know
it's pretty easy, you make use of the Hologram class
you can add multiple lines, and there's VisibilityManager to change which players can see it
it basically spawns a small ArmorStand with the marker tag (so there's no hitbox) and as far as i've tested it isn't actually there
I use it for mob nameplates and informational stuff personally
Cool, thanks!
as far as i've tinkered with it there's only one really annoying limitation, and that is you can't get the text from the armorstand once you set it
ye!
ouch, thats a bit annoying
why would that even be though
seems like it'd be easy
i have Absolutely No Idea
if youre interested i wrote a really really really bad and terrible method to get the line as a String
oh shit
wrong thing
public static String NameFromHologramLine(HologramLine line) {
String name = "";
/* necessary atrocity that should have never happened */
String HoloText = line + "";
HoloText = HoloText.replaceFirst("CraftTextLine \\[text=", "");
if(HoloText.endsWith("]")) HoloText = HoloText.substring(0, HoloText.length() - 1);
name = HoloText;
return name;
}
this godforsaken thing
the screenshot
not thaat bad
that code is
singlehandedly
well
i'm actually sure theres something worse somewhere
it reeeeally shouldnt have happened
who am i to talk tho i make some of the worst code known to man sometimes
o hecc
i dont use an obfuscator do u
yeah no worries, my plugin isnt public but its like. a blighted hellscape of statics
nah
yeah
i only release the plugins i think are useful to at least 10 people or took me a long time
i guess if i were to make a public plugin that was paid maybe but i dont think i'm a good enough developer for that lol
the one i'm writing is for an mmorpg thingy
nope, just need to add it to your build path and plugins folder :D
yeeeeeeeeee its convenient :)
PlayerInteractEntityEvent and PlayerInteractAtEntityEvent is not Working for me. Why?
https://hasteb.in/agejokah.java
Event is added to PluginManager
add a debug message before Player p = e.getplayer(); to see if you are even getting the event.
@golden vault Yes i am getting it
ok add one in the first if block
Thx for helping i found my mistake
nice
Is it possible to make a plugin which makes there be a block you right click to remove every lets say stone around a 3x3x3 area and after 5 seconds puts them back?
wut.
I do not understand the grammar.
Are you asking if you have a block in your hand and right it it'll remove 3x3x3 and you use a bukkit runnable that gets the blocks removed and replaces them?
Like you have a block which you place and right click and it will remove 3x3x3 stone for 5 seconds
Is there a way to make a command like "/enchantitem [enchant]" which detects what enchant your item youre holding has and then gives +1 level to that?
Can anyone help me fix the error of Incorrect DOUBLE Truncating?
Im not really sure how to fix it lol
I believe i may have fixed it
im just dumb lol
I need help, so I'm making a pickaxe that mines in a 3x3x1 are according to which direction the player is facing, I have rotation calculated and it works, as well I have tested the code for the 3x3x1 separately and it also worked, but how would I implement the code for 3x3x1 into my rotation checks?
pBlock.getRelative(BlockFace.NORTH);
pBlock.getRelative(BlockFace.SOUTH);
pBlock.getRelative(BlockFace.WEST);
pBlock.getRelative(BlockFace.EAST);
for(int x=-1; x<=1; ++x) {
for (int y = -1; y<= 0; ++y) {
for (int z = -1; z<= 1; ++z) {
pBlock.getLocation();
currentblock = block.getRelative(x,y,z);
currentblock.breakNaturally(explosive);
player.playSound(player.getLocation(), Sound.ENTITY_GENERIC_EXPLODE, 30, 0);
}
}```
^^^this is the code for 3x3x1 hole
if (rotation < 0) {
rotation += 360.0;
}
player.sendMessage(Double.toString(rotation));
if (0 <= rotation && rotation < 22.5) {
player.sendMessage("North");
Block north = block.getRelative(BlockFace.NORTH);
} else if (22.5 <= rotation && rotation < 67.5) {
player.sendMessage("North East");
Block north_east = block.getRelative(BlockFace.NORTH_EAST);
} else if (67.5 <= rotation && rotation < 112.5) {
player.sendMessage("East");
Block east = block.getRelative(BlockFace.EAST);
} else if (112.5 <= rotation && rotation < 157.5) {
player.sendMessage("SouthEast");
Block south_east = block.getRelative(BlockFace.SOUTH_EAST);
} else if (157.5 <= rotation && rotation < 202.5) {
player.sendMessage("South");
Block south = block.getRelative(BlockFace.SOUTH_EAST);
} else if (202.5 <= rotation && rotation < 247.5) {
player.sendMessage("SouthWest");
Block south_west = block.getRelative(BlockFace.SOUTH_WEST);
} else if (247.5 <= rotation && rotation < 292.5) {
player.sendMessage("West");
Block west = block.getRelative(BlockFace.WEST);
} else if (292.5 <= rotation && rotation < 337.5) {
player.sendMessage("NorthWest");
Block north_west = block.getRelative(BlockFace.NORTH_WEST);
} else if (337.5 <= rotation && rotation <= 360) {
player.sendMessage("North");
Block north2 = block.getRelative(BlockFace.NORTH);```
^^^This one is for rotation
can anyone help?
i have a bungeecord server and players with alot of pick are getting timed out how to remove timed out kicks and let them play with alot of ping?
lol I guess no one wants to help
Hi Everyone is there a plugin which removes the "too expensive" limit in an anvil?
hi guys with github actions how are you building your plugins that use spigot itself rather than spigotapi
it takes me a long time to deploy due to the entire buildtools pipeline
Does anyone know what the equivalent of this is in 1.12
Particle.DustOptions(Color.RED, 1)
I developed a plugin in 1.15 and am trying to make it compatible with 1.12 but am getting an error on this
@sage flame you need to enable speed or something then you can use offsets xyz for rgb
so does that mean the offset cannot be used for the random placement?
hmm I can't seem to get the offset to work for rgb
world.spawnParticle(Particle.REDSTONE, player.getLocation(), 50, 0.5, 0.5, 0.5, new Particle.DustOptions(Color.RED, 1));
^1.15 code
world.spawnParticle(Particle.REDSTONE, player.getLocation(), 50, 1, 0, 0, 1);
^1.12 code
this is what happens in 1.12
red component is set to 1 right now
Hi, we have a server with spigot 1.15.2 and we want to build some advanced redstone machines, but they keep breaking. After doing a little research I discovered spigot sometimes moves redstone ticks to the next server tick so the performance suffers less, but this breaks the redstone contraption. Is there some way that I can prevent this from happening? The server is strong enough for that to be disabled but I simply don't know where to disable it.
i dunno, you have to experiment a little
Guys, can you help me out? Do you know why "ConnectionHandler" is so high? 600%, this is my timings https://timings.aikar.co/?id=43ee9f163c814b269a1222c3ce484cfb
someone spams commands?
or too many registered?
π€
oh
connection
it can be some sniffer doing the dirty
it is a PreHub server, where people simply enter and register
Is there a way to know which Mojang release ultimately becomes the basis for the BuildTools output? I'm fighting with a bug that was claimed to have been resolved by Mojang in 20w11a and their stated solution doesn't appear to apply in a freshly-built spigot-1.15.2.jar
i would look at protocollib and go from there
@tiny dagger I don't understand, where should I look?
ProtocolLib? what exactly
on the plugins that depend on protocollib
well you can try
Ok
is there a way to declare the plugin version in the code?
rather than the plugin.yml
@mossy osprey spigot 1.15.2 is build on mc 1.15.2
20w11a is part of the 1.16 snapshots
So it will reach spigot with the 1.16 release of mc and spigot
Spigot doesn't distribute snapshot versions, they are only used for testing in the #spigotcraft server
So you could try reproduce it there if you want
That answers it exactly then, thank you.
well you can try
@tiny dagger Now it is, https://timings.aikar.co/?id=c76e468d51504d50b846f53dc0421dca. it went down, really a lot but that still 120% do you know what it depended on?
Looks like its time to generate some superflat region data in single player, woo.
Hi, we have a server with spigot 1.15.2 and we want to build some advanced redstone machines, but they keep breaking. After doing a little research I discovered spigot sometimes moves redstone ticks to the next server tick so the performance suffers less, but this breaks the redstone contraption. Is there some way that I can prevent this from happening? The server is strong enough for that to be disabled but I simply don't know where to disable it.
@clear lark spigot doesn't do such a thing, the internet is full of misinformation. If your redstone broke it's a bug
@frigid ember if you aren't running spigot this isn't the place for support
@frigid ember that's probabily linear lag π€
Mh.. ok
@fleet crane it does not break in vanilla, but it does on the server
@frigid ember if you aren't running spigot this isn't the place for support
@fleet crane Ok, sorry
you can nitpick your plugins to see if it goes down
What is it "nitpick"?
You should make a reliable and simple test case and then open a bug report @clear lark
Okie
@frigid ember remove one by one till it goes down
@frigid ember someone who selects every little thing and usually complains about it
or that
@fleet crane Ilmango explains it here and he builds these machines so i think he knows whats going on; https://youtu.be/2sCEsghQI6w?t=452
- someone already made a fix for it in 1.7 but i dunno how to apply this https://github.com/PaperMC/Paper-1.7/commit/990d14df93f45e95eefabff10985ea75c26d8971 (yes this is paper but it happens on both normal spigot as paperspigot)
does anyone knows if it's normal for npcs on first server start to be all steves? π€
Do i have to do some pre cache
1.7
well thats something I havnt heard in a long time
@tiny dagger mojang services be having issues the last couple days/weeks
but ye, caching is a good thing, there are events to catch profile lookups
if i want to save a inventory to yaml, should i just do: data.set("name", myinventory);
its only used for the plugin to write/read
that would be the way yes
i am having issues with group manager says essentials is not required but its not working i am trying to make a server that doesnt require essentials but issue is it shows my name as <> no group tags no permissions do i need a chat formatter if so any you guys recommend that support 1.15.2
?
but i'm not sure if inventory is serializable or the itemstack or both
Player player = (Player) sender;
String playername = player.getDisplayName();
if (args.length == 0) {
String eia = plugin.getCustomFileConfiguration().getString("error-in-args");
player.sendMessage(ChatColor.RED + eia);
} else if (args.length > 0) {
StringBuilder sb = new StringBuilder();
for (String arg : args) sb.append(arg).append(" ");
String messagetobs = sb.toString();
Location location = player.getLocation();
int messagerange = plugin.getCustomFileConfiguration().getInt("message-range");
for (Entity e : player.getNearbyEntities(messagerange, messagerange, messagerange))
if (e instanceof Player) {
((Player) e).sendMessage(ChatColor.LIGHT_PURPLE + playername + " " + messagetobs);
}else {
player.sendMessage("No one read the message");
}
}```
So I want to send the message "no one heard you" if it wasnt a HumanEntity but.
it sends the msg for each non human entity
[02:24:38 INFO]: [ChatEx] Latest version found online is 2.4.0v37
[02:24:38 WARN]: java.lang.NumberFormatException: For input string: "240v37"
[02:24:38 WARN]: at java.lang.NumberFormatException.forInputString(Unknown Source)
[02:24:38 WARN]: at java.lang.Integer.parseInt(Unknown Source)
[02:24:38 WARN]: at java.lang.Integer.valueOf(Unknown Source)
[02:24:38 WARN]: at de.jeter.chatex.utils.UpdateChecker.shouldUpdate(UpdateChecker.java:138)
[02:24:38 WARN]: at de.jeter.chatex.utils.UpdateChecker.checkUpdate(UpdateChecker.java:117)
[02:24:38 WARN]: at de.jeter.chatex.utils.UpdateChecker.access$200(UpdateChecker.java:14)
[02:24:38 WARN]: at de.jeter.chatex.utils.UpdateChecker$UpdaterRunnable.run(UpdateChecker.java:165)
[02:24:38 WARN]: at java.lang.Thread.run(Unknown Source)
[02:24:38 INFO]: [ChatEx] Update found!
says its latest but shows there is an update
did u get it from spigot?
yes i got it from: https://www.spigotmc.org/resources/chatex.71041
works tho so its ok i guess
guys, how can I declare the version of my plugin in the code as opposed to the plugin.yml?
Why avoid essentials it pretty much became a must for servers..
You cant rly
There is no way to auto update plugin.yml..
i know theres a way of registering plugin commands at runtime with reflection for example
Commands can be done multiple ways but plugin.yml gets built by ide
Also the server uses the plugin.yml for guidance..
avoided not only essentials but worldedit and worldguard i wanted something different, essentials is way overused and seems like every server has the same base wordledit worldguard essentials. i manage to find a replacement for most basic commands but the point is to stand up and be different
you know what i mean
you can have a plugin loader that loads your plugin manually where you switch your version so yeah.. you can't really
the problem is that my plugin is implemented on 5 different platforms 3 of which use plugin.yml. Ive got a plugin meta class in the common module that gets the version string from gradle
@junior acorn its because of its usefullness
and i find it really annoying that i need to go to 4 different files
to change the version, when i should just be able to change it from my build.gradle
you can replace plugin.yml insides with a placeholder and maven i think π€
so then whats the issue
with blossom
then id need to put that code in the build.gradle for each implementation
the blossom code
whats so hard about just reading from a main class?
Doesnt most plugins run multiple jars inside?
it's md_5 themself holy crap i never seen them in person
the common build.gradle cant touch files in other modules
i think you can try modifing the plugin description π€
I just use maven to set my version in places I need the version to be updated. Then that just leaves me updating in the pom in one place only π
replaceable strings IN java code is shocking
anyone know of a plugins to replace /mail i found a command to replace /r /replay and /msg but still having trouble finding a mail replacement
whats shocking is that plugin.yml still exists
how do you specify where your javaplugin path is?
Well, I haven't come across an instance that I couldn't dynamically change the version using maven, even when using multiple modules
with a @Plugin annotation
I don't use gradle so not entirely sure how gradle does it
works well on sponge on velocity
I mean.. plugin.yml exists for guidance reason..
when it comes to basic plugin meta like name, its debatable. But when it comes to registering commands, theres no wonder people have come up with hacks to register commands with reflection
why would you restrict people to only whats in a yml file, when you dont need that at all
just register the command in your code
well I literally linked you to a library that uses annotations to generate plugin.yml
does a server owner care whats inside though?
the issue is that most ppl that register commands via code, dont do so properly
but your premise seems to boil down to 'I think annotations are cooler than yaml therefore your API is wrong'
eg not registering into bukkits help map
@hoary parcel spigot guide where? REE
my guide would be "use ACF", lol
damn
Can I ask help related to intellij?
@fleet crane thank You very much i am renesys
ye, sure
i mean, why would you even think about making an additional file outside of java when theres such a thing as annotations?
Can some1 setup votifier for me in bungeecord?
I'll pay him
i get that its a valid solution to the problem, but annotations dont require you to specify the main class
or commands
I have used intellij debugger, it starts up the server perfectly but it doesn't add the plugin to the server
because you can read the file before you can read the annotations
its been quite some times i opened a jar file to read its plugin.yml
how would you find the main class? class path scanning? π
to see commands and such
yes
thats horrible slow
not rlly
@cold wharf well, you need to copy it properly to your plugins folder
IJ just starts the server
i guess if it works,it works
you also forget how old bukkit is
@hoary parcel how?
well, you can move it manually
or use a maven plugin
or a bash script
or whatever
I mean you meant by moving the plugin or the server file?
jeez my laptop went turbo mode with chrome and discord opened
classpath scanning is slow
it would add seconds to the startup time of a large server (which wouldve been much more significant when the server started in seconds)
https://discordapp.com/channels/690411863766466590/690470011382267904/703899165419110451 can anyone help me out?
plugin.yml best way confirmed
definitely not seconds
@cold wharf you need to put your plugin jar into the plugins folder
i start a sponge server with several plugins in under 1.5 seconds
if you think about how standalone java applications run
Oh oki let me try
aaawww yes, hes a sponge guy
@hidden glade rethink your code
they have a plugin.yml equivalent as META-INF/MANIFEST.mf
you need to add some sort of variable in the loop to see if there were players
yes i did start writing plugins with sponge
and send the 'no one heard' message after the loop
heh, bukkit was once updated to java 1.5 ^^ https://github.com/Bukkit/Bukkit/commit/888d06a01e6522a42fcbe8ad2cc21a49985998b4
is there a plugin, you can vote for other players?
ok TY
sorry for my bad english
getnearbyentities dont affect items dropped as well?
can someone help me?
Maybe ask the question rather than waiting for an asnwer..
not entirely sure what the issue is with plugin.yml and commands. I have no problems with it, considering I organize my commands based on if they truly need to have their own base or not. If the command doesn't need its own base command and instead could be just a subcommand it doesn't need to be registered as a separate command
also, you can specify the permissions level in the plugin.yml for those that choose to not have a permissions plugin as well
making commands based on args[0] may do it
trying to find a chest shop plugin not sign on other blocks but sign on chest where you can do buy sell trade directly on chest to work. chest sign no gui but i cant find any everything is now sign on wall or on specific blocks but my need is a plugin where you can use chest as base
if that makes sense
why not make one?
You know.. you are giving up perfectly created wheels for parts of it
if you get what i mean..
yes
You would need a loop
i usualy do for(String key : getConfig().getconfigsection("section").getKeys(false))
its better to also check if it exists first
ok so the plugin.yml isnt too bad, i got a big trigger happy there. What really does tick me off is the overuse of classes where interfaces would be more appropriate. In order to use my own class structure i have to hack with inner classes
i will do that stellrow
is that a comment related to the API or are you referring to other plugins? o.O
the api
plugins.yml has only main wich you need to reffer though?
using classes forces consumers of your api to extend your classes
Well it isn't perfect, I am sure some or most would agree. However, you are allowed to make PR's though
when they would rather extend their own
changing it to interfaces is a breaking change
so its too late for that
bukkit was never meant to be extended
sometimes breaking changes do happen every now and then with the API π
thats the fundamental issue
ive yet to meet a issue with plugin.yml
Oh sweet, I didn't know the plugin annotations library existed!
as an example, here is my main class for velocity https://pastie.io/vyofeh.scala and here is my main class for bungee https://pastie.io/wwajgh.java
they do the SAME thing
one is 7 times longer
because i need to hack with inner classes
instead of just being able to extend my common plugin
i need to extend javaplugin
One uses the protocol the other doesn't
Can't really compare. One uses packets the other is using the API. You could do the same in spigot if you choose to listen for packets instead
Also, will I get an email when my Stash account gets activated to make a PR?
frostalf what? bungee is an api too...
wtf is your point
it seems to just be 'bungee doesn't have native guice support therefore sucks'
lets relax
my point is that i need to hack with inner classes to extend my common class
its that his framework he wrote for multi platform support happens to use extends too
'bungee doesn't have $fangled_dependency_injection_framework and therefore sucks'
the problem is not the dependency
@crimson sandal no it will just be activated
oh
plugins not having a common class is horrendous design imo
I think the velocity example is terrible in that respect
@fleet crane Okay cheers, I'll keep checking back then π
its usually added in a day or two, @wintry jasper handles it
thats interesting, what do you have against having a separate PluginContainer type for all of that stuff?
all i see is the extra flexibility to use your own class structure
instead of being forced to extend a class
oh no, a whole extra class
it sure does clean up the code
and you probably wont have to use final methods preventing plugins from overwriting behavior that you rely on
you would replace Plugin with an interface, but how would you handle stuff like getConfig methods then?
default methods?
if it were up to me, injection
or getSomeThing.getConfig?
but DI is not for everyone
that would be a whole different concept
but yeah, default methods would work
but they werent available when that class was created anyways
not all API's are created equal. Just because one API is nicer to work with then another, doesn't mean that other API needs to change what they do just because it isn't like some other one.
yes this is all speculation because this kind of change wont happen with bukkit
wdym? they share the entire Bukkit API
mmmh? paper cant do such changes either, forks cant really break shit, they just add api
not like paper can casually change the plugin loading mechanism
I wasn't talking about forks, but Cableguy20 seems to be comparing the sponge api to the bukkit api
which are both completely different systems
its not at a marketshare yet where they can just break up from upstream, lol
"il buy your entire stock"
Backwards compatibility is more difficult and requires supporting older versions which isn't very feasible
see, I think that its reasonable to ask plugins to adopt on major minecraft versions
so api breakage should be allowed
yeah but server owners like it when they can use older plugins without breakage
sure, rewriting the loading mechanism will not happen
as thats changing a whole concept
yep
but other stuff should be broken
that is on the plugin authors to make their plugins compatible with older versions
although theres no point to breakage for its own sake
there should always be a good reason
for example, I really would like to have native brigadier support for commands in bukkit, but I think ppl would hate me for forcing that ontop them π
if it compes to version compatibility dont count on me
API is already forwards compatible though, so you can use older plugins on newer versions given the API hasn't changed
@keen compass yeah since 1.12 not much has changed
the new modern materials made quite a nice change
also im pretty sure thats backwards compatible frostalf
no that is forwards compatible
because regardless if the server goes up a version
the plugin doesn't need to necessarily
but if you made your plugin for a higher version, it won't necessarily work on a lower version
im pretty sure most 1.15 plugins will work on 1.16
backwards compatible means supporting lower versions, forwards compatible means supporting higher versions
Is it bad to create a few yml files to keep organized? or is it bad in terms of permformance
Cause i save quite a bit of locations that get removed automatically and the other file is for saving itemstacks[]
@keen compass isnt the api most build to assure forward comp?
yes
@narrow crypt not at all
okay great
So that means old plugins in theory will continue to work even if the mc version changes
now if it was the other way around, it would be that newer plugins would automatically be able to support lower versions of mc
even though it was built against a higher version
no its backwards compatibility because newer version of MC still support old plugins
that is forwards compatible
no its 1.15 allowing old plugins
backwards compatible would be making a plugin on 1.15 and then it working on 1.14 without doing anything
wich i guess it can be achieved through the api
"An API is Backwards Compatible if a program written against one version of that API will continue to work the same way, without modification, against future versions of the API."
so it worked with 1.15
but imagine the logic keeping all the old code
and it continues to work with 1.16
which is, "without modification, against future versions of the API"
ok so we agree that its backwards compatibility now?
Just because the MC version changed, doesn't mean the API did
MC is an api
no bukkit is an API
...
bukkit is an api that talks to the mc api
MC doesn't have an API
isnt mc api,the server rather than an minecraft client?
and if the bukkit api didnt change then its neither backwards nor forwards compatiblity
if you can call minecraft code, thats an api
Everytime there is a change in the API old plugins generally break
which means not backwards compatible if the API changes
fk 1.8 π
Cableguy20Today at 12:22 PM
MC is an api
see, nowadays maybe. not 10 years ago tho
well, stable api then
you can in general turn any program into an API if you call code from it
yes
doesn't mean it really is an API though
Does that mean remote code injection is an api
are you calling code from minecraft or the server though? π€
its the same?
you call code from minecraft, the implementation for which is the server
i mean there are alot of things the client handles itself
wich you cant modify server side
well you handle the server things on the server and client things on the client
Minecraft isn't an API at all. It is an implementation more then anything. Anytime there is an update, the mc code changes everywhere which isn't what an API is supposed to do. Yes you can call code from it, but to call it an API would be incorrect.
The Bukkit/Spigot api does not change everytime there is an update to MC. There are times the API does get updated or changed, but for the most part it is constant. Which makes it a valid API structure.
what is wrong with this, im trying to get the amount of keys in data.yml in the section loot
int chestamount = data.getConfigurationSection("loot.").getKeys(false).size();
data.yml:
loot:
chest0:
items etc
chest1:
items etc
java.lang.NullPointerException: null
at me.rik.Airdrop.Lightning.Lightin(Lightning.java:125) ~[?:?]
with line 125 being ```java
int chestamount = data.getConfigurationSection("loot").getKeys(false).size();
Please help: > [12:35:45 INFO]: kevin[/IP ADRESS] logged in with entity id 1004 at ([Survival] -8.0, 171.0, 7.0)
[12:35:45 WARN]: Exception in thread "Craft Scheduler Thread - 15"
[12:35:45 WARN]: org.apache.commons.lang.UnhandledException: Plugin Essentials v2.17.1.0 generated an exception while executing task 130
at org.bukkit.craftbukkit.v1_8_R1.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:56)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.NullPointerException
at com.earth2me.essentials.geoip.EssentialsGeoIPPlayerListener.delayedJoin(EssentialsGeoIPPlayerListener.java:80)
at com.earth2me.essentials.geoip.EssentialsGeoIPPlayerListener.lambda$onPlayerJoin$0(EssentialsGeoIPPlayerListener.java:48)
at org.bukkit.craftbukkit.v1_8_R1.scheduler.CraftTask.run(CraftTask.java:71)
at org.bukkit.craftbukkit.v1_8_R1.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:53)
... 3 more
is it safe to use color coded item lores instead of nbt data? im making items with special abilities
I think its the essentials plugin
Might want to hide that ip lad.
hi
@vivid imp
don't really need to hide IP's. They are not as private as you might think XD
A bit more safer than usual tho. :p
not really, not hard to see what IP's an ISP owns
Still.
i cant start my bungeecord since i add some plugins. can someone translate this error code and see if it's related to the plugins i add?

