MCPcopy Create free account
hub / github.com/Neop/mudmap2 / removeInformationColor

Method removeInformationColor

src/main/java/mudmap2/backend/World.java:526–540  ·  view source on GitHub ↗

Removes an information color @param ic @throws java.lang.Exception

(InformationColor ic)

Source from the content-addressed store, hash-verified

524 * @throws java.lang.Exception
525 */
526 public void removeInformationColor(InformationColor ic) throws Exception {
527 if(ic != null){
528 if(!informationColors.containsValue(ic)) throw new Exception("Tried to remove information color that does not belong to this world");
529 // remode from information color list
530 informationColors.remove(ic.getId());
531 // removePlace from places
532 for(Layer layer: getLayers()){
533 for(Place place: layer.getPlaces()){
534 if(place.getInfoRing() == ic) place.setInfoRing(null);
535 }
536 }
537
538 callListeners(ic);
539 }
540 }
541
542 // --------- preference ----------------------------------------------------
543 /**

Callers 2

removeEntryMethod · 0.80

Calls 7

getLayersMethod · 0.95
callListenersMethod · 0.95
getInfoRingMethod · 0.80
setInfoRingMethod · 0.80
removeMethod · 0.65
getIdMethod · 0.45
getPlacesMethod · 0.45

Tested by 1