├── src ├── config.yml ├── plugin.yml └── cl │ └── mariofinale │ ├── VillagerSaver_PluginVars.java │ ├── VillagerSaver.java │ ├── VillagerSaver_Commands.java │ └── VillagerSaver_Listener.java ├── JavaDocs ├── element-list ├── legal │ ├── LICENSE │ ├── ASSEMBLY_EXCEPTION │ ├── ADDITIONAL_LICENSE_INFO │ ├── jqueryUI.md │ └── jquery.md ├── tag-search-index.js ├── module-search-index.js ├── resources │ ├── x.png │ └── glass.png ├── package-search-index.js ├── script-dir │ ├── images │ │ ├── ui-icons_222222_256x240.png │ │ ├── ui-icons_2e83ff_256x240.png │ │ ├── ui-icons_454545_256x240.png │ │ ├── ui-icons_888888_256x240.png │ │ ├── ui-icons_cd0a0a_256x240.png │ │ ├── ui-bg_glass_55_fbf9ee_1x400.png │ │ ├── ui-bg_glass_65_dadada_1x400.png │ │ ├── ui-bg_glass_75_dadada_1x400.png │ │ ├── ui-bg_glass_75_e6e6e6_1x400.png │ │ ├── ui-bg_glass_95_fef1ec_1x400.png │ │ └── ui-bg_highlight-soft_75_cccccc_1x100.png │ ├── jquery-ui.structure.min.css │ └── jquery-ui.min.css ├── type-search-index.js ├── index.html ├── jquery-ui.overrides.css ├── member-search-index.js ├── allpackages-index.html ├── index-files │ ├── index-2.html │ ├── index-11.html │ ├── index-12.html │ ├── index-1.html │ ├── index-8.html │ ├── index-3.html │ ├── index-7.html │ ├── index-9.html │ ├── index-4.html │ ├── index-5.html │ ├── index-6.html │ └── index-10.html ├── cl │ └── mariofinale │ │ ├── package-tree.html │ │ ├── package-summary.html │ │ ├── VillagerSaver_PluginVars.html │ │ ├── VillagerSaver_Listener.html │ │ └── VillagerSaver_Commands.html ├── overview-tree.html ├── allclasses-index.html ├── script.js ├── help-doc.html └── search.js ├── .gitattributes ├── .gitignore ├── VillagerSaver.iml ├── README.md └── LICENSE /src/config.yml: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /JavaDocs/element-list: -------------------------------------------------------------------------------- 1 | cl.mariofinale 2 | -------------------------------------------------------------------------------- /JavaDocs/legal/LICENSE: -------------------------------------------------------------------------------- 1 | Please see ..\java.base\LICENSE 2 | -------------------------------------------------------------------------------- /JavaDocs/tag-search-index.js: -------------------------------------------------------------------------------- 1 | tagSearchIndex = [];updateSearchResults(); -------------------------------------------------------------------------------- /JavaDocs/module-search-index.js: -------------------------------------------------------------------------------- 1 | moduleSearchIndex = [];updateSearchResults(); -------------------------------------------------------------------------------- /JavaDocs/legal/ASSEMBLY_EXCEPTION: -------------------------------------------------------------------------------- 1 | Please see ..\java.base\ASSEMBLY_EXCEPTION 2 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | -------------------------------------------------------------------------------- /JavaDocs/legal/ADDITIONAL_LICENSE_INFO: -------------------------------------------------------------------------------- 1 | Please see ..\java.base\ADDITIONAL_LICENSE_INFO 2 | -------------------------------------------------------------------------------- /JavaDocs/resources/x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MarioFinale/VillagerSaver/HEAD/JavaDocs/resources/x.png -------------------------------------------------------------------------------- /JavaDocs/resources/glass.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MarioFinale/VillagerSaver/HEAD/JavaDocs/resources/glass.png -------------------------------------------------------------------------------- /JavaDocs/package-search-index.js: -------------------------------------------------------------------------------- 1 | packageSearchIndex = [{"l":"All Packages","u":"allpackages-index.html"},{"l":"cl.mariofinale"}];updateSearchResults(); -------------------------------------------------------------------------------- /JavaDocs/script-dir/images/ui-icons_222222_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MarioFinale/VillagerSaver/HEAD/JavaDocs/script-dir/images/ui-icons_222222_256x240.png -------------------------------------------------------------------------------- /JavaDocs/script-dir/images/ui-icons_2e83ff_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MarioFinale/VillagerSaver/HEAD/JavaDocs/script-dir/images/ui-icons_2e83ff_256x240.png -------------------------------------------------------------------------------- /JavaDocs/script-dir/images/ui-icons_454545_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MarioFinale/VillagerSaver/HEAD/JavaDocs/script-dir/images/ui-icons_454545_256x240.png -------------------------------------------------------------------------------- /JavaDocs/script-dir/images/ui-icons_888888_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MarioFinale/VillagerSaver/HEAD/JavaDocs/script-dir/images/ui-icons_888888_256x240.png -------------------------------------------------------------------------------- /JavaDocs/script-dir/images/ui-icons_cd0a0a_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MarioFinale/VillagerSaver/HEAD/JavaDocs/script-dir/images/ui-icons_cd0a0a_256x240.png -------------------------------------------------------------------------------- /JavaDocs/script-dir/images/ui-bg_glass_55_fbf9ee_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MarioFinale/VillagerSaver/HEAD/JavaDocs/script-dir/images/ui-bg_glass_55_fbf9ee_1x400.png -------------------------------------------------------------------------------- /JavaDocs/script-dir/images/ui-bg_glass_65_dadada_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MarioFinale/VillagerSaver/HEAD/JavaDocs/script-dir/images/ui-bg_glass_65_dadada_1x400.png -------------------------------------------------------------------------------- /JavaDocs/script-dir/images/ui-bg_glass_75_dadada_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MarioFinale/VillagerSaver/HEAD/JavaDocs/script-dir/images/ui-bg_glass_75_dadada_1x400.png -------------------------------------------------------------------------------- /JavaDocs/script-dir/images/ui-bg_glass_75_e6e6e6_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MarioFinale/VillagerSaver/HEAD/JavaDocs/script-dir/images/ui-bg_glass_75_e6e6e6_1x400.png -------------------------------------------------------------------------------- /JavaDocs/script-dir/images/ui-bg_glass_95_fef1ec_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MarioFinale/VillagerSaver/HEAD/JavaDocs/script-dir/images/ui-bg_glass_95_fef1ec_1x400.png -------------------------------------------------------------------------------- /JavaDocs/script-dir/images/ui-bg_highlight-soft_75_cccccc_1x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MarioFinale/VillagerSaver/HEAD/JavaDocs/script-dir/images/ui-bg_highlight-soft_75_cccccc_1x100.png -------------------------------------------------------------------------------- /JavaDocs/type-search-index.js: -------------------------------------------------------------------------------- 1 | typeSearchIndex = [{"l":"All Classes and Interfaces","u":"allclasses-index.html"},{"p":"cl.mariofinale","l":"VillagerSaver"},{"p":"cl.mariofinale","l":"VillagerSaver_Commands"},{"p":"cl.mariofinale","l":"VillagerSaver_Listener"},{"p":"cl.mariofinale","l":"VillagerSaver_PluginVars"}];updateSearchResults(); -------------------------------------------------------------------------------- /src/plugin.yml: -------------------------------------------------------------------------------- 1 | name: VillagerSaver 2 | version: 1.4.5 3 | authors: [MarioFinale, Kasama, Kyle Hunady] 4 | main: cl.mariofinale.VillagerSaver 5 | api-version: '1.21.8' 6 | website: https://github.com/MarioFinale/VillagerSaver 7 | commands: 8 | villagersaver: 9 | description: VillagerSaver commands. 10 | usage: /villagersaver 11 | permissions: 12 | villagersaver.blacklist: 13 | description: Allows managing the VillagerSaver world blacklist 14 | default: op -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Compiled class file 2 | *.class 3 | 4 | # Log file 5 | *.log 6 | #IntelliJ IDEA folders 7 | .idea/ 8 | .out/ 9 | out/ 10 | .idea/workspace.xml 11 | .idea/tasks.xml 12 | .idea/dictionaries 13 | .idea/vcs.xml 14 | .idea/jsLibraryMappings.xml 15 | 16 | # BlueJ files 17 | *.ctxt 18 | 19 | # Mobile Tools for Java (J2ME) 20 | .mtj.tmp/ 21 | 22 | # Package Files # 23 | *.jar 24 | *.war 25 | *.nar 26 | *.ear 27 | *.zip 28 | *.tar.gz 29 | *.rar 30 | 31 | # virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml 32 | hs_err_pid* 33 | 34 | # Maven Files # 35 | pom.xml 36 | target/ 37 | 38 | # VS Code Files # 39 | workspace.code-workspace 40 | -------------------------------------------------------------------------------- /VillagerSaver.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /src/cl/mariofinale/VillagerSaver_PluginVars.java: -------------------------------------------------------------------------------- 1 | package cl.mariofinale; 2 | 3 | import org.bukkit.ChatColor; 4 | import org.bukkit.entity.EntityType; 5 | 6 | import java.util.ArrayList; 7 | 8 | /** 9 | * This class contains variables used by the VillagerSaver plugin. 10 | */ 11 | public class VillagerSaver_PluginVars { 12 | 13 | /** 14 | * The prefix used in plugin messages. 15 | */ 16 | public static final String PluginPrefix = ChatColor.BOLD + "" + ChatColor.GREEN + "[Villager Saver]:" + ChatColor.RESET; 17 | 18 | /** 19 | * The list of zombie entity types. 20 | * These are the entity types that are considered zombie variants. 21 | */ 22 | public static final ArrayList ZombieTypes = new ArrayList<>() { 23 | { 24 | add(EntityType.ZOMBIE); 25 | add(EntityType.ZOMBIE_VILLAGER); 26 | add(EntityType.DROWNED); 27 | add(EntityType.HUSK); 28 | add(EntityType.ZOMBIFIED_PIGLIN); 29 | } 30 | }; 31 | } 32 | -------------------------------------------------------------------------------- /JavaDocs/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Generated Documentation (Untitled) 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 17 | 18 | 19 |
20 | 23 |

cl/mariofinale/package-summary.html

24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /JavaDocs/jquery-ui.overrides.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 | * 5 | * This code is free software; you can redistribute it and/or modify it 6 | * under the terms of the GNU General Public License version 2 only, as 7 | * published by the Free Software Foundation. Oracle designates this 8 | * particular file as subject to the "Classpath" exception as provided 9 | * by Oracle in the LICENSE file that accompanied this code. 10 | * 11 | * This code is distributed in the hope that it will be useful, but WITHOUT 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 13 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 | * version 2 for more details (a copy is included in the LICENSE file that 15 | * accompanied this code). 16 | * 17 | * You should have received a copy of the GNU General Public License version 18 | * 2 along with this work; if not, write to the Free Software Foundation, 19 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20 | * 21 | * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 22 | * or visit www.oracle.com if you need additional information or have any 23 | * questions. 24 | */ 25 | 26 | .ui-state-active, 27 | .ui-widget-content .ui-state-active, 28 | .ui-widget-header .ui-state-active, 29 | a.ui-button:active, 30 | .ui-button:active, 31 | .ui-button.ui-state-active:hover { 32 | /* Overrides the color of selection used in jQuery UI */ 33 | background: #F8981D; 34 | } 35 | -------------------------------------------------------------------------------- /JavaDocs/script-dir/jquery-ui.structure.min.css: -------------------------------------------------------------------------------- 1 | /*! jQuery UI - v1.12.1 - 2018-12-06 2 | * http://jqueryui.com 3 | * Copyright jQuery Foundation and other contributors; Licensed MIT */ 4 | 5 | .ui-helper-hidden{display:none}.ui-helper-hidden-accessible{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.ui-helper-reset{margin:0;padding:0;border:0;outline:0;line-height:1.3;text-decoration:none;font-size:100%;list-style:none}.ui-helper-clearfix:before,.ui-helper-clearfix:after{content:"";display:table;border-collapse:collapse}.ui-helper-clearfix:after{clear:both}.ui-helper-zfix{width:100%;height:100%;top:0;left:0;position:absolute;opacity:0;filter:Alpha(Opacity=0)}.ui-front{z-index:100}.ui-state-disabled{cursor:default!important;pointer-events:none}.ui-icon{display:inline-block;vertical-align:middle;margin-top:-.25em;position:relative;text-indent:-99999px;overflow:hidden;background-repeat:no-repeat}.ui-widget-icon-block{left:50%;margin-left:-8px;display:block}.ui-widget-overlay{position:fixed;top:0;left:0;width:100%;height:100%}.ui-autocomplete{position:absolute;top:0;left:0;cursor:default}.ui-menu{list-style:none;padding:0;margin:0;display:block;outline:0}.ui-menu .ui-menu{position:absolute}.ui-menu .ui-menu-item{margin:0;cursor:pointer;list-style-image:url("data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7")}.ui-menu .ui-menu-item-wrapper{position:relative;padding:3px 1em 3px .4em}.ui-menu .ui-menu-divider{margin:5px 0;height:0;font-size:0;line-height:0;border-width:1px 0 0 0}.ui-menu .ui-state-focus,.ui-menu .ui-state-active{margin:-1px}.ui-menu-icons{position:relative}.ui-menu-icons .ui-menu-item-wrapper{padding-left:2em}.ui-menu .ui-icon{position:absolute;top:0;bottom:0;left:.2em;margin:auto 0}.ui-menu .ui-menu-icon{left:auto;right:0} -------------------------------------------------------------------------------- /JavaDocs/legal/jqueryUI.md: -------------------------------------------------------------------------------- 1 | ## jQuery UI v1.12.1 2 | 3 | ### jQuery UI License 4 | ``` 5 | Copyright jQuery Foundation and other contributors, https://jquery.org/ 6 | 7 | This software consists of voluntary contributions made by many 8 | individuals. For exact contribution history, see the revision history 9 | available at https://github.com/jquery/jquery-ui 10 | 11 | The following license applies to all parts of this software except as 12 | documented below: 13 | 14 | ==== 15 | 16 | Permission is hereby granted, free of charge, to any person obtaining 17 | a copy of this software and associated documentation files (the 18 | "Software"), to deal in the Software without restriction, including 19 | without limitation the rights to use, copy, modify, merge, publish, 20 | distribute, sublicense, and/or sell copies of the Software, and to 21 | permit persons to whom the Software is furnished to do so, subject to 22 | the following conditions: 23 | 24 | The above copyright notice and this permission notice shall be 25 | included in all copies or substantial portions of the Software. 26 | 27 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 28 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 29 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 30 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 31 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 32 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 33 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 34 | 35 | ==== 36 | 37 | Copyright and related rights for sample code are waived via CC0. Sample 38 | code is defined as all source code contained within the demos directory. 39 | 40 | CC0: http://creativecommons.org/publicdomain/zero/1.0/ 41 | 42 | ==== 43 | 44 | All files located in the node_modules and external directories are 45 | externally maintained libraries used by this software which have their 46 | own licenses; we recommend you read them, as their terms may differ from 47 | the terms above. 48 | 49 | ``` 50 | -------------------------------------------------------------------------------- /JavaDocs/member-search-index.js: -------------------------------------------------------------------------------- 1 | memberSearchIndex = [{"p":"cl.mariofinale","c":"VillagerSaver_Commands","l":"AddToBlacklistIfWorldExists(Player, String)","u":"AddToBlacklistIfWorldExists(org.bukkit.entity.Player,java.lang.String)"},{"p":"cl.mariofinale","c":"VillagerSaver_Listener","l":"getKillerEntity(EntityDamageEvent, EntityDamageEvent.DamageCause)","u":"getKillerEntity(org.bukkit.event.entity.EntityDamageEvent,org.bukkit.event.entity.EntityDamageEvent.DamageCause)"},{"p":"cl.mariofinale","c":"VillagerSaver_Listener","l":"isValidDamageCause(EntityDamageEvent.DamageCause)","u":"isValidDamageCause(org.bukkit.event.entity.EntityDamageEvent.DamageCause)"},{"p":"cl.mariofinale","c":"VillagerSaver_Listener","l":"isVillagerWorldBlacklisted(Villager)","u":"isVillagerWorldBlacklisted(org.bukkit.entity.Villager)"},{"p":"cl.mariofinale","c":"VillagerSaver_Listener","l":"isZombieVariant(Entity)","u":"isZombieVariant(org.bukkit.entity.Entity)"},{"p":"cl.mariofinale","c":"VillagerSaver","l":"LoadWorldBlackList()"},{"p":"cl.mariofinale","c":"VillagerSaver","l":"LogError(String)","u":"LogError(java.lang.String)"},{"p":"cl.mariofinale","c":"VillagerSaver","l":"LogInfo(String)","u":"LogInfo(java.lang.String)"},{"p":"cl.mariofinale","c":"VillagerSaver","l":"LogWarn(String)","u":"LogWarn(java.lang.String)"},{"p":"cl.mariofinale","c":"VillagerSaver_Commands","l":"onCommand(CommandSender, Command, String, String[])","u":"onCommand(org.bukkit.command.CommandSender,org.bukkit.command.Command,java.lang.String,java.lang.String[])"},{"p":"cl.mariofinale","c":"VillagerSaver","l":"onDisable()"},{"p":"cl.mariofinale","c":"VillagerSaver","l":"onEnable()"},{"p":"cl.mariofinale","c":"VillagerSaver_Listener","l":"onEntityDeath(EntityDeathEvent)","u":"onEntityDeath(org.bukkit.event.entity.EntityDeathEvent)"},{"p":"cl.mariofinale","c":"VillagerSaver","l":"plugin"},{"p":"cl.mariofinale","c":"VillagerSaver_PluginVars","l":"PluginPrefix"},{"p":"cl.mariofinale","c":"VillagerSaver_Commands","l":"RemoveFromTheBlackListIfWorldExists(Player, String)","u":"RemoveFromTheBlackListIfWorldExists(org.bukkit.entity.Player,java.lang.String)"},{"p":"cl.mariofinale","c":"VillagerSaver","l":"SaveWorldBlackList()"},{"p":"cl.mariofinale","c":"VillagerSaver_Commands","l":"SendMessageToPlayer(Player, String)","u":"SendMessageToPlayer(org.bukkit.entity.Player,java.lang.String)"},{"p":"cl.mariofinale","c":"VillagerSaver_Commands","l":"VillagerSaver_Commands()","u":"%3Cinit%3E()"},{"p":"cl.mariofinale","c":"VillagerSaver_Listener","l":"VillagerSaver_Listener()","u":"%3Cinit%3E()"},{"p":"cl.mariofinale","c":"VillagerSaver_PluginVars","l":"VillagerSaver_PluginVars()","u":"%3Cinit%3E()"},{"p":"cl.mariofinale","c":"VillagerSaver","l":"VillagerSaver()","u":"%3Cinit%3E()"},{"p":"cl.mariofinale","c":"VillagerSaver","l":"WorldBlackList"},{"p":"cl.mariofinale","c":"VillagerSaver_PluginVars","l":"ZombieTypes"}];updateSearchResults(); -------------------------------------------------------------------------------- /JavaDocs/allpackages-index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | All Packages 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 21 | 24 |
25 | 47 |
48 |
49 |
50 |

All Packages

51 |
52 |
Package Summary
53 |
54 |
Package
55 |
Description
56 | 57 |
 
58 |
59 |
60 |
61 |
62 | 63 | 64 | -------------------------------------------------------------------------------- /JavaDocs/legal/jquery.md: -------------------------------------------------------------------------------- 1 | ## jQuery v3.5.1 2 | 3 | ### jQuery License 4 | ``` 5 | jQuery v 3.5.1 6 | Copyright JS Foundation and other contributors, https://js.foundation/ 7 | 8 | Permission is hereby granted, free of charge, to any person obtaining 9 | a copy of this software and associated documentation files (the 10 | "Software"), to deal in the Software without restriction, including 11 | without limitation the rights to use, copy, modify, merge, publish, 12 | distribute, sublicense, and/or sell copies of the Software, and to 13 | permit persons to whom the Software is furnished to do so, subject to 14 | the following conditions: 15 | 16 | The above copyright notice and this permission notice shall be 17 | included in all copies or substantial portions of the Software. 18 | 19 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 20 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 22 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 23 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 24 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 25 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | 27 | ****************************************** 28 | 29 | The jQuery JavaScript Library v3.5.1 also includes Sizzle.js 30 | 31 | Sizzle.js includes the following license: 32 | 33 | Copyright JS Foundation and other contributors, https://js.foundation/ 34 | 35 | This software consists of voluntary contributions made by many 36 | individuals. For exact contribution history, see the revision history 37 | available at https://github.com/jquery/sizzle 38 | 39 | The following license applies to all parts of this software except as 40 | documented below: 41 | 42 | ==== 43 | 44 | Permission is hereby granted, free of charge, to any person obtaining 45 | a copy of this software and associated documentation files (the 46 | "Software"), to deal in the Software without restriction, including 47 | without limitation the rights to use, copy, modify, merge, publish, 48 | distribute, sublicense, and/or sell copies of the Software, and to 49 | permit persons to whom the Software is furnished to do so, subject to 50 | the following conditions: 51 | 52 | The above copyright notice and this permission notice shall be 53 | included in all copies or substantial portions of the Software. 54 | 55 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 56 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 57 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 58 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 59 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 60 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 61 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 62 | 63 | ==== 64 | 65 | All files located in the node_modules and external directories are 66 | externally maintained libraries used by this software which have their 67 | own licenses; we recommend you read them, as their terms may differ from 68 | the terms above. 69 | 70 | ********************* 71 | 72 | ``` 73 | -------------------------------------------------------------------------------- /JavaDocs/index-files/index-2.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | C-Index 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 21 | 24 |
25 | 47 |
48 |
49 |
50 |

Index

51 |
52 | A C G I L O P R S V W Z 
All Classes and Interfaces|All Packages 53 |

C

54 |
55 |
cl.mariofinale - package cl.mariofinale
56 |
 
57 |
58 | A C G I L O P R S V W Z 
All Classes and Interfaces|All Packages
59 |
60 |
61 | 62 | 63 | -------------------------------------------------------------------------------- /JavaDocs/cl/mariofinale/package-tree.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | cl.mariofinale Class Hierarchy 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 21 | 24 |
25 | 47 |
48 |
49 |
50 |

Hierarchy For Package cl.mariofinale

51 |
52 |
53 |

Class Hierarchy

54 |
    55 |
  • java.lang.Object 56 | 70 |
  • 71 |
72 |
73 |
74 |
75 |
76 | 77 | 78 | -------------------------------------------------------------------------------- /JavaDocs/overview-tree.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Class Hierarchy 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 21 | 24 |
25 | 47 |
48 |
49 |
50 |

Hierarchy For All Packages

51 | Package Hierarchies: 52 | 55 |
56 |
57 |

Class Hierarchy

58 |
    59 |
  • java.lang.Object 60 | 74 |
  • 75 |
76 |
77 |
78 |
79 |
80 | 81 | 82 | -------------------------------------------------------------------------------- /JavaDocs/index-files/index-11.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | W-Index 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 21 | 24 |
25 | 47 |
48 |
49 |
50 |

Index

51 |
52 | A C G I L O P R S V W Z 
All Classes and Interfaces|All Packages 53 |

W

54 |
55 |
WorldBlackList - Static variable in class cl.mariofinale.VillagerSaver
56 |
 
57 |
58 | A C G I L O P R S V W Z 
All Classes and Interfaces|All Packages
59 |
60 |
61 | 62 | 63 | -------------------------------------------------------------------------------- /JavaDocs/index-files/index-12.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Z-Index 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 21 | 24 |
25 | 47 |
48 |
49 |
50 |

Index

51 |
52 | A C G I L O P R S V W Z 
All Classes and Interfaces|All Packages 53 |

Z

54 |
55 |
ZombieTypes - Static variable in class cl.mariofinale.VillagerSaver_PluginVars
56 |
57 |
The list of zombie entity types.
58 |
59 |
60 | A C G I L O P R S V W Z 
All Classes and Interfaces|All Packages
61 |
62 |
63 | 64 | 65 | -------------------------------------------------------------------------------- /JavaDocs/index-files/index-1.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | A-Index 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 21 | 24 |
25 | 47 |
48 |
49 |
50 |

Index

51 |
52 | A C G I L O P R S V W Z 
All Classes and Interfaces|All Packages 53 |

A

54 |
55 |
AddToBlacklistIfWorldExists(Player, String) - Static method in class cl.mariofinale.VillagerSaver_Commands
56 |
57 |
Adds a world to the blacklist if it exists.
58 |
59 |
60 | A C G I L O P R S V W Z 
All Classes and Interfaces|All Packages
61 |
62 |
63 | 64 | 65 | -------------------------------------------------------------------------------- /JavaDocs/index-files/index-8.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | R-Index 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 21 | 24 |
25 | 47 |
48 |
49 |
50 |

Index

51 |
52 | A C G I L O P R S V W Z 
All Classes and Interfaces|All Packages 53 |

R

54 |
55 |
RemoveFromTheBlackListIfWorldExists(Player, String) - Static method in class cl.mariofinale.VillagerSaver_Commands
56 |
57 |
Removes a world from the blacklist if it exists.
58 |
59 |
60 | A C G I L O P R S V W Z 
All Classes and Interfaces|All Packages
61 |
62 |
63 | 64 | 65 | -------------------------------------------------------------------------------- /JavaDocs/index-files/index-3.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | G-Index 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 21 | 24 |
25 | 47 |
48 |
49 |
50 |

Index

51 |
52 | A C G I L O P R S V W Z 
All Classes and Interfaces|All Packages 53 |

G

54 |
55 |
getKillerEntity(EntityDamageEvent, EntityDamageEvent.DamageCause) - Method in class cl.mariofinale.VillagerSaver_Listener
56 |
57 |
Gets the killer entity from the damage cause event.
58 |
59 |
60 | A C G I L O P R S V W Z 
All Classes and Interfaces|All Packages
61 |
62 |
63 | 64 | 65 | -------------------------------------------------------------------------------- /JavaDocs/index-files/index-7.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | P-Index 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 21 | 24 |
25 | 47 |
48 |
49 |
50 |

Index

51 |
52 | A C G I L O P R S V W Z 
All Classes and Interfaces|All Packages 53 |

P

54 |
55 |
plugin - Static variable in class cl.mariofinale.VillagerSaver
56 |
 
57 |
PluginPrefix - Static variable in class cl.mariofinale.VillagerSaver_PluginVars
58 |
59 |
The prefix used in plugin messages.
60 |
61 |
62 | A C G I L O P R S V W Z 
All Classes and Interfaces|All Packages
63 |
64 |
65 | 66 | 67 | -------------------------------------------------------------------------------- /JavaDocs/allclasses-index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | All Classes and Interfaces 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 21 | 24 |
25 | 47 |
48 |
49 |
50 |

All Classes and Interfaces

51 |
52 |
53 |
Classes
54 |
55 |
Class
56 |
Description
57 | 58 |
59 |
The main class of the VillagerSaver plugin.
60 |
61 | 62 |
63 |
Class that handles the commands for the VillagerSaver plugin.
64 |
65 | 66 |
67 |
Class that implements the Listener interface to handle entity death events.
68 |
69 | 70 |
71 |
This class contains variables used by the VillagerSaver plugin.
72 |
73 |
74 |
75 |
76 |
77 |
78 | 79 | 80 | -------------------------------------------------------------------------------- /JavaDocs/index-files/index-9.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | S-Index 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 21 | 24 |
25 | 47 |
48 |
49 |
50 |

Index

51 |
52 | A C G I L O P R S V W Z 
All Classes and Interfaces|All Packages 53 |

S

54 |
55 |
SaveWorldBlackList() - Method in class cl.mariofinale.VillagerSaver
56 |
57 |
Saves the world blacklist to the configuration file.
58 |
59 |
SendMessageToPlayer(Player, String) - Static method in class cl.mariofinale.VillagerSaver_Commands
60 |
61 |
Sends a message to a player.
62 |
63 |
64 | A C G I L O P R S V W Z 
All Classes and Interfaces|All Packages
65 |
66 |
67 | 68 | 69 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # VillagerSaver 2 | A Minecraft plugin for Spigot servers 3 | 4 | **[Spigot Resource Page](https://www.spigotmc.org/resources/villager-saver.84738/)** 5 | 6 | **VillagerSaver** keeps villagers alive through zombie encounters by turning them into zombie villagers—ready for you to cure and restore. From basic zombie attacks to drowned tridents or even TNT and creeper explosions triggered by zombie variants, your villagers stay safe. Trades, homes, job sites, and reputation remain intact. 7 | 8 | - **Key Features**: 9 | - Converts villagers killed by zombie variants (zombies, husks, drowned, etc.) into zombie villagers. 10 | - Handles extra threats like tridents and TNT/creeper explosions primed by zombie variants. 11 | - Offers a configurable world blacklist with commands (`/villagersaver blacklistworld `). 12 | - Logs zombification events with XYZ coordinates for easy monitoring. 13 | 14 | Ideal for servers that depend on villager trading or aim to spare players the pain of losing valuable villagers. 15 | 16 | - **Permissions**: 17 | - `villagersaver.blacklist`: Allows managing the VillagerSaver world blacklist (defaults to operators). 18 | - **Config**: 19 | - The blacklist is saved at `/plugins/VillagerSaver/WorldBlackList.yml`. Manual editing is not recommended to avoid file corruption. 20 | 21 | ## Changelog 22 | 23 | ### 1.4.5 24 | - Updated to minecraft 1.21.8 25 | 26 | ### 1.4.4 27 | - Updated to Minecraft 1.21.4. 28 | - Added `villagersaver.blacklist` permission for operator-only blacklist management. 29 | - Added XYZ coordinate logging for villager zombification events. 30 | - Refactored fields and methods for improved encapsulation and maintainability. 31 | - Improved safety and exception handling for file operations and events. 32 | - Updated README with permissions and config sections. 33 | 34 | ### 1.4.3 35 | - Compiled against Java 21. 36 | 37 | ### 1.4.2 38 | - Updated to 1.21. (Requires Java 23) 39 | 40 | ### 1.4.1 41 | - Fixes [#22](https://github.com/MarioFinale/VillagerSaver/issues/22) (ClassCastException when a Villager is Killed by a Creeper Explosion). 42 | 43 | ### 1.4.0 44 | - Now converts villagers killed by drowned tridents or a [TNT explosion primed by a trident](https://www.youtube.com/watch?v=qR_jv8wefAY). 45 | 46 | ### 1.3.5 47 | - Specify API version as String. 48 | 49 | ### 1.3.4 50 | - Minor changes. 51 | - Updated to 1.20.1. 52 | 53 | ### 1.3.3 54 | - Updated to 1.19.2. 55 | 56 | ### 1.3.2 57 | - Plugin now checks on death events for improved performance (fewer function calls). 58 | - Plugin now uses the *zombify* function (should fix [#18](https://github.com/MarioFinale/VillagerSaver/issues/18)). 59 | - Improved readability. 60 | 61 | ### 1.3.1 62 | - Updated to 1.19. 63 | 64 | ### 1.2.5 65 | - Updated to 1.18.2. 66 | 67 | ### 1.2.4 68 | - Updated to 1.18 - 1.18.1. 69 | 70 | ### 1.2.3 71 | - Fixed logging (now using proper Bukkit logger, fixes [#15](https://github.com/MarioFinale/VillagerSaver/issues/15)). 72 | - Fixed nag message about using stdout. 73 | - Minor code changes to improve readability. 74 | - Changed plugin messages to better communicate plugin status. 75 | - Added a severe warning about plugin hijacking, advising downloads from GitHub only (fixes [#16](https://github.com/MarioFinale/VillagerSaver/issues/16)). 76 | 77 | ### 1.2.2 78 | - Updated to 1.17.1. 79 | 80 | ### 1.2.1 81 | - Updated to 1.17. 82 | 83 | ### 1.2.0 84 | - Fixes [#13](https://github.com/MarioFinale/VillagerSaver/issues/13) (Merges Kasama's fork into main). 85 | 86 | ### 1.1.6 87 | - Fixes [#10](https://github.com/MarioFinale/VillagerSaver/issues/10) (Many thanks to Kasama). 88 | 89 | ### 1.1.5 90 | - Spigot support. 91 | 92 | ### 1.1.4 93 | - Adds [#8](https://github.com/MarioFinale/VillagerSaver/issues/8). 94 | 95 | ### 1.1.3 96 | - Fixes [#7](https://github.com/MarioFinale/VillagerSaver/issues/7). 97 | - Updated to 1.16.5. 98 | 99 | ### 1.1.2 100 | - Fixes [#6](https://github.com/MarioFinale/VillagerSaver/issues/6). 101 | 102 | ### 1.1.1 103 | - World blacklist, usage: 104 | - `/villagersaver blacklistworld ` 105 | - `/villagersaver unblacklistworld ` 106 | - Fixes [#4](https://github.com/MarioFinale/VillagerSaver/issues/4). 107 | - Fixes [#3](https://github.com/MarioFinale/VillagerSaver/issues/3). 108 | 109 | [![ko-fi](https://www.ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/W7W52TMLM) -------------------------------------------------------------------------------- /JavaDocs/cl/mariofinale/package-summary.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | cl.mariofinale 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 21 | 24 |
25 | 55 |
56 |
57 |
58 |

Package cl.mariofinale

59 |
60 |
61 |
package cl.mariofinale
62 |
63 |
    64 |
  • 65 |
    66 |
    Classes
    67 |
    68 |
    Class
    69 |
    Description
    70 | 71 |
    72 |
    The main class of the VillagerSaver plugin.
    73 |
    74 | 75 |
    76 |
    Class that handles the commands for the VillagerSaver plugin.
    77 |
    78 | 79 |
    80 |
    Class that implements the Listener interface to handle entity death events.
    81 |
    82 | 83 |
    84 |
    This class contains variables used by the VillagerSaver plugin.
    85 |
    86 |
    87 |
    88 |
  • 89 |
90 |
91 |
92 |
93 |
94 | 95 | 96 | -------------------------------------------------------------------------------- /JavaDocs/index-files/index-4.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | I-Index 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 21 | 24 |
25 | 47 |
48 |
49 |
50 |

Index

51 |
52 | A C G I L O P R S V W Z 
All Classes and Interfaces|All Packages 53 |

I

54 |
55 |
isValidDamageCause(EntityDamageEvent.DamageCause) - Method in class cl.mariofinale.VillagerSaver_Listener
56 |
57 |
Checks if the given damage cause is valid for villager death.
58 |
59 |
isVillagerWorldBlacklisted(Villager) - Method in class cl.mariofinale.VillagerSaver_Listener
60 |
61 |
Checks if the given villager is in a blacklisted world.
62 |
63 |
isZombieVariant(Entity) - Method in class cl.mariofinale.VillagerSaver_Listener
64 |
65 |
Checks if the given entity is a zombie variant.
66 |
67 |
68 | A C G I L O P R S V W Z 
All Classes and Interfaces|All Packages
69 |
70 |
71 | 72 | 73 | -------------------------------------------------------------------------------- /JavaDocs/index-files/index-5.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | L-Index 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 21 | 24 |
25 | 47 |
48 |
49 |
50 |

Index

51 |
52 | A C G I L O P R S V W Z 
All Classes and Interfaces|All Packages 53 |

L

54 |
55 |
LoadWorldBlackList() - Method in class cl.mariofinale.VillagerSaver
56 |
57 |
Loads the world blacklist from the configuration file.
58 |
59 |
LogError(String) - Method in class cl.mariofinale.VillagerSaver
60 |
61 |
Logs an error message.
62 |
63 |
LogInfo(String) - Method in class cl.mariofinale.VillagerSaver
64 |
65 |
Logs an informational message.
66 |
67 |
LogWarn(String) - Method in class cl.mariofinale.VillagerSaver
68 |
69 |
Logs a warning message.
70 |
71 |
72 | A C G I L O P R S V W Z 
All Classes and Interfaces|All Packages
73 |
74 |
75 | 76 | 77 | -------------------------------------------------------------------------------- /src/cl/mariofinale/VillagerSaver.java: -------------------------------------------------------------------------------- 1 | package cl.mariofinale; 2 | 3 | import org.bukkit.command.PluginCommand; 4 | import org.bukkit.configuration.file.FileConfiguration; 5 | import org.bukkit.configuration.file.YamlConfiguration; 6 | import org.bukkit.plugin.Plugin; 7 | import org.bukkit.plugin.java.JavaPlugin; 8 | 9 | import java.io.File; 10 | import java.io.IOException; 11 | import java.util.ArrayList; 12 | import java.util.logging.Level; 13 | 14 | /** 15 | * The main class of the VillagerSaver plugin. 16 | */ 17 | public class VillagerSaver extends JavaPlugin { 18 | private ArrayList worldBlackList = new ArrayList<>(); 19 | private final Plugin plugin = this; 20 | 21 | /** 22 | * Called when the plugin is enabled. 23 | * Initializes the plugin by registering the listener, loading the world blacklist, and registering commands. 24 | * Logs relevant messages to indicate the progress. 25 | */ 26 | @Override 27 | public void onEnable() { 28 | logWarn("Make sure you downloaded a trusted version of this plugin on: https://github.com/MarioFinale/VillagerSaver/releases"); 29 | logInfo("Registering listener."); 30 | getServer().getPluginManager().registerEvents(new VillagerSaver_Listener(this), this); 31 | logInfo("Listener registered."); 32 | logInfo("Loading World Blacklist."); 33 | loadWorldBlackList(); 34 | logInfo("Registering commands."); 35 | VillagerSaver_Commands villagerSaver_commands = new VillagerSaver_Commands(this); 36 | PluginCommand command = getCommand("villagersaver"); 37 | if (command != null) { 38 | command.setExecutor(villagerSaver_commands); 39 | logInfo("Commands registered."); 40 | } else { 41 | logInfo("Command 'villagersaver' not found in plugin.yml!"); 42 | } 43 | logInfo("VillagerSaver loaded!"); 44 | } 45 | 46 | /** 47 | * Called when the plugin is disabled. 48 | * Saves the configuration and world blacklist. 49 | * Logs a message indicating that the plugin has been disabled. 50 | */ 51 | @Override 52 | public void onDisable() { 53 | logInfo("Saving config."); 54 | plugin.saveDefaultConfig(); 55 | saveWorldBlackList(); 56 | logInfo("VillagerSaver disabled!"); 57 | } 58 | 59 | /** 60 | * Logs an informational message. 61 | * 62 | * @param line The message to log 63 | */ 64 | public void logInfo(String line) { 65 | plugin.getLogger().log(Level.INFO, line); 66 | } 67 | 68 | /** 69 | * Logs a warning message. 70 | * 71 | * @param line The message to log 72 | */ 73 | public void logWarn(String line) { 74 | plugin.getLogger().log(Level.WARNING, line); 75 | } 76 | 77 | /** 78 | * Logs an error message. 79 | * 80 | * @param line The message to log 81 | */ 82 | public void logError(String line) { 83 | plugin.getLogger().log(Level.SEVERE, line); 84 | } 85 | 86 | /** 87 | * Saves the world blacklist to the configuration file. 88 | */ 89 | private void saveWorldBlackList() { 90 | logInfo("Saving blacklist."); 91 | File worldBlackListFile = new File(getDataFolder(), "WorldBlackList.yml"); 92 | FileConfiguration config = YamlConfiguration.loadConfiguration(worldBlackListFile); 93 | config.set("BlackList", getWorldBlackList()); 94 | try { 95 | config.save(worldBlackListFile); 96 | logInfo("Blacklist saved."); 97 | } catch (IOException ex) { 98 | logError("Error saving blacklist: " + ex.getMessage()); 99 | } 100 | } 101 | 102 | /** 103 | * Loads the world blacklist from the configuration file. 104 | */ 105 | private void loadWorldBlackList() { 106 | File WorldBlackListFile = new File(getDataFolder().getAbsolutePath(), "WorldBlackList.yml"); 107 | try { 108 | WorldBlackListFile.createNewFile(); 109 | FileConfiguration blacklistConfigFile = YamlConfiguration.loadConfiguration(WorldBlackListFile); 110 | Object blackListObj = blacklistConfigFile.get("BlackList"); 111 | if (blackListObj instanceof ArrayList) { 112 | worldBlackList = new ArrayList<>(blacklistConfigFile.getStringList("BlackList")); 113 | } else { 114 | worldBlackList = new ArrayList<>(); 115 | } 116 | } catch (Exception ex) { 117 | logWarn("World blacklist file has not been loaded: " + ex.getMessage()); 118 | logWarn("If this is the first time running the plugin the file will be created on server stop."); 119 | worldBlackList = new ArrayList<>(); 120 | return; 121 | } 122 | logInfo("World Blacklist loaded."); 123 | } 124 | 125 | public ArrayList getWorldBlackList() { 126 | return worldBlackList; 127 | } 128 | 129 | } 130 | -------------------------------------------------------------------------------- /JavaDocs/index-files/index-6.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | O-Index 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 21 | 24 |
25 | 47 |
48 |
49 |
50 |

Index

51 |
52 | A C G I L O P R S V W Z 
All Classes and Interfaces|All Packages 53 |

O

54 |
55 |
onCommand(CommandSender, Command, String, String[]) - Method in class cl.mariofinale.VillagerSaver_Commands
56 |
57 |
Handles the execution of a command.
58 |
59 |
onDisable() - Method in class cl.mariofinale.VillagerSaver
60 |
61 |
Called when the plugin is disabled.
62 |
63 |
onEnable() - Method in class cl.mariofinale.VillagerSaver
64 |
65 |
Called when the plugin is enabled.
66 |
67 |
onEntityDeath(EntityDeathEvent) - Method in class cl.mariofinale.VillagerSaver_Listener
68 |
69 |
Event handler for the EntityDeathEvent.
70 |
71 |
72 | A C G I L O P R S V W Z 
All Classes and Interfaces|All Packages
73 |
74 |
75 | 76 | 77 | -------------------------------------------------------------------------------- /JavaDocs/script.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2013, 2020, Oracle and/or its affiliates. All rights reserved. 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 | * 5 | * This code is free software; you can redistribute it and/or modify it 6 | * under the terms of the GNU General Public License version 2 only, as 7 | * published by the Free Software Foundation. Oracle designates this 8 | * particular file as subject to the "Classpath" exception as provided 9 | * by Oracle in the LICENSE file that accompanied this code. 10 | * 11 | * This code is distributed in the hope that it will be useful, but WITHOUT 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 13 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 | * version 2 for more details (a copy is included in the LICENSE file that 15 | * accompanied this code). 16 | * 17 | * You should have received a copy of the GNU General Public License version 18 | * 2 along with this work; if not, write to the Free Software Foundation, 19 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20 | * 21 | * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 22 | * or visit www.oracle.com if you need additional information or have any 23 | * questions. 24 | */ 25 | 26 | var moduleSearchIndex; 27 | var packageSearchIndex; 28 | var typeSearchIndex; 29 | var memberSearchIndex; 30 | var tagSearchIndex; 31 | function loadScripts(doc, tag) { 32 | createElem(doc, tag, 'search.js'); 33 | 34 | createElem(doc, tag, 'module-search-index.js'); 35 | createElem(doc, tag, 'package-search-index.js'); 36 | createElem(doc, tag, 'type-search-index.js'); 37 | createElem(doc, tag, 'member-search-index.js'); 38 | createElem(doc, tag, 'tag-search-index.js'); 39 | } 40 | 41 | function createElem(doc, tag, path) { 42 | var script = doc.createElement(tag); 43 | var scriptElement = doc.getElementsByTagName(tag)[0]; 44 | script.src = pathtoroot + path; 45 | scriptElement.parentNode.insertBefore(script, scriptElement); 46 | } 47 | 48 | function show(tableId, selected, columns) { 49 | if (tableId !== selected) { 50 | document.querySelectorAll('div.' + tableId + ':not(.' + selected + ')') 51 | .forEach(function(elem) { 52 | elem.style.display = 'none'; 53 | }); 54 | } 55 | document.querySelectorAll('div.' + selected) 56 | .forEach(function(elem, index) { 57 | elem.style.display = ''; 58 | var isEvenRow = index % (columns * 2) < columns; 59 | elem.classList.remove(isEvenRow ? oddRowColor : evenRowColor); 60 | elem.classList.add(isEvenRow ? evenRowColor : oddRowColor); 61 | }); 62 | updateTabs(tableId, selected); 63 | } 64 | 65 | function updateTabs(tableId, selected) { 66 | document.querySelector('div#' + tableId +' .summary-table') 67 | .setAttribute('aria-labelledby', selected); 68 | document.querySelectorAll('button[id^="' + tableId + '"]') 69 | .forEach(function(tab, index) { 70 | if (selected === tab.id || (tableId === selected && index === 0)) { 71 | tab.className = activeTableTab; 72 | tab.setAttribute('aria-selected', true); 73 | tab.setAttribute('tabindex',0); 74 | } else { 75 | tab.className = tableTab; 76 | tab.setAttribute('aria-selected', false); 77 | tab.setAttribute('tabindex',-1); 78 | } 79 | }); 80 | } 81 | 82 | function switchTab(e) { 83 | var selected = document.querySelector('[aria-selected=true]'); 84 | if (selected) { 85 | if ((e.keyCode === 37 || e.keyCode === 38) && selected.previousSibling) { 86 | // left or up arrow key pressed: move focus to previous tab 87 | selected.previousSibling.click(); 88 | selected.previousSibling.focus(); 89 | e.preventDefault(); 90 | } else if ((e.keyCode === 39 || e.keyCode === 40) && selected.nextSibling) { 91 | // right or down arrow key pressed: move focus to next tab 92 | selected.nextSibling.click(); 93 | selected.nextSibling.focus(); 94 | e.preventDefault(); 95 | } 96 | } 97 | } 98 | 99 | var updateSearchResults = function() {}; 100 | 101 | function indexFilesLoaded() { 102 | return moduleSearchIndex 103 | && packageSearchIndex 104 | && typeSearchIndex 105 | && memberSearchIndex 106 | && tagSearchIndex; 107 | } 108 | 109 | // Workaround for scroll position not being included in browser history (8249133) 110 | document.addEventListener("DOMContentLoaded", function(e) { 111 | var contentDiv = document.querySelector("div.flex-content"); 112 | window.addEventListener("popstate", function(e) { 113 | if (e.state !== null) { 114 | contentDiv.scrollTop = e.state; 115 | } 116 | }); 117 | window.addEventListener("hashchange", function(e) { 118 | history.replaceState(contentDiv.scrollTop, document.title); 119 | }); 120 | contentDiv.addEventListener("scroll", function(e) { 121 | var timeoutID; 122 | if (!timeoutID) { 123 | timeoutID = setTimeout(function() { 124 | history.replaceState(contentDiv.scrollTop, document.title); 125 | timeoutID = null; 126 | }, 100); 127 | } 128 | }); 129 | if (!location.hash) { 130 | history.replaceState(contentDiv.scrollTop, document.title); 131 | } 132 | }); 133 | -------------------------------------------------------------------------------- /JavaDocs/index-files/index-10.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | V-Index 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 21 | 24 |
25 | 47 |
48 |
49 |
50 |

Index

51 |
52 | A C G I L O P R S V W Z 
All Classes and Interfaces|All Packages 53 |

V

54 |
55 |
VillagerSaver - Class in cl.mariofinale
56 |
57 |
The main class of the VillagerSaver plugin.
58 |
59 |
VillagerSaver() - Constructor for class cl.mariofinale.VillagerSaver
60 |
 
61 |
VillagerSaver_Commands - Class in cl.mariofinale
62 |
63 |
Class that handles the commands for the VillagerSaver plugin.
64 |
65 |
VillagerSaver_Commands() - Constructor for class cl.mariofinale.VillagerSaver_Commands
66 |
 
67 |
VillagerSaver_Listener - Class in cl.mariofinale
68 |
69 |
Class that implements the Listener interface to handle entity death events.
70 |
71 |
VillagerSaver_Listener() - Constructor for class cl.mariofinale.VillagerSaver_Listener
72 |
 
73 |
VillagerSaver_PluginVars - Class in cl.mariofinale
74 |
75 |
This class contains variables used by the VillagerSaver plugin.
76 |
77 |
VillagerSaver_PluginVars() - Constructor for class cl.mariofinale.VillagerSaver_PluginVars
78 |
 
79 |
80 | A C G I L O P R S V W Z 
All Classes and Interfaces|All Packages
81 |
82 |
83 | 84 | 85 | -------------------------------------------------------------------------------- /src/cl/mariofinale/VillagerSaver_Commands.java: -------------------------------------------------------------------------------- 1 | package cl.mariofinale; 2 | 3 | import org.bukkit.Bukkit; 4 | import org.bukkit.World; 5 | import org.bukkit.command.Command; 6 | import org.bukkit.command.CommandExecutor; 7 | import org.bukkit.command.CommandSender; 8 | import org.bukkit.entity.Player; 9 | 10 | /** 11 | * Handles command execution for the VillagerSaver plugin, allowing players to manage the world blacklist. 12 | * Supports adding and removing worlds from the blacklist via the "/villagersaver" command. 13 | * Requires the "villagersaver.blacklist" permission to execute blacklist-modifying commands. 14 | */ 15 | public class VillagerSaver_Commands implements CommandExecutor { 16 | private final VillagerSaver plugin; 17 | 18 | /** 19 | * Constructs a new command handler with a reference to the main plugin instance. 20 | * 21 | * @param plugin The VillagerSaver plugin instance, used to access and modify the world blacklist 22 | */ 23 | public VillagerSaver_Commands(VillagerSaver plugin) { 24 | this.plugin = plugin; 25 | } 26 | 27 | /** 28 | * Executes the VillagerSaver command based on the provided arguments. 29 | * Supports "blacklistworld" to add a world to the blacklist and "unblacklistworld" to remove one. 30 | * Only players with the "villagersaver.blacklist" permission can modify the blacklist. 31 | * Non-player senders (e.g., console) and invalid players are rejected with appropriate feedback. 32 | * 33 | * @param sender The entity that issued the command (must be a player) 34 | * @param command The command object representing "villagersaver" 35 | * @param label The alias used to execute the command (e.g., "villagersaver") 36 | * @param args The arguments provided with the command (minimum 2 expected for valid execution) 37 | * @return true if the command was handled successfully (including error cases), false otherwise 38 | */ 39 | @Override 40 | public boolean onCommand(CommandSender sender, Command command, String label, String[] args) { 41 | if (!(sender instanceof Player player)) { 42 | sender.sendMessage("This command can only be run by a player."); 43 | return true; 44 | } 45 | if (!player.isValid()) return true; 46 | 47 | if (!player.hasPermission("villagersaver.blacklist")) { 48 | sendMessageToPlayer(player, "You don’t have permission to use this command."); 49 | return true; 50 | } 51 | 52 | if (args.length < 2) { 53 | sendMessageToPlayer(player, "Usage: /villagersaver "); 54 | return true; 55 | } 56 | 57 | return switch (args[0].toUpperCase()) { 58 | case "BLACKLISTWORLD" -> tryAddWorldToBlacklist(player, args[1]); 59 | case "UNBLACKLISTWORLD" -> removeWorldFromBlacklist(player, args[1]); 60 | default -> { 61 | sendMessageToPlayer(player, "Unknown subcommand. Use blacklistworld or unblacklistworld."); 62 | yield true; 63 | } 64 | }; 65 | } 66 | 67 | /** 68 | * Attempts to add a world to the blacklist if it exists on the server. 69 | * Sends feedback to the player indicating whether the world was added, already blacklisted, or doesn’t exist. 70 | * 71 | * @param player The player executing the command 72 | * @param worldName The name of the world to add to the blacklist 73 | * @return true if the operation was successful (world exists and was processed), false if the world doesn’t exist 74 | */ 75 | private boolean tryAddWorldToBlacklist(Player player, String worldName) { 76 | World world = Bukkit.getWorld(worldName); 77 | if (world == null) { // Check if world exists 78 | sendMessageToPlayer(player, "The world '" + worldName + "' does not exist."); 79 | return false; 80 | } 81 | if (!plugin.getWorldBlackList().contains(worldName)) { 82 | plugin.getWorldBlackList().add(worldName); 83 | sendMessageToPlayer(player, "The world '" + worldName + "' was added to the blacklist."); 84 | } else { 85 | sendMessageToPlayer(player, "The world '" + worldName + "' is already blacklisted."); 86 | } 87 | return true; 88 | } 89 | 90 | /** 91 | * Removes a world from the blacklist if it is currently listed. 92 | * Sends feedback to the player indicating whether the world was removed or wasn’t blacklisted. 93 | * Does not check if the world exists on the server, only if it’s in the blacklist. 94 | * 95 | * @param player The player executing the command 96 | * @param worldName The name of the world to remove from the blacklist 97 | * @return true if the operation was successful (regardless of whether the world was removed) 98 | */ 99 | private boolean removeWorldFromBlacklist(Player player, String worldName) { 100 | if (plugin.getWorldBlackList().contains(worldName)) { 101 | plugin.getWorldBlackList().remove(worldName); 102 | sendMessageToPlayer(player, "The world '" + worldName + "' was removed from the blacklist."); 103 | } else { 104 | sendMessageToPlayer(player, "The world '" + worldName + "' is not on the blacklist."); 105 | } 106 | return true; 107 | } 108 | 109 | /** 110 | * Sends a formatted message to the player with the plugin prefix, if the player is valid and online. 111 | * No message is sent if the player is invalid, banned, or offline. 112 | * 113 | * @param player The player to receive the message 114 | * @param message The message content to send (appended to the plugin prefix) 115 | */ 116 | private static void sendMessageToPlayer(Player player, String message) { 117 | if (!player.isValid() || player.isBanned() || !player.isOnline()) return; 118 | String resultingMessage = VillagerSaver_PluginVars.PluginPrefix + " " + message; 119 | player.sendMessage(resultingMessage); 120 | } 121 | } -------------------------------------------------------------------------------- /src/cl/mariofinale/VillagerSaver_Listener.java: -------------------------------------------------------------------------------- 1 | package cl.mariofinale; 2 | 3 | import org.bukkit.Location; 4 | import org.bukkit.entity.*; 5 | import org.bukkit.event.EventHandler; 6 | import org.bukkit.event.Listener; 7 | import org.bukkit.event.entity.EntityDamageByEntityEvent; 8 | import org.bukkit.event.entity.EntityDamageEvent; 9 | import org.bukkit.event.entity.EntityDeathEvent; 10 | import org.bukkit.projectiles.ProjectileSource; 11 | 12 | /** 13 | * Implements the Listener interface to handle villager death events in the VillagerSaver plugin. 14 | * When a villager is killed by a zombie variant in a non-blacklisted world, it is zombified instead of dying. 15 | */ 16 | public class VillagerSaver_Listener implements Listener { 17 | private final VillagerSaver plugin; 18 | 19 | /** 20 | * Constructs a new listener with a reference to the main plugin instance. 21 | * 22 | * @param plugin The VillagerSaver plugin instance, used to access the world blacklist and logging 23 | */ 24 | public VillagerSaver_Listener(VillagerSaver plugin) { 25 | this.plugin = plugin; 26 | } 27 | 28 | /** 29 | * Handles the EntityDeathEvent to detect villager deaths and zombify them under specific conditions. 30 | * A villager is zombified if it is killed by a zombie variant (e.g., zombie, husk, drowned) via entity attack, 31 | * projectile, or explosion (caused by one the zombie variants), and the villager's world is not blacklisted. 32 | * Logs an error if zombification fails. 33 | * 34 | * @param event The EntityDeathEvent triggered when an entity dies 35 | */ 36 | @EventHandler 37 | public void onEntityDeath(EntityDeathEvent event) { 38 | if (!(event.getEntity() instanceof Villager villager)) return; 39 | 40 | EntityDamageEvent damageCauseEvent = villager.getLastDamageCause(); 41 | if (damageCauseEvent == null) return; 42 | EntityDamageEvent.DamageCause cause = damageCauseEvent.getCause(); 43 | 44 | if (!isValidDamageCause(cause)) return; 45 | 46 | Entity killerEntity = getKillerEntity(damageCauseEvent, cause); 47 | if (killerEntity == null || !killerEntity.isValid() || !isZombieVariant(killerEntity)) return; 48 | 49 | if (isVillagerWorldBlacklisted(villager)) return; 50 | Location loc = villager.getLocation(); 51 | String worldName = villager.getWorld().getName(); 52 | String coordinates = String.format("at %d %d %d", loc.getBlockX(), loc.getBlockY(), loc.getBlockZ()); 53 | 54 | try { 55 | villager.zombify(); 56 | plugin.logInfo("Villager zombified in world " + worldName + " " + coordinates); 57 | } catch (IllegalStateException e) { 58 | plugin.logError("Failed to zombify villager in world " + worldName + " " + coordinates + ": " + e.getMessage()); 59 | } 60 | } 61 | 62 | /** 63 | * Retrieves the entity responsible for killing the villager based on the damage event. 64 | * Supports projectiles (returns the shooter), direct entity attacks (returns the attacker), and explosions 65 | * (returns the TNT prime source or Creeper's target, if applicable). 66 | * 67 | * @param damageCauseEvent The event containing details of the damage that caused the death 68 | * @param cause The specific cause of the damage (e.g., PROJECTILE, ENTITY_ATTACK) 69 | * @return The entity responsible for the damage, or null if not applicable or undetermined 70 | */ 71 | private Entity getKillerEntity(EntityDamageEvent damageCauseEvent, EntityDamageEvent.DamageCause cause) { 72 | if (!(damageCauseEvent instanceof EntityDamageByEntityEvent entityEvent)) return null; 73 | Entity damagerEntity = entityEvent.getDamager(); 74 | 75 | switch (cause) { 76 | case PROJECTILE: 77 | if (damagerEntity instanceof Projectile projectile) { 78 | ProjectileSource shooter = projectile.getShooter(); 79 | return shooter instanceof Entity ? (Entity) shooter : null; 80 | } 81 | return null; 82 | case ENTITY_ATTACK: 83 | return damagerEntity; 84 | case ENTITY_EXPLOSION: 85 | if (damagerEntity instanceof TNTPrimed tnt) { 86 | return tnt.getSource(); 87 | } 88 | if (damagerEntity instanceof Creeper creeper) { 89 | Entity target = creeper.getTarget(); 90 | return (target != null && target.isValid()) ? target : null; 91 | } 92 | return null; 93 | default: 94 | return null; 95 | } 96 | } 97 | 98 | /** 99 | * Determines if the damage cause is one that triggers villager zombification. 100 | * Valid causes are direct entity attacks, projectiles, and entity-induced explosions. 101 | * 102 | * @param cause The damage cause to check 103 | * @return true if the cause is ENTITY_ATTACK, PROJECTILE, or ENTITY_EXPLOSION, false otherwise 104 | */ 105 | private boolean isValidDamageCause(EntityDamageEvent.DamageCause cause) { 106 | return cause == EntityDamageEvent.DamageCause.ENTITY_ATTACK || 107 | cause == EntityDamageEvent.DamageCause.PROJECTILE || 108 | cause == EntityDamageEvent.DamageCause.ENTITY_EXPLOSION; 109 | } 110 | 111 | /** 112 | * Checks if the entity is a zombie variant as defined in VillagerSaver_PluginVars.ZombieTypes. 113 | * Players are explicitly excluded, even if they match a zombie-like entity type. 114 | * 115 | * @param entity The entity to check 116 | * @return true if the entity is a zombie variant (e.g., zombie, husk, drowned) and not a player, false otherwise 117 | */ 118 | private boolean isZombieVariant(Entity entity) { 119 | if (entity instanceof Player) return false; 120 | return VillagerSaver_PluginVars.ZombieTypes.contains(entity.getType()); 121 | } 122 | 123 | /** 124 | * Checks if the villager’s world is in the plugin’s blacklist. 125 | * Blacklisted worlds prevent villager zombification. 126 | * 127 | * @param villager The villager entity to check 128 | * @return true if the villager’s world is blacklisted, false otherwise 129 | */ 130 | private boolean isVillagerWorldBlacklisted(Villager villager) { 131 | return plugin.getWorldBlackList().contains(villager.getWorld().getName()); 132 | } 133 | } -------------------------------------------------------------------------------- /JavaDocs/help-doc.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | API Help 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 21 | 24 |
25 | 54 |
55 |
56 |

JavaDoc Help

57 | 75 |
76 |
77 |

Navigation

78 | Starting from the Overview page, you can browse the documentation using the links in each page, and in the navigation bar at the top of each page. The Index and Search box allow you to navigate to specific declarations and summary pages, including: All Packages, All Classes and Interfaces 79 | 89 |
90 |
91 |
92 |

Kinds of Pages

93 | The following sections describe the different kinds of pages in this collection. 94 |
95 |

Package

96 |

Each package has a page that contains a list of its classes and interfaces, with a summary for each. These pages may contain the following categories:

97 |
    98 |
  • Interfaces
  • 99 |
  • Classes
  • 100 |
  • Enum Classes
  • 101 |
  • Exceptions
  • 102 |
  • Errors
  • 103 |
  • Annotation Interfaces
  • 104 |
105 |
106 |
107 |

Class or Interface

108 |

Each class, interface, nested class and nested interface has its own separate page. Each of these pages has three sections consisting of a declaration and description, member summary tables, and detailed member descriptions. Entries in each of these sections are omitted if they are empty or not applicable.

109 |
    110 |
  • Class Inheritance Diagram
  • 111 |
  • Direct Subclasses
  • 112 |
  • All Known Subinterfaces
  • 113 |
  • All Known Implementing Classes
  • 114 |
  • Class or Interface Declaration
  • 115 |
  • Class or Interface Description
  • 116 |
117 |
118 |
    119 |
  • Nested Class Summary
  • 120 |
  • Enum Constant Summary
  • 121 |
  • Field Summary
  • 122 |
  • Property Summary
  • 123 |
  • Constructor Summary
  • 124 |
  • Method Summary
  • 125 |
  • Required Element Summary
  • 126 |
  • Optional Element Summary
  • 127 |
128 |
129 |
    130 |
  • Enum Constant Details
  • 131 |
  • Field Details
  • 132 |
  • Property Details
  • 133 |
  • Constructor Details
  • 134 |
  • Method Details
  • 135 |
  • Element Details
  • 136 |
137 |

Note: Annotation interfaces have required and optional elements, but not methods. Only enum classes have enum constants. The components of a record class are displayed as part of the declaration of the record class. Properties are a feature of JavaFX.

138 |

The summary entries are alphabetical, while the detailed descriptions are in the order they appear in the source code. This preserves the logical groupings established by the programmer.

139 |
140 |
141 |

Other Files

142 |

Packages and modules may contain pages with additional information related to the declarations nearby.

143 |
144 |
145 |

Tree (Class Hierarchy)

146 |

There is a Class Hierarchy page for all packages, plus a hierarchy for each package. Each hierarchy page contains a list of classes and a list of interfaces. Classes are organized by inheritance structure starting with java.lang.Object. Interfaces do not inherit from java.lang.Object.

147 |
    148 |
  • When viewing the Overview page, clicking on TREE displays the hierarchy for all packages.
  • 149 |
  • When viewing a particular package, class or interface page, clicking on TREE displays the hierarchy for only that package.
  • 150 |
151 |
152 |
153 |

All Packages

154 |

The All Packages page contains an alphabetic index of all packages contained in the documentation.

155 |
156 |
157 |

All Classes and Interfaces

158 |

The All Classes and Interfaces page contains an alphabetic index of all classes and interfaces contained in the documentation, including annotation interfaces, enum classes, and record classes.

159 |
160 |
161 |

Index

162 |

The Index contains an alphabetic index of all classes, interfaces, constructors, methods, and fields in the documentation, as well as summary pages such as All Packages, All Classes and Interfaces.

163 |
164 |
165 |
166 | This help file applies to API documentation generated by the standard doclet.
167 |
168 |
169 | 170 | 171 | -------------------------------------------------------------------------------- /JavaDocs/cl/mariofinale/VillagerSaver_PluginVars.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | VillagerSaver_PluginVars 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 21 | 24 |
25 | 62 |
63 |
64 | 65 |
66 | 67 |

Class VillagerSaver_PluginVars

68 |
69 |
java.lang.Object 70 |
cl.mariofinale.VillagerSaver_PluginVars
71 |
72 |
73 |
74 |
public class VillagerSaver_PluginVars 75 | extends Object
76 |
This class contains variables used by the VillagerSaver plugin.
77 |
78 |
79 | 125 |
126 |
127 |
    128 | 129 |
  • 130 |
    131 |

    Field Details

    132 |
      133 |
    • 134 |
      135 |

      PluginPrefix

      136 |
      public static final String PluginPrefix
      137 |
      The prefix used in plugin messages.
      138 |
      139 |
    • 140 |
    • 141 |
      142 |

      ZombieTypes

      143 |
      public static final ArrayList ZombieTypes
      144 |
      The list of zombie entity types. 145 | These are the entity types that are considered zombie variants.
      146 |
      147 |
    • 148 |
    149 |
    150 |
  • 151 | 152 |
  • 153 |
    154 |

    Constructor Details

    155 |
      156 |
    • 157 |
      158 |

      VillagerSaver_PluginVars

      159 |
      public VillagerSaver_PluginVars()
      160 |
      161 |
    • 162 |
    163 |
    164 |
  • 165 |
166 |
167 | 168 |
169 |
170 |
171 | 172 | 173 | -------------------------------------------------------------------------------- /JavaDocs/search.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015, 2020, Oracle and/or its affiliates. All rights reserved. 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 | * 5 | * This code is free software; you can redistribute it and/or modify it 6 | * under the terms of the GNU General Public License version 2 only, as 7 | * published by the Free Software Foundation. Oracle designates this 8 | * particular file as subject to the "Classpath" exception as provided 9 | * by Oracle in the LICENSE file that accompanied this code. 10 | * 11 | * This code is distributed in the hope that it will be useful, but WITHOUT 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 13 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 | * version 2 for more details (a copy is included in the LICENSE file that 15 | * accompanied this code). 16 | * 17 | * You should have received a copy of the GNU General Public License version 18 | * 2 along with this work; if not, write to the Free Software Foundation, 19 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20 | * 21 | * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 22 | * or visit www.oracle.com if you need additional information or have any 23 | * questions. 24 | */ 25 | 26 | var noResult = {l: "No results found"}; 27 | var loading = {l: "Loading search index..."}; 28 | var catModules = "Modules"; 29 | var catPackages = "Packages"; 30 | var catTypes = "Classes and Interfaces"; 31 | var catMembers = "Members"; 32 | var catSearchTags = "Search Tags"; 33 | var highlight = "$&"; 34 | var searchPattern = ""; 35 | var fallbackPattern = ""; 36 | var RANKING_THRESHOLD = 2; 37 | var NO_MATCH = 0xffff; 38 | var MIN_RESULTS = 3; 39 | var MAX_RESULTS = 500; 40 | var UNNAMED = ""; 41 | function escapeHtml(str) { 42 | return str.replace(//g, ">"); 43 | } 44 | function getHighlightedText(item, matcher, fallbackMatcher) { 45 | var escapedItem = escapeHtml(item); 46 | var highlighted = escapedItem.replace(matcher, highlight); 47 | if (highlighted === escapedItem) { 48 | highlighted = escapedItem.replace(fallbackMatcher, highlight) 49 | } 50 | return highlighted; 51 | } 52 | function getURLPrefix(ui) { 53 | var urlPrefix=""; 54 | var slash = "/"; 55 | if (ui.item.category === catModules) { 56 | return ui.item.l + slash; 57 | } else if (ui.item.category === catPackages && ui.item.m) { 58 | return ui.item.m + slash; 59 | } else if (ui.item.category === catTypes || ui.item.category === catMembers) { 60 | if (ui.item.m) { 61 | urlPrefix = ui.item.m + slash; 62 | } else { 63 | $.each(packageSearchIndex, function(index, item) { 64 | if (item.m && ui.item.p === item.l) { 65 | urlPrefix = item.m + slash; 66 | } 67 | }); 68 | } 69 | } 70 | return urlPrefix; 71 | } 72 | function createSearchPattern(term) { 73 | var pattern = ""; 74 | var isWordToken = false; 75 | term.replace(/,\s*/g, ", ").trim().split(/\s+/).forEach(function(w, index) { 76 | if (index > 0) { 77 | // whitespace between identifiers is significant 78 | pattern += (isWordToken && /^\w/.test(w)) ? "\\s+" : "\\s*"; 79 | } 80 | var tokens = w.split(/(?=[A-Z,.()<>[\/])/); 81 | for (var i = 0; i < tokens.length; i++) { 82 | var s = tokens[i]; 83 | if (s === "") { 84 | continue; 85 | } 86 | pattern += $.ui.autocomplete.escapeRegex(s); 87 | isWordToken = /\w$/.test(s); 88 | if (isWordToken) { 89 | pattern += "([a-z0-9_$<>\\[\\]]*?)"; 90 | } 91 | } 92 | }); 93 | return pattern; 94 | } 95 | function createMatcher(pattern, flags) { 96 | var isCamelCase = /[A-Z]/.test(pattern); 97 | return new RegExp(pattern, flags + (isCamelCase ? "" : "i")); 98 | } 99 | var watermark = 'Search'; 100 | $(function() { 101 | var search = $("#search-input"); 102 | var reset = $("#reset-button"); 103 | search.val(''); 104 | search.prop("disabled", false); 105 | reset.prop("disabled", false); 106 | search.val(watermark).addClass('watermark'); 107 | search.blur(function() { 108 | if ($(this).val().length === 0) { 109 | $(this).val(watermark).addClass('watermark'); 110 | } 111 | }); 112 | search.on('click keydown paste', function() { 113 | if ($(this).val() === watermark) { 114 | $(this).val('').removeClass('watermark'); 115 | } 116 | }); 117 | reset.click(function() { 118 | search.val('').focus(); 119 | }); 120 | search.focus()[0].setSelectionRange(0, 0); 121 | }); 122 | $.widget("custom.catcomplete", $.ui.autocomplete, { 123 | _create: function() { 124 | this._super(); 125 | this.widget().menu("option", "items", "> :not(.ui-autocomplete-category)"); 126 | }, 127 | _renderMenu: function(ul, items) { 128 | var rMenu = this; 129 | var currentCategory = ""; 130 | rMenu.menu.bindings = $(); 131 | $.each(items, function(index, item) { 132 | var li; 133 | if (item.category && item.category !== currentCategory) { 134 | ul.append("
  • " + item.category + "
  • "); 135 | currentCategory = item.category; 136 | } 137 | li = rMenu._renderItemData(ul, item); 138 | if (item.category) { 139 | li.attr("aria-label", item.category + " : " + item.l); 140 | li.attr("class", "result-item"); 141 | } else { 142 | li.attr("aria-label", item.l); 143 | li.attr("class", "result-item"); 144 | } 145 | }); 146 | }, 147 | _renderItem: function(ul, item) { 148 | var label = ""; 149 | var matcher = createMatcher(escapeHtml(searchPattern), "g"); 150 | var fallbackMatcher = new RegExp(fallbackPattern, "gi") 151 | if (item.category === catModules) { 152 | label = getHighlightedText(item.l, matcher, fallbackMatcher); 153 | } else if (item.category === catPackages) { 154 | label = getHighlightedText(item.l, matcher, fallbackMatcher); 155 | } else if (item.category === catTypes) { 156 | label = (item.p && item.p !== UNNAMED) 157 | ? getHighlightedText(item.p + "." + item.l, matcher, fallbackMatcher) 158 | : getHighlightedText(item.l, matcher, fallbackMatcher); 159 | } else if (item.category === catMembers) { 160 | label = (item.p && item.p !== UNNAMED) 161 | ? getHighlightedText(item.p + "." + item.c + "." + item.l, matcher, fallbackMatcher) 162 | : getHighlightedText(item.c + "." + item.l, matcher, fallbackMatcher); 163 | } else if (item.category === catSearchTags) { 164 | label = getHighlightedText(item.l, matcher, fallbackMatcher); 165 | } else { 166 | label = item.l; 167 | } 168 | var li = $("
  • ").appendTo(ul); 169 | var div = $("
    ").appendTo(li); 170 | if (item.category === catSearchTags && item.h) { 171 | if (item.d) { 172 | div.html(label + " (" + item.h + ")
    " 173 | + item.d + "
    "); 174 | } else { 175 | div.html(label + " (" + item.h + ")"); 176 | } 177 | } else { 178 | if (item.m) { 179 | div.html(item.m + "/" + label); 180 | } else { 181 | div.html(label); 182 | } 183 | } 184 | return li; 185 | } 186 | }); 187 | function rankMatch(match, category) { 188 | if (!match) { 189 | return NO_MATCH; 190 | } 191 | var index = match.index; 192 | var input = match.input; 193 | var leftBoundaryMatch = 2; 194 | var periferalMatch = 0; 195 | // make sure match is anchored on a left word boundary 196 | if (index === 0 || /\W/.test(input[index - 1]) || "_" === input[index]) { 197 | leftBoundaryMatch = 0; 198 | } else if ("_" === input[index - 1] || (input[index] === input[index].toUpperCase() && !/^[A-Z0-9_$]+$/.test(input))) { 199 | leftBoundaryMatch = 1; 200 | } 201 | var matchEnd = index + match[0].length; 202 | var leftParen = input.indexOf("("); 203 | var endOfName = leftParen > -1 ? leftParen : input.length; 204 | // exclude peripheral matches 205 | if (category !== catModules && category !== catSearchTags) { 206 | var delim = category === catPackages ? "/" : "."; 207 | if (leftParen > -1 && leftParen < index) { 208 | periferalMatch += 2; 209 | } else if (input.lastIndexOf(delim, endOfName) >= matchEnd) { 210 | periferalMatch += 2; 211 | } 212 | } 213 | var delta = match[0].length === endOfName ? 0 : 1; // rank full match higher than partial match 214 | for (var i = 1; i < match.length; i++) { 215 | // lower ranking if parts of the name are missing 216 | if (match[i]) 217 | delta += match[i].length; 218 | } 219 | if (category === catTypes) { 220 | // lower ranking if a type name contains unmatched camel-case parts 221 | if (/[A-Z]/.test(input.substring(matchEnd))) 222 | delta += 5; 223 | if (/[A-Z]/.test(input.substring(0, index))) 224 | delta += 5; 225 | } 226 | return leftBoundaryMatch + periferalMatch + (delta / 200); 227 | 228 | } 229 | function doSearch(request, response) { 230 | var result = []; 231 | searchPattern = createSearchPattern(request.term); 232 | fallbackPattern = createSearchPattern(request.term.toLowerCase()); 233 | if (searchPattern === "") { 234 | return this.close(); 235 | } 236 | var camelCaseMatcher = createMatcher(searchPattern, ""); 237 | var fallbackMatcher = new RegExp(fallbackPattern, "i"); 238 | 239 | function searchIndexWithMatcher(indexArray, matcher, category, nameFunc) { 240 | if (indexArray) { 241 | var newResults = []; 242 | $.each(indexArray, function (i, item) { 243 | item.category = category; 244 | var ranking = rankMatch(matcher.exec(nameFunc(item)), category); 245 | if (ranking < RANKING_THRESHOLD) { 246 | newResults.push({ranking: ranking, item: item}); 247 | } 248 | return newResults.length <= MAX_RESULTS; 249 | }); 250 | return newResults.sort(function(e1, e2) { 251 | return e1.ranking - e2.ranking; 252 | }).map(function(e) { 253 | return e.item; 254 | }); 255 | } 256 | return []; 257 | } 258 | function searchIndex(indexArray, category, nameFunc) { 259 | var primaryResults = searchIndexWithMatcher(indexArray, camelCaseMatcher, category, nameFunc); 260 | result = result.concat(primaryResults); 261 | if (primaryResults.length <= MIN_RESULTS && !camelCaseMatcher.ignoreCase) { 262 | var secondaryResults = searchIndexWithMatcher(indexArray, fallbackMatcher, category, nameFunc); 263 | result = result.concat(secondaryResults.filter(function (item) { 264 | return primaryResults.indexOf(item) === -1; 265 | })); 266 | } 267 | } 268 | 269 | searchIndex(moduleSearchIndex, catModules, function(item) { return item.l; }); 270 | searchIndex(packageSearchIndex, catPackages, function(item) { 271 | return (item.m && request.term.indexOf("/") > -1) 272 | ? (item.m + "/" + item.l) : item.l; 273 | }); 274 | searchIndex(typeSearchIndex, catTypes, function(item) { 275 | return request.term.indexOf(".") > -1 ? item.p + "." + item.l : item.l; 276 | }); 277 | searchIndex(memberSearchIndex, catMembers, function(item) { 278 | return request.term.indexOf(".") > -1 279 | ? item.p + "." + item.c + "." + item.l : item.l; 280 | }); 281 | searchIndex(tagSearchIndex, catSearchTags, function(item) { return item.l; }); 282 | 283 | if (!indexFilesLoaded()) { 284 | updateSearchResults = function() { 285 | doSearch(request, response); 286 | } 287 | result.unshift(loading); 288 | } else { 289 | updateSearchResults = function() {}; 290 | } 291 | response(result); 292 | } 293 | $(function() { 294 | $("#search-input").catcomplete({ 295 | minLength: 1, 296 | delay: 300, 297 | source: doSearch, 298 | response: function(event, ui) { 299 | if (!ui.content.length) { 300 | ui.content.push(noResult); 301 | } else { 302 | $("#search-input").empty(); 303 | } 304 | }, 305 | autoFocus: true, 306 | focus: function(event, ui) { 307 | return false; 308 | }, 309 | position: { 310 | collision: "flip" 311 | }, 312 | select: function(event, ui) { 313 | if (ui.item.category) { 314 | var url = getURLPrefix(ui); 315 | if (ui.item.category === catModules) { 316 | url += "module-summary.html"; 317 | } else if (ui.item.category === catPackages) { 318 | if (ui.item.u) { 319 | url = ui.item.u; 320 | } else { 321 | url += ui.item.l.replace(/\./g, '/') + "/package-summary.html"; 322 | } 323 | } else if (ui.item.category === catTypes) { 324 | if (ui.item.u) { 325 | url = ui.item.u; 326 | } else if (ui.item.p === UNNAMED) { 327 | url += ui.item.l + ".html"; 328 | } else { 329 | url += ui.item.p.replace(/\./g, '/') + "/" + ui.item.l + ".html"; 330 | } 331 | } else if (ui.item.category === catMembers) { 332 | if (ui.item.p === UNNAMED) { 333 | url += ui.item.c + ".html" + "#"; 334 | } else { 335 | url += ui.item.p.replace(/\./g, '/') + "/" + ui.item.c + ".html" + "#"; 336 | } 337 | if (ui.item.u) { 338 | url += ui.item.u; 339 | } else { 340 | url += ui.item.l; 341 | } 342 | } else if (ui.item.category === catSearchTags) { 343 | url += ui.item.u; 344 | } 345 | if (top !== window) { 346 | parent.classFrame.location = pathtoroot + url; 347 | } else { 348 | window.location.href = pathtoroot + url; 349 | } 350 | $("#search-input").focus(); 351 | } 352 | } 353 | }); 354 | }); 355 | -------------------------------------------------------------------------------- /JavaDocs/cl/mariofinale/VillagerSaver_Listener.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | VillagerSaver_Listener 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 25 | 28 |
    29 | 66 |
    67 |
    68 | 69 |
    70 | 71 |

    Class VillagerSaver_Listener

    72 |
    73 |
    java.lang.Object 74 |
    cl.mariofinale.VillagerSaver_Listener
    75 |
    76 |
    77 |
    78 |
    All Implemented Interfaces:
    79 |
    org.bukkit.event.Listener
    80 |
    81 |
    82 |
    public class VillagerSaver_Listener 83 | extends Object 84 | implements org.bukkit.event.Listener
    85 |
    Class that implements the Listener interface to handle entity death events.
    86 |
    87 |
    88 |
      89 | 90 |
    • 91 |
      92 |

      Constructor Summary

      93 |
      Constructors
      94 |
      95 |
      Constructor
      96 |
      Description
      97 | 98 |
       
      99 |
      100 |
      101 |
    • 102 | 103 |
    • 104 |
      105 |

      Method Summary

      106 |
      107 |
      108 |
      109 |
      110 |
      Modifier and Type
      111 |
      Method
      112 |
      Description
      113 |
      private org.bukkit.entity.Entity
      114 |
      getKillerEntity(org.bukkit.event.entity.EntityDamageEvent damageCauseEvent, 115 | org.bukkit.event.entity.EntityDamageEvent.DamageCause cause)
      116 |
      117 |
      Gets the killer entity from the damage cause event.
      118 |
      119 |
      private boolean
      120 |
      isValidDamageCause(org.bukkit.event.entity.EntityDamageEvent.DamageCause cause)
      121 |
      122 |
      Checks if the given damage cause is valid for villager death.
      123 |
      124 |
      private boolean
      125 |
      isVillagerWorldBlacklisted(org.bukkit.entity.Villager villager)
      126 |
      127 |
      Checks if the given villager is in a blacklisted world.
      128 |
      129 |
      private boolean
      130 |
      isZombieVariant(org.bukkit.entity.Entity entity)
      131 |
      132 |
      Checks if the given entity is a zombie variant.
      133 |
      134 |
      void
      135 |
      onEntityDeath(org.bukkit.event.entity.EntityDeathEvent event)
      136 |
      137 |
      Event handler for the EntityDeathEvent.
      138 |
      139 |
      140 |
      141 |
      142 |
      143 |

      Methods inherited from class java.lang.Object

      144 | clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      145 |
      146 |
    • 147 |
    148 |
    149 |
    150 |
      151 | 152 |
    • 153 |
      154 |

      Constructor Details

      155 |
        156 |
      • 157 |
        158 |

        VillagerSaver_Listener

        159 |
        public VillagerSaver_Listener()
        160 |
        161 |
      • 162 |
      163 |
      164 |
    • 165 | 166 |
    • 167 |
      168 |

      Method Details

      169 |
        170 |
      • 171 |
        172 |

        onEntityDeath

        173 |
        public void onEntityDeath(org.bukkit.event.entity.EntityDeathEvent event)
        174 |
        Event handler for the EntityDeathEvent.
        175 |
        176 |
        Parameters:
        177 |
        event - The EntityDeathEvent.
        178 |
        179 |
        180 |
      • 181 |
      • 182 |
        183 |

        getKillerEntity

        184 |
        private org.bukkit.entity.Entity getKillerEntity(org.bukkit.event.entity.EntityDamageEvent damageCauseEvent, 185 | org.bukkit.event.entity.EntityDamageEvent.DamageCause cause)
        186 |
        Gets the killer entity from the damage cause event.
        187 |
        188 |
        Parameters:
        189 |
        damageCauseEvent - The damage cause event.
        190 |
        cause - The damage cause.
        191 |
        Returns:
        192 |
        The killer entity, or null if not found.
        193 |
        194 |
        195 |
      • 196 |
      • 197 |
        198 |

        isValidDamageCause

        199 |
        private boolean isValidDamageCause(org.bukkit.event.entity.EntityDamageEvent.DamageCause cause)
        200 |
        Checks if the given damage cause is valid for villager death.
        201 |
        202 |
        Parameters:
        203 |
        cause - The damage cause.
        204 |
        Returns:
        205 |
        true if the cause is valid, false otherwise.
        206 |
        207 |
        208 |
      • 209 |
      • 210 |
        211 |

        isZombieVariant

        212 |
        private boolean isZombieVariant(org.bukkit.entity.Entity entity)
        213 |
        Checks if the given entity is a zombie variant.
        214 |
        215 |
        Parameters:
        216 |
        entity - The entity to check.
        217 |
        Returns:
        218 |
        true if the entity is a zombie variant, false otherwise.
        219 |
        220 |
        221 |
      • 222 |
      • 223 |
        224 |

        isVillagerWorldBlacklisted

        225 |
        private boolean isVillagerWorldBlacklisted(org.bukkit.entity.Villager villager)
        226 |
        Checks if the given villager is in a blacklisted world.
        227 |
        228 |
        Parameters:
        229 |
        villager - The villager entity.
        230 |
        Returns:
        231 |
        true if the villager is in a blacklisted world, false otherwise.
        232 |
        233 |
        234 |
      • 235 |
      236 |
      237 |
    • 238 |
    239 |
    240 | 241 |
    242 |
    243 |
    244 | 245 | 246 | -------------------------------------------------------------------------------- /JavaDocs/script-dir/jquery-ui.min.css: -------------------------------------------------------------------------------- 1 | /*! jQuery UI - v1.12.1 - 2018-12-06 2 | * http://jqueryui.com 3 | * Includes: core.css, autocomplete.css, menu.css, theme.css 4 | * To view and modify this theme, visit http://jqueryui.com/themeroller/?scope=&folderName=custom-theme&bgImgOpacityError=95&bgImgOpacityHighlight=55&bgImgOpacityActive=65&bgImgOpacityHover=75&bgImgOpacityDefault=75&bgImgOpacityContent=75&bgImgOpacityHeader=75&cornerRadiusShadow=8px&offsetLeftShadow=-8px&offsetTopShadow=-8px&thicknessShadow=8px&opacityShadow=30&bgImgOpacityShadow=0&bgTextureShadow=flat&bgColorShadow=%23aaaaaa&opacityOverlay=30&bgImgOpacityOverlay=0&bgTextureOverlay=flat&bgColorOverlay=%23aaaaaa&iconColorError=%23cd0a0a&fcError=%23cd0a0a&borderColorError=%23cd0a0a&bgTextureError=glass&bgColorError=%23fef1ec&iconColorHighlight=%232e83ff&fcHighlight=%23363636&borderColorHighlight=%23fcefa1&bgTextureHighlight=glass&bgColorHighlight=%23fbf9ee&iconColorActive=%23454545&fcActive=%23212121&borderColorActive=%23aaaaaa&bgTextureActive=glass&bgColorActive=%23dadada&iconColorHover=%23454545&fcHover=%23212121&borderColorHover=%23999999&bgTextureHover=glass&bgColorHover=%23dadada&iconColorDefault=%23888888&fcDefault=%23555555&borderColorDefault=%23d3d3d3&bgTextureDefault=glass&bgColorDefault=%23e6e6e6&iconColorContent=%23222222&fcContent=%23222222&borderColorContent=%23aaaaaa&bgTextureContent=flat&bgColorContent=%23ffffff&iconColorHeader=%23222222&fcHeader=%23222222&borderColorHeader=%23aaaaaa&bgTextureHeader=highlight_soft&bgColorHeader=%23cccccc&cornerRadius=4px&fwDefault=normal&fsDefault=1.1em&ffDefault=Verdana%2CArial%2Csans-serif 5 | * Copyright jQuery Foundation and other contributors; Licensed MIT */ 6 | 7 | .ui-helper-hidden{display:none}.ui-helper-hidden-accessible{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.ui-helper-reset{margin:0;padding:0;border:0;outline:0;line-height:1.3;text-decoration:none;font-size:100%;list-style:none}.ui-helper-clearfix:before,.ui-helper-clearfix:after{content:"";display:table;border-collapse:collapse}.ui-helper-clearfix:after{clear:both}.ui-helper-zfix{width:100%;height:100%;top:0;left:0;position:absolute;opacity:0;filter:Alpha(Opacity=0)}.ui-front{z-index:100}.ui-state-disabled{cursor:default!important;pointer-events:none}.ui-icon{display:inline-block;vertical-align:middle;margin-top:-.25em;position:relative;text-indent:-99999px;overflow:hidden;background-repeat:no-repeat}.ui-widget-icon-block{left:50%;margin-left:-8px;display:block}.ui-widget-overlay{position:fixed;top:0;left:0;width:100%;height:100%}.ui-autocomplete{position:absolute;top:0;left:0;cursor:default}.ui-menu{list-style:none;padding:0;margin:0;display:block;outline:0}.ui-menu .ui-menu{position:absolute}.ui-menu .ui-menu-item{margin:0;cursor:pointer;list-style-image:url("data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7")}.ui-menu .ui-menu-item-wrapper{position:relative;padding:3px 1em 3px .4em}.ui-menu .ui-menu-divider{margin:5px 0;height:0;font-size:0;line-height:0;border-width:1px 0 0 0}.ui-menu .ui-state-focus,.ui-menu .ui-state-active{margin:-1px}.ui-menu-icons{position:relative}.ui-menu-icons .ui-menu-item-wrapper{padding-left:2em}.ui-menu .ui-icon{position:absolute;top:0;bottom:0;left:.2em;margin:auto 0}.ui-menu .ui-menu-icon{left:auto;right:0}.ui-widget{font-family:Verdana,Arial,sans-serif;font-size:1.1em}.ui-widget .ui-widget{font-size:1em}.ui-widget input,.ui-widget select,.ui-widget textarea,.ui-widget button{font-family:Verdana,Arial,sans-serif;font-size:1em}.ui-widget.ui-widget-content{border:1px solid #d3d3d3}.ui-widget-content{border:1px solid #aaa;background:#fff;color:#222}.ui-widget-content a{color:#222}.ui-widget-header{border:1px solid #aaa;background:#ccc url("images/ui-bg_highlight-soft_75_cccccc_1x100.png") 50% 50% repeat-x;color:#222;font-weight:bold}.ui-widget-header a{color:#222}.ui-state-default,.ui-widget-content .ui-state-default,.ui-widget-header .ui-state-default,.ui-button,html .ui-button.ui-state-disabled:hover,html .ui-button.ui-state-disabled:active{border:1px solid #d3d3d3;background:#e6e6e6 url("images/ui-bg_glass_75_e6e6e6_1x400.png") 50% 50% repeat-x;font-weight:normal;color:#555}.ui-state-default a,.ui-state-default a:link,.ui-state-default a:visited,a.ui-button,a:link.ui-button,a:visited.ui-button,.ui-button{color:#555;text-decoration:none}.ui-state-hover,.ui-widget-content .ui-state-hover,.ui-widget-header .ui-state-hover,.ui-state-focus,.ui-widget-content .ui-state-focus,.ui-widget-header .ui-state-focus,.ui-button:hover,.ui-button:focus{border:1px solid #999;background:#dadada url("images/ui-bg_glass_75_dadada_1x400.png") 50% 50% repeat-x;font-weight:normal;color:#212121}.ui-state-hover a,.ui-state-hover a:hover,.ui-state-hover a:link,.ui-state-hover a:visited,.ui-state-focus a,.ui-state-focus a:hover,.ui-state-focus a:link,.ui-state-focus a:visited,a.ui-button:hover,a.ui-button:focus{color:#212121;text-decoration:none}.ui-visual-focus{box-shadow:0 0 3px 1px rgb(94,158,214)}.ui-state-active,.ui-widget-content .ui-state-active,.ui-widget-header .ui-state-active,a.ui-button:active,.ui-button:active,.ui-button.ui-state-active:hover{border:1px solid #aaa;background:#dadada url("images/ui-bg_glass_65_dadada_1x400.png") 50% 50% repeat-x;font-weight:normal;color:#212121}.ui-icon-background,.ui-state-active .ui-icon-background{border:#aaa;background-color:#212121}.ui-state-active a,.ui-state-active a:link,.ui-state-active a:visited{color:#212121;text-decoration:none}.ui-state-highlight,.ui-widget-content .ui-state-highlight,.ui-widget-header .ui-state-highlight{border:1px solid #fcefa1;background:#fbf9ee url("images/ui-bg_glass_55_fbf9ee_1x400.png") 50% 50% repeat-x;color:#363636}.ui-state-checked{border:1px solid #fcefa1;background:#fbf9ee}.ui-state-highlight a,.ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a{color:#363636}.ui-state-error,.ui-widget-content .ui-state-error,.ui-widget-header .ui-state-error{border:1px solid #cd0a0a;background:#fef1ec url("images/ui-bg_glass_95_fef1ec_1x400.png") 50% 50% repeat-x;color:#cd0a0a}.ui-state-error a,.ui-widget-content .ui-state-error a,.ui-widget-header .ui-state-error a{color:#cd0a0a}.ui-state-error-text,.ui-widget-content .ui-state-error-text,.ui-widget-header .ui-state-error-text{color:#cd0a0a}.ui-priority-primary,.ui-widget-content .ui-priority-primary,.ui-widget-header .ui-priority-primary{font-weight:bold}.ui-priority-secondary,.ui-widget-content .ui-priority-secondary,.ui-widget-header .ui-priority-secondary{opacity:.7;filter:Alpha(Opacity=70);font-weight:normal}.ui-state-disabled,.ui-widget-content .ui-state-disabled,.ui-widget-header .ui-state-disabled{opacity:.35;filter:Alpha(Opacity=35);background-image:none}.ui-state-disabled .ui-icon{filter:Alpha(Opacity=35)}.ui-icon{width:16px;height:16px}.ui-icon,.ui-widget-content .ui-icon{background-image:url("images/ui-icons_222222_256x240.png")}.ui-widget-header .ui-icon{background-image:url("images/ui-icons_222222_256x240.png")}.ui-state-hover .ui-icon,.ui-state-focus .ui-icon,.ui-button:hover .ui-icon,.ui-button:focus .ui-icon{background-image:url("images/ui-icons_454545_256x240.png")}.ui-state-active .ui-icon,.ui-button:active .ui-icon{background-image:url("images/ui-icons_454545_256x240.png")}.ui-state-highlight .ui-icon,.ui-button .ui-state-highlight.ui-icon{background-image:url("images/ui-icons_2e83ff_256x240.png")}.ui-state-error .ui-icon,.ui-state-error-text .ui-icon{background-image:url("images/ui-icons_cd0a0a_256x240.png")}.ui-button .ui-icon{background-image:url("images/ui-icons_888888_256x240.png")}.ui-icon-blank{background-position:16px 16px}.ui-icon-caret-1-n{background-position:0 0}.ui-icon-caret-1-ne{background-position:-16px 0}.ui-icon-caret-1-e{background-position:-32px 0}.ui-icon-caret-1-se{background-position:-48px 0}.ui-icon-caret-1-s{background-position:-65px 0}.ui-icon-caret-1-sw{background-position:-80px 0}.ui-icon-caret-1-w{background-position:-96px 0}.ui-icon-caret-1-nw{background-position:-112px 0}.ui-icon-caret-2-n-s{background-position:-128px 0}.ui-icon-caret-2-e-w{background-position:-144px 0}.ui-icon-triangle-1-n{background-position:0 -16px}.ui-icon-triangle-1-ne{background-position:-16px -16px}.ui-icon-triangle-1-e{background-position:-32px -16px}.ui-icon-triangle-1-se{background-position:-48px -16px}.ui-icon-triangle-1-s{background-position:-65px -16px}.ui-icon-triangle-1-sw{background-position:-80px -16px}.ui-icon-triangle-1-w{background-position:-96px -16px}.ui-icon-triangle-1-nw{background-position:-112px -16px}.ui-icon-triangle-2-n-s{background-position:-128px -16px}.ui-icon-triangle-2-e-w{background-position:-144px -16px}.ui-icon-arrow-1-n{background-position:0 -32px}.ui-icon-arrow-1-ne{background-position:-16px -32px}.ui-icon-arrow-1-e{background-position:-32px -32px}.ui-icon-arrow-1-se{background-position:-48px -32px}.ui-icon-arrow-1-s{background-position:-65px -32px}.ui-icon-arrow-1-sw{background-position:-80px -32px}.ui-icon-arrow-1-w{background-position:-96px -32px}.ui-icon-arrow-1-nw{background-position:-112px -32px}.ui-icon-arrow-2-n-s{background-position:-128px -32px}.ui-icon-arrow-2-ne-sw{background-position:-144px -32px}.ui-icon-arrow-2-e-w{background-position:-160px -32px}.ui-icon-arrow-2-se-nw{background-position:-176px -32px}.ui-icon-arrowstop-1-n{background-position:-192px -32px}.ui-icon-arrowstop-1-e{background-position:-208px -32px}.ui-icon-arrowstop-1-s{background-position:-224px -32px}.ui-icon-arrowstop-1-w{background-position:-240px -32px}.ui-icon-arrowthick-1-n{background-position:1px -48px}.ui-icon-arrowthick-1-ne{background-position:-16px -48px}.ui-icon-arrowthick-1-e{background-position:-32px -48px}.ui-icon-arrowthick-1-se{background-position:-48px -48px}.ui-icon-arrowthick-1-s{background-position:-64px -48px}.ui-icon-arrowthick-1-sw{background-position:-80px -48px}.ui-icon-arrowthick-1-w{background-position:-96px -48px}.ui-icon-arrowthick-1-nw{background-position:-112px -48px}.ui-icon-arrowthick-2-n-s{background-position:-128px -48px}.ui-icon-arrowthick-2-ne-sw{background-position:-144px -48px}.ui-icon-arrowthick-2-e-w{background-position:-160px -48px}.ui-icon-arrowthick-2-se-nw{background-position:-176px -48px}.ui-icon-arrowthickstop-1-n{background-position:-192px -48px}.ui-icon-arrowthickstop-1-e{background-position:-208px -48px}.ui-icon-arrowthickstop-1-s{background-position:-224px -48px}.ui-icon-arrowthickstop-1-w{background-position:-240px -48px}.ui-icon-arrowreturnthick-1-w{background-position:0 -64px}.ui-icon-arrowreturnthick-1-n{background-position:-16px -64px}.ui-icon-arrowreturnthick-1-e{background-position:-32px -64px}.ui-icon-arrowreturnthick-1-s{background-position:-48px -64px}.ui-icon-arrowreturn-1-w{background-position:-64px -64px}.ui-icon-arrowreturn-1-n{background-position:-80px -64px}.ui-icon-arrowreturn-1-e{background-position:-96px -64px}.ui-icon-arrowreturn-1-s{background-position:-112px -64px}.ui-icon-arrowrefresh-1-w{background-position:-128px -64px}.ui-icon-arrowrefresh-1-n{background-position:-144px -64px}.ui-icon-arrowrefresh-1-e{background-position:-160px -64px}.ui-icon-arrowrefresh-1-s{background-position:-176px -64px}.ui-icon-arrow-4{background-position:0 -80px}.ui-icon-arrow-4-diag{background-position:-16px -80px}.ui-icon-extlink{background-position:-32px -80px}.ui-icon-newwin{background-position:-48px -80px}.ui-icon-refresh{background-position:-64px -80px}.ui-icon-shuffle{background-position:-80px -80px}.ui-icon-transfer-e-w{background-position:-96px -80px}.ui-icon-transferthick-e-w{background-position:-112px -80px}.ui-icon-folder-collapsed{background-position:0 -96px}.ui-icon-folder-open{background-position:-16px -96px}.ui-icon-document{background-position:-32px -96px}.ui-icon-document-b{background-position:-48px -96px}.ui-icon-note{background-position:-64px -96px}.ui-icon-mail-closed{background-position:-80px -96px}.ui-icon-mail-open{background-position:-96px -96px}.ui-icon-suitcase{background-position:-112px -96px}.ui-icon-comment{background-position:-128px -96px}.ui-icon-person{background-position:-144px -96px}.ui-icon-print{background-position:-160px -96px}.ui-icon-trash{background-position:-176px -96px}.ui-icon-locked{background-position:-192px -96px}.ui-icon-unlocked{background-position:-208px -96px}.ui-icon-bookmark{background-position:-224px -96px}.ui-icon-tag{background-position:-240px -96px}.ui-icon-home{background-position:0 -112px}.ui-icon-flag{background-position:-16px -112px}.ui-icon-calendar{background-position:-32px -112px}.ui-icon-cart{background-position:-48px -112px}.ui-icon-pencil{background-position:-64px -112px}.ui-icon-clock{background-position:-80px -112px}.ui-icon-disk{background-position:-96px -112px}.ui-icon-calculator{background-position:-112px -112px}.ui-icon-zoomin{background-position:-128px -112px}.ui-icon-zoomout{background-position:-144px -112px}.ui-icon-search{background-position:-160px -112px}.ui-icon-wrench{background-position:-176px -112px}.ui-icon-gear{background-position:-192px -112px}.ui-icon-heart{background-position:-208px -112px}.ui-icon-star{background-position:-224px -112px}.ui-icon-link{background-position:-240px -112px}.ui-icon-cancel{background-position:0 -128px}.ui-icon-plus{background-position:-16px -128px}.ui-icon-plusthick{background-position:-32px -128px}.ui-icon-minus{background-position:-48px -128px}.ui-icon-minusthick{background-position:-64px -128px}.ui-icon-close{background-position:-80px -128px}.ui-icon-closethick{background-position:-96px -128px}.ui-icon-key{background-position:-112px -128px}.ui-icon-lightbulb{background-position:-128px -128px}.ui-icon-scissors{background-position:-144px -128px}.ui-icon-clipboard{background-position:-160px -128px}.ui-icon-copy{background-position:-176px -128px}.ui-icon-contact{background-position:-192px -128px}.ui-icon-image{background-position:-208px -128px}.ui-icon-video{background-position:-224px -128px}.ui-icon-script{background-position:-240px -128px}.ui-icon-alert{background-position:0 -144px}.ui-icon-info{background-position:-16px -144px}.ui-icon-notice{background-position:-32px -144px}.ui-icon-help{background-position:-48px -144px}.ui-icon-check{background-position:-64px -144px}.ui-icon-bullet{background-position:-80px -144px}.ui-icon-radio-on{background-position:-96px -144px}.ui-icon-radio-off{background-position:-112px -144px}.ui-icon-pin-w{background-position:-128px -144px}.ui-icon-pin-s{background-position:-144px -144px}.ui-icon-play{background-position:0 -160px}.ui-icon-pause{background-position:-16px -160px}.ui-icon-seek-next{background-position:-32px -160px}.ui-icon-seek-prev{background-position:-48px -160px}.ui-icon-seek-end{background-position:-64px -160px}.ui-icon-seek-start{background-position:-80px -160px}.ui-icon-seek-first{background-position:-80px -160px}.ui-icon-stop{background-position:-96px -160px}.ui-icon-eject{background-position:-112px -160px}.ui-icon-volume-off{background-position:-128px -160px}.ui-icon-volume-on{background-position:-144px -160px}.ui-icon-power{background-position:0 -176px}.ui-icon-signal-diag{background-position:-16px -176px}.ui-icon-signal{background-position:-32px -176px}.ui-icon-battery-0{background-position:-48px -176px}.ui-icon-battery-1{background-position:-64px -176px}.ui-icon-battery-2{background-position:-80px -176px}.ui-icon-battery-3{background-position:-96px -176px}.ui-icon-circle-plus{background-position:0 -192px}.ui-icon-circle-minus{background-position:-16px -192px}.ui-icon-circle-close{background-position:-32px -192px}.ui-icon-circle-triangle-e{background-position:-48px -192px}.ui-icon-circle-triangle-s{background-position:-64px -192px}.ui-icon-circle-triangle-w{background-position:-80px -192px}.ui-icon-circle-triangle-n{background-position:-96px -192px}.ui-icon-circle-arrow-e{background-position:-112px -192px}.ui-icon-circle-arrow-s{background-position:-128px -192px}.ui-icon-circle-arrow-w{background-position:-144px -192px}.ui-icon-circle-arrow-n{background-position:-160px -192px}.ui-icon-circle-zoomin{background-position:-176px -192px}.ui-icon-circle-zoomout{background-position:-192px -192px}.ui-icon-circle-check{background-position:-208px -192px}.ui-icon-circlesmall-plus{background-position:0 -208px}.ui-icon-circlesmall-minus{background-position:-16px -208px}.ui-icon-circlesmall-close{background-position:-32px -208px}.ui-icon-squaresmall-plus{background-position:-48px -208px}.ui-icon-squaresmall-minus{background-position:-64px -208px}.ui-icon-squaresmall-close{background-position:-80px -208px}.ui-icon-grip-dotted-vertical{background-position:0 -224px}.ui-icon-grip-dotted-horizontal{background-position:-16px -224px}.ui-icon-grip-solid-vertical{background-position:-32px -224px}.ui-icon-grip-solid-horizontal{background-position:-48px -224px}.ui-icon-gripsmall-diagonal-se{background-position:-64px -224px}.ui-icon-grip-diagonal-se{background-position:-80px -224px}.ui-corner-all,.ui-corner-top,.ui-corner-left,.ui-corner-tl{border-top-left-radius:4px}.ui-corner-all,.ui-corner-top,.ui-corner-right,.ui-corner-tr{border-top-right-radius:4px}.ui-corner-all,.ui-corner-bottom,.ui-corner-left,.ui-corner-bl{border-bottom-left-radius:4px}.ui-corner-all,.ui-corner-bottom,.ui-corner-right,.ui-corner-br{border-bottom-right-radius:4px}.ui-widget-overlay{background:#aaa;opacity:.3;filter:Alpha(Opacity=30)}.ui-widget-shadow{-webkit-box-shadow:-8px -8px 8px #aaa;box-shadow:-8px -8px 8px #aaa} -------------------------------------------------------------------------------- /JavaDocs/cl/mariofinale/VillagerSaver_Commands.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | VillagerSaver_Commands 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 25 | 28 |
    29 | 66 |
    67 |
    68 | 69 |
    70 | 71 |

    Class VillagerSaver_Commands

    72 |
    73 |
    java.lang.Object 74 |
    cl.mariofinale.VillagerSaver_Commands
    75 |
    76 |
    77 |
    78 |
    All Implemented Interfaces:
    79 |
    org.bukkit.command.CommandExecutor
    80 |
    81 |
    82 |
    public class VillagerSaver_Commands 83 | extends Object 84 | implements org.bukkit.command.CommandExecutor
    85 |
    Class that handles the commands for the VillagerSaver plugin.
    86 |
    87 |
    88 |
      89 | 90 |
    • 91 |
      92 |

      Constructor Summary

      93 |
      Constructors
      94 |
      95 |
      Constructor
      96 |
      Description
      97 | 98 |
       
      99 |
      100 |
      101 |
    • 102 | 103 |
    • 104 |
      105 |

      Method Summary

      106 |
      107 |
      108 |
      109 |
      110 |
      Modifier and Type
      111 |
      Method
      112 |
      Description
      113 |
      private static boolean
      114 |
      AddToBlacklistIfWorldExists(org.bukkit.entity.Player player, 115 | String worldName)
      116 |
      117 |
      Adds a world to the blacklist if it exists.
      118 |
      119 |
      boolean
      120 |
      onCommand(org.bukkit.command.CommandSender sender, 121 | org.bukkit.command.Command command, 122 | String label, 123 | String[] args)
      124 |
      125 |
      Handles the execution of a command.
      126 |
      127 |
      private static boolean
      128 |
      RemoveFromTheBlackListIfWorldExists(org.bukkit.entity.Player player, 129 | String worldName)
      130 |
      131 |
      Removes a world from the blacklist if it exists.
      132 |
      133 |
      private static void
      134 |
      SendMessageToPlayer(org.bukkit.entity.Player player, 135 | String message)
      136 |
      137 |
      Sends a message to a player.
      138 |
      139 |
      140 |
      141 |
      142 |
      143 |

      Methods inherited from class java.lang.Object

      144 | clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      145 |
      146 |
    • 147 |
    148 |
    149 |
    150 |
      151 | 152 |
    • 153 |
      154 |

      Constructor Details

      155 |
        156 |
      • 157 |
        158 |

        VillagerSaver_Commands

        159 |
        public VillagerSaver_Commands()
        160 |
        161 |
      • 162 |
      163 |
      164 |
    • 165 | 166 |
    • 167 |
      168 |

      Method Details

      169 |
        170 |
      • 171 |
        172 |

        onCommand

        173 |
        public boolean onCommand(org.bukkit.command.CommandSender sender, 174 | org.bukkit.command.Command command, 175 | String label, 176 | String[] args)
        177 |
        Handles the execution of a command.
        178 |
        179 |
        Specified by:
        180 |
        onCommand in interface org.bukkit.command.CommandExecutor
        181 |
        Parameters:
        182 |
        sender - The sender of the command.
        183 |
        command - The command that was executed.
        184 |
        label - The alias used for the command.
        185 |
        args - The arguments provided with the command.
        186 |
        Returns:
        187 |
        true if the command was executed successfully, false otherwise.
        188 |
        189 |
        190 |
      • 191 |
      • 192 |
        193 |

        AddToBlacklistIfWorldExists

        194 |
        private static boolean AddToBlacklistIfWorldExists(org.bukkit.entity.Player player, 195 | String worldName)
        196 |
        Adds a world to the blacklist if it exists.
        197 |
        198 |
        Parameters:
        199 |
        player - The player executing the command.
        200 |
        worldName - The name of the world to add to the blacklist.
        201 |
        Returns:
        202 |
        true if the world was added to the blacklist, false otherwise.
        203 |
        204 |
        205 |
      • 206 |
      • 207 |
        208 |

        RemoveFromTheBlackListIfWorldExists

        209 |
        private static boolean RemoveFromTheBlackListIfWorldExists(org.bukkit.entity.Player player, 210 | String worldName)
        211 |
        Removes a world from the blacklist if it exists.
        212 |
        213 |
        Parameters:
        214 |
        player - The player executing the command.
        215 |
        worldName - The name of the world to remove from the blacklist.
        216 |
        Returns:
        217 |
        true if the world was removed from the blacklist, false otherwise.
        218 |
        219 |
        220 |
      • 221 |
      • 222 |
        223 |

        SendMessageToPlayer

        224 |
        private static void SendMessageToPlayer(org.bukkit.entity.Player player, 225 | String message)
        226 |
        Sends a message to a player.
        227 |
        228 |
        Parameters:
        229 |
        player - The player to send the message to.
        230 |
        message - The message to send.
        231 |
        232 |
        233 |
      • 234 |
      235 |
      236 |
    • 237 |
    238 |
    239 | 240 |
    241 |
    242 |
    243 | 244 | 245 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | GNU GENERAL PUBLIC LICENSE 2 | Version 2, June 1991 3 | 4 | Copyright (C) 1989, 1991 Free Software Foundation, Inc., 5 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 6 | Everyone is permitted to copy and distribute verbatim copies 7 | of this license document, but changing it is not allowed. 8 | 9 | Preamble 10 | 11 | The licenses for most software are designed to take away your 12 | freedom to share and change it. By contrast, the GNU General Public 13 | License is intended to guarantee your freedom to share and change free 14 | software--to make sure the software is free for all its users. This 15 | General Public License applies to most of the Free Software 16 | Foundation's software and to any other program whose authors commit to 17 | using it. (Some other Free Software Foundation software is covered by 18 | the GNU Lesser General Public License instead.) You can apply it to 19 | your programs, too. 20 | 21 | When we speak of free software, we are referring to freedom, not 22 | price. Our General Public Licenses are designed to make sure that you 23 | have the freedom to distribute copies of free software (and charge for 24 | this service if you wish), that you receive source code or can get it 25 | if you want it, that you can change the software or use pieces of it 26 | in new free programs; and that you know you can do these things. 27 | 28 | To protect your rights, we need to make restrictions that forbid 29 | anyone to deny you these rights or to ask you to surrender the rights. 30 | These restrictions translate to certain responsibilities for you if you 31 | distribute copies of the software, or if you modify it. 32 | 33 | For example, if you distribute copies of such a program, whether 34 | gratis or for a fee, you must give the recipients all the rights that 35 | you have. You must make sure that they, too, receive or can get the 36 | source code. And you must show them these terms so they know their 37 | rights. 38 | 39 | We protect your rights with two steps: (1) copyright the software, and 40 | (2) offer you this license which gives you legal permission to copy, 41 | distribute and/or modify the software. 42 | 43 | Also, for each author's protection and ours, we want to make certain 44 | that everyone understands that there is no warranty for this free 45 | software. If the software is modified by someone else and passed on, we 46 | want its recipients to know that what they have is not the original, so 47 | that any problems introduced by others will not reflect on the original 48 | authors' reputations. 49 | 50 | Finally, any free program is threatened constantly by software 51 | patents. We wish to avoid the danger that redistributors of a free 52 | program will individually obtain patent licenses, in effect making the 53 | program proprietary. To prevent this, we have made it clear that any 54 | patent must be licensed for everyone's free use or not licensed at all. 55 | 56 | The precise terms and conditions for copying, distribution and 57 | modification follow. 58 | 59 | GNU GENERAL PUBLIC LICENSE 60 | TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 61 | 62 | 0. This License applies to any program or other work which contains 63 | a notice placed by the copyright holder saying it may be distributed 64 | under the terms of this General Public License. The "Program", below, 65 | refers to any such program or work, and a "work based on the Program" 66 | means either the Program or any derivative work under copyright law: 67 | that is to say, a work containing the Program or a portion of it, 68 | either verbatim or with modifications and/or translated into another 69 | language. (Hereinafter, translation is included without limitation in 70 | the term "modification".) Each licensee is addressed as "you". 71 | 72 | Activities other than copying, distribution and modification are not 73 | covered by this License; they are outside its scope. The act of 74 | running the Program is not restricted, and the output from the Program 75 | is covered only if its contents constitute a work based on the 76 | Program (independent of having been made by running the Program). 77 | Whether that is true depends on what the Program does. 78 | 79 | 1. You may copy and distribute verbatim copies of the Program's 80 | source code as you receive it, in any medium, provided that you 81 | conspicuously and appropriately publish on each copy an appropriate 82 | copyright notice and disclaimer of warranty; keep intact all the 83 | notices that refer to this License and to the absence of any warranty; 84 | and give any other recipients of the Program a copy of this License 85 | along with the Program. 86 | 87 | You may charge a fee for the physical act of transferring a copy, and 88 | you may at your option offer warranty protection in exchange for a fee. 89 | 90 | 2. You may modify your copy or copies of the Program or any portion 91 | of it, thus forming a work based on the Program, and copy and 92 | distribute such modifications or work under the terms of Section 1 93 | above, provided that you also meet all of these conditions: 94 | 95 | a) You must cause the modified files to carry prominent notices 96 | stating that you changed the files and the date of any change. 97 | 98 | b) You must cause any work that you distribute or publish, that in 99 | whole or in part contains or is derived from the Program or any 100 | part thereof, to be licensed as a whole at no charge to all third 101 | parties under the terms of this License. 102 | 103 | c) If the modified program normally reads commands interactively 104 | when run, you must cause it, when started running for such 105 | interactive use in the most ordinary way, to print or display an 106 | announcement including an appropriate copyright notice and a 107 | notice that there is no warranty (or else, saying that you provide 108 | a warranty) and that users may redistribute the program under 109 | these conditions, and telling the user how to view a copy of this 110 | License. (Exception: if the Program itself is interactive but 111 | does not normally print such an announcement, your work based on 112 | the Program is not required to print an announcement.) 113 | 114 | These requirements apply to the modified work as a whole. If 115 | identifiable sections of that work are not derived from the Program, 116 | and can be reasonably considered independent and separate works in 117 | themselves, then this License, and its terms, do not apply to those 118 | sections when you distribute them as separate works. But when you 119 | distribute the same sections as part of a whole which is a work based 120 | on the Program, the distribution of the whole must be on the terms of 121 | this License, whose permissions for other licensees extend to the 122 | entire whole, and thus to each and every part regardless of who wrote it. 123 | 124 | Thus, it is not the intent of this section to claim rights or contest 125 | your rights to work written entirely by you; rather, the intent is to 126 | exercise the right to control the distribution of derivative or 127 | collective works based on the Program. 128 | 129 | In addition, mere aggregation of another work not based on the Program 130 | with the Program (or with a work based on the Program) on a volume of 131 | a storage or distribution medium does not bring the other work under 132 | the scope of this License. 133 | 134 | 3. You may copy and distribute the Program (or a work based on it, 135 | under Section 2) in object code or executable form under the terms of 136 | Sections 1 and 2 above provided that you also do one of the following: 137 | 138 | a) Accompany it with the complete corresponding machine-readable 139 | source code, which must be distributed under the terms of Sections 140 | 1 and 2 above on a medium customarily used for software interchange; or, 141 | 142 | b) Accompany it with a written offer, valid for at least three 143 | years, to give any third party, for a charge no more than your 144 | cost of physically performing source distribution, a complete 145 | machine-readable copy of the corresponding source code, to be 146 | distributed under the terms of Sections 1 and 2 above on a medium 147 | customarily used for software interchange; or, 148 | 149 | c) Accompany it with the information you received as to the offer 150 | to distribute corresponding source code. (This alternative is 151 | allowed only for noncommercial distribution and only if you 152 | received the program in object code or executable form with such 153 | an offer, in accord with Subsection b above.) 154 | 155 | The source code for a work means the preferred form of the work for 156 | making modifications to it. For an executable work, complete source 157 | code means all the source code for all modules it contains, plus any 158 | associated interface definition files, plus the scripts used to 159 | control compilation and installation of the executable. However, as a 160 | special exception, the source code distributed need not include 161 | anything that is normally distributed (in either source or binary 162 | form) with the major components (compiler, kernel, and so on) of the 163 | operating system on which the executable runs, unless that component 164 | itself accompanies the executable. 165 | 166 | If distribution of executable or object code is made by offering 167 | access to copy from a designated place, then offering equivalent 168 | access to copy the source code from the same place counts as 169 | distribution of the source code, even though third parties are not 170 | compelled to copy the source along with the object code. 171 | 172 | 4. You may not copy, modify, sublicense, or distribute the Program 173 | except as expressly provided under this License. Any attempt 174 | otherwise to copy, modify, sublicense or distribute the Program is 175 | void, and will automatically terminate your rights under this License. 176 | However, parties who have received copies, or rights, from you under 177 | this License will not have their licenses terminated so long as such 178 | parties remain in full compliance. 179 | 180 | 5. You are not required to accept this License, since you have not 181 | signed it. However, nothing else grants you permission to modify or 182 | distribute the Program or its derivative works. These actions are 183 | prohibited by law if you do not accept this License. Therefore, by 184 | modifying or distributing the Program (or any work based on the 185 | Program), you indicate your acceptance of this License to do so, and 186 | all its terms and conditions for copying, distributing or modifying 187 | the Program or works based on it. 188 | 189 | 6. Each time you redistribute the Program (or any work based on the 190 | Program), the recipient automatically receives a license from the 191 | original licensor to copy, distribute or modify the Program subject to 192 | these terms and conditions. You may not impose any further 193 | restrictions on the recipients' exercise of the rights granted herein. 194 | You are not responsible for enforcing compliance by third parties to 195 | this License. 196 | 197 | 7. If, as a consequence of a court judgment or allegation of patent 198 | infringement or for any other reason (not limited to patent issues), 199 | conditions are imposed on you (whether by court order, agreement or 200 | otherwise) that contradict the conditions of this License, they do not 201 | excuse you from the conditions of this License. If you cannot 202 | distribute so as to satisfy simultaneously your obligations under this 203 | License and any other pertinent obligations, then as a consequence you 204 | may not distribute the Program at all. For example, if a patent 205 | license would not permit royalty-free redistribution of the Program by 206 | all those who receive copies directly or indirectly through you, then 207 | the only way you could satisfy both it and this License would be to 208 | refrain entirely from distribution of the Program. 209 | 210 | If any portion of this section is held invalid or unenforceable under 211 | any particular circumstance, the balance of the section is intended to 212 | apply and the section as a whole is intended to apply in other 213 | circumstances. 214 | 215 | It is not the purpose of this section to induce you to infringe any 216 | patents or other property right claims or to contest validity of any 217 | such claims; this section has the sole purpose of protecting the 218 | integrity of the free software distribution system, which is 219 | implemented by public license practices. Many people have made 220 | generous contributions to the wide range of software distributed 221 | through that system in reliance on consistent application of that 222 | system; it is up to the author/donor to decide if he or she is willing 223 | to distribute software through any other system and a licensee cannot 224 | impose that choice. 225 | 226 | This section is intended to make thoroughly clear what is believed to 227 | be a consequence of the rest of this License. 228 | 229 | 8. If the distribution and/or use of the Program is restricted in 230 | certain countries either by patents or by copyrighted interfaces, the 231 | original copyright holder who places the Program under this License 232 | may add an explicit geographical distribution limitation excluding 233 | those countries, so that distribution is permitted only in or among 234 | countries not thus excluded. In such case, this License incorporates 235 | the limitation as if written in the body of this License. 236 | 237 | 9. The Free Software Foundation may publish revised and/or new versions 238 | of the General Public License from time to time. Such new versions will 239 | be similar in spirit to the present version, but may differ in detail to 240 | address new problems or concerns. 241 | 242 | Each version is given a distinguishing version number. If the Program 243 | specifies a version number of this License which applies to it and "any 244 | later version", you have the option of following the terms and conditions 245 | either of that version or of any later version published by the Free 246 | Software Foundation. If the Program does not specify a version number of 247 | this License, you may choose any version ever published by the Free Software 248 | Foundation. 249 | 250 | 10. If you wish to incorporate parts of the Program into other free 251 | programs whose distribution conditions are different, write to the author 252 | to ask for permission. For software which is copyrighted by the Free 253 | Software Foundation, write to the Free Software Foundation; we sometimes 254 | make exceptions for this. Our decision will be guided by the two goals 255 | of preserving the free status of all derivatives of our free software and 256 | of promoting the sharing and reuse of software generally. 257 | 258 | NO WARRANTY 259 | 260 | 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY 261 | FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN 262 | OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES 263 | PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED 264 | OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 265 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS 266 | TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE 267 | PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, 268 | REPAIR OR CORRECTION. 269 | 270 | 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 271 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR 272 | REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, 273 | INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING 274 | OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED 275 | TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY 276 | YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER 277 | PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE 278 | POSSIBILITY OF SUCH DAMAGES. 279 | 280 | END OF TERMS AND CONDITIONS 281 | 282 | How to Apply These Terms to Your New Programs 283 | 284 | If you develop a new program, and you want it to be of the greatest 285 | possible use to the public, the best way to achieve this is to make it 286 | free software which everyone can redistribute and change under these terms. 287 | 288 | To do so, attach the following notices to the program. It is safest 289 | to attach them to the start of each source file to most effectively 290 | convey the exclusion of warranty; and each file should have at least 291 | the "copyright" line and a pointer to where the full notice is found. 292 | 293 | 294 | Copyright (C) 295 | 296 | This program is free software; you can redistribute it and/or modify 297 | it under the terms of the GNU General Public License as published by 298 | the Free Software Foundation; either version 2 of the License, or 299 | (at your option) any later version. 300 | 301 | This program is distributed in the hope that it will be useful, 302 | but WITHOUT ANY WARRANTY; without even the implied warranty of 303 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 304 | GNU General Public License for more details. 305 | 306 | You should have received a copy of the GNU General Public License along 307 | with this program; if not, write to the Free Software Foundation, Inc., 308 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 309 | 310 | Also add information on how to contact you by electronic and paper mail. 311 | 312 | If the program is interactive, make it output a short notice like this 313 | when it starts in an interactive mode: 314 | 315 | Gnomovision version 69, Copyright (C) year name of author 316 | Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 317 | This is free software, and you are welcome to redistribute it 318 | under certain conditions; type `show c' for details. 319 | 320 | The hypothetical commands `show w' and `show c' should show the appropriate 321 | parts of the General Public License. Of course, the commands you use may 322 | be called something other than `show w' and `show c'; they could even be 323 | mouse-clicks or menu items--whatever suits your program. 324 | 325 | You should also get your employer (if you work as a programmer) or your 326 | school, if any, to sign a "copyright disclaimer" for the program, if 327 | necessary. Here is a sample; alter the names: 328 | 329 | Yoyodyne, Inc., hereby disclaims all copyright interest in the program 330 | `Gnomovision' (which makes passes at compilers) written by James Hacker. 331 | 332 | , 1 April 1989 333 | Ty Coon, President of Vice 334 | 335 | This General Public License does not permit incorporating your program into 336 | proprietary programs. If your program is a subroutine library, you may 337 | consider it more useful to permit linking proprietary applications with the 338 | library. If this is what you want to do, use the GNU Lesser General 339 | Public License instead of this License. 340 | --------------------------------------------------------------------------------